riscv: dts: Add DT support for SiFive FU540 GPIO driver
authorYash Shah <yash.shah@sifive.com>
Tue, 10 Dec 2019 11:11:14 +0000 (16:41 +0530)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Wed, 29 Jan 2020 14:58:08 +0000 (14:58 +0000)
Add the gpio DT node in SiFive FU540 soc-specific DT file.
Enable the gpio node in HiFive Unleashed board-specific DT file.

Signed-off-by: Yash Shah <yash.shah@sifive.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/boot/dts/sifive/fu540-c000.dtsi
arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts

index a2e3d54e830cc2c2de4ab0382254adf8674a11a5..7db8610534834e1272662fbd3636eef0b3a565d7 100644 (file)
                        interrupts = <1 2 3>;
                        reg = <0x0 0x2010000 0x0 0x1000>;
                };
-
+               gpio: gpio@10060000 {
+                       compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
+                       interrupt-parent = <&plic0>;
+                       interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>,
+                                    <14>, <15>, <16>, <17>, <18>, <19>, <20>,
+                                    <21>, <22>;
+                       reg = <0x0 0x10060000 0x0 0x1000>;
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       clocks = <&prci PRCI_CLK_TLCLK>;
+                       status = "disabled";
+               };
        };
 };
index 88cfcb96bf233d3bb1c7677eb5526f6072e8ce77..609198cb1163756e9c00d6c8f70e8a8b2440c7a0 100644 (file)
@@ -94,3 +94,7 @@
 &pwm1 {
        status = "okay";
 };
+
+&gpio {
+       status = "okay";
+};