From patchwork Tue Apr 23 13:50:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Gong X-Patchwork-Id: 10913045 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 9D8A01575 for ; Tue, 23 Apr 2019 13:50:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BBBE286B5 for ; Tue, 23 Apr 2019 13:50:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FBDE28740; Tue, 23 Apr 2019 13:50:49 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 07CB7286B5 for ; Tue, 23 Apr 2019 13:50:49 +0000 (UTC) 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=KnNIrxNG4MPoTRzrbZcvlJ+JCEuC1atbAujdoo/mQ+s=; b=PuJRCR3PI8zyfL 6LoOGFYl6NohWpiYhMNYLx0TYJfLDfu+uA1ZKrB9siKK3OmGSEhuDT/1p/hOz7hpTW3uEz2CcJ8pD yVG39nhhqh/c1I2IQ6D08SMUXAqnWRZPsF0OdZH4BZJVNdxYdXdbWixsgCPMOwPzX2u/ELLs8o4IS gJJxujxApAt/OoGgbxmEYUdm+66TabqMxrQrGivv/W/PThkMOtlyuvoGoCHyJLNRo3W8duF1Exuqr n5czY0einIfPpKmzIPJ0VEsWjkXTBpmhppMS+qKUXM54sSZrm8CVqEGKPXBT4jR0EvxRMydEtsT01 LJf/sCsC21O5Ht4DONNA==; 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 1hIvoo-0001mp-Mr; Tue, 23 Apr 2019 13:50:42 +0000 Received: from mail-eopbgr20078.outbound.protection.outlook.com ([40.107.2.78] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIvol-0001li-KH for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2019 13:50:41 +0000 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=I4q+KfkZ548fRBsjhTaA2XKTALFn1gteHj7k7G6UC9k=; b=XzyiZeS7aHSARYn74OUemZZ0FdQIaWrywGgAKENUShgHMqzK5mFrqJ64BpFdhh5u5T8stuqX8kKHuQNSyamBoSXhSnEcRhEsxerBv6UNG299TrnLiemw7jgEWBgXFACuZpZdlINH03cGTJ5LHmjLUbNWaJ7n4Qzg8lqOfC49Pf8= Received: from VI1PR04MB4543.eurprd04.prod.outlook.com (20.177.55.90) by VI1PR04MB5901.eurprd04.prod.outlook.com (20.178.205.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1813.12; Tue, 23 Apr 2019 13:50:34 +0000 Received: from VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::5d07:911b:18e1:1525]) by VI1PR04MB4543.eurprd04.prod.outlook.com ([fe80::5d07:911b:18e1:1525%4]) with mapi id 15.20.1813.017; Tue, 23 Apr 2019 13:50:34 +0000 From: Robin Gong To: "broonie@kernel.org" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "festevam@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "u.kleine-koenig@pengutronix.de" , "plyatov@gmail.com" , "sean.nyekjaer@prevas.dk" Subject: [PATCH v1 00/15] add ecspi ERR009165 for i.mx6/7 soc family Thread-Topic: [PATCH v1 00/15] add ecspi ERR009165 for i.mx6/7 soc family Thread-Index: AQHU+duGTXiEawO6vkOZRAs4Bg3Yeg== Date: Tue, 23 Apr 2019 13:50:34 +0000 Message-ID: <1556027045-5269-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: HK2PR04CA0044.apcprd04.prod.outlook.com (2603:1096:202:14::12) 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: db4fe6c9-adc8-47e5-50f7-08d6c7f2a850 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:VI1PR04MB5901; x-ms-traffictypediagnostic: VI1PR04MB5901: x-ms-exchange-purlcount: 2 x-microsoft-antispam-prvs: x-forefront-prvs: 0016DEFF96 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(136003)(396003)(376002)(346002)(39860400002)(199004)(189003)(6506007)(102836004)(86362001)(97736004)(386003)(7416002)(36756003)(14444005)(2201001)(25786009)(4326008)(305945005)(26005)(256004)(73956011)(71190400001)(71200400001)(7736002)(64756008)(66556008)(66476007)(478600001)(66446008)(66946007)(316002)(14454004)(81156014)(8676002)(68736007)(54906003)(81166006)(2501003)(966005)(8936002)(186003)(5660300002)(6436002)(110136005)(3846002)(6116002)(6486002)(53936002)(66066001)(6512007)(486006)(476003)(99286004)(50226002)(2616005)(52116002)(2906002)(6306002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5901; H:VI1PR04MB4543.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: PpQx5do2VVhhfW9aHljzGOxjB8o8KHWYidwt8ZzwsiWBMc7K6TIm44AambuLRKQGnXJGHwiaRz5x+24s/ISU0CzbjKtSt2dGYYuWKiY9NF8d6UoEtIOh2EcDj0NyHer+wFWyWSVd+D/cOqAy6BGcUzFJkhLtfn/HP+Cbwl6EEFaXlLFwLE5JQEJZ9vpXFWFU5HUFmMPQGdG8U/Sgy7tw2K2m28FbsBj34DTeqReowtgwnF8kqaxpihsYVDjYDcJw0FETZA75yeKvWd8sL5CR+QedNgugv7qtHcmxyNWUVoqH3aDDkL8f2yNxSFJhk6YW+jyJMZ4gLPiEE3Vs9T9dmgU4pqYMqBBzGQriedxMyoiRc+Aofjju/nltvIcIjnNa/GjyAH1vlthYqa7fcE5K6p4MhvXjlvNIrwatYeBeviE= MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: db4fe6c9-adc8-47e5-50f7-08d6c7f2a850 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Apr 2019 13:50:34.4066 (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: VI1PR04MB5901 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190423_065039_694060_76EAEBC5 X-CRM114-Status: GOOD ( 14.60 ) 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" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 such as i.mx6ull/ i.mx8mq/i.mx8mm, don't need this workaroud anymore. 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 Robin Gong (15): 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 dma: engine: imx-sdma: add mcu_2_ecspi script spi: imx: fix ERR009165 spi: imx: remove ERR009165 workaround on i.mx6ul dt-bindings: spi: imx: add i.mx6ul to state errata fixed 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 ARM64: dts: freescale: imx8mm/8mq: update new compatible name for ecspi and sdma ARM: dts: imx6ul: add dma support on ecspi ARM: dts: imx6sll: correct ecspi/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 | 2 + arch/arm/boot/dts/imx6q.dtsi | 2 +- arch/arm/boot/dts/imx6qdl.dtsi | 8 +-- arch/arm/boot/dts/imx6sll.dtsi | 10 ++-- arch/arm/boot/dts/imx6ul.dtsi | 8 +++ arch/arm64/boot/dts/freescale/imx8mm.dtsi | 14 ++--- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 6 +- arch/arm64/configs/defconfig | 3 + drivers/dma/imx-sdma.c | 67 ++++++++++++++++------ drivers/spi/spi-imx.c | 46 ++++++++++++--- include/linux/platform_data/dma-imx-sdma.h | 1 + 12 files changed, 124 insertions(+), 45 deletions(-)