mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2026-01-25 05:01:00 -05:00
ipq806x: dts: fix SPI 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>
This commit is contained in:
committed by
Hauke Mehrtens
parent
dd7087aa17
commit
2a709d108e
@@ -249,7 +249,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -410,7 +410,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
@@ -432,7 +432,7 @@
|
||||
pinctrl-0 = <&spi6_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_LOW>;
|
||||
|
||||
dmas = <&adm_dma 8 0xb>,
|
||||
<&adm_dma 7 0x14>;
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "mx25u25635f", "jedec,spi-nor";
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -288,7 +288,7 @@ switch@10 {
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "everspin,mr25h256";
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "everspin,mr25h256";
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
w25q128@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 0>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash: flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
@@ -427,7 +427,7 @@
|
||||
pinctrl-0 = <&spi6_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 57 GPIO_ACTIVE_LOW>;
|
||||
|
||||
dmas = <&adm_dma 8 0xb>,
|
||||
<&adm_dma 7 0x14>;
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&qcom_pinmux 20 0>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "mx25u25635f", "jedec,spi-nor";
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -288,7 +288,7 @@ switch@10 {
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "everspin,mr25h256";
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "everspin,mr25h256";
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
m25p80@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>;
|
||||
cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_LOW>;
|
||||
|
||||
w25q128@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
|
||||
Reference in New Issue
Block a user