Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp327891imu; Fri, 16 Nov 2018 03:14:46 -0800 (PST) X-Google-Smtp-Source: AJdET5cCNGiKxerjRjQ1608EYGGmSV53lJJb1LQNmT/AUvkHatbcFoQ5RhlMizqmH26xJm9ZISvC X-Received: by 2002:a63:e20a:: with SMTP id q10mr9352269pgh.206.1542366886820; Fri, 16 Nov 2018 03:14:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542366886; cv=none; d=google.com; s=arc-20160816; b=kytrW0BZpoT2lYqW3A5EkPezxlq9MuZfe+5lCvW05e2BfL5r5iA+CjWm7cIzHy6iVu Ybvlclc/8T+69VCaG4mgo7OjHnLzdjveadjeFR6nBxcfBwWVMllg0k4oUMrcsLUej8ld cuXnqpWef1zlLeh5YMmfnY289q+qrIK4zTorieIDsKPWjM98T+PhFpXNBi3cehPSPvoB aTs2n5pvcWFJXrPQdwsDoOFqBMNcBGpWCO1LVbn0GkLdnziU0hSMw1owv/a5v3wYW1oD hbWCWD9fUUu9hU1kmriX06yj0wGR+dGFGGeZSSUjnUhC0waau7vtEdynN6Lnleii1hmY 1A6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature; bh=OdosYpVI5MatABVZCdWKX1YyOB3vtNQjJIALKwGVCJ4=; b=Djr9cj7DPDB2i6E2CdNkjMEolyrNe2KpWR05umfqLPGQgZjB7+ThuPi+VSB5dhRyJg /zojZFcJUyFm7saHUnqMCRQSYH8lQGJRZq1s/3nydb5bzUsdYFqjlVna4eXJ6V44mFfL es9id7or8+vbfTZ5v6koZOMw1LJQz6wwYtT4K4ppmBYbdsJZi0gzkpblw+hIyrFl/8Wn 10P+xLo7seFWWeeMbLwyG5RjXJA0GRFoUITcxB84MRlDMv9+YmbmPz3BBZMm4NKz81tg jFmo5pOEfCETJ9tdYXHk6HEhQxPFj08G2CFeWBQQBLNDtLNMdYXS8/VWvHle7T6tRMnh +GQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=KX8gD48S; 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 63-v6si34545332pfg.234.2018.11.16.03.14.32; Fri, 16 Nov 2018 03:14:46 -0800 (PST) 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=KX8gD48S; 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 S2389395AbeKPVZp (ORCPT + 99 others); Fri, 16 Nov 2018 16:25:45 -0500 Received: from mail-eopbgr50051.outbound.protection.outlook.com ([40.107.5.51]:28291 "EHLO EUR03-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727734AbeKPVZp (ORCPT ); Fri, 16 Nov 2018 16:25:45 -0500 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=OdosYpVI5MatABVZCdWKX1YyOB3vtNQjJIALKwGVCJ4=; b=KX8gD48SrriZ/UVYVNNy0JX68BOkpAieQ4dLbV8gMx0U9Kd36yT6yxaBob7Rjy4r746Tigi89cFIAdnLLBVGGaFTztNz77IC0MZlu4D4c86J/QiCYbZz7jBpmHs7N2Waya+N5gjnJ7kXfQO7rjEdbWCCNp6HzZx9x4Y6Smw0Py4= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1PR04MB3294.eurprd04.prod.outlook.com (10.170.231.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.27; Fri, 16 Nov 2018 11:13:46 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::297b:bb50:9b83:48e1]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::297b:bb50:9b83:48e1%4]) with mapi id 15.20.1294.045; Fri, 16 Nov 2018 11:13:46 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "marek.vasut@gmail.com" , "broonie@kernel.org" , "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@kontron.de" , "linux-kernel@vger.kernel.org" , Yogesh Narayan Gaur Subject: [PATCH v5 0/5] spi: spi-mem: Add driver for NXP FlexSPI controller Thread-Topic: [PATCH v5 0/5] spi: spi-mem: Add driver for NXP FlexSPI controller Thread-Index: AQHUfZ1xHR0z7dER2Ee8gogEfLBWnw== Date: Fri, 16 Nov 2018 11:13:46 +0000 Message-ID: <1542366701-16065-1-git-send-email-yogeshnarayan.gaur@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SG2PR04CA0149.apcprd04.prod.outlook.com (2603:1096:3:16::33) To VI1PR04MB5726.eurprd04.prod.outlook.com (2603:10a6:803:e4::24) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB3294;6:ypZgXv/BTn/BJITtZR6VKclIBt9YfULqPa/64CSPyWTQ17s3IUrkeHLCZFpnlEpAhhmuLy32+WRl7UjJg2lOCCWWoyXf3h9Dfme74yj6k9lyvX68gDBtvPHHf0zN9gYW103LrM48qMfQ5K9JSbMgAd0jW7x/PnZezsLSxrTWwOIaayryClxJZofOZdpuyigL4DXXyDrmk2HxjQCxK69PsjBW6ep35Mco9CptOmo11pWJR2BChrLQQYp+9yz/qjK5I/tywmRXG39Fa4jctwSSnh4DbxQtUuIHwM11Kh+4FCutMg7gCUyATmF/XSy6crNFBJ5hUR+4dHXpzU1aogWLi++15OXokEf4bcahp7k75tW2T2fR4N8VtrpRxbxYogTkZsNXHvcZsR7L9Q4OUGcCP2NWgAfKsGn4sB/UmCWXdG7/jbeQZaA7z5+IjuHsPe60ii+D3DGWuee+/9V0ekWL2Q==;5:XBCZ7W8iakeMYgwKT3sHUxKmDukwMaXXzRkhnU/p0zNazNqT6JTRDrKVk8ieXlqDFRhrzDblwDPchETiAk1Kav/mocg9mnAjD2o5SXLg4u3BmMg161c1Suo01N0suYI5Ga2lL//hTSstDmoYY1yLewXDWKQIIyJZDWRYvmrlTuY=;7:7AwiSzVbiOXdgy13joTHEobLQr1T1BgJ9Rka7idvVB0vhDG8ar7RtCvmcW8+VH4NFbvvRJJjFzY0n4I9/VGHRVvf9lUdmpTkjaGP3QszLsvVB66+RHMjmoN/T5+GQx/p/8CxypQmN7NQxA3cbN4Wcw== x-ms-office365-filtering-correlation-id: 13231c66-53b0-4e0c-ba25-08d64bb49368 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4618075)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB3294; x-ms-traffictypediagnostic: VI1PR04MB3294: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(264314650089876)(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3231415)(944501410)(52105112)(93006095)(93001095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:VI1PR04MB3294;BCL:0;PCL:0;RULEID:;SRVR:VI1PR04MB3294; x-forefront-prvs: 0858FF8026 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(136003)(366004)(396003)(39860400002)(376002)(199004)(189003)(2906002)(81166006)(8676002)(6436002)(106356001)(81156014)(6486002)(102836004)(25786009)(53936002)(4326008)(316002)(478600001)(8936002)(7416002)(6506007)(55236004)(6306002)(6512007)(386003)(26005)(966005)(105586002)(186003)(54906003)(110136005)(68736007)(14454004)(99286004)(52116002)(2501003)(2900100001)(2201001)(3846002)(6116002)(97736004)(476003)(2616005)(36756003)(78486014)(305945005)(486006)(7736002)(66066001)(256004)(71190400001)(86362001)(71200400001)(39060400002)(5660300001);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB3294;H:VI1PR04MB5726.eurprd04.prod.outlook.com;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-antispam-message-info: uuU9F35lkaWmruuJvCtdPqf2zbsGNS2PoD9fphx0I31CeIqc4GDB8sDbMOujyvnpLNWRp/8wHgfv1R9BmMM/ps8FvL/sY+GO3c9rvtXBZCFXq1HSYElwAPSQ8n5OiPGmpNUqda4FeJ/fOiAKUAG2WbHWtB2tCZiB72TPk1+IzlN0ojsikhIUNlR9nhkAX4fpIkj3VJp0c4PdO52LkdVhztXSM+tT2PCKQfxQcCn82i4R8iq6zTQZnvdf2dqByczI8AVvxSNiIVoHVXY475PFXi69hpx7jWgzh/zAQOK8ZC9+eNfaCnkU3lGeiIvc+6RcH1adRyHrKD90RU38kB2LJotH4P8nS9Tk7LADrzzPmyY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 13231c66-53b0-4e0c-ba25-08d64bb49368 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Nov 2018 11:13:46.5369 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3294 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - Add 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 b= idirectional data lines) i.e. FlexSPI acts as an interface to external devices, maximum 4, each wit= h up to 8 bidirectional data lines. - Tested this driver with mtd_debug(Erase/Write/Read) utility and JFFS2 filesystem mounting and booting on NXP LX2160ARDB[2] and LX2160AQDS target= s. 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] [1] https://www.nxp.com/docs/en/reference-manual/IMXRT1050RM.pdf [2] https://patchwork.kernel.org/project/linux-arm-kernel/list/?submitter= =3D182097 [3] https://patchwork.ozlabs.org/project/linux-mtd/list/?series=3D70384 Yogesh Gaur (5): spi: spi-mem: Add driver for NXP FlexSPI controller dt-bindings: spi: add binding file for NXP FlexSPI controller arm64: dts: lx2160a: add FlexSPI node property arm64: defconfig: enable NXP FlexSPI driver MAINTAINERS: add maintainers for the NXP FlexSPI driver Changes for v5: - Rebase on top of v4.20-rc2 - Incorporated review comments for patch 'spi: spi-mem: Add driver for NXP FlexSPI controller'. Changes for v4: - Incorporated review comments for patch 'spi: spi-mem: Add driver for NXP FlexSPI controller'. - Incorporated binding file review comments. Changes for v3: - Incorporated review comments for patch 'spi: spi-mem: Add driver for NXP FlexSPI controller'. Changes for v2: - Incorporated Boris review comments and drop below patches as per the comm= ents. - Patch 'spi: add slave device size in spi_device struct' - Patch 'spi: add flags for octal I/O data transfer' - Incorporated DTS and Binding file review comments of Shawn Guo and Rob He= rring. .../devicetree/bindings/spi/spi-nxp-fspi.txt | 39 + MAINTAINERS | 7 + arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 22 + arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi | 13 + arch/arm64/configs/defconfig | 1 + drivers/spi/Kconfig | 10 + drivers/spi/Makefile | 1 + drivers/spi/spi-nxp-fspi.c | 1145 ++++++++++++++++= ++++ 8 files changed, 1238 insertions(+) create mode 100644 Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt create mode 100644 drivers/spi/spi-nxp-fspi.c --=20 2.7.4