xref: /freebsd-src/sys/contrib/device-tree/src/mips/pic32/pic32mzda.dtsi (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*c66ec88fSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*c66ec88fSEmmanuel Vadot/*
3*c66ec88fSEmmanuel Vadot * Copyright (C) 2015 Microchip Technology Inc.  All rights reserved.
4*c66ec88fSEmmanuel Vadot */
5*c66ec88fSEmmanuel Vadot#include <dt-bindings/clock/microchip,pic32-clock.h>
6*c66ec88fSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
7*c66ec88fSEmmanuel Vadot
8*c66ec88fSEmmanuel Vadot/ {
9*c66ec88fSEmmanuel Vadot	#address-cells = <1>;
10*c66ec88fSEmmanuel Vadot	#size-cells = <1>;
11*c66ec88fSEmmanuel Vadot	interrupt-parent = <&evic>;
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel Vadot	aliases {
14*c66ec88fSEmmanuel Vadot		gpio0 = &gpio0;
15*c66ec88fSEmmanuel Vadot		gpio1 = &gpio1;
16*c66ec88fSEmmanuel Vadot		gpio2 = &gpio2;
17*c66ec88fSEmmanuel Vadot		gpio3 = &gpio3;
18*c66ec88fSEmmanuel Vadot		gpio4 = &gpio4;
19*c66ec88fSEmmanuel Vadot		gpio5 = &gpio5;
20*c66ec88fSEmmanuel Vadot		gpio6 = &gpio6;
21*c66ec88fSEmmanuel Vadot		gpio7 = &gpio7;
22*c66ec88fSEmmanuel Vadot		gpio8 = &gpio8;
23*c66ec88fSEmmanuel Vadot		gpio9 = &gpio9;
24*c66ec88fSEmmanuel Vadot		serial0 = &uart1;
25*c66ec88fSEmmanuel Vadot		serial1 = &uart2;
26*c66ec88fSEmmanuel Vadot		serial2 = &uart3;
27*c66ec88fSEmmanuel Vadot		serial3 = &uart4;
28*c66ec88fSEmmanuel Vadot		serial4 = &uart5;
29*c66ec88fSEmmanuel Vadot		serial5 = &uart6;
30*c66ec88fSEmmanuel Vadot	};
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot	cpus {
33*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
34*c66ec88fSEmmanuel Vadot		#size-cells = <0>;
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadot		cpu@0 {
37*c66ec88fSEmmanuel Vadot			compatible = "mti,mips14KEc";
38*c66ec88fSEmmanuel Vadot			device_type = "cpu";
39*c66ec88fSEmmanuel Vadot		};
40*c66ec88fSEmmanuel Vadot	};
41*c66ec88fSEmmanuel Vadot
42*c66ec88fSEmmanuel Vadot	soc {
43*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-infra";
44*c66ec88fSEmmanuel Vadot		interrupts = <0 IRQ_TYPE_EDGE_RISING>;
45*c66ec88fSEmmanuel Vadot	};
46*c66ec88fSEmmanuel Vadot
47*c66ec88fSEmmanuel Vadot	/* external clock input on TxCLKI pin */
48*c66ec88fSEmmanuel Vadot	txcki: txcki_clk {
49*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
50*c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
51*c66ec88fSEmmanuel Vadot		clock-frequency = <4000000>;
52*c66ec88fSEmmanuel Vadot		status = "disabled";
53*c66ec88fSEmmanuel Vadot	};
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot	/* external input on REFCLKIx pin */
56*c66ec88fSEmmanuel Vadot	refix: refix_clk {
57*c66ec88fSEmmanuel Vadot		#clock-cells = <0>;
58*c66ec88fSEmmanuel Vadot		compatible = "fixed-clock";
59*c66ec88fSEmmanuel Vadot		clock-frequency = <24000000>;
60*c66ec88fSEmmanuel Vadot		status = "disabled";
61*c66ec88fSEmmanuel Vadot	};
62*c66ec88fSEmmanuel Vadot
63*c66ec88fSEmmanuel Vadot	rootclk: clock-controller@1f801200 {
64*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-clk";
65*c66ec88fSEmmanuel Vadot		reg = <0x1f801200 0x200>;
66*c66ec88fSEmmanuel Vadot		#clock-cells = <1>;
67*c66ec88fSEmmanuel Vadot		microchip,pic32mzda-sosc;
68*c66ec88fSEmmanuel Vadot	};
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel Vadot	evic: interrupt-controller@1f810000 {
71*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-evic";
72*c66ec88fSEmmanuel Vadot		interrupt-controller;
73*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
74*c66ec88fSEmmanuel Vadot		reg = <0x1f810000 0x1000>;
75*c66ec88fSEmmanuel Vadot		microchip,external-irqs = <3 8 13 18 23>;
76*c66ec88fSEmmanuel Vadot	};
77*c66ec88fSEmmanuel Vadot
78*c66ec88fSEmmanuel Vadot	pic32_pinctrl: pinctrl@1f801400 {
79*c66ec88fSEmmanuel Vadot		#address-cells = <1>;
80*c66ec88fSEmmanuel Vadot		#size-cells = <1>;
81*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-pinctrl";
82*c66ec88fSEmmanuel Vadot		reg = <0x1f801400 0x400>;
83*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB1CLK>;
84*c66ec88fSEmmanuel Vadot	};
85*c66ec88fSEmmanuel Vadot
86*c66ec88fSEmmanuel Vadot	/* PORTA */
87*c66ec88fSEmmanuel Vadot	gpio0: gpio0@1f860000 {
88*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
89*c66ec88fSEmmanuel Vadot		reg = <0x1f860000 0x100>;
90*c66ec88fSEmmanuel Vadot		interrupts = <118 IRQ_TYPE_LEVEL_HIGH>;
91*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
92*c66ec88fSEmmanuel Vadot		gpio-controller;
93*c66ec88fSEmmanuel Vadot		interrupt-controller;
94*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
95*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
96*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <0>;
97*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 0 16>;
98*c66ec88fSEmmanuel Vadot	};
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel Vadot	/* PORTB */
101*c66ec88fSEmmanuel Vadot	gpio1: gpio1@1f860100 {
102*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
103*c66ec88fSEmmanuel Vadot		reg = <0x1f860100 0x100>;
104*c66ec88fSEmmanuel Vadot		interrupts = <119 IRQ_TYPE_LEVEL_HIGH>;
105*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
106*c66ec88fSEmmanuel Vadot		gpio-controller;
107*c66ec88fSEmmanuel Vadot		interrupt-controller;
108*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
109*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
110*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <1>;
111*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 16 16>;
112*c66ec88fSEmmanuel Vadot	};
113*c66ec88fSEmmanuel Vadot
114*c66ec88fSEmmanuel Vadot	/* PORTC */
115*c66ec88fSEmmanuel Vadot	gpio2: gpio2@1f860200 {
116*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
117*c66ec88fSEmmanuel Vadot		reg = <0x1f860200 0x100>;
118*c66ec88fSEmmanuel Vadot		interrupts = <120 IRQ_TYPE_LEVEL_HIGH>;
119*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
120*c66ec88fSEmmanuel Vadot		gpio-controller;
121*c66ec88fSEmmanuel Vadot		interrupt-controller;
122*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
123*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
124*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <2>;
125*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 32 16>;
126*c66ec88fSEmmanuel Vadot	};
127*c66ec88fSEmmanuel Vadot
128*c66ec88fSEmmanuel Vadot	/* PORTD */
129*c66ec88fSEmmanuel Vadot	gpio3: gpio3@1f860300 {
130*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
131*c66ec88fSEmmanuel Vadot		reg = <0x1f860300 0x100>;
132*c66ec88fSEmmanuel Vadot		interrupts = <121 IRQ_TYPE_LEVEL_HIGH>;
133*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
134*c66ec88fSEmmanuel Vadot		gpio-controller;
135*c66ec88fSEmmanuel Vadot		interrupt-controller;
136*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
137*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
138*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <3>;
139*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 48 16>;
140*c66ec88fSEmmanuel Vadot	};
141*c66ec88fSEmmanuel Vadot
142*c66ec88fSEmmanuel Vadot	/* PORTE */
143*c66ec88fSEmmanuel Vadot	gpio4: gpio4@1f860400 {
144*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
145*c66ec88fSEmmanuel Vadot		reg = <0x1f860400 0x100>;
146*c66ec88fSEmmanuel Vadot		interrupts = <122 IRQ_TYPE_LEVEL_HIGH>;
147*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
148*c66ec88fSEmmanuel Vadot		gpio-controller;
149*c66ec88fSEmmanuel Vadot		interrupt-controller;
150*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
151*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
152*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <4>;
153*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 64 16>;
154*c66ec88fSEmmanuel Vadot	};
155*c66ec88fSEmmanuel Vadot
156*c66ec88fSEmmanuel Vadot	/* PORTF */
157*c66ec88fSEmmanuel Vadot	gpio5: gpio5@1f860500 {
158*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
159*c66ec88fSEmmanuel Vadot		reg = <0x1f860500 0x100>;
160*c66ec88fSEmmanuel Vadot		interrupts = <123 IRQ_TYPE_LEVEL_HIGH>;
161*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
162*c66ec88fSEmmanuel Vadot		gpio-controller;
163*c66ec88fSEmmanuel Vadot		interrupt-controller;
164*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
165*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
166*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <5>;
167*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 80 16>;
168*c66ec88fSEmmanuel Vadot	};
169*c66ec88fSEmmanuel Vadot
170*c66ec88fSEmmanuel Vadot	/* PORTG */
171*c66ec88fSEmmanuel Vadot	gpio6: gpio6@1f860600 {
172*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
173*c66ec88fSEmmanuel Vadot		reg = <0x1f860600 0x100>;
174*c66ec88fSEmmanuel Vadot		interrupts = <124 IRQ_TYPE_LEVEL_HIGH>;
175*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
176*c66ec88fSEmmanuel Vadot		gpio-controller;
177*c66ec88fSEmmanuel Vadot		interrupt-controller;
178*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
179*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
180*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <6>;
181*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 96 16>;
182*c66ec88fSEmmanuel Vadot	};
183*c66ec88fSEmmanuel Vadot
184*c66ec88fSEmmanuel Vadot	/* PORTH */
185*c66ec88fSEmmanuel Vadot	gpio7: gpio7@1f860700 {
186*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
187*c66ec88fSEmmanuel Vadot		reg = <0x1f860700 0x100>;
188*c66ec88fSEmmanuel Vadot		interrupts = <125 IRQ_TYPE_LEVEL_HIGH>;
189*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
190*c66ec88fSEmmanuel Vadot		gpio-controller;
191*c66ec88fSEmmanuel Vadot		interrupt-controller;
192*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
193*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
194*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <7>;
195*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 112 16>;
196*c66ec88fSEmmanuel Vadot	};
197*c66ec88fSEmmanuel Vadot
198*c66ec88fSEmmanuel Vadot	/* PORTI does not exist */
199*c66ec88fSEmmanuel Vadot
200*c66ec88fSEmmanuel Vadot	/* PORTJ */
201*c66ec88fSEmmanuel Vadot	gpio8: gpio8@1f860800 {
202*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
203*c66ec88fSEmmanuel Vadot		reg = <0x1f860800 0x100>;
204*c66ec88fSEmmanuel Vadot		interrupts = <126 IRQ_TYPE_LEVEL_HIGH>;
205*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
206*c66ec88fSEmmanuel Vadot		gpio-controller;
207*c66ec88fSEmmanuel Vadot		interrupt-controller;
208*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
209*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
210*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <8>;
211*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 128 16>;
212*c66ec88fSEmmanuel Vadot	};
213*c66ec88fSEmmanuel Vadot
214*c66ec88fSEmmanuel Vadot	/* PORTK */
215*c66ec88fSEmmanuel Vadot	gpio9: gpio9@1f860900 {
216*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-gpio";
217*c66ec88fSEmmanuel Vadot		reg = <0x1f860900 0x100>;
218*c66ec88fSEmmanuel Vadot		interrupts = <127 IRQ_TYPE_LEVEL_HIGH>;
219*c66ec88fSEmmanuel Vadot		#gpio-cells = <2>;
220*c66ec88fSEmmanuel Vadot		gpio-controller;
221*c66ec88fSEmmanuel Vadot		interrupt-controller;
222*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
223*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB4CLK>;
224*c66ec88fSEmmanuel Vadot		microchip,gpio-bank = <9>;
225*c66ec88fSEmmanuel Vadot		gpio-ranges = <&pic32_pinctrl 0 144 16>;
226*c66ec88fSEmmanuel Vadot	};
227*c66ec88fSEmmanuel Vadot
228*c66ec88fSEmmanuel Vadot	sdhci: sdhci@1f8ec000 {
229*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-sdhci";
230*c66ec88fSEmmanuel Vadot		reg = <0x1f8ec000 0x100>;
231*c66ec88fSEmmanuel Vadot		interrupts = <191 IRQ_TYPE_LEVEL_HIGH>;
232*c66ec88fSEmmanuel Vadot		clocks = <&rootclk REF4CLK>, <&rootclk PB5CLK>;
233*c66ec88fSEmmanuel Vadot		clock-names = "base_clk", "sys_clk";
234*c66ec88fSEmmanuel Vadot		bus-width = <4>;
235*c66ec88fSEmmanuel Vadot		cap-sd-highspeed;
236*c66ec88fSEmmanuel Vadot		status = "disabled";
237*c66ec88fSEmmanuel Vadot	};
238*c66ec88fSEmmanuel Vadot
239*c66ec88fSEmmanuel Vadot	uart1: serial@1f822000 {
240*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
241*c66ec88fSEmmanuel Vadot		reg = <0x1f822000 0x50>;
242*c66ec88fSEmmanuel Vadot		interrupts = <112 IRQ_TYPE_LEVEL_HIGH>,
243*c66ec88fSEmmanuel Vadot			<113 IRQ_TYPE_LEVEL_HIGH>,
244*c66ec88fSEmmanuel Vadot			<114 IRQ_TYPE_LEVEL_HIGH>;
245*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
246*c66ec88fSEmmanuel Vadot		status = "disabled";
247*c66ec88fSEmmanuel Vadot	};
248*c66ec88fSEmmanuel Vadot
249*c66ec88fSEmmanuel Vadot	uart2: serial@1f822200 {
250*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
251*c66ec88fSEmmanuel Vadot		reg = <0x1f822200 0x50>;
252*c66ec88fSEmmanuel Vadot		interrupts = <145 IRQ_TYPE_LEVEL_HIGH>,
253*c66ec88fSEmmanuel Vadot			<146 IRQ_TYPE_LEVEL_HIGH>,
254*c66ec88fSEmmanuel Vadot			<147 IRQ_TYPE_LEVEL_HIGH>;
255*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
256*c66ec88fSEmmanuel Vadot		status = "disabled";
257*c66ec88fSEmmanuel Vadot	};
258*c66ec88fSEmmanuel Vadot
259*c66ec88fSEmmanuel Vadot	uart3: serial@1f822400 {
260*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
261*c66ec88fSEmmanuel Vadot		reg = <0x1f822400 0x50>;
262*c66ec88fSEmmanuel Vadot		interrupts = <157 IRQ_TYPE_LEVEL_HIGH>,
263*c66ec88fSEmmanuel Vadot			<158 IRQ_TYPE_LEVEL_HIGH>,
264*c66ec88fSEmmanuel Vadot			<159 IRQ_TYPE_LEVEL_HIGH>;
265*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
266*c66ec88fSEmmanuel Vadot		status = "disabled";
267*c66ec88fSEmmanuel Vadot	};
268*c66ec88fSEmmanuel Vadot
269*c66ec88fSEmmanuel Vadot	uart4: serial@1f822600 {
270*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
271*c66ec88fSEmmanuel Vadot		reg = <0x1f822600 0x50>;
272*c66ec88fSEmmanuel Vadot		interrupts = <170 IRQ_TYPE_LEVEL_HIGH>,
273*c66ec88fSEmmanuel Vadot			<171 IRQ_TYPE_LEVEL_HIGH>,
274*c66ec88fSEmmanuel Vadot			<172 IRQ_TYPE_LEVEL_HIGH>;
275*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
276*c66ec88fSEmmanuel Vadot		status = "disabled";
277*c66ec88fSEmmanuel Vadot	};
278*c66ec88fSEmmanuel Vadot
279*c66ec88fSEmmanuel Vadot	uart5: serial@1f822800 {
280*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
281*c66ec88fSEmmanuel Vadot		reg = <0x1f822800 0x50>;
282*c66ec88fSEmmanuel Vadot		interrupts = <179 IRQ_TYPE_LEVEL_HIGH>,
283*c66ec88fSEmmanuel Vadot			<180 IRQ_TYPE_LEVEL_HIGH>,
284*c66ec88fSEmmanuel Vadot			<181 IRQ_TYPE_LEVEL_HIGH>;
285*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
286*c66ec88fSEmmanuel Vadot		status = "disabled";
287*c66ec88fSEmmanuel Vadot	};
288*c66ec88fSEmmanuel Vadot
289*c66ec88fSEmmanuel Vadot	uart6: serial@1f822A00 {
290*c66ec88fSEmmanuel Vadot		compatible = "microchip,pic32mzda-uart";
291*c66ec88fSEmmanuel Vadot		reg = <0x1f822A00 0x50>;
292*c66ec88fSEmmanuel Vadot		interrupts = <188 IRQ_TYPE_LEVEL_HIGH>,
293*c66ec88fSEmmanuel Vadot			<189 IRQ_TYPE_LEVEL_HIGH>,
294*c66ec88fSEmmanuel Vadot			<190 IRQ_TYPE_LEVEL_HIGH>;
295*c66ec88fSEmmanuel Vadot		clocks = <&rootclk PB2CLK>;
296*c66ec88fSEmmanuel Vadot		status = "disabled";
297*c66ec88fSEmmanuel Vadot	};
298*c66ec88fSEmmanuel Vadot};
299