devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] spi: spi-gpio: Augment device tree bindings
       [not found] <20180212124532.25776-1-linus.walleij@linaro.org>
@ 2018-02-12 12:45 ` Linus Walleij
  2018-02-19  2:35   ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2018-02-12 12:45 UTC (permalink / raw)
  To: Mark Brown, linux-spi; +Cc: linux-gpio, Linus Walleij, devicetree, Rob Herring

After we augmented the core to handle "gpio-sck"/"sck-gpios",
"gpio-mosi"/"mosi-gpios", "gpio-miso"/"miso-gpios" alike,
deprecate the old binding and put the strict modern and
recommended binding practice into place as the default for
GPIO-based SPI.

This reflects the similar change in I2C:
commit 7d29f509d2cf
("dt-bindings: i2c: i2c-gpio: Add support for named gpios")

Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 Documentation/devicetree/bindings/spi/spi-gpio.txt | 24 ++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/spi/spi-gpio.txt b/Documentation/devicetree/bindings/spi/spi-gpio.txt
index a95603bcf6ff..52db562f17a4 100644
--- a/Documentation/devicetree/bindings/spi/spi-gpio.txt
+++ b/Documentation/devicetree/bindings/spi/spi-gpio.txt
@@ -1,18 +1,30 @@
 SPI-GPIO devicetree bindings
 
+This represents a group of 3-n GPIO lines used for bit-banged SPI on dedicated
+GPIO lines.
+
 Required properties:
 
  - compatible: should be set to "spi-gpio"
  - #address-cells: should be set to <0x1>
  - ranges
- - gpio-sck: GPIO spec for the SCK line to use
- - gpio-miso: GPIO spec for the MISO line to use
- - gpio-mosi: GPIO spec for the MOSI line to use
+ - sck-gpios: GPIO spec for the SCK line to use
+ - miso-gpios: GPIO spec for the MISO line to use
+ - mosi-gpios: GPIO spec for the MOSI line to use
  - cs-gpios: GPIOs to use for chipselect lines.
              Not needed if num-chipselects = <0>.
  - num-chipselects: Number of chipselect lines. Should be <0> if a single device
                     with no chip select is connected.
 
+Deprecated bindings:
+
+These legacy GPIO line bindings can alternatively be used to define the
+GPIO lines used, they should not be used in new device trees.
+
+ - gpio-sck: GPIO spec for the SCK line to use
+ - gpio-miso: GPIO spec for the MISO line to use
+ - gpio-mosi: GPIO spec for the MOSI line to use
+
 Example:
 
 	spi {
@@ -20,9 +32,9 @@ Example:
 		#address-cells = <0x1>;
 		ranges;
 
-		gpio-sck = <&gpio 95 0>;
-		gpio-miso = <&gpio 98 0>;
-		gpio-mosi = <&gpio 97 0>;
+		sck-gpios = <&gpio 95 0>;
+		miso-gpios = <&gpio 98 0>;
+		mosi-gpios = <&gpio 97 0>;
 		cs-gpios = <&gpio 125 0>;
 		num-chipselects = <1>;
 
-- 
2.14.3


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

* Re: [PATCH 3/3] spi: spi-gpio: Augment device tree bindings
  2018-02-12 12:45 ` [PATCH 3/3] spi: spi-gpio: Augment device tree bindings Linus Walleij
@ 2018-02-19  2:35   ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2018-02-19  2:35 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mark Brown, linux-spi, linux-gpio, devicetree

On Mon, Feb 12, 2018 at 01:45:32PM +0100, Linus Walleij wrote:
> After we augmented the core to handle "gpio-sck"/"sck-gpios",
> "gpio-mosi"/"mosi-gpios", "gpio-miso"/"miso-gpios" alike,
> deprecate the old binding and put the strict modern and
> recommended binding practice into place as the default for
> GPIO-based SPI.
> 
> This reflects the similar change in I2C:
> commit 7d29f509d2cf
> ("dt-bindings: i2c: i2c-gpio: Add support for named gpios")
> 
> Cc: devicetree@vger.kernel.org
> Cc: Rob Herring <robh@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  Documentation/devicetree/bindings/spi/spi-gpio.txt | 24 ++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2018-02-19  2:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20180212124532.25776-1-linus.walleij@linaro.org>
2018-02-12 12:45 ` [PATCH 3/3] spi: spi-gpio: Augment device tree bindings Linus Walleij
2018-02-19  2:35   ` Rob Herring

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).