aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/patches-5.10
diff options
context:
space:
mode:
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>2021-04-05 22:53:46 -0700
committerChuanhong Guo <gch981213@gmail.com>2021-04-15 00:00:54 +0800
commit85ca6923bc21a7de031ca9b68e13ecfb4f3debd3 (patch)
treeaccf521ef40c5bfdb0f5da2a01b9ae9df0ea0a9b /target/linux/ramips/patches-5.10
parent5f07c579f8c2eeb8056628f7b6a8732bf0f8d492 (diff)
downloadupstream-85ca6923bc21a7de031ca9b68e13ecfb4f3debd3.tar.gz
upstream-85ca6923bc21a7de031ca9b68e13ecfb4f3debd3.tar.bz2
upstream-85ca6923bc21a7de031ca9b68e13ecfb4f3debd3.zip
ramips: gpio-ralink: use ngpios, not ralink,num-gpios
DTS properties that match *-gpios are treated specially. Use ngpios instead, as most GPIO drivers upstream do. Fixes 5.10 DTS errors such as: OF: /palmbus@300000/gpio@600: could not find phandle Fixes DTC warnings such as: Warning (gpios_property): /palmbus@300000/gpio@600:ralink,num-gpios: Could not get phandle node for (cell 0) Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Cc: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux/ramips/patches-5.10')
-rw-r--r--target/linux/ramips/patches-5.10/801-DT-Add-documentation-for-gpio-ralink.patch4
-rw-r--r--target/linux/ramips/patches-5.10/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch2
-rw-r--r--target/linux/ramips/patches-5.10/804-staging-mt7621-pinctrl-use-ngpios-not-num-gpios.patch11
3 files changed, 14 insertions, 3 deletions
diff --git a/target/linux/ramips/patches-5.10/801-DT-Add-documentation-for-gpio-ralink.patch b/target/linux/ramips/patches-5.10/801-DT-Add-documentation-for-gpio-ralink.patch
index 7d5f98f647..93dabf8776 100644
--- a/target/linux/ramips/patches-5.10/801-DT-Add-documentation-for-gpio-ralink.patch
+++ b/target/linux/ramips/patches-5.10/801-DT-Add-documentation-for-gpio-ralink.patch
@@ -29,7 +29,7 @@ Cc: linux-gpio@vger.kernel.org
+- reg : Physical base address and length of the controller's registers
+- interrupt-parent: phandle to the INTC device node
+- interrupts : Specify the INTC interrupt number
-+- ralink,num-gpios : Specify the number of GPIOs
++- ngpios : Specify the number of GPIOs
+- ralink,register-map : The register layout depends on the GPIO bank and actual
+ SoC type. Register offsets need to be in this order.
+ [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ]
@@ -50,8 +50,8 @@ Cc: linux-gpio@vger.kernel.org
+ interrupt-parent = <&intc>;
+ interrupts = <6>;
+
++ ngpios = <24>;
+ ralink,gpio-base = <0>;
-+ ralink,num-gpios = <24>;
+ ralink,register-map = [ 00 04 08 0c
+ 20 24 28 2c
+ 30 34 ];
diff --git a/target/linux/ramips/patches-5.10/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch b/target/linux/ramips/patches-5.10/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
index 141d29f940..c173336924 100644
--- a/target/linux/ramips/patches-5.10/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
+++ b/target/linux/ramips/patches-5.10/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
@@ -357,7 +357,7 @@ Cc: linux-gpio@vger.kernel.org
+ return -EINVAL;
+ }
+
-+ ngpio = of_get_property(np, "ralink,num-gpios", NULL);
++ ngpio = of_get_property(np, "ngpios", NULL);
+ if (!ngpio) {
+ dev_err(&pdev->dev, "failed to read number of pins\n");
+ return -EINVAL;
diff --git a/target/linux/ramips/patches-5.10/804-staging-mt7621-pinctrl-use-ngpios-not-num-gpios.patch b/target/linux/ramips/patches-5.10/804-staging-mt7621-pinctrl-use-ngpios-not-num-gpios.patch
new file mode 100644
index 0000000000..0d62bd8b03
--- /dev/null
+++ b/target/linux/ramips/patches-5.10/804-staging-mt7621-pinctrl-use-ngpios-not-num-gpios.patch
@@ -0,0 +1,11 @@
+--- a/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
++++ b/drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c
+@@ -354,7 +354,7 @@ static int rt2880_pinmux_probe(struct pl
+ if (!of_device_is_available(np))
+ continue;
+
+- ngpio = of_get_property(np, "ralink,num-gpios", NULL);
++ ngpio = of_get_property(np, "ngpios", NULL);
+ gpiobase = of_get_property(np, "ralink,gpio-base", NULL);
+ if (!ngpio || !gpiobase) {
+ dev_err(&pdev->dev, "failed to load chip info\n");