Skip to content

Commit 20b7792

Browse files
author
Yixun Lan
committed
riscv: dts: spacemit: k3: add GPIO support
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>
1 parent d894457 commit 20b7792

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

  • arch/riscv/boot/dts/spacemit

arch/riscv/boot/dts/spacemit/k3.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,24 @@
536536
status = "disabled";
537537
};
538538

539+
gpio: gpio@d4019000 {
540+
compatible = "spacemit,k3-gpio";
541+
reg = <0x0 0xd4019000 0x0 0x100>;
542+
clocks = <&syscon_apbc CLK_APBC_GPIO>,
543+
<&syscon_apbc CLK_APBC_GPIO_BUS>;
544+
clock-names = "core", "bus";
545+
gpio-controller;
546+
#gpio-cells = <3>;
547+
interrupts = <58 IRQ_TYPE_LEVEL_HIGH>;
548+
interrupt-parent = <&saplic>;
549+
interrupt-controller;
550+
#interrupt-cells = <3>;
551+
gpio-ranges = <&pinctrl 0 0 0 32>,
552+
<&pinctrl 1 0 32 32>,
553+
<&pinctrl 2 0 64 32>,
554+
<&pinctrl 3 0 96 32>;
555+
};
556+
539557
pinctrl: pinctrl@d401e000 {
540558
compatible = "spacemit,k3-pinctrl";
541559
reg = <0x0 0xd401e000 0x0 0x1000>;

0 commit comments

Comments
 (0)