From patchwork Tue Nov 13 13:47:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frieder Schrempf X-Patchwork-Id: 997112 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="bx/gqzS0"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="cWLpWGIl"; 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 42vTWY2JSNz9s3q for ; Wed, 14 Nov 2018 00:49:29 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: 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=pd6mYxchInpU4d3/nuFVJOMrZ/EA7uygHJJMZiOMacI=; b=bx/gqzS03BrlvV 2UJGnjJQaaCsgoMKTAgYHHMEmzBWq+Tt0hrlFyyzMIqN1GLAqhz/4/lOwI4GW9mH4cAgIbEdSkNCR ifyjJhfmM6sULw0Hr2ngpwoDcggoyDlTJqVwxDYzqrv3I3WJ6CmV424d+KxqeqY6iBa6DFvcOb2aQ wGVuJ4kyZLDOFKG7c83cgvVsCk1RTiMB3Tn/ECbnuH/fLhZF7r7Whx1d08BCWEFYwqUlPwU7vx3Ct 3MfkmLaJNPxOZ2fpVdaZttjPHwW/T2btuh/g8q2oEGbi9UzDBkcsh7e7BJ+JftZyr4JjEOG34G/YU zII0oYzePxoUJs36ihlA==; 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 1gMZ4D-0005vU-Vy; Tue, 13 Nov 2018 13:49:22 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZ2n-0004ZT-6Y for linux-mtd@bombadil.infradead.org; Tue, 13 Nov 2018 13:47:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=s27C0Fi97mf0ZUraXrTjIvR/9ErHle5UvTxqW0kNHFw=; b=cWLpWGIlKwfkQ/Vw768d3CFxtZ nKZ9AqesFh+KON2XlgrQmvY5+vcTT+v4WkZ6ZExNS7enmOVb6Y6pXbpzZeCZBqmth8PkX+OnFo5WT J2d6IBOdvYxQukpjcKdSuudQcL+s2s9DGkpZY1K1SFP268hCFqaQdSQX+3muCSn0M35UOl4QvYJFM PVbI50ozIbrSKottmGxkkFNKqBA2Y0jwkDoD8+9xAtXBn/fJk6mOC3RFjQOWb9kT9JR2K3OytnuTO 3Uj7yEBl2wJvHFN4LbkZPqvVr1oUUGJnNWO0dRQaspVggr7UVbs3G+jkfwDPHabznxzXWelybM6Vq QdQifY8A==; Received: from skedge04.snt-world.com ([91.208.41.69]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZ2j-0005yF-8I for linux-mtd@lists.infradead.org; Tue, 13 Nov 2018 13:47:51 +0000 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 3646167A08A; Tue, 13 Nov 2018 14:47:38 +0100 (CET) Received: from sntmail11s.snt-is.com (10.203.32.181) 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, 13 Nov 2018 14:47:37 +0100 Received: from sntmail11s.snt-is.com ([fe80::b972:ad22:ada5:7c6a]) by sntmail11s.snt-is.com ([fe80::b972:ad22:ada5:7c6a%4]) with mapi id 15.01.1466.003; Tue, 13 Nov 2018 14:47:37 +0100 From: Schrempf Frieder To: "linux-mtd@lists.infradead.org" , "boris.brezillon@bootlin.com" , "linux-spi@vger.kernel.org" , Mark Brown Subject: [PATCH v5 5/9] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Thread-Topic: [PATCH v5 5/9] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver Thread-Index: AQHUe1dwps7l/YeMeECxVWvmG8EAHQ== Date: Tue, 13 Nov 2018 13:47:37 +0000 Message-ID: <1542116782-13118-6-git-send-email-frieder.schrempf@kontron.de> References: <1542116782-13118-1-git-send-email-frieder.schrempf@kontron.de> In-Reply-To: <1542116782-13118-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 MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 3646167A08A.ACDEB 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_134749_424462_F2DD97DF X-CRM114-Status: GOOD ( 23.71 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [91.208.41.69 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 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" , "linux-kernel@vger.kernel.org" , "shawnguo@kernel.org" , "marek.vasut@gmail.com" , "han.xu@nxp.com" , "prabhakar.kushwaha@nxp.com" , Schrempf Frieder , "miquel.raynal@bootlin.com" , "fabio.estevam@nxp.com" , "david.wolfe@nxp.com" , "computersforpeace@gmail.com" , "dwmw2@infradead.org" Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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";