1
0
Fork 0
forked from mirror/openwrt
openwrt/target/linux/ramips
Shiji Yang c2e5bded8d treewide: dts: fix spi-gpio chip select GPIO polarity
The SPI chip select GPIO polarity is active low by default. We must
use "spi-cs-high" dts property to toggle the polarity. The polarity
on "cs-gpios" won't take effect at all[1]. Fix these incorrect GPIO
polarities to silence the kernel warnings.

[1] Refer to Linux/Documentation/devicetree/bindings/spi/spi-controller.yaml
```
      device node     | cs-gpio       | CS pin state active | Note
      ================+===============+=====================+=====
      spi-cs-high     | -             | H                   |
      -               | -             | L                   |
      spi-cs-high     | ACTIVE_HIGH   | H                   |
      -               | ACTIVE_HIGH   | L                   | 1
      spi-cs-high     | ACTIVE_LOW    | H                   | 2
      -               | ACTIVE_LOW    | L                   |

      Notes:
      1) Should print a warning about polarity inversion.
         Here it would be wise to avoid and define the gpio as
         ACTIVE_LOW.
      2) Should print a warning about polarity inversion
         because ACTIVE_LOW is overridden by spi-cs-high.
         Should be generally avoided and be replaced by
         spi-cs-high + ACTIVE_HIGH.
```

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/19845
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-10-20 00:28:15 +02:00
..
base-files/etc ramips: remove model name from LED labels 2020-10-02 14:51:57 +02:00
dts treewide: dts: fix spi-gpio chip select GPIO polarity 2025-10-20 00:28:15 +02:00
files/drivers treewide: remove of_gpio.h 2025-09-20 12:47:23 +02:00
image ramips: mt7621: add support for D-Link DIR-X1860 B1 / DIR-X1550 A1 2025-10-19 23:54:56 +02:00
mt76x8 ramips: Fix Hongdian H7920 v40 mac address 2025-10-04 19:36:44 +02:00
mt7620 ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
mt7621 ramips: mt7621: add support for D-Link DIR-X1860 B1 / DIR-X1550 A1 2025-10-19 23:54:56 +02:00
patches-6.12 kernel: bump 6.12 to 6.12.51 2025-10-09 23:13:45 +02:00
rt288x ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
rt305x ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
rt3883 ramips: drop 6.6 support 2025-07-07 20:30:26 +02:00
Makefile ramips: use kernel 6.12 by default 2025-07-07 20:30:26 +02:00
modules.mk ramips: mtk-sd: backport Host Software Queue support 2025-06-16 19:31:51 +02:00