From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FD09C18E7D for ; Wed, 22 May 2019 09:59:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D839520821 for ; Wed, 22 May 2019 09:59:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GLVRTPkl"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="r8VzIPYm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D839520821 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=UdpfYqrvhmV/DF7PJcAXYJhMwuzAOH8yDzzaVE0ZSME=; b=GLVRTPklNnmxhE Mp9jo33C+mLjUo6hdoTcNa8QjPbDxDK9As1MWMhbeg/SlAxLUUJTb6GVCOuURlGJ2/nGwa4A9nFEk Bw0qWXqbX1ttAMi3U8PgqqWmqPJNDJwWsJ/NsiVneVL9AgaEnlKQ+u8B5NXrNu+5XywbdSmOwZfKI pvRCRFHs/ybSWaDFz/kvENzexSGUD6T5BQ9Y0JMXCK6Rx+RxqT1w3aVCSw4OqG5W+jndJiId08fjd sFAmYrcloVfjwpnohznyqF2DzTJUK9yNnWc1PhfDuLCQFQOva5/sk9jawD1zCzlKrBYX1DWULinfD HGT0jvCsRSe1GWGGHEoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTO2G-000378-CB; Wed, 22 May 2019 09:59:48 +0000 Received: from mail-ve1eur02on0626.outbound.protection.outlook.com ([2a01:111:f400:fe06::626] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hTO2C-00035d-M6 for linux-arm-kernel@lists.infradead.org; Wed, 22 May 2019 09:59:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WDyskuE1hfrVjxPzPDO3h59MjCYr/+DW7fNrhovBzYY=; b=r8VzIPYmATUNiTqGa7xA1UawM3hW9IKBgg3nOQJ0F5BFxBYlfDFZfhh1nOdaUh2uRqxW1Zhjx0yR6vwGw3YTKDaLaSFnwGrOIQqiIqIOYwSCa4UGDPIfE+jZ3/ZfgHHs4vmTDnAz5kqofqqdg7JkmP3xnfWYeveKF63dUtN4aZo= Received: from VI1PR04MB4543.eurprd04.prod.outlook.com (20.177.55.90) by VI1PR04MB3103.eurprd04.prod.outlook.com (10.170.229.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1900.18; Wed, 22 May 2019 09:59:39 +0000 Received: from VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::5062:df97:a70b:93f8]) by VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::5062:df97:a70b:93f8%7]) with mapi id 15.20.1900.020; Wed, 22 May 2019 09:59:39 +0000 From: Robin Gong To: "robh@kernel.org" , "broonie@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , "mark.rutland@arm.com" , "vkoul@kernel.org" , "dan.j.williams@intel.com" , "u.kleine-koenig@pengutronix.de" , "plyatov@gmail.com" , "catalin.marinas@arm.com" , "l.stach@pengutronix.de" Subject: [PATCH v4 00/14] add ecspi ERR009165 for i.mx6/7 soc family Thread-Topic: [PATCH v4 00/14] add ecspi ERR009165 for i.mx6/7 soc family Thread-Index: AQHVEIUR54BxkzTNOk2fBr52LKhyNQ== Date: Wed, 22 May 2019 09:59:39 +0000 Message-ID: <1558548188-1155-1-git-send-email-yibin.gong@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.7.4 x-clientproxiedby: HK2PR04CA0045.apcprd04.prod.outlook.com (2603:1096:202:14::13) To VI1PR04MB4543.eurprd04.prod.outlook.com (2603:10a6:803:6d::26) authentication-results: spf=none (sender IP is ) smtp.mailfrom=yibin.gong@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [119.31.174.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 87ebcce8-5d67-4a02-6927-08d6de9c33f8 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600141)(711020)(4605104)(4618075)(2017052603328)(7193020); SRVR:VI1PR04MB3103; x-ms-traffictypediagnostic: VI1PR04MB3103: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 0045236D47 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(189003)(199004)(68736007)(81166006)(2201001)(2501003)(52116002)(71200400001)(14454004)(186003)(256004)(14444005)(26005)(53936002)(7736002)(25786009)(81156014)(305945005)(966005)(8936002)(4326008)(86362001)(8676002)(50226002)(71190400001)(486006)(6512007)(6306002)(5660300002)(6436002)(66946007)(73956011)(498600001)(66446008)(66066001)(66476007)(64756008)(66556008)(3846002)(6116002)(99286004)(386003)(6506007)(2906002)(54906003)(36756003)(110136005)(7416002)(2616005)(6486002)(102836004)(476003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB3103; H:VI1PR04MB4543.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: jnsnaHzcad38YiP83FfDlBCYBJ0GMZPivmHg4wOR57yoTdXl2R3JmK81S9ktZE1NnM9yFYXqoEpB82tanGIzEfsFKclYNaRXVyUIUWbhFMB3dM0tfk7yhiLgLudUiR0PT1Orxj+0cMk3hg/Fbfjxz8QuW6zGySAl7/KWjYyIofhToKtL3evJCZgVlfiQto1o/P/Fm5lgoazQZCOC9J4CMuSK9iZ3MRAHcPfiMHx5GOC3YXEatdntT4n44m/c2su7YiZG3e3qlyun+VQllxPcNi+O4gxayDkZAapD587786dMJFRbuckFQVlfLrZV5HiG17H13drTfkF4teCkqfqnDQwcjCTzwqjzPqx9w5lS83XK+PPlpKdYoucN8lxWhw8PHhGIM7W4ctr02WiAEdnL1PZeiw/lSkfn2qif1wiunoQ= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 87ebcce8-5d67-4a02-6927-08d6de9c33f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2019 09:59:39.2933 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3103 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190522_025944_725775_558C63C8 X-CRM114-Status: GOOD ( 14.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-spi@vger.kernel.org" , dl-linux-imx , "kernel@pengutronix.de" , "dmaengine@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is ecspi ERR009165 on i.mx6/7 soc family, which cause FIFO transfer to be send twice in DMA mode. Please get more information from: https://www.nxp.com/docs/en/errata/IMX6DQCE.pdf. The workaround is adding new sdma ram script which works in XCH mode as PIO inside sdma instead of SMC mode, meanwhile, 'TX_THRESHOLD' should be 0. The issue should be exist on all legacy i.mx6/7 soc family before i.mx6ul. NXP fix this design issue from i.mx6ul, so newer chips including i.mx6ul/ 6ull/6sll do not need this workaroud anymore. All other i.mx6/7/8 chips still need this workaroud. This patch set add new 'fsl,imx6ul-ecspi' for ecspi driver and 'ecspi_fixed' in sdma driver to choose if need errata or not. The first two reverted patches should be the same issue, though, it seems 'fixed' by changing to other shp script. Hope Sean or Sascha could have the chance to test this patch set if could fix their issues. Besides, enable sdma support for i.mx8mm/8mq and fix ecspi1 not work on i.mx8mm because the event id is zero. PS: Please get sdma firmware from below linux-firmware and copy it to your local rootfs /lib/firmware/imx/sdma. https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma v2: 1. add commit log for reverted patches. 2. add comment for 'ecspi_fixed' in sdma driver. 3. add 'fsl,imx6sll-ecspi' compatible instead of 'fsl,imx6ul-ecspi' rather than remove. v3: 1. confirm with design team make sure ERR009165 fixed on i.mx6ul/i.mx6ull /i.mx6sll, not fixed on i.mx8m/8mm and other i.mx6/7 legacy chips. Correct dts related dts patch in v2. 2. clean eratta information in binding doc and new 'tx_glitch_fixed' flag in spi-imx driver to state ERR009165 fixed or not. 3. Enlarge burst size to fifo size for tx since tx_wml set to 0 in the errata workaroud, thus improve performance as possible. v4: 1. add Ack tag from Mark and Vinod 2. remove checking 'event_id1' zero as 'event_id0'. Robin Gong (14): Revert "ARM: dts: imx6q: Use correct SDMA script for SPI5 core" Revert "ARM: dts: imx6: Use correct SDMA script for SPI cores" Revert "dmaengine: imx-sdma: refine to load context only once" dmaengine: imx-sdma: remove dupilicated sdma_load_context dmaengine: imx-sdma: add mcu_2_ecspi script spi: imx: fix ERR009165 spi: imx: remove ERR009165 workaround on i.mx6ul dt-bindings: spi: imx: add new i.mx6ul compatible name dmaengine: imx-sdma: remove ERR009165 on i.mx6ul dt-bindings: dma: imx-sdma: add i.mx6ul/6sx compatible name dmaengine: imx-sdma: fix ecspi1 rx dma not work on i.mx8mm ARM: dts: imx6ul: add dma support on ecspi ARM: dts: imx6sll: correct sdma compatible arm64: defconfig: Enable SDMA on i.mx8mq/8mm .../devicetree/bindings/dma/fsl-imx-sdma.txt | 2 + .../devicetree/bindings/spi/fsl-imx-cspi.txt | 1 + arch/arm/boot/dts/imx6q.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 8 +-- arch/arm/boot/dts/imx6sll.dtsi | 2 +- arch/arm/boot/dts/imx6ul.dtsi | 8 +++ arch/arm64/configs/defconfig | 3 + drivers/dma/imx-sdma.c | 78 ++++++++++++++++------ drivers/spi/spi-imx.c | 61 ++++++++++++++--- include/linux/platform_data/dma-imx-sdma.h | 1 + 10 files changed, 132 insertions(+), 34 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel