From patchwork Tue Jan 15 10:05:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10764175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6D7214E5 for ; Tue, 15 Jan 2019 10:05:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A63172AC61 for ; Tue, 15 Jan 2019 10:05:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 994312AC8A; Tue, 15 Jan 2019 10:05:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2DC12AC61 for ; Tue, 15 Jan 2019 10:05:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbfAOKFd (ORCPT ); Tue, 15 Jan 2019 05:05:33 -0500 Received: from mail-eopbgr10087.outbound.protection.outlook.com ([40.107.1.87]:38816 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727221AbfAOKFc (ORCPT ); Tue, 15 Jan 2019 05:05:32 -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=fzyxst+PTiRkkAIdab37IGTQhp9IR4kHAFdInXWUMeo=; b=Dw52r3YdG4xIHsOgVJG9ECPwGEHXrFFJ+Me/8GR/Fe8B3zmqTftH0MdFTsd7Bd+ip53Jz6j89QeAS4VqKdv9qiVcPklA9egx1Uk+my4HdN6x6T2gwDFp1MtOdYC6zTeRgdNtqUMPK1whfwkEPlYod94/wwa/Bqmgr/1E2vvMNnA= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1SPR01MB10.eurprd04.prod.outlook.com (10.170.239.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 10:05:10 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 10:05:10 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "tudor.ambarus@microchip.com" , "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 Narayan Gaur Subject: [PATCH v7 1/5] mtd: spi-nor: add opcodes for octal Read/Write commands Thread-Topic: [PATCH v7 1/5] mtd: spi-nor: add opcodes for octal Read/Write commands Thread-Index: AQHUrLnM7+Ij20wb5EO5zed9O3cV1w== Date: Tue, 15 Jan 2019 10:05:10 +0000 Message-ID: <1547546584-5254-2-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1547546584-5254-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1547546584-5254-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: SG2PR06CA0123.apcprd06.prod.outlook.com (2603:1096:1:1d::25) To VI1PR04MB5726.eurprd04.prod.outlook.com (2603:10a6:803:e4::24) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1SPR01MB10;6:oRWgzD5By+dTE8v80PgBDlw7ZF6JwnYkMvlXj46EkcV0qHUurBbnkyF4RTyjMLiCEE+azfmxKmscu1lw1O5mnmeqfU/48NtyUVLd3buy7OCsr6dHlMzy02X49lOrC/ZAONn60b1IoXa4eXcntoLZ6DUWCoB7qzaDufNcG7KEngBtLIkrvHf+nNkYK1/askvn22Ya2VXJodaYL6UGkIsdcBf1IASjdIKGFXB1ElkgaOGrf2teTd+DS9+CVq1+bp/iwOHKhTV+nsi88I147psDXhD4IJF7t5uIegNkjACp52Jl+UxyIeaBzEDG0mk4dp2+zwnKLnDVbn/SZj0L2bSPulE+72cFzCno03bcy6C9ee61qxp4XP6Y8JZfKv+qc45veFebb6Gqd1ZivD3MQzT/kxUZ7F52by1DOUxIqtwXu7u6CpbvpVeUf9Zi5qzkowABCj82PQt4OZdwPYk4z3RYsg==;5:m/t5+/BE63SfVlIrDmBxkOaW2QzJtjk/mq/43vTpKF+FrRTQbTYrxb2+O7mFykYhnPrzWmS5qM3F0jp0TWGqLCXZbbe3EBFhy0hw5TUSAaTmZT0HOkBHzjIO4qH7VelB8wM7KlNlCW+fFnOjinreC60zMicRFR6ojFMXSAZ3XVKeOXAWGStWDPsiUnDNAbkbbZsnZb/HPVgBZOklnv/COg==;7:o4QXDcK2mPryXRhX/+qqYiqrNe695mgjP/CoKWHBqsil1F/dpYYVsOij0eOaatb/EU9BtHpUVeirG55KMMPeIikwH3R7zN1tA9wqqsuwgiNNYPw6+vdaI+07aEekrEWInegX9v/CpsEFOX3KjQOWIw== x-ms-office365-filtering-correlation-id: ccd3a162-7306-4c21-75d8-08d67ad0eef8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1SPR01MB10; x-ms-traffictypediagnostic: VI1SPR01MB10: x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(366004)(136003)(396003)(346002)(199004)(189003)(6486002)(97736004)(2501003)(6506007)(386003)(316002)(53936002)(55236004)(102836004)(5660300001)(106356001)(105586002)(68736007)(52116002)(36756003)(76176011)(86362001)(11346002)(71200400001)(3846002)(71190400001)(2906002)(446003)(6512007)(256004)(486006)(14454004)(2616005)(476003)(7416002)(78486014)(99286004)(25786009)(8676002)(6346003)(81166006)(81156014)(186003)(4326008)(2201001)(6436002)(8936002)(26005)(478600001)(66066001)(54906003)(305945005)(39060400002)(6116002)(110136005)(50226002)(7736002)(21314003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1SPR01MB10;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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: qHzJHsnm5lj2uVr/LFdqQZVZB2H78xNBopzemxYNjbnhjy+ONvdgRQn+0vEbGwwJMy+o6JQBTnTRVb/sX/8nR52Ny8AqTC29LRI/YzQN1o+LC0hz9OiSU3g6dsFW2XaZA1dKFLawGaMvWaiHuEEY6+htdIK8kfD+g6+TCha0NPjhXak6/5QxS33UAQ/GmFutMiX+bl5IYDqmyOgs5x6q3TO/tMAdDPhDN40PbAY+PyZjffpOMJIq+4FudAuD0h+MvdNAkzaqbE02WtURdb2MzFF/zw7bVDdQSNl6zcXzCR7hr3B0ri97trPP2oeOxSxUYIg2rixb5VXBjH9eFc7mPAMvL02lzZDH5fObZEq9Xm8TP9XTxh4ZH37hOmTxrDtb8IXmS3uGu10RChtdYgUe2iWggtD9q3ey1mTv5DqFvVQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccd3a162-7306-4c21-75d8-08d67ad0eef8 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 10:05:04.5705 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR01MB10 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP - Add opcodes for octal I/O commands * Read : 1-1-8 and 1-8-8 protocol * Write : 1-1-8 and 1-8-8 protocol * opcodes for 4-byte address mode command - Entry of macros in _convert_3to4_xxx function - Add flag SPI_NOR_OCTAL_READ specifying flash support octal read commands. This flag is required for flashes which didn't provides support for auto detection of Octal mode capabilities i.e. not seems to support newer JESD216C standard. Signed-off-by: Vignesh R Signed-off-by: Yogesh Narayan Gaur Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 16 ++++++++++++++-- include/linux/mtd/spi-nor.h | 16 ++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 6e13bbd1aaa5..872d70722672 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -68,7 +68,7 @@ enum spi_nor_read_command_index { SNOR_CMD_READ_4_4_4, SNOR_CMD_READ_1_4_4_DTR, - /* Octo SPI */ + /* Octal SPI */ SNOR_CMD_READ_1_1_8, SNOR_CMD_READ_1_8_8, SNOR_CMD_READ_8_8_8, @@ -85,7 +85,7 @@ enum spi_nor_pp_command_index { SNOR_CMD_PP_1_4_4, SNOR_CMD_PP_4_4_4, - /* Octo SPI */ + /* Octal SPI */ SNOR_CMD_PP_1_1_8, SNOR_CMD_PP_1_8_8, SNOR_CMD_PP_8_8_8, @@ -278,6 +278,7 @@ struct flash_info { #define NO_CHIP_ERASE BIT(12) /* Chip does not support chip erase */ #define SPI_NOR_SKIP_SFDP BIT(13) /* Skip parsing of SFDP tables */ #define USE_CLSR BIT(14) /* use CLSR command */ +#define SPI_NOR_OCTAL_READ BIT(15) /* Flash supports Octal Read */ /* Part specific fixup hooks. */ const struct spi_nor_fixups *fixups; @@ -398,6 +399,8 @@ static u8 spi_nor_convert_3to4_read(u8 opcode) { SPINOR_OP_READ_1_2_2, SPINOR_OP_READ_1_2_2_4B }, { SPINOR_OP_READ_1_1_4, SPINOR_OP_READ_1_1_4_4B }, { SPINOR_OP_READ_1_4_4, SPINOR_OP_READ_1_4_4_4B }, + { SPINOR_OP_READ_1_1_8, SPINOR_OP_READ_1_1_8_4B }, + { SPINOR_OP_READ_1_8_8, SPINOR_OP_READ_1_8_8_4B }, { SPINOR_OP_READ_1_1_1_DTR, SPINOR_OP_READ_1_1_1_DTR_4B }, { SPINOR_OP_READ_1_2_2_DTR, SPINOR_OP_READ_1_2_2_DTR_4B }, @@ -414,6 +417,8 @@ static u8 spi_nor_convert_3to4_program(u8 opcode) { SPINOR_OP_PP, SPINOR_OP_PP_4B }, { SPINOR_OP_PP_1_1_4, SPINOR_OP_PP_1_1_4_4B }, { SPINOR_OP_PP_1_4_4, SPINOR_OP_PP_1_4_4_4B }, + { SPINOR_OP_PP_1_1_8, SPINOR_OP_PP_1_1_8_4B }, + { SPINOR_OP_PP_1_8_8, SPINOR_OP_PP_1_8_8_4B }, }; return spi_nor_convert_opcode(opcode, spi_nor_3to4_program, @@ -3591,6 +3596,13 @@ static int spi_nor_init_params(struct spi_nor *nor, SNOR_PROTO_1_1_4); } + if (info->flags & SPI_NOR_OCTAL_READ) { + params->hwcaps.mask |= SNOR_HWCAPS_READ_1_1_8; + spi_nor_set_read_settings(¶ms->reads[SNOR_CMD_READ_1_1_8], + 0, 8, SPINOR_OP_READ_1_1_8, + SNOR_PROTO_1_1_8); + } + /* Page Program settings. */ params->hwcaps.mask |= SNOR_HWCAPS_PP; spi_nor_set_pp_settings(¶ms->page_programs[SNOR_CMD_PP], diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h index fa2d89e38e40..2353af8bac99 100644 --- a/include/linux/mtd/spi-nor.h +++ b/include/linux/mtd/spi-nor.h @@ -46,9 +46,13 @@ #define SPINOR_OP_READ_1_2_2 0xbb /* Read data bytes (Dual I/O SPI) */ #define SPINOR_OP_READ_1_1_4 0x6b /* Read data bytes (Quad Output SPI) */ #define SPINOR_OP_READ_1_4_4 0xeb /* Read data bytes (Quad I/O SPI) */ +#define SPINOR_OP_READ_1_1_8 0x8b /* Read data bytes (Octal Output SPI) */ +#define SPINOR_OP_READ_1_8_8 0xcb /* Read data bytes (Octal I/O SPI) */ #define SPINOR_OP_PP 0x02 /* Page program (up to 256 bytes) */ #define SPINOR_OP_PP_1_1_4 0x32 /* Quad page program */ #define SPINOR_OP_PP_1_4_4 0x38 /* Quad page program */ +#define SPINOR_OP_PP_1_1_8 0x82 /* Octal page program */ +#define SPINOR_OP_PP_1_8_8 0xc2 /* Octal page program */ #define SPINOR_OP_BE_4K 0x20 /* Erase 4KiB block */ #define SPINOR_OP_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips */ #define SPINOR_OP_BE_32K 0x52 /* Erase 32KiB block */ @@ -69,9 +73,13 @@ #define SPINOR_OP_READ_1_2_2_4B 0xbc /* Read data bytes (Dual I/O SPI) */ #define SPINOR_OP_READ_1_1_4_4B 0x6c /* Read data bytes (Quad Output SPI) */ #define SPINOR_OP_READ_1_4_4_4B 0xec /* Read data bytes (Quad I/O SPI) */ +#define SPINOR_OP_READ_1_1_8_4B 0x7c /* Read data bytes (Octal Output SPI) */ +#define SPINOR_OP_READ_1_8_8_4B 0xcc /* Read data bytes (Octal I/O SPI) */ #define SPINOR_OP_PP_4B 0x12 /* Page program (up to 256 bytes) */ #define SPINOR_OP_PP_1_1_4_4B 0x34 /* Quad page program */ #define SPINOR_OP_PP_1_4_4_4B 0x3e /* Quad page program */ +#define SPINOR_OP_PP_1_1_8_4B 0x84 /* Octal page program */ +#define SPINOR_OP_PP_1_8_8_4B 0x8e /* Octal page program */ #define SPINOR_OP_BE_4K_4B 0x21 /* Erase 4KiB block */ #define SPINOR_OP_BE_32K_4B 0x5c /* Erase 32KiB block */ #define SPINOR_OP_SE_4B 0xdc /* Sector erase (usually 64KiB) */ @@ -458,7 +466,7 @@ struct spi_nor_hwcaps { /* *(Fast) Read capabilities. * MUST be ordered by priority: the higher bit position, the higher priority. - * As a matter of performances, it is relevant to use Octo SPI protocols first, + * As a matter of performances, it is relevant to use Octal SPI protocols first, * then Quad SPI protocols before Dual SPI protocols, Fast Read and lastly * (Slow) Read. */ @@ -479,7 +487,7 @@ struct spi_nor_hwcaps { #define SNOR_HWCAPS_READ_4_4_4 BIT(9) #define SNOR_HWCAPS_READ_1_4_4_DTR BIT(10) -#define SNOR_HWCPAS_READ_OCTO GENMASK(14, 11) +#define SNOR_HWCPAS_READ_OCTAL GENMASK(14, 11) #define SNOR_HWCAPS_READ_1_1_8 BIT(11) #define SNOR_HWCAPS_READ_1_8_8 BIT(12) #define SNOR_HWCAPS_READ_8_8_8 BIT(13) @@ -488,7 +496,7 @@ struct spi_nor_hwcaps { /* * Page Program capabilities. * MUST be ordered by priority: the higher bit position, the higher priority. - * Like (Fast) Read capabilities, Octo/Quad SPI protocols are preferred to the + * Like (Fast) Read capabilities, Octal/Quad SPI protocols are preferred to the * legacy SPI 1-1-1 protocol. * Note that Dual Page Programs are not supported because there is no existing * JEDEC/SFDP standard to define them. Also at this moment no SPI flash memory @@ -502,7 +510,7 @@ struct spi_nor_hwcaps { #define SNOR_HWCAPS_PP_1_4_4 BIT(18) #define SNOR_HWCAPS_PP_4_4_4 BIT(19) -#define SNOR_HWCAPS_PP_OCTO GENMASK(22, 20) +#define SNOR_HWCAPS_PP_OCTAL GENMASK(22, 20) #define SNOR_HWCAPS_PP_1_1_8 BIT(20) #define SNOR_HWCAPS_PP_1_8_8 BIT(21) #define SNOR_HWCAPS_PP_8_8_8 BIT(22) From patchwork Tue Jan 15 10:05:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10764177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E532E139A for ; Tue, 15 Jan 2019 10:05:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D43CF2AC76 for ; Tue, 15 Jan 2019 10:05:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C88042AC61; Tue, 15 Jan 2019 10:05:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7342A2AC61 for ; Tue, 15 Jan 2019 10:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728498AbfAOKFh (ORCPT ); Tue, 15 Jan 2019 05:05:37 -0500 Received: from mail-eopbgr10087.outbound.protection.outlook.com ([40.107.1.87]:38816 "EHLO EUR02-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727451AbfAOKFh (ORCPT ); Tue, 15 Jan 2019 05:05:37 -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=yXGCWNDxM8RawqSl8SpvNauvyjgeoRTco8+iqiQVGsQ=; b=fV5cxcoLOkcR3KvbTiv8xrVVfITeguBHdt0BWMwhn1ccGX1Jl5AZ2H5KtGEQt+vMpECHRz75BlKMvzbxOSlkzyEl1vKtoD6wUsG6FpyZt9+bSgd84Pz9mBhIn8dalLxfXjpglUzIf42/Wsm8x7p5jRC6X2/R4uaN+QzltdXwevM= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1SPR01MB10.eurprd04.prod.outlook.com (10.170.239.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 10:05:16 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 10:05:16 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "tudor.ambarus@microchip.com" , "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 Narayan Gaur Subject: [PATCH v7 2/5] mtd: spi-nor: add octal read flag for flash mt35xu512aba Thread-Topic: [PATCH v7 2/5] mtd: spi-nor: add octal read flag for flash mt35xu512aba Thread-Index: AQHUrLnQgJgrUdZwrUut3L5z4nyOUQ== Date: Tue, 15 Jan 2019 10:05:16 +0000 Message-ID: <1547546584-5254-3-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1547546584-5254-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1547546584-5254-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: SG2PR06CA0123.apcprd06.prod.outlook.com (2603:1096:1:1d::25) To VI1PR04MB5726.eurprd04.prod.outlook.com (2603:10a6:803:e4::24) x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 1.9.1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1SPR01MB10;6:HKIo2rKDCzsGWT8/5toYFJCzaGL8IHeGb70tWJnKibq/TwyKxVK9HylsoCQlt5a/HbLHgGg2SvBEUOXWNvRprOODZLXumXKMDCBLtUbq4XY+zh2ziXkG7IAUYOrG/nxpjBJL1bzuoQag3ONAaBp5DSHVgQUllsYIz/YEUsL/oMgrw2gC7IgKCyXW2uDleEn19VloPxMj3vxlxUJuhhtl/nbLA3hNBZQdKLWau4Vp2M2oTY0JGJXdQDAFE4G3xXiOCuDZ02ds6Hw3S4XlGiSzruMZmkndc61vCoNlQyJAtYh8n+aHUwT/FRAz/tSSmAt5sb1u/Iotr08DAvRWRDcvlm9G6hvFdyE5ahmWmYeOQEt8L5JWH3u0tmmXC7EfnU8QlPzFmDK9Rx8K74h0am0xFptb1wadJq0QOz+wSqric6lX+yd9vep+YWnIQlNpPpWb0doiEy2lScAk1ofd6iGszg==;5:rJypuP3J7Y6O7Cr0yfT3i+K0wQ3NWhtKGuIHI3Zwzx4Ss3oR3OLnxeMnATpge8RIQz7G4uRVRds3YuWXBiZ1ifnuVaTrTMOaHeC3qtm60Sd6I62LnvRPTHgXOBHOrtRPrVvVSN+S6gee/7fEJYtfLRu3AwjV3Ac/1MxuYLIOeeFXiK9YA1Dxi+7wvk+R/589jjX9a+cYUDuuJTcnBUhg+w==;7:7eZ+5Vf3aPpAUDxIRwgFd9vrrJXok91K4rmxwFH+gJ4XP7RVSepl4B+0VRogJ5zw03tIBTPDpfEtgSmJ3VHBbOTcQThwza49EQe5iLFYNcXHUwknz/izLbXM2KLEeyAe5cu2302kpLCrYnBw53bXKg== x-ms-office365-filtering-correlation-id: 970eebdf-4930-4835-63d2-08d67ad0f2ad x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1SPR01MB10; x-ms-traffictypediagnostic: VI1SPR01MB10: x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(366004)(136003)(396003)(346002)(199004)(189003)(6486002)(97736004)(2501003)(6506007)(386003)(316002)(53936002)(55236004)(102836004)(5660300001)(106356001)(4744005)(105586002)(68736007)(52116002)(36756003)(76176011)(86362001)(11346002)(71200400001)(3846002)(71190400001)(2906002)(446003)(6512007)(256004)(486006)(14454004)(2616005)(476003)(7416002)(78486014)(99286004)(25786009)(8676002)(6346003)(81166006)(81156014)(186003)(4326008)(2201001)(14444005)(6436002)(8936002)(26005)(478600001)(66066001)(54906003)(305945005)(39060400002)(6116002)(110136005)(50226002)(7736002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1SPR01MB10;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) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yogeshnarayan.gaur@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8enKZ8NK0Iebp5efXrx/8WyQ4gFG9QY2CU/Vd0x2JRZD53YqD5iyFMkBoQxK0MU78tLD315InKUBuibTUd7IKbC4W//waEOQVxUo3ENLdoXizcjfwvTclUoopD+LsESABct9U0aUFsPJthZzChJRIz7NKHphKGVmDGa8k5a3m0qpuhsov4WQ4p9esBRW2Zo7/AMSl6Wu5UHXqquUWtUqD7C5Pie0jmEp1XAgWMmSPNanaownSNxX6v+a0/6lhZDdmDDxd4/u4y5Ca3XvBDCJLmwol+nQ7Nv1AK7LGFYRuqwOFctsB5cqXBh2hLczwgUL1G9IgeQFv+/RYrsqTHSho0D2x/LaSWLCTbWv9zRImvkI+4kOyU7av+qGaLrk+Imw8K7esofXQuOCXOTnvDTBHGdKD+lcxFb76n7r38epZxQ= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 970eebdf-4930-4835-63d2-08d67ad0f2ad X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 10:05:10.7894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1SPR01MB10 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add octal read flag for flash mt35xu512aba. This flash, mt35xu512aba, is only complaint to SFDP JESD216B and does not seem to support newer JESD216C standard that provides auto detection of Octal mode capabilities and opcodes. Therefore, this capability is manually added using new SPI_NOR_OCTAL_READ flag. Signed-off-by: Vignesh R Signed-off-by: Yogesh Narayan Gaur Reviewed-by: Tudor Ambarus --- drivers/mtd/spi-nor/spi-nor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 872d70722672..53a3bcc6a55b 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c @@ -1877,7 +1877,8 @@ static const struct flash_info spi_nor_ids[] = { /* Micron */ { "mt35xu512aba", INFO(0x2c5b1a, 0, 128 * 1024, 512, - SECT_4K | USE_FSR | SPI_NOR_4B_OPCODES) + SECT_4K | USE_FSR | SPI_NOR_OCTAL_READ | + SPI_NOR_4B_OPCODES) }, /* PMC */ From patchwork Tue Jan 15 10:05:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10764171 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FA23139A for ; Tue, 15 Jan 2019 10:05:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F3B42AC61 for ; Tue, 15 Jan 2019 10:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 721692AC8A; Tue, 15 Jan 2019 10:05:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9DE02AC61 for ; Tue, 15 Jan 2019 10:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbfAOKF2 (ORCPT ); Tue, 15 Jan 2019 05:05:28 -0500 Received: from mail-eopbgr30048.outbound.protection.outlook.com ([40.107.3.48]:21740 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727451AbfAOKF2 (ORCPT ); Tue, 15 Jan 2019 05:05:28 -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=6H5vAledmi0esA7RBZS8cP072AFqnf9w5a0YwwQhDEs=; b=nPQ6AqV3xVQajzukwEsDcrJtsmi6ZIeOxOZRKZw4MavbMwD6MRQmcUbxkdO1GxgPQHo0zY1uH/btRbFAhHoIs78nE6KD7oNOx5YAz4QMfAV79gMc71jF4vUkNIVqGonQxACMXgiWyUaMseGBzfbmP3rAVex7fJc91Umgo0aU9lg= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1PR04MB5822.eurprd04.prod.outlook.com (20.178.204.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 10:05:23 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 10:05:23 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "tudor.ambarus@microchip.com" , "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 Narayan Gaur Subject: [PATCH v7 3/5] mtd: m25p80: add support of octal mode I/O transfer Thread-Topic: [PATCH v7 3/5] mtd: m25p80: add support of octal mode I/O transfer Thread-Index: AQHUrLnUkUf6WbGWr02OhoksrpQ9ag== Date: Tue, 15 Jan 2019 10:05:22 +0000 Message-ID: <1547546584-5254-4-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1547546584-5254-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1547546584-5254-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: SG2PR06CA0123.apcprd06.prod.outlook.com (2603:1096:1:1d::25) 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-mailer: git-send-email 1.9.1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB5822;6:Ag9dWE1ag6+JHhM4Bk8YsHF09tVGWVoL7kcRutAHS3MMWJD+2E4DNZXnF46CinZZfVzDayQBf9wvicgE4ZTGxXGR6UIu99Q9oy/vdmI6T1cTx0zyRlDYSC+SVicWAtQK1ejeuDwvIrc2J4KZisfXgrxjoxbEbeTtNWb4Or/FSVRbepRHDTrWRcqBUQsCRMHoV9wn+rQlNIMNM8pWikZRB+GPLV9af1uMIi14kgkCrWHUN/CJOTEOMAZjQEw4RgH+oZamUX7mIG0YLRnNsRPSWctoP9YBGH4TZvnwOA5BFCrHjgVWwThzgPY5YP9tQw4RQaU3nBoV/y1ZulKOH0+hVxJd/4opBOpjENWixpPqEkFkKSILFOADTckkqtTN9HpkL8vJzjSEX4rO1KO9Jxc9jfAogxdQ4ZU+ctLaHQO+YBNIEORI5YdA5Z+CXpt5CROmYpi2Xd+jvx2X1MDXwU4usg==;5:Ul5nd7LIqpTjcHJOIvshhbfcloQCAMVcWjraoMcNTPh2KR7UTLoMd/5Pv97IQTXvPv9s7WE5dYHGNh8P8r+axkHhgVTVlbyK1lKdXLBY339nufjNAy55KP8fL+51SH0hobefSymcObplAzLm9QH/WkMOVZbHuW/J8KbxHKTd/olYpM7CJgy7p+l4ps6nahQEGnaRPM98We1luKSHNpV+WA==;7:gptW05hTBtZ/oxkxgKV7TLjX/MSLz7YwtoxFtmM+akay/JN0oe1r0LoIiQo0r2nS1FkqmKjdDsW2kzRrSs0+YY786WWc1Jkf4DXbyijhDvbT74kL4/kGzZgr9+ho5JoJiT0VJJUD1sFZYVrujGsRLw== x-ms-office365-filtering-correlation-id: 383a9aaa-f204-4ca4-9ff8-08d67ad0f670 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB5822; x-ms-traffictypediagnostic: VI1PR04MB5822: x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(346002)(396003)(39860400002)(136003)(376002)(189003)(199004)(36756003)(305945005)(14454004)(6512007)(81166006)(486006)(446003)(2201001)(81156014)(2501003)(4326008)(14444005)(105586002)(8936002)(386003)(7736002)(86362001)(102836004)(2616005)(26005)(186003)(6506007)(54906003)(50226002)(97736004)(316002)(5660300001)(110136005)(2906002)(6116002)(8676002)(256004)(71190400001)(6486002)(7416002)(66066001)(3846002)(99286004)(6436002)(106356001)(478600001)(76176011)(55236004)(71200400001)(78486014)(11346002)(39060400002)(53936002)(52116002)(68736007)(476003)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5822;H:VI1PR04MB5726.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ScdKliUfYOU0y9Cln/XdEcLHwAMbJUMPKkKrFyqYakAuAESCF9s5fcYgNg4JHIm3zOm7HWcFg+1rpVdrX6T2cj2uQmOXgqHOtBKLFXPtRbZIdPtrJLIdyf/F48qvG87bHeAZ4lc/w3770VF86mx6wXiPDXExw4QEW/OslOyiF0Gh3HJ0ilTo4MQjzBboOWK555awo8A28Y9PjIIpAMO+bTiJnpzoFHo0jO3FYRt9zQ3y/Jn71PVyoHw3rufZQwQ+eZVf+KR03bB0nIBGtwLvxYwF9C+FAc18EHvVlL/1+fRRteTtyvmsX48G5kF8FaPt1jTyFm88xmGwF4FFmciBYojf9O4MLELqgxANZbi4qHx6BDDMqBNMTVz5rRodQHEkxFCOS3XzIfm2u5C7RYApoUNeVuv9ZvD74RI8l9FMcAE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 383a9aaa-f204-4ca4-9ff8-08d67ad0f670 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 10:05:17.0864 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5822 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for octal mode I/O data transfer based on the controller (spi) mode. Assign hw-capability mask bits for octal transfer. Signed-off-by: Yogesh Narayan Gaur Reviewed-by: Tudor Ambarus --- drivers/mtd/devices/m25p80.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index c4a1d04b8c80..651bab6d4e31 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -195,7 +195,14 @@ static int m25p_probe(struct spi_mem *spimem) spi_mem_set_drvdata(spimem, flash); flash->spimem = spimem; - if (spi->mode & SPI_RX_QUAD) { + if (spi->mode & SPI_RX_OCTAL) { + hwcaps.mask |= SNOR_HWCAPS_READ_1_1_8; + + if (spi->mode & SPI_TX_OCTAL) + hwcaps.mask |= (SNOR_HWCAPS_READ_1_8_8 | + SNOR_HWCAPS_PP_1_1_8 | + SNOR_HWCAPS_PP_1_8_8); + } else if (spi->mode & SPI_RX_QUAD) { hwcaps.mask |= SNOR_HWCAPS_READ_1_1_4; if (spi->mode & SPI_TX_QUAD) From patchwork Tue Jan 15 10:05:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10764181 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41B3F139A for ; Tue, 15 Jan 2019 10:05:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 306202AC61 for ; Tue, 15 Jan 2019 10:05:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 248B52AC8A; Tue, 15 Jan 2019 10:05:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBFDA2AC61 for ; Tue, 15 Jan 2019 10:05:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727221AbfAOKFe (ORCPT ); Tue, 15 Jan 2019 05:05:34 -0500 Received: from mail-eopbgr130044.outbound.protection.outlook.com ([40.107.13.44]:51840 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728408AbfAOKFd (ORCPT ); Tue, 15 Jan 2019 05:05:33 -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=Ktx1GRcHi1eYSge/SiHdvLAqiZpoEsriXHWfa3f58Mw=; b=DqW6ASRd74gV6eTHyQqLOiNzogWLVcw6FSf+LKyROhHEcOiNoUt4/3PP9La3YyrldP4Q4gfvsJUX5ssUZZlHFz0getWTCIv0E5mlYLeydIpgjYdCxb0XP/dsl8X9NsIXNi6zODRYaZlBjprpybNOe9g3vr5rvPywY1fxjM7tw9A= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1PR04MB5822.eurprd04.prod.outlook.com (20.178.204.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 10:05:29 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 10:05:29 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "tudor.ambarus@microchip.com" , "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 Narayan Gaur Subject: [PATCH v7 4/5] spi: nxp-fspi: add octal mode flag bit for octal support Thread-Topic: [PATCH v7 4/5] spi: nxp-fspi: add octal mode flag bit for octal support Thread-Index: AQHUrLnXO6XkhNwsbkOmcWHevEJc4A== Date: Tue, 15 Jan 2019 10:05:29 +0000 Message-ID: <1547546584-5254-5-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1547546584-5254-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1547546584-5254-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: SG2PR06CA0123.apcprd06.prod.outlook.com (2603:1096:1:1d::25) 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-mailer: git-send-email 1.9.1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB5822;6:0q1+Zvgcx8BLycQTLx8u8om9fFK6Ocmqh2G07b+cKcmKgywS65jADKvtKB8UxylmLBwfm2AvJDikf0aCFqDPG6szZ0eIwwQQR7UQeZpjSGtUkQew2uM512p4c9vNH7P4LRaW+Qzy7V+pl61gBZqZZnhY82PPRJuLj+waiSsvag3Ktr2URfqZ6y3fD0fbWvffmmqohye22sbm4BXmLM/S2Wf0EKEsZK7wNoiA/AsIndQttvCCwmyh+aKo/jC9Caa2gZ0iblnYxsZhB4GZbBzywnPACwDnXL1reWaurfQHUNxq8HKWr471UmbALP4e/9sftsenE2UzImHdw+USVxNz0RxpjGMGdGox8zVxkOWCjdBAQX/kBgapskYsuIn61V4eWz4cCMeOgFIoWfYeZ57diT2AjQArfL6DbMNisfA/jKEPB7rFC222NBCngW32dBmj9IZbTVcb6oAYyjgnfd4qfQ==;5:AkITVbbdEvUYQ7aX3In8IEF++wW7+OSZ06OE4rjcbrGcD0MAPyZK+s8WeZ1gklV6xYdrZi5FFxqKzv2bJWK2yzdsco9kIf7/85c5kFUOvIoppzaz1I8tUdo8AM4ytxQGSFYNszCBPoWO/xnP7cyNNBrqIrvBfeIscywDp2aocXFZUa1Fe4CfCffDe/RLL1wvIhngjkZHp3ViRxCoV/95jw==;7:M02TcNhv6qLLM5m8agZii6CV+0lmjQ9hN53OEZMbRZ69z8xAoV89RQeDAqYPFk4p0UKkU4sZ08FuRgbuop7Agt3YtbIo42xX4fEoyJTbrnN84/h4Kn+pLsxDvj/klgFTQX+PFadETFtRGeK88Oj9tw== x-ms-office365-filtering-correlation-id: 3bc83343-de8f-4a30-52ae-08d67ad0fa2a x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB5822; x-ms-traffictypediagnostic: VI1PR04MB5822: x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(346002)(396003)(39860400002)(136003)(376002)(189003)(199004)(36756003)(305945005)(14454004)(6512007)(81166006)(486006)(446003)(2201001)(81156014)(2501003)(4326008)(105586002)(8936002)(386003)(7736002)(86362001)(102836004)(2616005)(26005)(186003)(6506007)(54906003)(50226002)(97736004)(316002)(5660300001)(110136005)(2906002)(6116002)(8676002)(256004)(71190400001)(6486002)(7416002)(66066001)(3846002)(99286004)(6436002)(106356001)(478600001)(76176011)(55236004)(71200400001)(78486014)(11346002)(39060400002)(53936002)(52116002)(68736007)(476003)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5822;H:VI1PR04MB5726.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: EATlUiWocJvqTUr2CzcKne6iyIcSipjF/4J/6wdjf6jF/5LWcenAWLgUe0rT/gE9NDkucgP0PlN3EPUWSZhvnn++LR9B2V90Nz8npplMqMyEgERGkgjvdhEtXOnWrplp8KM1IZloIVkuP/90YBljrV/UCHOS8Zw7Qi96gar30YRptHL622Gb6Xxb8218AW82ORKyeRqPIzFK/TXfaPOwC615URgRELYtxS/9GBFumHHDo8sqHe8NrBALiN9csAYvBvidoZf2Eb5OO4CP/6V5YjHyA66BxTLNhIXuJ7DgNJxSBIPIYl/3n5Fv4AwyB8EYhLCyQxupALQaEty1PV0P1aSbPhQCvS6B5m2tsS2yAw8gkiKjTcO3ihSnCeFP9pIfzVCvHE+jptmIehjFLkshifvzOMQjsugk7XB4d/neZpg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3bc83343-de8f-4a30-52ae-08d67ad0fa2a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 10:05:23.3366 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5822 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add octal mode flags for octal I/O data transfer support. NXP FlexSPI controller supports 8 lines Rx/Tx data transfer. Signed-off-by: Yogesh Narayan Gaur --- drivers/spi/spi-nxp-fspi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c index e23ad9ef028e..adc3c0e14f38 100644 --- a/drivers/spi/spi-nxp-fspi.c +++ b/drivers/spi/spi-nxp-fspi.c @@ -952,8 +952,8 @@ static int nxp_fspi_probe(struct platform_device *pdev) if (!ctlr) return -ENOMEM; - ctlr->mode_bits = SPI_RX_DUAL | SPI_RX_QUAD | - SPI_TX_DUAL | SPI_TX_QUAD; + ctlr->mode_bits = SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL | + SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL; f = spi_controller_get_devdata(ctlr); f->dev = dev; From patchwork Tue Jan 15 10:05:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yogesh Narayan Gaur X-Patchwork-Id: 10764179 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9BBA914E5 for ; Tue, 15 Jan 2019 10:05:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BE672AC61 for ; Tue, 15 Jan 2019 10:05:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F88F2AC8A; Tue, 15 Jan 2019 10:05:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 17D012AC61 for ; Tue, 15 Jan 2019 10:05:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728352AbfAOKFl (ORCPT ); Tue, 15 Jan 2019 05:05:41 -0500 Received: from mail-eopbgr130040.outbound.protection.outlook.com ([40.107.13.40]:62592 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727790AbfAOKFk (ORCPT ); Tue, 15 Jan 2019 05:05:40 -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=fnBg/3Zd/nOHZWiutsHzWXpvg1b8b3mX29x9+sBnDXY=; b=cCgQw5YKVz0GMGKJZNVxGBT+m2jFkOzQQV3F73d5+2mW0ulTgj3NetanjmTTafs+1j7QoNSdyqHWTetNf85xBtq+wZt6Uy4kqFFiTbefPkuZLRU3rWTKVMAhLAlgs+oTV6mXN2moSNfsZvDIXJaBusBnJ7ridN2KhxsVq3pEURk= Received: from VI1PR04MB5726.eurprd04.prod.outlook.com (20.178.127.24) by VI1PR04MB5822.eurprd04.prod.outlook.com (20.178.204.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Tue, 15 Jan 2019 10:05:35 +0000 Received: from VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb]) by VI1PR04MB5726.eurprd04.prod.outlook.com ([fe80::a1c2:cc79:80f3:3bcb%4]) with mapi id 15.20.1516.019; Tue, 15 Jan 2019 10:05:35 +0000 From: Yogesh Narayan Gaur To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "broonie@kernel.org" , "marek.vasut@gmail.com" , "vigneshr@ti.com" , "linux-spi@vger.kernel.org" , "devicetree@vger.kernel.org" CC: "tudor.ambarus@microchip.com" , "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 Narayan Gaur Subject: [PATCH v7 5/5] arm64: dts: lx2160a: update fspi node Thread-Topic: [PATCH v7 5/5] arm64: dts: lx2160a: update fspi node Thread-Index: AQHUrLnbWH3YDSF6OUOBVDSvHgkBWw== Date: Tue, 15 Jan 2019 10:05:35 +0000 Message-ID: <1547546584-5254-6-git-send-email-yogeshnarayan.gaur@nxp.com> References: <1547546584-5254-1-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1547546584-5254-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: SG2PR06CA0123.apcprd06.prod.outlook.com (2603:1096:1:1d::25) 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-mailer: git-send-email 1.9.1 x-originating-ip: [14.143.30.134] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;VI1PR04MB5822;6:As0kijqYpdLXyo/cdHf5tv3DukVLKJlSrelMt5fcIHXxo8so1vzga9pd7L9TSf+5Hc/A2UI6jdZGOcBjV6pLxbx5+r8YwqSM+gekE6uSeOEkC/7+yo0Vy/Gau3yjl0M4f31ksHN8IfjWH6kezA12rwjE5KHPoPToCeegDuGvT/r1Lv2vohK9g7nhybR3CPpB21Hy/IPwNcbN1DezAsXgtm3sYB+XyydpslvRBcFF6hVev9qrmXxChTkAV7hcWk8K1cJTx7QGPDWowijYBnzEcjxOE6l5ga/mmCUYxe0VmepUVPACimeh/Grfsz1gT+WwIMsplsee2DfJPu7ydeZAvBggPf9YJDLGJBvtpxzO0iQ8Zw0M9xJkrWGQXnm0VTW89+MPtJXW20oVN7BlmaRUwYBTH8n8hScKmBCrE2VnJnnwxYXn6mTYmABa2Orh4eCGc8LXHTNFmiPv0JZyYHzhmQ==;5:TBB8xsgEVQTEGXk4huBj41QUcQK5caVyFMfPbDFnsFqO1JSusOlpIk+Slo3Db1eJgX4pedZOQyYqShMPfP+uIeZsAKBL+r9lO5bPgcRH9vvC2xMpr5Vsf2cNhap/+Ijc37ShVhwCCRiYxH3jzR1jj1H6/1w6Rz5dTJ+dw+AsZ8yW/9+a6ajsLxyvLv/4Ko7LfiVJtXGhXvvCYiwAQzcriA==;7:5ul/OENiRKkVmyhobrfF4mxKmsfX/RxTZHZoa5QNASNeEN9RIZt9BBxwAkSTxSP8ewRP9XGxrn55/byg/brqOqgk45g/B2wBkDYigZWKaAzdccVBLVOVpJZF4cuCo9c0KyhqE9gjifD0RkgfVy0GRQ== x-ms-office365-filtering-correlation-id: b6540173-c398-4d61-2c7e-08d67ad0fdeb x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:VI1PR04MB5822; x-ms-traffictypediagnostic: VI1PR04MB5822: x-microsoft-antispam-prvs: x-forefront-prvs: 0918748D70 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(346002)(396003)(39860400002)(136003)(376002)(189003)(199004)(36756003)(305945005)(14454004)(6512007)(81166006)(486006)(446003)(2201001)(81156014)(2501003)(4326008)(105586002)(8936002)(386003)(7736002)(86362001)(102836004)(2616005)(26005)(186003)(6506007)(54906003)(50226002)(97736004)(316002)(5660300001)(110136005)(2906002)(6116002)(8676002)(256004)(71190400001)(6486002)(7416002)(66066001)(3846002)(99286004)(6436002)(106356001)(478600001)(76176011)(55236004)(71200400001)(78486014)(11346002)(39060400002)(53936002)(52116002)(68736007)(476003)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR04MB5822;H:VI1PR04MB5726.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: YOjbCOhrN8U/RrqNzfxvLr/Md/UmthoOdzf6T9QkdDfr0jv8mdxkxbsnvrP4Q+FHhXp8Epk4HrSiUm9A69I4r5/wryGdn1NYv2dYei+W5LgBp2SAPue8ZHWIfXXRxgYIodlvMaUGY//Zto/y0KCr2ev5AXDvUBNB9DSPrdNlvP/zAYvHOBI5YgxjSW1iG1sKY8Y806wWEYi3Z5FJtAgVADdMDKGoTMQmmsYYNNlw1FjbX/LpV68MsyI6I0pelO1eoMdO8pLAV3n1s14/Mf/KQmnLMIlfaHfwQBNvGl7i/6zujE2y9rSY1pF+e56Qzts616xLbn9IbgQpO4VlsIbMTIdk/UDr20MvEG0erDt/RYxZyKAoeTYFd9ZNnFz+OZmyQHiuoKE0wNyBxxKHAYCoOUR5cCvKS/fdOQ9kSnlRvvs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b6540173-c398-4d61-2c7e-08d67ad0fdeb X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2019 10:05:29.6493 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5822 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Flash mt35xu512aba connected to FlexSPI controller supports 1-1-8/1-8-8 protocol. Added flag spi-rx-bus-width and spi-tx-bus-width with values as 8 and 8 respectively for both flashes connected at CS0 and CS1. Signed-off-by: Yogesh Narayan Gaur --- Changes for v6: - Correct S-o-b tag with full author name as 'Yogesh Narayan Gaur'. Changes for v5: - None Changes for v4: - None Changes for v3: - None Changes for v2: - None --- arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts index 70658946fbbe..9df37b159415 100644 --- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts +++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rdb.dts @@ -60,6 +60,8 @@ m25p,fast-read; spi-max-frequency = <50000000>; reg = <0>; + spi-rx-bus-width = <8>; + spi-tx-bus-width = <8>; }; mt35xu512aba1: flash@1 { @@ -69,6 +71,8 @@ m25p,fast-read; spi-max-frequency = <50000000>; reg = <1>; + spi-rx-bus-width = <8>; + spi-tx-bus-width = <8>; }; };