xref: /openbmc/u-boot/arch/arm/dts/sama5d3xmb.dtsi (revision c9af6673)
1/*
2 * sama5d3xmb.dts - Device Tree file for SAMA5D3x mother board
3 *
4 *  Copyright (C) 2013 Atmel,
5 *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
6 *
7 * Licensed under GPLv2 or later.
8 */
9#include "sama5d3xcm.dtsi"
10
11/ {
12	compatible = "atmel,sama5d3xmb", "atmel,sama5d3xcm", "atmel,sama5d3", "atmel,sama5";
13
14	chosen {
15		u-boot,dm-pre-reloc;
16		stdout-path = &dbgu;
17	};
18
19	ahb {
20		apb {
21			mmc0: mmc@f0000000 {
22				pinctrl-names = "default";
23				pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
24				status = "okay";
25				u-boot,dm-pre-reloc;
26				slot@0 {
27					reg = <0>;
28					bus-width = <4>;
29					cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
30				};
31			};
32
33			spi0: spi@f0004000 {
34				dmas = <0>, <0>;	/*  Do not use DMA for spi0 */
35				u-boot,dm-pre-reloc;
36
37				spi_flash@0 {
38					compatible = "spi-flash";
39					spi-max-frequency = <50000000>;
40					reg = <0>;
41					u-boot,dm-pre-reloc;
42				};
43			};
44
45			ssc0: ssc@f0008000 {
46				atmel,clk-from-rk-pin;
47			};
48
49			/*
50			 * i2c0 conflicts with ISI:
51			 * disable it to allow the use of ISI
52			 * can not enable audio when i2c0 disabled
53			 */
54			i2c0: i2c@f0014000 {
55				wm8904: wm8904@1a {
56					compatible = "wlf,wm8904";
57					reg = <0x1a>;
58					clocks = <&pck0>;
59					clock-names = "mclk";
60				};
61			};
62
63			i2c1: i2c@f0018000 {
64				ov2640: camera@0x30 {
65					compatible = "ovti,ov2640";
66					reg = <0x30>;
67					pinctrl-names = "default";
68					pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
69					resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>;
70					pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>;
71					/* use pck1 for the master clock of ov2640 */
72					clocks = <&pck1>;
73					clock-names = "xvclk";
74					assigned-clocks = <&pck1>;
75					assigned-clock-rates = <25000000>;
76
77					port {
78						ov2640_0: endpoint {
79							remote-endpoint = <&isi_0>;
80							bus-width = <8>;
81						};
82					};
83				};
84			};
85
86			usart1: serial@f0020000 {
87				dmas = <0>, <0>;	/*  Do not use DMA for usart1 */
88				pinctrl-names = "default";
89				pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
90				status = "okay";
91			};
92
93			isi: isi@f0034000 {
94				port {
95					isi_0: endpoint {
96						remote-endpoint = <&ov2640_0>;
97						bus-width = <8>;
98						vsync-active = <1>;
99						hsync-active = <1>;
100					};
101				};
102			};
103
104			mmc1: mmc@f8000000 {
105				pinctrl-names = "default";
106				pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
107				status = "okay";
108				u-boot,dm-pre-reloc;
109				slot@0 {
110					reg = <0>;
111					bus-width = <4>;
112					cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>;
113				};
114			};
115
116			adc0: adc@f8018000 {
117				pinctrl-names = "default";
118				pinctrl-0 = <
119					&pinctrl_adc0_adtrg
120					&pinctrl_adc0_ad0
121					&pinctrl_adc0_ad1
122					&pinctrl_adc0_ad2
123					&pinctrl_adc0_ad3
124					&pinctrl_adc0_ad4
125					>;
126				status = "okay";
127			};
128
129			macb1: ethernet@f802c000 {
130				phy-mode = "rmii";
131
132				#address-cells = <1>;
133				#size-cells = <0>;
134				phy0: ethernet-phy@1 {
135					/*interrupt-parent = <&pioE>;*/
136					/*interrupts = <30 IRQ_TYPE_EDGE_FALLING>;*/
137					reg = <1>;
138				};
139			};
140
141			pinctrl@fffff200 {
142				board {
143					u-boot,dm-pre-reloc;
144					pinctrl_mmc0_cd: mmc0_cd {
145						u-boot,dm-pre-reloc;
146						atmel,pins =
147							<AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD17 GPIO with pullup deglitch */
148					};
149
150					pinctrl_mmc1_cd: mmc1_cd {
151						u-boot,dm-pre-reloc;
152						atmel,pins =
153							<AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>; /* PD18 GPIO with pullup deglitch */
154					};
155
156					pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
157						atmel,pins =
158							<AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;	/* PD30 periph B */
159					};
160
161					pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
162						atmel,pins =
163							<AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;	/* PD31 periph B ISI_MCK */
164					};
165
166					pinctrl_sensor_reset: sensor_reset-0 {
167						atmel,pins =
168							<AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;   /* PE24 gpio */
169					};
170
171					pinctrl_sensor_power: sensor_power-0 {
172						atmel,pins =
173							<AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>; /* PE29 gpio */
174					};
175
176					pinctrl_usba_vbus: usba_vbus {
177						atmel,pins =
178							<AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PD29 GPIO with deglitch */
179					};
180				};
181			};
182
183			dbgu: serial@ffffee00 {
184				dmas = <0>, <0>;	/*  Do not use DMA for dbgu */
185				status = "okay";
186				u-boot,dm-pre-reloc;
187			};
188
189			watchdog@fffffe40 {
190				status = "okay";
191			};
192		};
193
194		usb0: gadget@00500000 {
195			atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>;
196			pinctrl-names = "default";
197			pinctrl-0 = <&pinctrl_usba_vbus>;
198			status = "okay";
199		};
200
201		usb1: ohci@00600000 {
202			num-ports = <3>;
203			atmel,vbus-gpio = <&pioD 25 GPIO_ACTIVE_HIGH
204					   &pioD 26 GPIO_ACTIVE_LOW
205					   &pioD 27 GPIO_ACTIVE_LOW
206					  >;
207			status = "okay";
208		};
209
210		usb2: ehci@00700000 {
211			status = "okay";
212		};
213	};
214
215	sound {
216		compatible = "atmel,asoc-wm8904";
217		pinctrl-names = "default";
218		pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
219
220		atmel,model = "wm8904 @ SAMA5D3EK";
221		atmel,audio-routing =
222			"Headphone Jack", "HPOUTL",
223			"Headphone Jack", "HPOUTR",
224			"IN2L", "Line In Jack",
225			"IN2R", "Line In Jack",
226			"Mic", "MICBIAS",
227			"IN1L", "Mic";
228
229		atmel,ssc-controller = <&ssc0>;
230		atmel,audio-codec = <&wm8904>;
231
232		status = "disabled";
233	};
234};
235