ARM: dts: pxa3xx: Fix polarity on Raumfeld SPI CS
diff mbox series

Message ID 20190716213520.31427-1-linus.walleij@linaro.org
State New
Headers show
Series
  • ARM: dts: pxa3xx: Fix polarity on Raumfeld SPI CS
Related show

Commit Message

Linus Walleij July 16, 2019, 9:35 p.m. UTC
The SPI CS is active low and you probably will get a
warning in dmesg of the DT core enforcing it active low.

The reason it was set as GPIO_ACTIVE_HIGH in the old
board file was that the old spi-gpio driver would
invert the value and drive it low deliberately to
activate CS. The SPI and gpiolib core handling now
expects proper polarity to be used in the machine
descriptions.

Cc: Daniel Mack <daniel@zonque.org>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 arch/arm/boot/dts/pxa300-raumfeld-common.dtsi | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Daniel Mack July 17, 2019, 9:05 p.m. UTC | #1
On 16/7/2019 11:35 PM, Linus Walleij wrote:
> The SPI CS is active low and you probably will get a
> warning in dmesg of the DT core enforcing it active low.
> 
> The reason it was set as GPIO_ACTIVE_HIGH in the old
> board file was that the old spi-gpio driver would
> invert the value and drive it low deliberately to
> activate CS. The SPI and gpiolib core handling now
> expects proper polarity to be used in the machine
> descriptions.

Can't test this right now, but your explanation makes sense.

> Cc: Robert Jarzmik <robert.jarzmik@free.fr>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Daniel Mack <daniel@zonque.org>



Thanks,
Daniel

> ---
>  arch/arm/boot/dts/pxa300-raumfeld-common.dtsi | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi b/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
> index 8ac24e3c8513..86568637e6d9 100644
> --- a/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
> +++ b/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
> @@ -78,9 +78,9 @@
>  		gpio-miso = <&gpio 98 GPIO_ACTIVE_HIGH>;
>  		gpio-mosi = <&gpio 97 GPIO_ACTIVE_HIGH>;
>  		cs-gpios = <
> -			&gpio 34 GPIO_ACTIVE_HIGH
> -			&gpio 125 GPIO_ACTIVE_HIGH
> -			&gpio 96 GPIO_ACTIVE_HIGH
> +			&gpio 34 GPIO_ACTIVE_LOW
> +			&gpio 125 GPIO_ACTIVE_LOW
> +			&gpio 96 GPIO_ACTIVE_LOW
>  		>;
>  		num-chipselects = <3>;
>  
>

Patch
diff mbox series

diff --git a/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi b/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
index 8ac24e3c8513..86568637e6d9 100644
--- a/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
+++ b/arch/arm/boot/dts/pxa300-raumfeld-common.dtsi
@@ -78,9 +78,9 @@ 
 		gpio-miso = <&gpio 98 GPIO_ACTIVE_HIGH>;
 		gpio-mosi = <&gpio 97 GPIO_ACTIVE_HIGH>;
 		cs-gpios = <
-			&gpio 34 GPIO_ACTIVE_HIGH
-			&gpio 125 GPIO_ACTIVE_HIGH
-			&gpio 96 GPIO_ACTIVE_HIGH
+			&gpio 34 GPIO_ACTIVE_LOW
+			&gpio 125 GPIO_ACTIVE_LOW
+			&gpio 96 GPIO_ACTIVE_LOW
 		>;
 		num-chipselects = <3>;