devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 2/7] dt-bindings: spi: Move the bindings for the FSL QSPI driver
       [not found] <20190107092823.11188-1-frieder.schrempf@kontron.de>
@ 2019-01-07  9:29 ` Schrempf Frieder
  2019-01-07  9:29 ` [PATCH v8 3/7] dt-bindings: spi: Adjust " Schrempf Frieder
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-07  9:29 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, David Woodhouse,
	Brian Norris, Boris Brezillon, Marek Vasut, Richard Weinberger
  Cc: 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

From: Frieder Schrempf <frieder.schrempf@kontron.de>

Move the documentation of the old SPI NOR driver to the place of the new
SPI memory interface based driver.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../bindings/{mtd/fsl-quadspi.txt => spi/spi-fsl-qspi.txt}           | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt
similarity index 100%
rename from Documentation/devicetree/bindings/mtd/fsl-quadspi.txt
rename to Documentation/devicetree/bindings/spi/spi-fsl-qspi.txt
-- 
2.17.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v8 3/7] dt-bindings: spi: Adjust the bindings for the FSL QSPI driver
       [not found] <20190107092823.11188-1-frieder.schrempf@kontron.de>
  2019-01-07  9:29 ` [PATCH v8 2/7] dt-bindings: spi: Move the bindings for the FSL QSPI driver Schrempf Frieder
@ 2019-01-07  9:29 ` Schrempf Frieder
  2019-01-07  9:29 ` [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Schrempf Frieder
  2019-01-07  9:29 ` [PATCH v8 6/7] ARM64: dts: ls1046a: " Schrempf Frieder
  3 siblings, 0 replies; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-07  9:29 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org
  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

From: Frieder Schrempf <frieder.schrempf@kontron.de>

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 <frieder.schrempf@kontron.de>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../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 483e9cfac1b1..e8f1d627d288 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.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
       [not found] <20190107092823.11188-1-frieder.schrempf@kontron.de>
  2019-01-07  9:29 ` [PATCH v8 2/7] dt-bindings: spi: Move the bindings for the FSL QSPI driver Schrempf Frieder
  2019-01-07  9:29 ` [PATCH v8 3/7] dt-bindings: spi: Adjust " Schrempf Frieder
