* [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS
@ 2019-03-18 15:31 Linus Walleij
2019-03-25 16:03 ` Arnd Bergmann
2019-04-07 10:16 ` Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2019-03-18 15:31 UTC (permalink / raw)
To: arm; +Cc: Linus Walleij, linux-arm-kernel
The SPI DT bindings are for historical reasons a pitfall,
the ability to flag a GPIO line as active high/low with
the second cell flags was introduced later so the SPI
subsystem will only accept the bool flag spi-cs-high
to indicate that the line is active high.
It worked by mistake, but the mistake was corrected
in another commit.
The comment in the DTS file was also misleading: this
CS is indeed active high.
Fixes: cffbb02dafa3 ("ARM: dts: nomadik: Augment NHK15 panel setting")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ARM SoC people: please apply this directly for fixes
if you're OK with it.
---
arch/arm/boot/dts/ste-nomadik-nhk15.dts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/ste-nomadik-nhk15.dts b/arch/arm/boot/dts/ste-nomadik-nhk15.dts
index 04066f9cb8a3..f2f6558a00f1 100644
--- a/arch/arm/boot/dts/ste-nomadik-nhk15.dts
+++ b/arch/arm/boot/dts/ste-nomadik-nhk15.dts
@@ -213,12 +213,13 @@
gpio-sck = <&gpio0 5 GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpio0 4 GPIO_ACTIVE_HIGH>;
/*
- * It's not actually active high, but the frameworks assume
- * the polarity of the passed-in GPIO is "normal" (active
- * high) then actively drives the line low to select the
- * chip.
+ * This chipselect is active high. Just setting the flags
+ * to GPIO_ACTIVE_HIGH is not enough for the SPI DT bindings,
+ * it will be ignored, only the special "spi-cs-high" flag
+ * really counts.
*/
cs-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
+ spi-cs-high;
num-chipselects = <1>;
/*
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS
2019-03-18 15:31 [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS Linus Walleij
@ 2019-03-25 16:03 ` Arnd Bergmann
2019-04-07 10:16 ` Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2019-03-25 16:03 UTC (permalink / raw)
To: Linus Walleij; +Cc: arm-soc, Linux ARM
On Mon, Mar 18, 2019 at 4:31 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> The SPI DT bindings are for historical reasons a pitfall,
> the ability to flag a GPIO line as active high/low with
> the second cell flags was introduced later so the SPI
> subsystem will only accept the bool flag spi-cs-high
> to indicate that the line is active high.
>
> It worked by mistake, but the mistake was corrected
> in another commit.
>
> The comment in the DTS file was also misleading: this
> CS is indeed active high.
>
> Fixes: cffbb02dafa3 ("ARM: dts: nomadik: Augment NHK15 panel setting")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Applied to fixes, thanks!
Arnd
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS
2019-03-18 15:31 [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS Linus Walleij
2019-03-25 16:03 ` Arnd Bergmann
@ 2019-04-07 10:16 ` Linus Walleij
2019-04-07 22:19 ` Olof Johansson
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2019-04-07 10:16 UTC (permalink / raw)
To: arm-soc; +Cc: Linux ARM
Dear ARM SoC maintainers,
can you please revert this patch. It was the wrong solution to the
wrong problem, and I must have acted in stress. Andrey fixed the
real bug in a proper way in these commits:
commit e5545c94e43b8f6599ffc01df8d1aedf18ee912a
"gpio: of: Check propname before applying "cs-gpios" quirks"
commit 7ce40277bf848391705011ba37eac2e377cbd9e6
"gpio: of: Check for "spi-cs-high" in child instead of parent node"
On Mon, Mar 18, 2019 at 4:31 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> The SPI DT bindings are for historical reasons a pitfall,
> the ability to flag a GPIO line as active high/low with
> the second cell flags was introduced later so the SPI
> subsystem will only accept the bool flag spi-cs-high
> to indicate that the line is active high.
>
> It worked by mistake, but the mistake was corrected
> in another commit.
>
> The comment in the DTS file was also misleading: this
> CS is indeed active high.
>
> Fixes: cffbb02dafa3 ("ARM: dts: nomadik: Augment NHK15 panel setting")
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Thanks,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS
2019-04-07 10:16 ` Linus Walleij
@ 2019-04-07 22:19 ` Olof Johansson
0 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2019-04-07 22:19 UTC (permalink / raw)
To: Linus Walleij; +Cc: arm-soc, Linux ARM
On Sun, Apr 07, 2019 at 12:16:25PM +0200, Linus Walleij wrote:
> Dear ARM SoC maintainers,
>
> can you please revert this patch. It was the wrong solution to the
> wrong problem, and I must have acted in stress. Andrey fixed the
> real bug in a proper way in these commits:
>
> commit e5545c94e43b8f6599ffc01df8d1aedf18ee912a
> "gpio: of: Check propname before applying "cs-gpios" quirks"
> commit 7ce40277bf848391705011ba37eac2e377cbd9e6
> "gpio: of: Check for "spi-cs-high" in child instead of parent node"
Done, thanks!
-Olof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-07 22:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 15:31 [PATCH] ARM: dts: nomadik: Fix polarity of SPI CS Linus Walleij
2019-03-25 16:03 ` Arnd Bergmann
2019-04-07 10:16 ` Linus Walleij
2019-04-07 22:19 ` Olof Johansson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.