]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
riscv: dts: spacemit: k3: add GPIO support
authorYixun Lan <dlan@kernel.org>
Wed, 4 Mar 2026 07:36:44 +0000 (07:36 +0000)
committerYixun Lan <dlan@kernel.org>
Fri, 13 Mar 2026 11:17:02 +0000 (11:17 +0000)
Add GPIO node in the Device Tree, so devices are able to request GPIO
resource properly.

Link: https://lore.kernel.org/r/20260304-01-dts-uart-full-v1-3-50a0aa53a245@kernel.org
Signed-off-by: Yixun Lan <dlan@kernel.org>
arch/riscv/boot/dts/spacemit/k3.dtsi

index 6449ab0562938b9fa3f4882ddf7b1345c423a3b6..3683a1a653628657b47fd2c08d4b9802de4ab5b9 100644 (file)
                        status = "disabled";
                };
 
+               gpio: gpio@d4019000 {
+                       compatible = "spacemit,k3-gpio";
+                       reg = <0x0 0xd4019000 0x0 0x100>;
+                       clocks = <&syscon_apbc CLK_APBC_GPIO>,
+                                <&syscon_apbc CLK_APBC_GPIO_BUS>;
+                       clock-names = "core", "bus";
+                       gpio-controller;
+                       #gpio-cells = <3>;
+                       interrupts = <58 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-parent = <&saplic>;
+                       interrupt-controller;
+                       #interrupt-cells = <3>;
+                       gpio-ranges = <&pinctrl 0 0 0 32>,
+                                     <&pinctrl 1 0 32 32>,
+                                     <&pinctrl 2 0 64 32>,
+                                     <&pinctrl 3 0 96 32>;
+               };
+
                pinctrl: pinctrl@d401e000 {
                        compatible = "spacemit,k3-pinctrl";
                        reg = <0x0 0xd401e000 0x0 0x1000>;