bmips: rewrite pin controllers
[openwrt/staging/dedeckeh.git] / target / linux / bmips / dts / bcm6358.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later
2
3 /dts-v1/;
4
5 #include <dt-bindings/clock/bcm6358-clock.h>
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8 #include <dt-bindings/interrupt-controller/bcm6358-interrupt-controller.h>
9 #include <dt-bindings/reset/bcm6358-reset.h>
10
11 / {
12 #address-cells = <1>;
13 #size-cells = <1>;
14 compatible = "brcm,bcm6358";
15
16 aliases {
17 pflash = &pflash;
18 pinctrl = &pinctrl;
19 serial0 = &uart0;
20 serial1 = &uart1;
21 spi0 = &lsspi;
22 };
23
24 chosen {
25 bootargs = "console=ttyS0,115200n8 earlycon";
26 stdout-path = "serial0:115200n8";
27 };
28
29 clocks {
30 periph_osc: periph-osc {
31 compatible = "fixed-clock";
32
33 #clock-cells = <0>;
34
35 clock-frequency = <50000000>;
36 clock-output-names = "periph";
37 };
38 };
39
40 cpus {
41 #address-cells = <1>;
42 #size-cells = <0>;
43 mips-hpt-frequency = <150000000>;
44
45 cpu@0 {
46 compatible = "brcm,bmips4350", "mips,mips4Kc";
47 device_type = "cpu";
48 reg = <0>;
49 };
50
51 cpu@1 {
52 compatible = "brcm,bmips4350", "mips,mips4Kc";
53 device_type = "cpu";
54 reg = <1>;
55 };
56 };
57
58 cpu_intc: interrupt-controller {
59 #address-cells = <0>;
60 compatible = "mti,cpu-interrupt-controller";
61
62 interrupt-controller;
63 #interrupt-cells = <1>;
64 };
65
66 memory@0 {
67 device_type = "memory";
68 reg = <0 0>;
69 };
70
71 pflash: nor@1e000000 {
72 #address-cells = <1>;
73 #size-cells = <1>;
74 compatible = "cfi-flash";
75 reg = <0x1e000000 0x2000000>;
76 bank-width = <2>;
77
78 status = "disabled";
79 };
80
81 ubus {
82 #address-cells = <1>;
83 #size-cells = <1>;
84
85 compatible = "simple-bus";
86 ranges;
87
88 periph_clk: clock-controller@fffe0004 {
89 compatible = "brcm,bcm6358-clocks";
90 reg = <0xfffe0004 0x4>;
91 #clock-cells = <1>;
92 };
93
94 pll_cntl: syscon@fffe0008 {
95 compatible = "syscon";
96 reg = <0xfffe0008 0x4>;
97 native-endian;
98 };
99
100 syscon-reboot {
101 compatible = "syscon-reboot";
102 regmap = <&pll_cntl>;
103 offset = <0x0>;
104 mask = <0x1>;
105 };
106
107 periph_intc: interrupt-controller@fffe000c {
108 #address-cells = <1>;
109 compatible = "brcm,bcm6345-l1-intc";
110 reg = <0xfffe000c 0x8>,
111 <0xfffe0038 0x8>;
112
113 interrupt-controller;
114 #interrupt-cells = <1>;
115
116 interrupt-parent = <&cpu_intc>;
117 interrupts = <2>, <3>;
118 };
119
120 ext_intc0: interrupt-controller@fffe0014 {
121 #address-cells = <1>;
122 compatible = "brcm,bcm6345-ext-intc";
123 reg = <0xfffe0014 0x4>;
124
125 interrupt-controller;
126 #interrupt-cells = <2>;
127
128 interrupts = <BCM6358_IRQ_EXT0>,
129 <BCM6358_IRQ_EXT1>,
130 <BCM6358_IRQ_EXT2>,
131 <BCM6358_IRQ_EXT3>;
132 };
133
134 ext_intc1: interrupt-controller@fffe001c {
135 #address-cells = <1>;
136 compatible = "brcm,bcm6345-ext-intc";
137 reg = <0xfffe001c 0x4>;
138
139 interrupt-controller;
140 #interrupt-cells = <2>;
141
142 interrupts = <BCM6358_IRQ_EXT4>,
143 <BCM6358_IRQ_EXT5>;
144 };
145
146 periph_rst: reset-controller@fffe0034 {
147 compatible = "brcm,bcm6345-reset";
148 reg = <0xfffe0034 0x4>;
149 #reset-cells = <1>;
150 };
151
152 wdt: watchdog@fffe005c {
153 compatible = "brcm,bcm7038-wdt";
154 reg = <0xfffe005c 0xc>;
155
156 clocks = <&periph_osc>;
157
158 timeout-sec = <30>;
159 };
160
161 gpio: syscon@fffe0080 {
162 compatible = "syscon", "simple-mfd";
163 reg = <0xfffe0080 0x50>;
164 native-endian;
165
166 pinctrl: pin-controller {
167 compatible = "brcm,bcm6358-pinctrl";
168
169 gpio-controller;
170 #gpio-cells = <2>;
171
172 interrupts-extended = <&ext_intc1 0 0>,
173 <&ext_intc1 1 0>,
174 <&ext_intc0 0 0>,
175 <&ext_intc0 1 0>,
176 <&ext_intc0 2 0>,
177 <&ext_intc0 3 0>;
178 interrupt-names = "gpio32",
179 "gpio33",
180 "gpio34",
181 "gpio35",
182 "gpio36",
183 "gpio37";
184
185 pinctrl_ebi_cs: ebi_cs {
186 function = "ebi_cs";
187 groups = "ebi_cs_grp";
188 };
189
190 pinctrl_uart1: uart1 {
191 function = "uart1";
192 groups = "uart1_grp";
193 };
194
195 pinctrl_serial_led: serial_led {
196 function = "serial_led";
197 groups = "serial_led_grp";
198 };
199
200 pinctrl_legacy_led: legacy_led {
201 function = "legacy_led";
202 groups = "legacy_led_grp";
203 };
204
205 pinctrl_led: led {
206 function = "led";
207 groups = "led_grp";
208 };
209
210 pinctrl_spi_cs_23: spi_cs {
211 function = "spi_cs";
212 groups = "spi_cs_grp";
213 };
214
215 pinctrl_utopia: utopia {
216 function = "utopia";
217 groups = "utopia_grp";
218 };
219
220 pinctrl_pwm_syn_clk: pwm_syn_clk {
221 function = "pwm_syn_clk";
222 groups = "pwm_syn_clk_grp";
223 };
224
225 pinctrl_sys_irq: sys_irq {
226 function = "sys_irq";
227 groups = "sys_irq_grp";
228 };
229 };
230 };
231
232 leds: led-controller@fffe00d0 {
233 #address-cells = <1>;
234 #size-cells = <0>;
235 compatible = "brcm,bcm6358-leds";
236 reg = <0xfffe00d0 0x8>;
237
238 status = "disabled";
239 };
240
241 uart0: serial@fffe0100 {
242 compatible = "brcm,bcm6345-uart";
243 reg = <0xfffe0100 0x18>;
244
245 interrupt-parent = <&periph_intc>;
246 interrupts = <BCM6358_IRQ_UART0>;
247
248 clocks = <&periph_osc>;
249 clock-names = "periph";
250
251 status = "disabled";
252 };
253
254 uart1: serial@fffe0120 {
255 compatible = "brcm,bcm6345-uart";
256 reg = <0xfffe0120 0x18>;
257
258 interrupt-parent = <&periph_intc>;
259 interrupts = <BCM6358_IRQ_UART1>;
260
261 clocks = <&periph_osc>;
262 clock-names = "periph";
263
264 status = "disabled";
265 };
266
267 lsspi: spi@fffe0800 {
268 compatible = "brcm,bcm6358-spi";
269 reg = <0xfffe0800 0x70c>;
270 #address-cells = <1>;
271 #size-cells = <0>;
272
273 interrupt-parent = <&periph_intc>;
274 interrupts = <BCM6358_IRQ_SPI>;
275
276 clocks = <&periph_clk BCM6358_CLK_SPI>;
277 clock-names = "spi";
278
279 resets = <&periph_rst BCM6358_RST_SPI>;
280
281 status = "disabled";
282 };
283
284 ehci: usb@fffe1300 {
285 compatible = "brcm,bcm6358-ehci", "generic-ehci";
286 reg = <0xfffe1300 0x100>;
287 big-endian;
288 ignore-oc;
289
290 interrupt-parent = <&periph_intc>;
291 interrupts = <BCM6358_IRQ_EHCI>;
292
293 phys = <&usbh 0>;
294 phy-names = "usb";
295
296 status = "disabled";
297 };
298
299 ohci: usb@fffe1400 {
300 compatible = "brcm,bcm6358-ohci", "generic-ohci";
301 reg = <0xfffe1400 0x100>;
302 big-endian;
303 no-big-frame-no;
304
305 interrupt-parent = <&periph_intc>;
306 interrupts = <BCM6358_IRQ_OHCI>;
307
308 phys = <&usbh 0>;
309 phy-names = "usb";
310
311 status = "disabled";
312 };
313
314 usbh: usb-phy@fffe1500 {
315 compatible = "brcm,bcm6358-usbh-phy";
316 reg = <0xfffe1500 0x38>;
317
318 #phy-cells = <1>;
319
320 resets = <&periph_rst BCM6358_RST_USBH>;
321
322 status = "disabled";
323 };
324 };
325 };