Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp399832imm; Fri, 31 Aug 2018 03:36:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZvAAnbjl4H5cy7YieLbELnmiSRjbACL33xvZktT4uSxwPxhL1ujX4RtY9m3tMXAeXGEYfX X-Received: by 2002:a63:a54f:: with SMTP id r15-v6mr13656509pgu.336.1535711764409; Fri, 31 Aug 2018 03:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535711764; cv=none; d=google.com; s=arc-20160816; b=PxRzxVFzYmGwm3P2oI7oKCSEgbsM/OHcX3oBx+C1+tEpeIbRMAm+m2dgYMZOi6xRQ1 /kw0XGM3L7ugE8EJXgMNyM1zLHhpUArk4MtX5flnau95g4KcO4On/OyKf6S80vCGfTBK wFw2cMYxp8IUSY6rJjYDoPE6G1etuXh/j7fdVqM/eLXE+wbb2bu4NWq0Y/i47SWoprI9 RB8dSTY5h7mljxbUqhsQtXTu7Vq3v69aWdmE+2N13/x7T/UaHAs+mWTHIJsftr9eSx21 UDlsH965/zZUY3+WDLK3p7j4vMa0x8C5CzVJ0yPMggkBEicaLS6UwoWLnAsmL7FsF7Fq Shqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=HVJYJByjbRmFg5/E79vwlz8FXMJO1aWss5f5vpPCN9o=; b=RDhjMCBBddn8v/L4E/CnpRTgtKdEIS70efUifNXJp+Y1/HUCE/j39VVL3dH1HnhfaP /WvVOBDOZF1p0JQZ00eYysxalcDGROou1kYl1q0mP7U7ibYUHbYxGewRWT0leI0fK/mI 0aiqV/KwTNWLRFJOBP0KVkPpGSiLLf8rjj81imOV/PkKDlHOte901JQQEo0K1jrTzaEJ XHFHd1C6cVPUlMo5WptO7qQ/+QEqOmT66x/dQ8IQY1OWnnz551Pl+o4RCUAxu0RZmjZW xfNxG6inPrCcOAKBWWkETRp4hjak+/aEyRmf69FluRoN512O/oBtYPchtIJEJunZQxJq dEqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=EODYBmoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5-v6si9538767pgf.529.2018.08.31.03.35.49; Fri, 31 Aug 2018 03:36:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=EODYBmoY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728317AbeHaOiv (ORCPT + 99 others); Fri, 31 Aug 2018 10:38:51 -0400 Received: from mail-eopbgr30055.outbound.protection.outlook.com ([40.107.3.55]:51264 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726493AbeHaOiu (ORCPT ); Fri, 31 Aug 2018 10:38:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HVJYJByjbRmFg5/E79vwlz8FXMJO1aWss5f5vpPCN9o=; b=EODYBmoYp0x3OKNk+gbaeAxeHYixv0NhK+XBX6Gs66yHGduigN9md2RpAVWPPuSB5Ub/+SzdvyMe0747BAeAoLeEFdESnWGo8CMVJzggnIDi0ZbIgs/28j+bcbniCv5/sZN5+axwZRqOdEUk7IQdzkIqh+X4JsX12cTUU70hir4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; Received: from idcbfarm.ap.freescale.net (14.143.30.134) by HE1PR04MB1034.eurprd04.prod.outlook.com (2a01:111:e400:581a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1101.16; Fri, 31 Aug 2018 10:31:49 +0000 From: Yogesh Gaur To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com, marek.vasut@gmail.com, linux-spi@vger.kernel.org, devicetree@vger.kernel.org Cc: robh@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, computersforpeace@gmail.com, frieder.schrempf@exceet.de, linux-kernel@vger.kernel.org, Yogesh Gaur Subject: [PATCH 0/7] spi: spi-mem: Add a driver for NXP FlexSPI controller Date: Fri, 31 Aug 2018 15:59:57 +0530 Message-Id: <1535711404-29528-1-git-send-email-yogeshnarayan.gaur@nxp.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: SG2PR01CA0100.apcprd01.prod.exchangelabs.com (2603:1096:3:15::26) To HE1PR04MB1034.eurprd04.prod.outlook.com (2a01:111:e400:581a::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3bd751a7-7223-40e6-62f7-08d60f2cf87c X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989137)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:HE1PR04MB1034; X-Microsoft-Exchange-Diagnostics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5sGrkQ/iHJSWAuBh/r+Wi30Jjp89QSCyz14iruBBnaaOhgLGWIc39PX6sD0bF63c3n8C+mlJyCQifV9ACHJfCSIL/O8iAvcbv0KXzw36VePnHhvAgSXtxx3IYYNQMkbH/+gdJAOXzZzHjl9UyeZnF7dhx161hFTvocZlq8QXT9qMz2GsXCHYeXexiDBQZWotD8UWJ9eoZXYupG7fu64AyNnHM/XAyZRK/e62IN2mn4QyDNxsemHyHCRMl6bp23PO+yPbIKZ8cQnCv6rsWteu2VE+Is7VvoPV1IdaCGq16jJIZrpb/xvqu1cj2+fGLvTE1WN2NLjGlQATHdmTh7CCNbG6zE14ZMELbAcUIWNRmeZFyiqFJWVEeCOeB4lBDu/vUuBw1olpU7NDR4UhahzwH;4:4dTaWDu4hsluPKQSLDtDVEX2tqy2QoX1tc7F5ij87P19YEYmJ/eyys2X1S7dBEjnWUM8qd/MzNK1faC+rE/i+96UbBAwRgdKOTCCEyXgwNVT0XFR6xgBB2As0V9dQcjJKQnaLQ3mObQeAJNxICyeE3J6MQ5CqrynSGLH/9dKiycvuptn4Hu9LsyzWFTgvb/LobrBydniT628/n/Jc5kcqTajoWcMrOnqaZiYywEaxCriA8K8dRCWFkNuBC9BzSG0clwUqpu8HmHlS0am5qAOCOkMW+zTLw+5+ZDqZR3XaoVlRq+RNiLmsl9Ca8ErBIeNpyDJO2tMrYumBgnRa05tgZOO8lmPgRimbViro6RfS+k= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(264314650089876); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823301075)(10201501046)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699016);SRVR:HE1PR04MB1034;BCL:0;PCL:0;RULEID:;SRVR:HE1PR04MB1034; X-Forefront-PRVS: 07817FCC2D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(396003)(39850400004)(376002)(346002)(366004)(136003)(199004)(189003)(48376002)(7736002)(7416002)(8936002)(105586002)(5009440100003)(52116002)(106356001)(51416003)(55236004)(386003)(6506007)(81156014)(81166006)(2906002)(86362001)(3846002)(186003)(50466002)(16526019)(6116002)(305945005)(26005)(6486002)(66066001)(47776003)(25786009)(36756003)(5660300001)(97736004)(8676002)(53936002)(6512007)(6306002)(50226002)(316002)(6666003)(39060400002)(68736007)(486006)(4326008)(966005)(16586007)(478600001)(2616005)(476003)(956004)(110426005);DIR:OUT;SFP:1101;SCL:1;SRVR:HE1PR04MB1034;H:idcbfarm.ap.freescale.net;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR04MB1034;23:5xRuJJULWzwVORPRmyHcRz3+OhdUdpc5AwUghh4C1?= =?us-ascii?Q?O5nx0uFz1iw90gN8Fhi3ZHSpKPyGq8ZQslnQnG1FmYIu8no+21hIOcTDeN8O?= =?us-ascii?Q?q1hcp7sr7Cl9J3FtC2BsE2C461b5f227GVeOj3Jup+01kHvYtpvD4LNsxEYQ?= =?us-ascii?Q?Rie59n6PBcd7+OLy10pMa0l0qx2sMLmxvXvRxCDK/oeSrkWbxCsW5lIT69oq?= =?us-ascii?Q?4k+xYWXo6kyp333L60UM8WECvxWu+wt9j0Dh6bKVBkA3bx30vIkDDv+HPJyw?= =?us-ascii?Q?NjlIF7UR5UytHdDUA5+CsHtYaft5ZTRUIOOa0JVjVYTJGetxkQ1Un+Wxa4gC?= =?us-ascii?Q?XjViDWhRe8opy6T1sOCw0K4AQqndYyfwY6kprRSiXqb99UyTEPDLyBcygP1e?= =?us-ascii?Q?QESh/nQ30P9Ru0Vdunki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21cndyGEu8GAP5PougzUDhwPon/grJFYeSgP7lvGfr+bB7tA/qbEua8YThbYlEEI2goebxmGa6wFBhZTFUOqkBd5IOnD5mwFQs98t09xYkk2f4MbpsarUtDuPE4YZsVVJZ+whHxH5GBkUZ5WD8JwFepNcJ5c4voBh+c4eMBsigf1opoOpV4FCHIiKnvf2SDMsM9f40t32F5Ozm0kFYVpb6hLUZjFAV2o+e6tq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2018 10:31:49.5289 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bd751a7-7223-40e6-62f7-08d60f2cf87c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR04MB1034 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - Add a driver for NXP FlexSPI host controller FlexSPI is a flexsible SPI host controller [1], Chapter 30 page 1475, which supports two SPI channels and up to 4 external devices. Each channel supports Single/Dual/Quad/Octal mode data transfer (1/2/4/8 bidirectional data lines) i.e. FlexSPI acts as an interface to external devices, maximum 4, each with up to 8 bidirectional data lines. FlexSPI controller is similar to the existing Freescale/NXP QuadSPI controller with advanced features. - Tested this driver with mtd_debug(Erase/Write/Read) utility and JFFS2 filesystem mounting and booting on NXP LX2160ARDB[2] and LX2160AQDS targets. LX2160ARDB is having two NOR slave device connected on single bus A i.e. A0 and A1 (CS0 and CS1). LX2160AQDS is having two NOR slave device connected on separate buses one flash on A0 and second on B1 i.e. (CS0 and CS3). Verified this driver on following SPI NOR flashes: Micron, mt35xu512aba[3], [Read - 1 bit mode] Cypress, s25fl512s, [Read - 1/2/4 bit mode] Patch 1 adds variable size in spi_device struct, to save the size of connected slave device. Patch 2 adds flags for octal I/O data transfer. Support for octal flash commands and other framework changes would going to be done in different patch set. Patch 3 adds a driver for the NXP FlexSPI controller, driver is based on new spi-mem framework. Patch 4 add binding file for this driver. Patch 5 add device node property for FlexSPI driver for lx2160 SoC. Patch 6 enables the config option. Patch 7 add MAINTAINERS file. [1] https://www.nxp.com/docs/en/reference-manual/IMXRT1050RM.pdf [2] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=9721 [3] https://patchwork.ozlabs.org/project/linux-mtd/list/?series=63445 This series adds below patches: Yogesh Gaur (7): spi: add slave device size in spi_device struct spi: add flags for octal I/O data transfer spi: spi-mem: Add a driver for NXP FlexSPI controller dt-bindings: spi: add binding file for NXP FlexSPI driver arm64: dts: lx2160a: add fspi node property arm64: defconfig: enable NXP FlexSPI driver MAINTAINERS: add maintainers for the NXP FlexSPI driver .../devicetree/bindings/spi/spi-nxp-fspi.txt | 42 + MAINTAINERS | 6 + arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 21 + arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 12 + arch/arm64/configs/defconfig | 1 + drivers/mtd/devices/m25p80.c | 6 + drivers/mtd/spi-nor/spi-nor.c | 2 + drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-nxp-fspi.c | 1242 ++++++++++++++++++++ include/linux/spi/spi.h | 4 + 11 files changed, 1347 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt create mode 100644 drivers/spi/spi-nxp-fspi.c -- 2.7.4