]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ARM: dts: nomadik: Fix polarity of SPI CS
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Mar 2019 15:31:22 +0000 (16:31 +0100)
committerArnd Bergmann <arnd@arndb.de>
Mon, 25 Mar 2019 16:03:34 +0000 (17:03 +0100)
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: a5fa502d2ed0 ("ARM: dts: nomadik: Augment NHK15 panel setting")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/ste-nomadik-nhk15.dts

index 04066f9cb8a31c643cba82ea337dd22cb7a85626..f2f6558a00f188937ca55ee5f44e689da5e1bf7a 100644 (file)
                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>;
 
                /*