Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8297322imu; Tue, 4 Dec 2018 06:16:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/Wf7xXa6yoCuAkBFo9On2k1+ixVJqujs6lEvTzIc+qgUHkEZm+7qNGPGt8NAXRxk8ENPbvR X-Received: by 2002:a62:14d1:: with SMTP id 200mr20497725pfu.103.1543933001665; Tue, 04 Dec 2018 06:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543933001; cv=none; d=google.com; s=arc-20160816; b=qz+3ul+SR+p+T44rXxzBOjB+4cj82yuwShLezG0cCrjD5mrfvsCKoWWO08EcZ2Jkje lfn2Yvf/tfSVPO2vp10xM3u6VXT6RXPS+V9l2UFkNQ8tQ8bsPORmATLeIMNCCVZpGDOH EuBKWfgAOZRMXEUs0zGkAtDg2MAAlZX1wox9QR8buKjl76OS+varbRR9eiuuX3X0TYp9 HPAkRgO2xShyWhSFKZtcDRNov4qjJY9JmgCgjdqnCNPcA8k0wB2maF3gbJKAmC9a1yhX NXZsRYoP+wubTC2R4NGuL4vevZ9YbBGBRmfCjn3qIFdyCibB9GB0lP63zfC3nHZvAUQa h5HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=/uhqQXx9OT1kGAI6B0VEt5HZBx915t21vOUCOYCXhVk=; b=ZcCAFyhymu9iPm6we2ToyH+6EArK6zmuZeWvDaiXGOso0eJiJYeBst3lBwnhn2JDsw Hm074dpgwzX+pMwT0/O0dkloFHLUywESAAWkJHMC0Aczog0vuZaNqRzITKK4ZnrkhIZQ WWCG0Qp/7J9HOOXaU4g6uy//AyjlbL53FvRFAheQkFQJ71s4+cCj7A9CjCKmNoZfqOC8 7ywIigN+dASfojZJWUtv6enpxyBD/6t+UIEq8qHztQM9NBG2SGYTr1R4hwB9Hl+25zCk AKgcUsS1Y3nopQovnbbXt8aY/U8YkfSJ3FNKBVn0BIAY5Q9oHXWkZ96Y/zM09Tn1R5xz kj7A== 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 d10si17277965pls.170.2018.12.04.06.16.25; Tue, 04 Dec 2018 06:16:41 -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 S1726636AbeLDOPZ convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Dec 2018 09:15:25 -0500 Received: from skedge04.snt-world.com ([91.208.41.69]:45340 "EHLO skedge04.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726420AbeLDOPZ (ORCPT ); Tue, 4 Dec 2018 09:15:25 -0500 Received: from sntmail12r.snt-is.com (unknown [10.203.32.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge04.snt-world.com (Postfix) with ESMTPS id C56C96798D2; Tue, 4 Dec 2018 15:15:20 +0100 (CET) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail12r.snt-is.com (10.203.32.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1466.3; Tue, 4 Dec 2018 15:15:20 +0100 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%5]) with mapi id 15.01.1466.003; Tue, 4 Dec 2018 15:15:20 +0100 From: Schrempf Frieder To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "linux-spi@vger.kernel.org" , Mark Brown CC: "dwmw2@infradead.org" , "computersforpeace@gmail.com" , "marek.vasut@gmail.com" , "richard@nod.at" , "miquel.raynal@bootlin.com" , "david.wolfe@nxp.com" , "fabio.estevam@nxp.com" , "prabhakar.kushwaha@nxp.com" , "yogeshnarayan.gaur@nxp.com" , "han.xu@nxp.com" , "shawnguo@kernel.org" , Schrempf Frieder , Rob Herring , Mark Rutland , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v7 5/9] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Thread-Topic: [PATCH v7 5/9] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Thread-Index: AQHUi9vJ/3Sk7BvQ8USVJUfsEaurVg== Date: Tue, 4 Dec 2018 14:15:20 +0000 Message-ID: <1543932685-15011-6-git-send-email-frieder.schrempf@kontron.de> References: <1543932685-15011-1-git-send-email-frieder.schrempf@kontron.de> In-Reply-To: <1543932685-15011-1-git-send-email-frieder.schrempf@kontron.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.25.9.43] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: C56C96798D2.A0337 X-SnT-MailScanner: Found to be clean X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: boris.brezillon@bootlin.com, broonie@kernel.org, computersforpeace@gmail.com, david.wolfe@nxp.com, devicetree@vger.kernel.org, dwmw2@infradead.org, fabio.estevam@nxp.com, han.xu@nxp.com, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, marek.vasut@gmail.com, mark.rutland@arm.com, miquel.raynal@bootlin.com, prabhakar.kushwaha@nxp.com, richard@nod.at, robh+dt@kernel.org, shawnguo@kernel.org, yogeshnarayan.gaur@nxp.com X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. [2] https://patchwork.ozlabs.org/patch/922817/#1925445 Signed-off-by: Frieder Schrempf Reviewed-by: Rob Herring --- .../devicetree/bindings/spi/spi-fsl-qspi.txt | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt index 483e9cf..e8f1d62 100644 --- a/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt +++ b/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt @@ -14,15 +14,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 +38,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"; -- 2.7.4