linux/arch/mips/boot/dts/realtek/rtl930x.dtsi
Chris Packham e4442636a6 mips: dts: realtek: Add gpio block
The RTL9300 has a block of GPIOs included in the SoC. Add these to the
devicetree.

This is taken from openwrt[1] the differences are removing the
unnecessary second cell from the interrupt and removing the -controller
from the node name to conform to the dtschema.

[1] - https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/dts/rtl930x.dtsi

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2025-07-02 13:18:49 +02:00

217 lines
4.2 KiB
Text

// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
/ {
compatible = "realtek,rtl9302-soc";
#address-cells = <1>;
#size-cells = <1>;
aliases {
serial0 = &uart0;
serial1 = &uart1;
};
cpuintc: cpuintc {
compatible = "mti,cpu-interrupt-controller";
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "mips,mips34Kc";
reg = <0>;
clocks = <&baseclk>;
};
};
baseclk: clock-800mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <800000000>;
};
lx_clk: clock-175mhz {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <175000000>;
};
switch0: switch@1b000000 {
compatible = "realtek,rtl9301-switch", "syscon", "simple-mfd";
reg = <0x1b000000 0x10000>;
#address-cells = <1>;
#size-cells = <1>;
interrupt-parent = <&intc>;
interrupts = <23>, <24>;
interrupt-names = "switch", "nic";
reboot@c {
compatible = "syscon-reboot";
reg = <0x0c 0x4>;
value = <0x01>;
};
i2c0: i2c@36c {
compatible = "realtek,rtl9301-i2c";
reg = <0x36c 0x14>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
i2c1: i2c@388 {
compatible = "realtek,rtl9301-i2c";
reg = <0x388 0x14>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio_controller: mdio-controller@ca00 {
compatible = "realtek,rtl9301-mdio";
reg = <0xca00 0x200>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
mdio0: mdio-bus@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio1: mdio-bus@1 {
reg = <1>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio2: mdio-bus@2 {
reg = <2>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
mdio3: mdio-bus@3 {
reg = <3>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
};
};
soc: soc@18000000 {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x18000000 0x20000>;
intc: interrupt-controller@3000 {
compatible = "realtek,rtl9300-intc", "realtek,rtl-intc";
reg = <0x3000 0x18>, <0x3018 0x18>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>, <3>, <4>, <5>, <6>, <7>;
};
spi0: spi@1200 {
compatible = "realtek,rtl8380-spi";
reg = <0x1200 0x100>;
#address-cells = <1>;
#size-cells = <0>;
};
timer0: timer@3200 {
compatible = "realtek,rtl9302-timer", "realtek,otto-timer";
reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
<0x3230 0x10>, <0x3240 0x10>;
interrupt-parent = <&intc>;
interrupts = <7>, <8>, <9>, <10>, <11>;
clocks = <&lx_clk>;
};
watchdog0: watchdog@3260 {
compatible = "realtek,rtl9300-wdt";
reg = <0x3260 0xc>;
realtek,reset-mode = "soc";
clocks = <&lx_clk>;
timeout-sec = <30>;
interrupt-parent = <&intc>;
interrupt-names = "phase1", "phase2";
interrupts = <5>, <6>;
};
gpio0: gpio@3300 {
compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
reg = <0x3300 0x1c>, <0x3338 0x8>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <24>;
interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&intc>;
interrupts = <13>;
};
snand: spi@1a400 {
compatible = "realtek,rtl9301-snand";
reg = <0x1a400 0x44>;
interrupt-parent = <&intc>;
interrupts = <19>;
clocks = <&lx_clk>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
};
uart0: serial@2000 {
compatible = "ns16550a";
reg = <0x2000 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <30>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
uart1: serial@2100 {
compatible = "ns16550a";
reg = <0x2100 0x100>;
clocks = <&lx_clk>;
interrupt-parent = <&intc>;
interrupts = <31>;
reg-io-width = <1>;
reg-shift = <2>;
fifo-size = <1>;
no-loopback-test;
status = "disabled";
};
};
};