realtek: Add Lexra bus clock
[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,115200";
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 lx_clk: lx_clk {
84 compatible = "fixed-clock";
85 #clock-cells = <0>;
86 clock-frequency = <175000000>;
87 };
88
89 soc: soc {
90 compatible = "simple-bus";
91 #address-cells = <1>;
92 #size-cells = <1>;
93 ranges = <0x0 0x18000000 0x10000>;
94
95 intc: rtlintc@3000 {
96 compatible = "realtek,rtl-intc";
97 reg = <0x3000 0x20>;
98 #address-cells = <0>;
99 #interrupt-cells = <1>;
100 interrupt-controller;
101 interrupt-map =
102 <31 &cpuintc 1>, /* UART1 */
103 <30 &cpuintc 2>, /* UART0 */
104 <28 &cpuintc 1>, /* USB_H2 */
105 <24 &cpuintc 4>, /* NIC */
106 <23 &cpuintc 3>, /* SWCORE */
107 <13 &cpuintc 4>, /* GPIO_ABCD */
108 <11 &cpuintc 1>, /* TC4 */
109 <10 &cpuintc 1>, /* TC3 */
110 <9 &cpuintc 1>, /* TC2 */
111 <8 &cpuintc 1>, /* TC1 */
112 <7 &cpuintc 5>; /* TC0 */
113 };
114
115 timer: timer@3200 {
116 compatible = "realtek,rtl9300-timer";
117 reg = <0x3200 0x60>;
118 interrupt-parent = <&intc>;
119 interrupts = <8>;
120 interrupt-names = "ostimer";
121 clocks = <&lx_clk>;
122 };
123
124 spi0: spi@1200 {
125 compatible = "realtek,rtl8380-spi";
126 reg = <0x1200 0x100>;
127
128 #address-cells = <1>;
129 #size-cells = <0>;
130 };
131
132 uart0: uart@2000 {
133 compatible = "ns16550a";
134 reg = <0x2000 0x100>;
135
136 clocks = <&lx_clk>;
137
138 interrupt-parent = <&intc>;
139 interrupts = <30>;
140
141 reg-io-width = <1>;
142 reg-shift = <2>;
143 fifo-size = <1>;
144 no-loopback-test;
145 };
146
147 uart1: uart@2100 {
148 compatible = "ns16550a";
149 reg = <0x2100 0x100>;
150
151 clocks = <&lx_clk>;
152
153 interrupt-parent = <&intc>;
154 interrupts = <31>;
155
156 reg-io-width = <1>;
157 reg-shift = <2>;
158 fifo-size = <1>;
159 no-loopback-test;
160
161 status = "disabled";
162 };
163
164 gpio0: gpio-controller@3500 {
165 compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
166 reg = <0x3500 0x20>;
167 gpio-controller;
168 #gpio-cells = <2>;
169 ngpios = <32>;
170 interrupt-parent = <&intc>;
171 interrupts = <31>;
172
173 /*
174 * currently, RTL930x GPIO is not supported in
175 * upstreamed driver (gpio-realtek-otto)
176 */
177 status = "disabled";
178 };
179 };
180
181 ethernet0: ethernet@1b00a300 {
182 compatible = "realtek,rtl838x-eth";
183 reg = <0x1b00a300 0x100>;
184 interrupt-parent = <&intc>;
185 interrupts = <24>;
186 #interrupt-cells = <1>;
187 phy-mode = "internal";
188
189 fixed-link {
190 speed = <1000>;
191 full-duplex;
192 };
193 };
194
195 switch0: switch@1b000000 {
196 compatible = "realtek,rtl83xx-switch";
197
198 interrupt-parent = <&intc>;
199 interrupts = <20>;
200 };
201 };