1/*
2 * at91-sama5d3_xplained.dts - Device Tree file for the SAMA5D3 Xplained board
3 *
4 *  Copyright (C) 2014 Atmel,
5 *		  2014 Nicolas Ferre <nicolas.ferre@atmel.com>
6 *
7 * Licensed under GPLv2 or later.
8 */
9/dts-v1/;
10#include "sama5d36.dtsi"
11
12/ {
13	model = "SAMA5D3 Xplained";
14	compatible = "atmel,sama5d3-xplained", "atmel,sama5d3", "atmel,sama5";
15
16	chosen {
17		u-boot,dm-pre-reloc;
18		stdout-path = &dbgu;
19	};
20
21	aliases {
22		spi0 = &spi0;
23	};
24
25	memory {
26		reg = <0x20000000 0x10000000>;
27	};
28
29	clocks {
30		slow_xtal {
31			clock-frequency = <32768>;
32		};
33
34		main_xtal {
35			clock-frequency = <12000000>;
36		};
37	};
38
39	ahb {
40		apb {
41			mmc0: mmc@f0000000 {
42				u-boot,dm-pre-reloc;
43				pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_dat4_7 &pinctrl_mmc0_cd>;
44				vmmc-supply = <&vcc_mmc0_reg>;
45				vqmmc-supply = <&vcc_3v3_reg>;
46				status = "okay";
47				slot@0 {
48					reg = <0>;
49					bus-width = <8>;
50					cd-gpios = <&pioE 0 GPIO_ACTIVE_LOW>;
51				};
52			};
53
54			mmc1: mmc@f8000000 {
55				u-boot,dm-pre-reloc;
56				vmmc-supply = <&vcc_3v3_reg>;
57				vqmmc-supply = <&vcc_3v3_reg>;
58				status = "disabled";
59				slot@0 {
60					reg = <0>;
61					bus-width = <4>;
62					cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>;
63				};
64			};
65
66			spi0: spi@f0004000 {
67				cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
68				status = "okay";
69			};
70
71			can0: can@f000c000 {
72				status = "okay";
73			};
74
75			i2c0: i2c@f0014000 {
76				pinctrl-0 = <&pinctrl_i2c0_pu>;
77				status = "okay";
78			};
79
80			i2c1: i2c@f0018000 {
81				status = "okay";
82
83				pmic: act8865@5b {
84					compatible = "active-semi,act8865";
85					reg = <0x5b>;
86					status = "disabled";
87
88					regulators {
89						vcc_1v8_reg: DCDC_REG1 {
90							regulator-name = "VCC_1V8";
91							regulator-min-microvolt = <1800000>;
92							regulator-max-microvolt = <1800000>;
93							regulator-always-on;
94						};
95
96						vcc_1v2_reg: DCDC_REG2 {
97							regulator-name = "VCC_1V2";
98							regulator-min-microvolt = <1200000>;
99							regulator-max-microvolt = <1200000>;
100							regulator-always-on;
101						};
102
103						vcc_3v3_reg: DCDC_REG3 {
104							regulator-name = "VCC_3V3";
105							regulator-min-microvolt = <3300000>;
106							regulator-max-microvolt = <3300000>;
107							regulator-always-on;
108						};
109
110						vddfuse_reg: LDO_REG1 {
111							regulator-name = "FUSE_2V5";
112							regulator-min-microvolt = <2500000>;
113							regulator-max-microvolt = <2500000>;
114						};
115
116						vddana_reg: LDO_REG2 {
117							regulator-name = "VDDANA";
118							regulator-min-microvolt = <3300000>;
119							regulator-max-microvolt = <3300000>;
120							regulator-always-on;
121						};
122					};
123				};
124			};
125
126			macb0: ethernet@f0028000 {
127				phy-mode = "rgmii";
128				#address-cells = <1>;
129				#size-cells = <0>;
130				status = "okay";
131
132				ethernet-phy@7 {
133					reg = <0x7>;
134				};
135			};
136
137			pwm0: pwm@f002c000 {
138				pinctrl-names = "default";
139				pinctrl-0 = <&pinctrl_pwm0_pwmh0_0 &pinctrl_pwm0_pwmh1_0>;
140				status = "okay";
141			};
142
143			usart0: serial@f001c000 {
144				status = "okay";
145			};
146
147			usart1: serial@f0020000 {
148				pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
149				status = "okay";
150			};
151
152			uart0: serial@f0024000 {
153				status = "okay";
154			};
155
156			mmc1: mmc@f8000000 {
157				pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
158				status = "okay";
159				slot@0 {
160					reg = <0>;
161					bus-width = <4>;
162					cd-gpios = <&pioE 1 GPIO_ACTIVE_HIGH>;
163				};
164			};
165
166			spi1: spi@f8008000 {
167				cs-gpios = <&pioC 25 0>;
168				status = "okay";
169			};
170
171			adc0: adc@f8018000 {
172				pinctrl-0 = <
173					&pinctrl_adc0_adtrg
174					&pinctrl_adc0_ad0
175					&pinctrl_adc0_ad1
176					&pinctrl_adc0_ad2
177					&pinctrl_adc0_ad3
178					&pinctrl_adc0_ad4
179					&pinctrl_adc0_ad5
180					&pinctrl_adc0_ad6
181					&pinctrl_adc0_ad7
182					&pinctrl_adc0_ad8
183					&pinctrl_adc0_ad9
184					>;
185				status = "okay";
186			};
187
188			i2c2: i2c@f801c000 {
189				dmas = <0>, <0>;	/* Do not use DMA for i2c2 */
190				pinctrl-0 = <&pinctrl_i2c2_pu>;
191				status = "okay";
192			};
193
194			macb1: ethernet@f802c000 {
195				phy-mode = "rmii";
196				#address-cells = <1>;
197				#size-cells = <0>;
198				status = "okay";
199
200				ethernet-phy@1 {
201					reg = <0x1>;
202				};
203			};
204
205			dbgu: serial@ffffee00 {
206				u-boot,dm-pre-reloc;
207				status = "okay";
208			};
209
210			pinctrl@fffff200 {
211				board {
212					u-boot,dm-pre-reloc;
213					pinctrl_i2c0_pu: i2c0_pu {
214						atmel,pins =
215							<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
216							<AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
217					};
218
219					pinctrl_i2c2_pu: i2c2_pu {
220						atmel,pins =
221							<AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
222							<AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
223					};
224
225					pinctrl_key_gpio: key_gpio_0 {
226						atmel,pins =
227							<AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
228					};
229
230					pinctrl_mmc0_cd: mmc0_cd {
231						u-boot,dm-pre-reloc;
232						atmel,pins =
233							<AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
234					};
235
236					pinctrl_mmc1_cd: mmc1_cd {
237						u-boot,dm-pre-reloc;
238						atmel,pins =
239							<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
240					};
241
242					pinctrl_usba_vbus: usba_vbus {
243						atmel,pins =
244							<AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;	/* PE9, conflicts with A9 */
245					};
246				};
247			};
248		};
249
250		nand0: nand@60000000 {
251			nand-bus-width = <8>;
252			nand-ecc-mode = "hw";
253			atmel,has-pmecc;
254			atmel,pmecc-cap = <4>;
255			atmel,pmecc-sector-size = <512>;
256			nand-on-flash-bbt;
257			status = "okay";
258
259			at91bootstrap@0 {
260				label = "at91bootstrap";
261				reg = <0x0 0x40000>;
262			};
263
264			bootloader@40000 {
265				label = "bootloader";
266				reg = <0x40000 0x80000>;
267			};
268
269			bootloaderenv@c0000 {
270				label = "bootloader env";
271				reg = <0xc0000 0xc0000>;
272			};
273
274			dtb@180000 {
275				label = "device tree";
276				reg = <0x180000 0x80000>;
277			};
278
279			kernel@200000 {
280				label = "kernel";
281				reg = <0x200000 0x600000>;
282			};
283
284			rootfs@800000 {
285				label = "rootfs";
286				reg = <0x800000 0x0f800000>;
287			};
288		};
289
290		usb0: gadget@00500000 {
291			atmel,vbus-gpio = <&pioE 9 GPIO_ACTIVE_HIGH>;	/* PE9, conflicts with A9 */
292			pinctrl-names = "default";
293			pinctrl-0 = <&pinctrl_usba_vbus>;
294			status = "okay";
295		};
296
297		usb1: ohci@00600000 {
298			num-ports = <3>;
299			atmel,vbus-gpio = <0
300					   &pioE 3 GPIO_ACTIVE_LOW
301					   &pioE 4 GPIO_ACTIVE_LOW
302					  >;
303			status = "okay";
304		};
305
306		usb2: ehci@00700000 {
307			status = "okay";
308		};
309	};
310
311	vcc_mmc0_reg: fixedregulator@0 {
312		compatible = "regulator-fixed";
313		gpio = <&pioE 2 GPIO_ACTIVE_LOW>;
314		regulator-name = "mmc0-card-supply";
315		regulator-min-microvolt = <3300000>;
316		regulator-max-microvolt = <3300000>;
317		regulator-always-on;
318	};
319
320	gpio_keys {
321		compatible = "gpio-keys";
322
323		pinctrl-names = "default";
324		pinctrl-0 = <&pinctrl_key_gpio>;
325
326		bp3 {
327			label = "PB_USER";
328			gpios = <&pioE 29 GPIO_ACTIVE_LOW>;
329			linux,code = <0x104>;
330			wakeup-source;
331		};
332	};
333
334	leds {
335		compatible = "gpio-leds";
336
337		d2 {
338			label = "d2";
339			gpios = <&pioE 23 GPIO_ACTIVE_LOW>;	/* PE23, conflicts with A23, CTS2 */
340			linux,default-trigger = "heartbeat";
341		};
342
343		d3 {
344			label = "d3";
345			gpios = <&pioE 24 GPIO_ACTIVE_HIGH>;
346		};
347	};
348};
349