bmips: backport accepted pinctrl patches
[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 = "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", "simple-mfd";
96 reg = <0xfffe0008 0x4>;
97 native-endian;
98
99 syscon-reboot {
100 compatible = "syscon-reboot";
101 offset = <0x0>;
102 mask = <0x1>;
103 };
104 };
105
106 periph_intc: interrupt-controller@fffe000c {
107 #address-cells = <1>;
108 compatible = "brcm,bcm6345-l1-intc";
109 reg = <0xfffe000c 0x8>,
110 <0xfffe0038 0x8>;
111
112 interrupt-controller;
113 #interrupt-cells = <1>;
114
115 interrupt-parent = <&cpu_intc>;
116 interrupts = <2>, <3>;
117 };
118
119 ext_intc0: interrupt-controller@fffe0014 {
120 #address-cells = <1>;
121 compatible = "brcm,bcm6345-ext-intc";
122 reg = <0xfffe0014 0x4>;
123
124 interrupt-controller;
125 #interrupt-cells = <2>;
126
127 interrupts = <BCM6358_IRQ_EXT0>,
128 <BCM6358_IRQ_EXT1>,
129 <BCM6358_IRQ_EXT2>,
130 <BCM6358_IRQ_EXT3>;
131 };
132
133 ext_intc1: interrupt-controller@fffe001c {
134 #address-cells = <1>;
135 compatible = "brcm,bcm6345-ext-intc";
136 reg = <0xfffe001c 0x4>;
137
138 interrupt-controller;
139 #interrupt-cells = <2>;
140
141 interrupts = <BCM6358_IRQ_EXT4>,
142 <BCM6358_IRQ_EXT5>;
143 };
144
145 periph_rst: reset-controller@fffe0034 {
146 compatible = "brcm,bcm6345-reset";
147 reg = <0xfffe0034 0x4>;
148 #reset-cells = <1>;
149 };
150
151 wdt: watchdog@fffe005c {
152 compatible = "brcm,bcm7038-wdt";
153 reg = <0xfffe005c 0xc>;
154
155 clocks = <&periph_osc>;
156
157 timeout-sec = <30>;
158 };
159
160 gpio_cntl: syscon@fffe0080 {
161 compatible = "brcm,bcm6358-gpio-sysctl",
162 "syscon", "simple-mfd";
163 reg = <0xfffe0080 0x50>;
164 ranges = <0 0xfffe0080 0x80>;
165 native-endian;
166
167 gpio: gpio@0 {
168 compatible = "brcm,bcm6358-gpio";
169 reg-names = "dirout", "dat";
170 reg = <0x0 0x8>, <0x8 0x8>;
171
172 gpio-controller;
173 gpio-ranges = <&pinctrl 0 0 40>;
174 #gpio-cells = <2>;
175 };
176
177 pinctrl: pinctrl@18 {
178 compatible = "brcm,bcm6358-pinctrl";
179 reg = <0x18 0x4>;
180
181 pinctrl_ebi_cs: ebi_cs-pins {
182 function = "ebi_cs";
183 groups = "ebi_cs_grp";
184 };
185
186 pinctrl_uart1: uart1-pins {
187 function = "uart1";
188 groups = "uart1_grp";
189 };
190
191 pinctrl_serial_led: serial_led-pins {
192 function = "serial_led";
193 groups = "serial_led_grp";
194 };
195
196 pinctrl_legacy_led: legacy_led-pins {
197 function = "legacy_led";
198 groups = "legacy_led_grp";
199 };
200
201 pinctrl_led: led-pins {
202 function = "led";
203 groups = "led_grp";
204 };
205
206 pinctrl_spi_cs_23: spi_cs-pins {
207 function = "spi_cs";
208 groups = "spi_cs_grp";
209 };
210
211 pinctrl_utopia: utopia-pins {
212 function = "utopia";
213 groups = "utopia_grp";
214 };
215
216 pinctrl_pwm_syn_clk: pwm_syn_clk-pins {
217 function = "pwm_syn_clk";
218 groups = "pwm_syn_clk_grp";
219 };
220
221 pinctrl_sys_irq: sys_irq-pins {
222 function = "sys_irq";
223 groups = "sys_irq_grp";
224 };
225 };
226 };
227
228 leds: led-controller@fffe00d0 {
229 #address-cells = <1>;
230 #size-cells = <0>;
231 compatible = "brcm,bcm6358-leds";
232 reg = <0xfffe00d0 0x8>;
233
234 status = "disabled";
235 };
236
237 uart0: serial@fffe0100 {
238 compatible = "brcm,bcm6345-uart";
239 reg = <0xfffe0100 0x18>;
240
241 interrupt-parent = <&periph_intc>;
242 interrupts = <BCM6358_IRQ_UART0>;
243
244 clocks = <&periph_osc>;
245 clock-names = "periph";
246
247 status = "disabled";
248 };
249
250 uart1: serial@fffe0120 {
251 compatible = "brcm,bcm6345-uart";
252 reg = <0xfffe0120 0x18>;
253
254 interrupt-parent = <&periph_intc>;
255 interrupts = <BCM6358_IRQ_UART1>;
256
257 clocks = <&periph_osc>;
258 clock-names = "periph";
259
260 status = "disabled";
261 };
262
263 lsspi: spi@fffe0800 {
264 #address-cells = <1>;
265 #size-cells = <0>;
266 compatible = "brcm,bcm6358-spi";
267 reg = <0xfffe0800 0x70c>;
268
269 interrupt-parent = <&periph_intc>;
270 interrupts = <BCM6358_IRQ_SPI>;
271
272 clocks = <&periph_clk BCM6358_CLK_SPI>;
273 clock-names = "spi";
274
275 resets = <&periph_rst BCM6358_RST_SPI>;
276
277 status = "disabled";
278 };
279
280 pci: pci@fffe1000 {
281 compatible = "brcm,bcm6348-pci";
282 reg = <0xfffe1000 0x200>,
283 <0x08000000 0x10000>;
284 reg-names = "pci",
285 "pci-io";
286 #address-cells = <3>;
287 #size-cells = <2>;
288
289 device_type = "pci";
290 bus-range = <0x00 0x01>;
291 ranges = <0x2000000 0 0x30000000 0x30000000 0 0x8000000>;
292 linux,pci-probe-only = <1>;
293
294 interrupt-parent = <&periph_intc>;
295 interrupts = <BCM6358_IRQ_MPI>;
296
297 resets = <&periph_rst BCM6358_RST_MPI>;
298 reset-names = "pci";
299
300 brcm,remap;
301
302 status = "disabled";
303 };
304
305 ehci: usb@fffe1300 {
306 compatible = "brcm,bcm6358-ehci", "generic-ehci";
307 reg = <0xfffe1300 0x100>;
308 big-endian;
309 spurious-oc;
310
311 interrupt-parent = <&periph_intc>;
312 interrupts = <BCM6358_IRQ_EHCI>;
313
314 phys = <&usbh 0>;
315 phy-names = "usb";
316
317 status = "disabled";
318 };
319
320 ohci: usb@fffe1400 {
321 compatible = "brcm,bcm6358-ohci", "generic-ohci";
322 reg = <0xfffe1400 0x100>;
323 big-endian;
324 no-big-frame-no;
325
326 interrupt-parent = <&periph_intc>;
327 interrupts = <BCM6358_IRQ_OHCI>;
328
329 phys = <&usbh 0>;
330 phy-names = "usb";
331
332 status = "disabled";
333 };
334
335 usbh: usb-phy@fffe1500 {
336 compatible = "brcm,bcm6358-usbh-phy";
337 reg = <0xfffe1500 0x38>;
338
339 #phy-cells = <1>;
340
341 resets = <&periph_rst BCM6358_RST_USBH>;
342
343 status = "disabled";
344 };
345 };
346 };