e78e9ebeb8fdcae5f411e48bf1ecc67a43c1b456
[openwrt/staging/nbd.git] / target / linux / realtek / dts-5.10 / rtl930x.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 /dts-v1/;
4
5 #define STRINGIZE(s) #s
6 #define LAN_LABEL(p, s) STRINGIZE(p ## s)
7 #define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
8
9 #define INTERNAL_PHY(n) \
10 phy##n: ethernet-phy@##n { \
11 reg = <##n>; \
12 compatible = "ethernet-phy-ieee802.3-c22"; \
13 phy-is-integrated; \
14 };
15
16 #define EXTERNAL_PHY(n) \
17 phy##n: ethernet-phy@##n { \
18 reg = <##n>; \
19 compatible = "ethernet-phy-ieee802.3-c22"; \
20 };
21
22 #define EXTERNAL_SFP_PHY(n) \
23 phy##n: ethernet-phy@##n { \
24 compatible = "ethernet-phy-ieee802.3-c22"; \
25 sfp; \
26 media = "fibre"; \
27 reg = <##n>; \
28 };
29
30 #define SWITCH_PORT(n, s, m) \
31 port@##n { \
32 reg = <##n>; \
33 label = SWITCH_PORT_LABEL(s) ; \
34 phy-handle = <&phy##n>; \
35 phy-mode = #m ; \
36 };
37
38 #define SWITCH_SFP_PORT(n, s, m) \
39 port@##n { \
40 reg = <##n>; \
41 label = SWITCH_PORT_LABEL(s) ; \
42 phy-handle = <&phy##n>; \
43 phy-mode = #m ; \
44 fixed-link { \
45 speed = <1000>; \
46 full-duplex; \
47 }; \
48 };
49
50 / {
51 #address-cells = <1>;
52 #size-cells = <1>;
53
54 compatible = "realtek,rtl838x-soc";
55
56 cpus {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 frequency = <800000000>;
60
61 cpu@0 {
62 compatible = "mips,mips34Kc";
63 reg = <0>;
64 };
65 };
66
67 memory@0 {
68 device_type = "memory";
69 reg = <0x0 0x8000000>;
70 };
71
72 chosen {
73 bootargs = "console=ttyS0,38400";
74 };
75
76 cpuintc: cpuintc {
77 compatible = "mti,cpu-interrupt-controller";
78 #address-cells = <0>;
79 #interrupt-cells = <1>;
80 interrupt-controller;
81 };
82
83 osc: oscillator {
84 compatible = "fixed-clock";
85 #clock-cells = <1>;
86 clock-frequency = <175000000>;
87 clock-output-names = "osc";
88 };
89
90 soc: soc {
91 compatible = "simple-bus";
92 #address-cells = <1>;
93 #size-cells = <1>;
94 ranges = <0x0 0x18000000 0x10000>;
95
96 intc: rtlintc@3000 {
97 compatible = "realtek,rtl-intc";
98 reg = <0x3000 0x20>;
99 #address-cells = <0>;
100 #interrupt-cells = <1>;
101 interrupt-controller;
102 interrupt-map =
103 <31 &cpuintc 1>, /* UART1 */
104 <30 &cpuintc 2>, /* UART0 */
105 <28 &cpuintc 1>, /* USB_H2 */
106 <24 &cpuintc 4>, /* NIC */
107 <23 &cpuintc 3>, /* SWCORE */
108 <13 &cpuintc 4>, /* GPIO_ABCD */
109 <11 &cpuintc 1>, /* TC4 */
110 <10 &cpuintc 1>, /* TC3 */
111 <9 &cpuintc 1>, /* TC2 */
112 <8 &cpuintc 1>, /* TC1 */
113 <7 &cpuintc 5>; /* TC0 */
114 };
115
116 timer: timer@3200 {
117 compatible = "realtek,rtl9300-timer";
118 reg = <0x3200 0x60>;
119 interrupt-parent = <&intc>;
120 interrupts = <8>;
121 interrupt-names = "ostimer";
122 clocks = <&osc 0>;
123 };
124
125 spi0: spi@1200 {
126 compatible = "realtek,rtl8380-spi";
127 reg = <0x1200 0x100>;
128
129 #address-cells = <1>;
130 #size-cells = <0>;
131 };
132
133 uart0: uart@2000 {
134 compatible = "ns16550a";
135 reg = <0x2000 0x100>;
136
137 clock-frequency = <175000000>;
138
139 interrupt-parent = <&intc>;
140 interrupts = <30>;
141
142 reg-io-width = <1>;
143 reg-shift = <2>;
144 fifo-size = <1>;
145 no-loopback-test;
146 };
147
148 uart1: uart@2100 {
149 compatible = "ns16550a";
150 reg = <0x2100 0x100>;
151
152 clock-frequency = <175000000>;
153
154 interrupt-parent = <&intc>;
155 interrupts = <31>;
156
157 reg-io-width = <1>;
158 reg-shift = <2>;
159 fifo-size = <1>;
160 no-loopback-test;
161
162 status = "disabled";
163 };
164
165 gpio0: gpio-controller@3500 {
166 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
167 reg = <0x3500 0x20>;
168 gpio-controller;
169 #gpio-cells = <2>;
170 ngpios = <32>;
171 interrupt-parent = <&intc>;
172 interrupts = <31>;
173
174 /*
175 * currently, RTL930x GPIO is not supported in
176 * upstreamed driver (gpio-realtek-otto)
177 */
178 status = "disabled";
179 };
180 };
181
182 ethernet0: ethernet@1b00a300 {
183 compatible = "realtek,rtl838x-eth";
184 reg = <0x1b00a300 0x100>;
185 interrupt-parent = <&intc>;
186 interrupts = <24>;
187 #interrupt-cells = <1>;
188 phy-mode = "internal";
189
190 fixed-link {
191 speed = <1000>;
192 full-duplex;
193 };
194 };
195
196 switch0: switch@1b000000 {
197 compatible = "realtek,rtl83xx-switch";
198
199 interrupt-parent = <&intc>;
200 interrupts = <20>;
201 };
202 };