Thread (1 message) 1 message, 1 author, 2015-03-04
DORMANTno replies

[PATCH 2/2] dt/bindings: control CS via standard GPIO operations instead of SPI-HW

From: <hidden>
Date: 2015-03-04 16:40:04
Also in: linux-spi
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

From: Martin Sperl <redacted>

Change the device tree to use cs-gpios for the spi bus master
and standard gpio operation instead of relying on the HW with
just 2 chip_selects using ALT0.

This reassigns the existing CS pins 7(=CS1) and 8(=CS0)
as output instead of ALT0 (=SPI HW block controlled) 
and adds them in the list of cs-gpios for the spi-bus.

Signed-off-by: Martin Sperl <redacted>

---
 arch/arm/boot/dts/bcm2835-rpi.dtsi |    4 ++--
 arch/arm/boot/dts/bcm2835.dtsi     |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index c706448..f0e36ab 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -20,12 +20,12 @@
 	pinctrl-names = "default";
 
 	gpioout: gpioout {
-		brcm,pins = <6>;
+		brcm,pins = <6 7 8>;
 		brcm,function = <1>; /* GPIO out */
 	};
 
 	alt0: alt0 {
-		brcm,pins = <0 1 2 3 4 5 7 8 9 10 11 14 15 40 45>;
+		brcm,pins = <0 1 2 3 4 5 9 10 11 14 15 40 45>;
 		brcm,function = <4>; /* alt0 */
 	};
 
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 3342cb1..74d08e1 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -110,6 +110,7 @@
 			#address-cells = <1>;
 			#size-cells = <0>;
 			status = "disabled";
+			cs-gpios = <&gpio 8 0>, <&gpio 7 0>;
 		};
 
 		i2c0: i2c@20205000 {
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help