]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mips: dts: realtek: Add RTL838x SoC peripherals
authorSander Vanheule <sander@svanheule.net>
Sun, 19 Jan 2025 18:34:23 +0000 (19:34 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 21 Feb 2025 14:10:22 +0000 (15:10 +0100)
Add some of the SoC's CPU peripherals currently supported:
  - GPIO controller with support for 24 GPIO lines, although not all
    lines are brought out to pads on the SoC package. These lines can
    generate interrupts from external sources.
  - Watchdog which can be used to restart the SoC if no external restart
    logic is present.
  - SPI controller, primarily used to access NOR flash

Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/realtek/rtl838x.dtsi

index 246f4f607128c4c87f38daee92511ce3b3c46735..ce522a6af262028b4408caded901f1e4192ae3a0 100644 (file)
                #size-cells = <1>;
                ranges = <0x0 0x18000000 0x10000>;
 
+               spi0: spi@1200 {
+                       compatible = "realtek,rtl8380-spi";
+                       reg = <0x1200 0x100>;
+
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+               };
+
                uart0: serial@2000 {
                        compatible = "ns16550a";
                        reg = <0x2000 0x100>;
                        interrupt-parent = <&cpuintc>;
                        interrupts = <2>, <3>, <4>, <5>, <6>;
                };
+
+               watchdog: watchdog@3150 {
+                       compatible = "realtek,rtl8380-wdt";
+                       reg = <0x3150 0xc>;
+
+                       realtek,reset-mode = "soc";
+
+                       clocks = <&lx_clk>;
+                       timeout-sec = <20>;
+
+                       interrupt-parent = <&intc>;
+                       interrupt-names = "phase1", "phase2";
+                       interrupts = <19>, <18>;
+               };
+
+               gpio0: gpio@3500 {
+                       compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
+                       reg = <0x3500 0x1c>;
+
+                       gpio-controller;
+                       #gpio-cells = <2>;
+                       ngpios = <24>;
+
+                       interrupt-controller;
+                       #interrupt-cells = <2>;
+                       interrupt-parent = <&intc>;
+                       interrupts = <23>;
+               };
        };
 };