@ 2019-01-07  9:29 ` Schrempf Frieder
  2019-01-13  3:31   ` Shawn Guo
  2019-01-07  9:29 ` [PATCH v8 6/7] ARM64: dts: ls1046a: " Schrempf Frieder
  3 siblings, 1 reply; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-07  9:29 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Shawn Guo, Li Yang,
	Rob Herring, Mark Rutland
  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, Schrempf Frieder,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org

From: Frieder Schrempf <frieder.schrempf@kontron.de>

After switching to the new FSL QSPI driver the property
'fsl,qspi-has-second-chip' is not needed anymore.

The driver now uses the 'reg' property to determine the bus and
the chipselect.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
 arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts b/arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts
index 6a83f30029ea..d3a1a73ae97e 100644
--- a/arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts
+++ b/arch/arm/boot/dts/ls1021a-moxa-uc-8410a.dts
@@ -203,7 +203,6 @@
 };
 
 &qspi {
-	fsl,qspi-has-second-chip;
 	status = "okay";
 
 	flash: flash@0 {
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v8 6/7] ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip as it is not used
       [not found] <20190107092823.11188-1-frieder.schrempf@kontron.de>
                   ` (2 preceding siblings ...)
  2019-01-07  9:29 ` [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Schrempf Frieder
@ 2019-01-07  9:29 ` Schrempf Frieder
  2019-01-13  3:32   ` Shawn Guo
  3 siblings, 1 reply; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-07  9:29 UTC (permalink / raw)
  To: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Shawn Guo, Li Yang
  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, Schrempf Frieder, Rob Herring, Mark Rutland,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kerne

From: Frieder Schrempf <frieder.schrempf@kontron.de>

After switching to the new FSL QSPI driver the property
'fsl,qspi-has-second-chip' is not needed anymore.

The driver now uses the 'reg' property to determine the bus and
the chipselect.

Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
---
 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 1 -
 1 file changed, 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
index 9a2106e60e19..b2996db5903c 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
@@ -215,7 +215,6 @@
 			clock-names = "qspi_en", "qspi";
 			clocks = <&clockgen 4 1>, <&clockgen 4 1>;
 			big-endian;
-			fsl,qspi-has-second-chip;
 			status = "disabled";
 		};
 
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
  2019-01-07  9:29 ` [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Schrempf Frieder
@ 2019-01-13  3:31   ` Shawn Guo
  2019-01-14  8:18     ` Schrempf Frieder
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2019-01-13  3:31 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: Mark Rutland, devicetree@vger.kernel.org,
	computersforpeace@gmail.com, marek.vasut@gmail.com,
	richard@nod.at, prabhakar.kushwaha@nxp.com, han.xu@nxp.com,
	linux-kernel@vger.kernel.org, Rob Herring, Li Yang,
	boris.brezillon@bootlin.com, yogeshnarayan.gaur@nxp.com,
	broonie@kernel.org, linux-mtd@lists.infradead.org,
	miquel.raynal@bootlin.com, fabio.estevam@nxp.com,
	david.wolfe@nxp.com,
	"linux-spi@vger.kernel.org" <linux-spi@

On Mon, Jan 07, 2019 at 09:29:54AM +0000, Schrempf Frieder wrote:
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
> 
> After switching to the new FSL QSPI driver the property
> 'fsl,qspi-has-second-chip' is not needed anymore.
> 
> The driver now uses the 'reg' property to determine the bus and
> the chipselect.
> 
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>

Applied, thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 6/7] ARM64: dts: ls1046a: Remove fsl,qspi-has-second-chip as it is not used
  2019-01-07  9:29 ` [PATCH v8 6/7] ARM64: dts: ls1046a: " Schrempf Frieder
@ 2019-01-13  3:32   ` Shawn Guo
  0 siblings, 0 replies; 9+ messages in thread
From: Shawn Guo @ 2019-01-13  3:32 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Li Yang,
	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, Rob Herring

On Mon, Jan 07, 2019 at 09:29:55AM +0000, Schrempf Frieder wrote:
> From: Frieder Schrempf <frieder.schrempf@kontron.de>
> 
> After switching to the new FSL QSPI driver the property
> 'fsl,qspi-has-second-chip' is not needed anymore.
> 
> The driver now uses the 'reg' property to determine the bus and
> the chipselect.
> 
> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>

Different from arm dts files, we use prefix 'arm64: dts: ...'.
I fixed it up and applied the patch.

Shawn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
  2019-01-13  3:31   ` Shawn Guo
@ 2019-01-14  8:18     ` Schrempf Frieder
  2019-01-15 15:18       ` Shawn Guo
  0 siblings, 1 reply; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-14  8:18 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Li Yang,
	Rob Herring, Mark Rutland, 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

Hi Shawn,

On 13.01.19 04:31, Shawn Guo wrote:
> On Mon, Jan 07, 2019 at 09:29:54AM +0000, Schrempf Frieder wrote:
>> From: Frieder Schrempf <frieder.schrempf@kontron.de>
>>
>> After switching to the new FSL QSPI driver the property
>> 'fsl,qspi-has-second-chip' is not needed anymore.
>>
>> The driver now uses the 'reg' property to determine the bus and
>> the chipselect.
>>
>> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> 
> Applied, thanks.

I just noticed, that this and the arm64 patch depend on the driver 
changes for 5.1 that go through the SPI tree. So I guess we can't be 
sure that this will be merged in the right order and we need to delay 
this cleanup to 5.2, or am I wrong?

Thanks,
Frieder

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
  2019-01-14  8:18     ` Schrempf Frieder
