From: Rustam Adilov Date: Tue, 10 Mar 2026 17:07:18 +0000 (+0500) Subject: realtek: gpio: backport rtl9607c gpio support patches X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adc1406f32fdf9c43fd4b356bb90f4fe6df75308;p=thirdparty%2Fopenwrt.git realtek: gpio: backport rtl9607c gpio support patches This commit backports 2 patches that add gpio controller support to RTL9607C SoCs. It enables us to make use of anything that can be controlled by GPIO on RTL9607C, like LEDs, buttons and such. Signed-off-by: Rustam Adilov Link: https://github.com/openwrt/openwrt/pull/22358 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/patches-6.12/023-01-v7.0-dt-bindings-gpio-realtek-otto-add-rtl9607-compatible.patch b/target/linux/realtek/patches-6.12/023-01-v7.0-dt-bindings-gpio-realtek-otto-add-rtl9607-compatible.patch new file mode 100644 index 00000000000..bfaf0928721 --- /dev/null +++ b/target/linux/realtek/patches-6.12/023-01-v7.0-dt-bindings-gpio-realtek-otto-add-rtl9607-compatible.patch @@ -0,0 +1,27 @@ +From 49944d6ab7eb951f2aefee69341c623e13434863 Mon Sep 17 00:00:00 2001 +From: Rustam Adilov +Date: Thu, 5 Mar 2026 21:11:05 +0500 +Subject: dt-bindings: gpio: realtek-otto: add rtl9607 compatible + +Add the "realtek,rtl9607-gpio" compatible for GPIO nodes +on the RTL9607C SoC series. + +Signed-off-by: Rustam Adilov +Reviewed-by: Linus Walleij +Reviewed-by: Sander Vanheule +Link: https://patch.msgid.link/20260305161106.15999-2-adilov@disroot.org +Signed-off-by: Bartosz Golaszewski +--- + Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml | 1 + + 1 file changed, 1 insertion(+) + +--- a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml ++++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml +@@ -30,6 +30,7 @@ properties: + - realtek,rtl8390-gpio + - realtek,rtl9300-gpio + - realtek,rtl9310-gpio ++ - realtek,rtl9607-gpio + - const: realtek,otto-gpio + + reg: true diff --git a/target/linux/realtek/patches-6.12/023-02-v7.0-gpio-realtek-otto-add-rtl9607-support.patch b/target/linux/realtek/patches-6.12/023-02-v7.0-gpio-realtek-otto-add-rtl9607-support.patch new file mode 100644 index 00000000000..bc60d881a74 --- /dev/null +++ b/target/linux/realtek/patches-6.12/023-02-v7.0-gpio-realtek-otto-add-rtl9607-support.patch @@ -0,0 +1,29 @@ +From 8f0aecf2957e7dba78603544368846133bf6d22e Mon Sep 17 00:00:00 2001 +From: Rustam Adilov +Date: Thu, 5 Mar 2026 21:11:06 +0500 +Subject: gpio: realtek-otto: add rtl9607 support + +The RTL9607C SoC has support for 3 GPIO banks with 32 GPIOs each and +the port order is reversed just like in RTL930x. + +Signed-off-by: Rustam Adilov +Reviewed-by: Sander Vanheule +Link: https://patch.msgid.link/20260305161106.15999-3-adilov@disroot.org +Signed-off-by: Bartosz Golaszewski +--- + drivers/gpio/gpio-realtek-otto.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpio/gpio-realtek-otto.c ++++ b/drivers/gpio/gpio-realtek-otto.c +@@ -350,6 +350,10 @@ static const struct of_device_id realtek + { + .compatible = "realtek,rtl9310-gpio", + }, ++ { ++ .compatible = "realtek,rtl9607-gpio", ++ .data = (void *)GPIO_PORTS_REVERSED, ++ }, + {} + }; + MODULE_DEVICE_TABLE(of, realtek_gpio_of_match);