Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp233482imu; Thu, 8 Nov 2018 00:42:06 -0800 (PST) X-Google-Smtp-Source: AJdET5dZRGr1Mw09dqPBqLEHQSjU4iQqbaqz5Jiiu8xeMvyy4JshJktch6vJCZVi/Hc+vNGS3ZX7 X-Received: by 2002:a63:6302:: with SMTP id x2mr3052780pgb.183.1541666526441; Thu, 08 Nov 2018 00:42:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541666526; cv=none; d=google.com; s=arc-20160816; b=bKHAUNaGf+TaTCpJ6tqLl7XPZmL2KfNF8iQ23qUBccQfJHGtAvyzGgBf8HMbpSAelQ ABxhTAMVHrpIuigxt38cXx9S8a3R1VaWXlK30RYkSts6U9n7rRKOYVIRHrYSba5Q2Syy ePPmLXDlW3GPbRvO9zss/1AnCaXnPHssmNOGLOMVdT00VSnZC01s1gqy+8KoLSAXlYEG IDlkOivn5+WYtcBmMU4vfqBfAWxawoc1uDWy4DYqZAV6U8YZoewLBMgkbuwEh3k/5BJT yVaaVeZUdf+lCRlqIR39vi0C47uD8wQ31fWXLNzWcxsLK5A2W3j18jyL+p0CmZEZPEvc bBnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=68YmqZiLKMXBLhXJ+XfE+QWxI926o6WyaX1FrJ+t9yg=; b=qzwOV+ktO4umcJoSWx0ux84NYqHFLLJBv14KFo6zjes9EYruAPgguEB6so6Y6LBM0+ Yt9C+4HN8kk09qagTfC6qjSZfh5nlZgFGBHnSdazKyLhWFviGW92QjnM+XoUSEDRsu8T 3OIQi538B3XjiRyUTipf5wvo2z/41JX45c37U2de/3epbqnEPFeMrWBy5WYg5zoICSm4 byp8z39p2cToYb50HyJtmv/qzlPLdOUGtpuSgY1SeKUg6XxaorzanWkh/C/+rLUOShEJ 3vPUWLeldHZKwtV59ozkxtuXkGrzddPGnaNzMhcZzkAuGQDW1qRURTr/iljHcrJnoRKR M/gA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh4-v6si3461568plb.386.2018.11.08.00.41.49; Thu, 08 Nov 2018 00:42:06 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726721AbeKHSPy (ORCPT + 99 others); Thu, 8 Nov 2018 13:15:54 -0500 Received: from mail.bootlin.com ([62.4.15.54]:58148 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbeKHSPy (ORCPT ); Thu, 8 Nov 2018 13:15:54 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 9F56920970; Thu, 8 Nov 2018 09:41:26 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from bbrezillon (aaubervilliers-681-1-30-49.w90-88.abo.wanadoo.fr [90.88.15.49]) by mail.bootlin.com (Postfix) with ESMTPSA id 1B96E2071E; Thu, 8 Nov 2018 09:41:26 +0100 (CET) Date: Thu, 8 Nov 2018 09:41:25 +0100 From: Boris Brezillon To: Frieder Schrempf Cc: linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, richard@nod.at, miquel.raynal@bootlin.com, broonie@kernel.org, david.wolfe@nxp.com, fabio.estevam@nxp.com, prabhakar.kushwaha@nxp.com, yogeshnarayan.gaur@nxp.com, han.xu@nxp.com, shawnguo@kernel.org, Frieder Schrempf , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 03/10] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Message-ID: <20181108094125.02e9b1e9@bbrezillon> In-Reply-To: <1541601809-16950-4-git-send-email-frieder.schrempf@kontron.de> References: <1541601809-16950-1-git-send-email-frieder.schrempf@kontron.de> <1541601809-16950-4-git-send-email-frieder.schrempf@kontron.de> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 7 Nov 2018 15:43:20 +0100 Frieder Schrempf wrote: > 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", Looks like this change is not related to this commit, and I'm not sure it's even needed. Plus, the order differs from the previous description, so, if the doc was right before this change it should be: "fsl,ls2080a-qspi", "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";