@ 2019-01-15 15:18       ` Shawn Guo
  2019-01-15 15:24         ` Schrempf Frieder
  0 siblings, 1 reply; 9+ messages in thread
From: Shawn Guo @ 2019-01-15 15:18 UTC (permalink / raw)
  To: Schrempf Frieder
  Cc: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Li Yang,
	Rob Herring, Mark Rutland, 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

On Mon, Jan 14, 2019 at 08:18:49AM +0000, Schrempf Frieder wrote:
> Hi Shawn,
> 
> On 13.01.19 04:31, Shawn Guo wrote:
> > On Mon, Jan 07, 2019 at 09:29:54AM +0000, Schrempf Frieder wrote:
> >> From: Frieder Schrempf <frieder.schrempf@kontron.de>
> >>
> >> After switching to the new FSL QSPI driver the property
> >> 'fsl,qspi-has-second-chip' is not needed anymore.
> >>
> >> The driver now uses the 'reg' property to determine the bus and
> >> the chipselect.
> >>
> >> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> > 
> > Applied, thanks.
> 
> I just noticed, that this and the arm64 patch depend on the driver 
> changes for 5.1 that go through the SPI tree. So I guess we can't be 
> sure that this will be merged in the right order and we need to delay 
> this cleanup to 5.2, or am I wrong?

You are right.  I just dropped the both patches.  Ping me or resend when
they are ready to go.

Shawn

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used
  2019-01-15 15:18       ` Shawn Guo
@ 2019-01-15 15:24         ` Schrempf Frieder
  0 siblings, 0 replies; 9+ messages in thread
From: Schrempf Frieder @ 2019-01-15 15:24 UTC (permalink / raw)
  To: Shawn Guo
  Cc: linux-mtd@lists.infradead.org, boris.brezillon@bootlin.com,
	linux-spi@vger.kernel.org, broonie@kernel.org, Li Yang,
	Rob Herring, Mark Rutland, 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

On 15.01.19 16:18, Shawn Guo wrote:
> On Mon, Jan 14, 2019 at 08:18:49AM +0000, Schrempf Frieder wrote:
>> Hi Shawn,
>>
>> On 13.01.19 04:31, Shawn Guo wrote:
>>> On Mon, Jan 07, 2019 at 09:29:54AM +0000, Schrempf Frieder wrote:
>>>> From: Frieder Schrempf <frieder.schrempf@kontron.de>
>>>>
>>>> After switching to the new FSL QSPI driver the property
>>>> 'fsl,qspi-has-second-chip' is not needed anymore.
>>>>
>>>> The driver now uses the 'reg' property to determine the bus and
>>>> the chipselect.
>>>>
>>>> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de>
>>>
>>> Applied, thanks.
>>
>> I just noticed, that this and the arm64 patch depend on the driver
>> changes for 5.1 that go through the SPI tree. So I guess we can't be
>> sure that this will be merged in the right order and we need to delay
>> this cleanup to 5.2, or am I wrong?
> 
> You are right.  I just dropped the both patches.  Ping me or resend when
> they are ready to go.

Thanks, will do so.

Frieder

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-15 15:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190107092823.11188-1-frieder.schrempf@kontron.de>
2019-01-07  9:29 ` [PATCH v8 2/7] dt-bindings: spi: Move the bindings for the FSL QSPI driver Schrempf Frieder
2019-01-07  9:29 ` [PATCH v8 3/7] dt-bindings: spi: Adjust " Schrempf Frieder
2019-01-07  9:29 ` [PATCH v8 5/7] ARM: dts: ls1021a: Remove fsl,qspi-has-second-chip as it is not used Schrempf Frieder
2019-01-13  3:31   ` Shawn Guo
2019-01-14  8:18     ` Schrempf Frieder
2019-01-15 15:18       ` Shawn Guo
2019-01-15 15:24         ` Schrempf Frieder
2019-01-07  9:29 ` [PATCH v8 6/7] ARM64: dts: ls1046a: " Schrempf Frieder
2019-01-13  3:32   ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).