realtek: copy dts directory for Kernel 5.10
[openwrt/openwrt.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 #address-cells = <0>;
78 #interrupt-cells = <1>;
79 interrupt-controller;
80 compatible = "mti,cpu-interrupt-controller";
81 };
82
83 intc: rtlintc {
84 #address-cells = <0>;
85 #interrupt-cells = <1>;
86 interrupt-controller;
87 compatible = "realtek,rt9300-intc";
88 reg = <0xb8003000 0x20>;
89 };
90
91 osc: oscillator {
92 compatible = "fixed-clock";
93 #clock-cells = <1>;
94 clock-frequency = <175000000>;
95 clock-output-names = "osc";
96 };
97
98 timer: timer@b8003200 {
99 compatible = "realtek,rtl9300-timer";
100 reg = <0xb8003200 0x60>;
101 interrupt-parent = <&intc>;
102 interrupts = <8>;
103 interrupt-names = "ostimer";
104 clocks = <&osc 0>;
105 };
106
107 spi0: spi@b8001200 {
108 status = "okay";
109
110 compatible = "realtek,rtl838x-nor";
111 reg = <0xb8001200 0x100>;
112
113 #address-cells = <1>;
114 #size-cells = <0>;
115 };
116
117 uart0: uart@b8002000 {
118 compatible = "ns16550a";
119 reg = <0xb8002000 0x100>;
120
121 clock-frequency = <175000000>;
122
123 interrupt-parent = <&intc>;
124 interrupts = <30>;
125
126 reg-io-width = <1>;
127 reg-shift = <2>;
128 fifo-size = <1>;
129 no-loopback-test;
130
131 status = "okay";
132 };
133
134 uart1: uart@b8002100 {
135 compatible = "ns16550a";
136 reg = <0xb8002100 0x100>;
137
138 clock-frequency = <175000000>;
139
140 interrupt-parent = <&intc>;
141 interrupts = <31>;
142
143 reg-io-width = <1>;
144 reg-shift = <2>;
145 fifo-size = <1>;
146 no-loopback-test;
147
148 status = "okay";
149 };
150
151 gpio0: gpio-controller@b8003500 {
152 compatible = "realtek,rtl838x-gpio";
153 reg = <0xb8003500 0x20>;
154 gpio-controller;
155 #gpio-cells = <2>;
156 interrupt-parent = <&intc>;
157 interrupts = <31>;
158 };
159
160 ethernet0: ethernet@bb00a300 {
161 status = "okay";
162 compatible = "realtek,rtl838x-eth";
163 reg = <0xbb00a300 0x100>;
164 interrupt-parent = <&intc>;
165 interrupts = <24>;
166 #interrupt-cells = <1>;
167 phy-mode = "internal";
168 fixed-link {
169 speed = <1000>;
170 full-duplex;
171 };
172 };
173
174 switch0: switch@bb000000 {
175 status = "okay";
176
177 interrupt-parent = <&intc>;
178 interrupts = <20>;
179
180 compatible = "realtek,rtl83xx-switch";
181 };
182 };