From patchwork Wed Nov 7 14:43:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 994288 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kontron.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uhnrHJAv"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=as-electronics.de header.i=@as-electronics.de header.b="Ig3356Jm"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42qq322t4kz9sDB for ; Thu, 8 Nov 2018 01:45:34 +1100 (AEDT) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To: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:List-Owner; bh=dGe4mL9f0MfgGbkCtaPbvRBPGv/3hCBiyhVF2VDDXjg=; b=uhnrHJAvpDsNde5g1rIELFUKZf OpthsAAld1i6RNFhEu8H/dghHFIhuD50rABqTCUhfTdytf8sCDzCGftRrIMtw+oDx+4ajqWJ4mSNd zzduNYkBVdkCOQk24Z7i4FNFKuWPEh8LRN45gGbg2XFDftMxghH7oWztZFCt9e7SX942DHw2+k98x fGLHwyCSLa210gauwBxrEdkzAUAK7OHo442pvoud8z6tsoe8m00Mi1m5xxwu20P+n/y16aQ9BXQdc hFT0cndNG2XWpbMFD1kjiqBxXPGdlAi0PUehR/pl3QpGPX/lNUi7fKc0wNxpU7KnQ76teJokCtoGx 3R6MgyCg==; 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 1gKP5B-0000tQ-5R; Wed, 07 Nov 2018 14:45:25 +0000 Received: from mo6-p05-ob.smtp.rzone.de ([2a01:238:20a:202:5305::2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKP4j-0007Jn-6c for linux-mtd@lists.infradead.org; Wed, 07 Nov 2018 14:44:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1541601885; s=strato-dkim-0002; d=as-electronics.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=eyAMa4jxAybAUfKZyOz03nHzABmuowAaRchxukYjamI=; b=Ig3356Jmh65ifDIHURgZTD0OrVlGaZmOgB7jhfnTBwR6mTY1qgzrdfF8xMVmK9JUcR YbKfsj2+cFnDMgZvomxIgrsuZE4t34vyj/zHfHrgJOMyy43pM3i+8T7GBthC1FadHRUx qCcGLGcKVQTPMegv0Jy4WqgMBtozcwLIiSXascm6EK4IL6ytEHv07Bmkx/x1j36AJuDk UXkxzkOKsnxRTu5K1txmULI2ixBXNWGDB8rIB2yYl4Y0FJ8EB4LCbWVbUswzc2oBG9PP /B30YMGj1DPtumvEiJ3h/mS5ki+Bk3itfLcis63H/J+qPB+PSN4TN1yqRvlEwSMAEdoT XGlg== X-RZG-AUTH: ":LX8JdEmkW/4tAFwMkcNJIloh1hrA5u3owhPk7bdT5Fx22AatU+eLaHfutoZdl+X9BETxn4/4+IVqx7ZdE8mPU5nMS5P2QgHAetWm5FNngAjmE0pFNjw=" X-RZG-CLASS-ID: mo05 Received: from fs-work.fritz.box by smtp.strato.de (RZmta 44.3 AUTH) with ESMTPSA id j097e4uA7EiCUQm (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 7 Nov 2018 15:44:12 +0100 (CET) From: Frieder Schrempf To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com, linux-spi@vger.kernel.org Subject: [PATCH v4 03/10] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Date: Wed, 7 Nov 2018 15:43:20 +0100 Message-Id: <1541601809-16950-4-git-send-email-frieder.schrempf@kontron.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1541601809-16950-1-git-send-email-frieder.schrempf@kontron.de> References: <1541601809-16950-1-git-send-email-frieder.schrempf@kontron.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181107_064457_395651_0FFC0EE1 X-CRM114-Status: GOOD ( 15.99 ) X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a01:238:20a:202:5305:0:0:2 listed in] [list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=frieder.schrempf%40kontron.de; ip=2a01%3A238%3A20a%3A202%3A5305%3A%3A2; r=bombadil.infradead.org] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, yogeshnarayan.gaur@nxp.com, Rob Herring , richard@nod.at, prabhakar.kushwaha@nxp.com, Frieder Schrempf , shawnguo@kernel.org, linux-kernel@vger.kernel.org, marek.vasut@gmail.com, han.xu@nxp.com, broonie@kernel.org, miquel.raynal@bootlin.com, fabio.estevam@nxp.com, david.wolfe@nxp.com, computersforpeace@gmail.com, dwmw2@infradead.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Frieder Schrempf Adjust the documentation of the new SPI memory interface based driver to reflect the new drivers settings. The "old" driver was using the "fsl,qspi-has-second-chip" property to select one of two dual chip setups (two chips on one bus or two chips on separate buses). And it used the order in which the subnodes are defined in the dt to select the CS, the chip is connected to. Both methods are wrong and in fact the "reg" property should be used to determine which bus and CS a chip is connected to. This also enables us to use different setups than just single chip, or symmetric dual chip. So the porting of the driver from the MTD to the SPI framework actually enforces the use of the "reg" properties and makes "fsl,qspi-has-second-chip" superfluous. As all boards that have "fsl,qspi-has-second-chip" set, also have correct "reg" properties, the removal of this property shouldn't lead to any incompatibilities. The only compatibility issues I can see are with imx6sx-sdb.dts and imx6sx-sdb-reva.dts, which have their reg properties set incorrectly (see explanation here: [2]), all other boards should stay compatible. Also the "big-endian" flag was removed, as this setting is now selected by the driver, depending on which SoC is in use. Signed-off-by: Frieder Schrempf --- .../devicetree/bindings/spi/spi-fsl-qspi.txt | 21 +++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt index 483e9cf..6d7c9ec 100644 --- a/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt @@ -3,9 +3,8 @@ Required properties: - compatible : Should be "fsl,vf610-qspi", "fsl,imx6sx-qspi", "fsl,imx7d-qspi", "fsl,imx6ul-qspi", - "fsl,ls1021a-qspi" + "fsl,ls1021a-qspi", "fsl,ls2080a-qspi" or - "fsl,ls2080a-qspi" followed by "fsl,ls1021a-qspi", "fsl,ls1043a-qspi" followed by "fsl,ls1021a-qspi" - reg : the first contains the register location and length, the second contains the memory mapping address and length @@ -14,15 +13,13 @@ Required properties: - clocks : The clocks needed by the QuadSPI controller - clock-names : Should contain the name of the clocks: "qspi_en" and "qspi". -Optional properties: - - fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B. - Each bus can be connected with two NOR flashes. - Most of the time, each bus only has one NOR flash - connected, this is the default case. - But if there are two NOR flashes connected to the - bus, you should enable this property. - (Please check the board's schematic.) - - big-endian : That means the IP register is big endian +Required SPI slave node properties: + - reg: There are two buses (A and B) with two chip selects each. + This encodes to which bus and CS the flash is connected: + <0>: Bus A, CS 0 + <1>: Bus A, CS 1 + <2>: Bus B, CS 0 + <3>: Bus B, CS 1 Example: @@ -40,7 +37,7 @@ qspi0: quadspi@40044000 { }; }; -Example showing the usage of two SPI NOR devices: +Example showing the usage of two SPI NOR devices on bus A: &qspi2 { pinctrl-names = "default";