* [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes
@ 2019-11-28 12:16 Christophe Leroy
2019-11-28 12:21 ` Linus Walleij
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Christophe Leroy @ 2019-11-28 12:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Rob Herring, Mark Rutland, Mark Brown
Cc: linux-kernel, linuxppc-dev, devicetree, Linus Walleij, linux-spi
Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO
descriptors"), the prefered way to define chipselect GPIOs is using
'cs-gpios' property instead of the legacy 'gpios' property.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
Documentation/devicetree/bindings/spi/fsl-spi.txt | 8 ++++----
arch/powerpc/boot/dts/mgcoge.dts | 2 +-
arch/powerpc/boot/dts/mpc832x_rdb.dts | 2 +-
arch/powerpc/boot/dts/mpc8610_hpcd.dts | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/spi/fsl-spi.txt b/Documentation/devicetree/bindings/spi/fsl-spi.txt
index 411375eac54d..0654380eb751 100644
--- a/Documentation/devicetree/bindings/spi/fsl-spi.txt
+++ b/Documentation/devicetree/bindings/spi/fsl-spi.txt
@@ -15,13 +15,13 @@ Required properties:
- clock-frequency : input clock frequency to non FSL_SOC cores
Optional properties:
-- gpios : specifies the gpio pins to be used for chipselects.
+- cs-gpios : specifies the gpio pins to be used for chipselects.
The gpios will be referred to as reg = <index> in the SPI child nodes.
If unspecified, a single SPI device without a chip select can be used.
- fsl,spisel_boot : for the MPC8306 and MPC8309, specifies that the
SPISEL_BOOT signal is used as chip select for a slave device. Use
reg = <number of gpios> in the corresponding child node, i.e. 0 if
- the gpios property is not present.
+ the cs-gpios property is not present.
Example:
spi@4c0 {
@@ -31,8 +31,8 @@ Example:
interrupts = <82 0>;
interrupt-parent = <700>;
mode = "cpu";
- gpios = <&gpio 18 1 // device reg=<0>
- &gpio 19 1>; // device reg=<1>
+ cs-gpios = <&gpio 18 1 // device reg=<0>
+ &gpio 19 1>; // device reg=<1>
};
diff --git a/arch/powerpc/boot/dts/mgcoge.dts b/arch/powerpc/boot/dts/mgcoge.dts
index a2dd5f1da621..7de068991bde 100644
--- a/arch/powerpc/boot/dts/mgcoge.dts
+++ b/arch/powerpc/boot/dts/mgcoge.dts
@@ -224,7 +224,7 @@
reg = <0x11a80 0x40 0x89fc 0x2>;
interrupts = <2 8>;
interrupt-parent = <&PIC>;
- gpios = < &cpm2_pio_d 19 0>;
+ cs-gpios = < &cpm2_pio_d 19 0>;
#address-cells = <1>;
#size-cells = <0>;
ds3106@1 {
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index b6257186528e..ecebc27a2898 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -249,7 +249,7 @@
reg = <0x4c0 0x40>;
interrupts = <2>;
interrupt-parent = <&qeic>;
- gpios = <&qe_pio_d 13 0>;
+ cs-gpios = <&qe_pio_d 13 0>;
mode = "cpu-qe";
mmc-slot@0 {
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
index 1a8321ac105a..33bbe58c1ad0 100644
--- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
+++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
@@ -200,7 +200,7 @@
interrupts = <59 2>;
interrupt-parent = <&mpic>;
mode = "cpu";
- gpios = <&sdcsr_pio 7 0>;
+ cs-gpios = <&sdcsr_pio 7 0>;
sleep = <&pmc 0x00000800 0>;
mmc-slot@0 {
--
2.13.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes
2019-11-28 12:16 [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes Christophe Leroy
@ 2019-11-28 12:21 ` Linus Walleij
2019-12-13 21:34 ` Rob Herring
2020-01-29 5:17 ` [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl, spi nodes Michael Ellerman
2 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2019-11-28 12:21 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Rob Herring, Mark Rutland, Mark Brown, linux-kernel,
linuxppc-dev@lists.ozlabs.org list,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
linux-spi
On Thu, Nov 28, 2019 at 1:16 PM Christophe Leroy
<christophe.leroy@c-s.fr> wrote:
> Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO
> descriptors"), the prefered way to define chipselect GPIOs is using
> 'cs-gpios' property instead of the legacy 'gpios' property.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes
2019-11-28 12:16 [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes Christophe Leroy
2019-11-28 12:21 ` Linus Walleij
@ 2019-12-13 21:34 ` Rob Herring
2019-12-14 7:30 ` Christophe Leroy
2020-01-29 5:17 ` [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl, spi nodes Michael Ellerman
2 siblings, 1 reply; 5+ messages in thread
From: Rob Herring @ 2019-12-13 21:34 UTC (permalink / raw)
To: Christophe Leroy
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Mark Rutland, Mark Brown, linux-kernel, linuxppc-dev, devicetree,
Linus Walleij, linux-spi
On Thu, Nov 28, 2019 at 12:16:35PM +0000, Christophe Leroy wrote:
> Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO
> descriptors"), the prefered way to define chipselect GPIOs is using
> 'cs-gpios' property instead of the legacy 'gpios' property.
This will break using a new dtb on a kernel without the above commit. Or
with any OS that never made the change.
I'm fine with the doc change, but you should keep 'gpios' as deprecated.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> Documentation/devicetree/bindings/spi/fsl-spi.txt | 8 ++++----
> arch/powerpc/boot/dts/mgcoge.dts | 2 +-
> arch/powerpc/boot/dts/mpc832x_rdb.dts | 2 +-
> arch/powerpc/boot/dts/mpc8610_hpcd.dts | 2 +-
> 4 files changed, 7 insertions(+), 7 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes
2019-12-13 21:34 ` Rob Herring
@ 2019-12-14 7:30 ` Christophe Leroy
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2019-12-14 7:30 UTC (permalink / raw)
To: Rob Herring
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Mark Rutland, Mark Brown, linux-kernel, linuxppc-dev, devicetree,
Linus Walleij, linux-spi
Le 13/12/2019 à 22:34, Rob Herring a écrit :
> On Thu, Nov 28, 2019 at 12:16:35PM +0000, Christophe Leroy wrote:
>> Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO
>> descriptors"), the prefered way to define chipselect GPIOs is using
>> 'cs-gpios' property instead of the legacy 'gpios' property.
>
> This will break using a new dtb on a kernel without the above commit. Or
> with any OS that never made the change.
Why would anybody use a new dtb on an old kernel ? I have not tagged
this change for stable, it will only apply to DTBs in new kernels, won't
it ?
That's not the first time DTS have to change for new kernels. For
instance, some time ago I had to replace all 'gpios' property by a set
of 'rdy-gpio', 'nce-gpio', 'ale-gpio' and 'cle-gpio' properties to
continue using 'gpio-control-nand' driver.
>
> I'm fine with the doc change, but you should keep 'gpios' as deprecated.
Ok
Christophe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl, spi nodes
2019-11-28 12:16 [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes Christophe Leroy
2019-11-28 12:21 ` Linus Walleij
2019-12-13 21:34 ` Rob Herring
@ 2020-01-29 5:17 ` Michael Ellerman
2 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2020-01-29 5:17 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
Rob Herring, Mark Rutland, Mark Brown
Cc: devicetree, Linus Walleij, linuxppc-dev, linux-kernel, linux-spi
On Thu, 2019-11-28 at 12:16:35 UTC, Christophe Leroy wrote:
> Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO
> descriptors"), the prefered way to define chipselect GPIOs is using
> 'cs-gpios' property instead of the legacy 'gpios' property.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/8c452a889821ca0cd2a5f2e3e87fbc01e56408cb
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-01-29 5:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-28 12:16 [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl,spi nodes Christophe Leroy
2019-11-28 12:21 ` Linus Walleij
2019-12-13 21:34 ` Rob Herring
2019-12-14 7:30 ` Christophe Leroy
2020-01-29 5:17 ` [PATCH] powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl, spi nodes Michael Ellerman
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).