xref: /openbmc/linux/arch/arm/boot/dts/microchip/sama5d3xmb_cmp.dtsi (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2*724ba675SRob Herring/*
3*724ba675SRob Herring * sama5d3xmb_cmp.dts - Device Tree file for SAMA5D3x CMP mother board
4*724ba675SRob Herring *
5*724ba675SRob Herring *  Copyright (C) 2016 Atmel,
6*724ba675SRob Herring */
7*724ba675SRob Herring#include "sama5d3xcm_cmp.dtsi"
8*724ba675SRob Herring
9*724ba675SRob Herring/ {
10*724ba675SRob Herring	compatible = "atmel,sama5d3xmb-cmp", "atmel,sama5d3xcm-cmp", "atmel,sama5d3", "atmel,sama5";
11*724ba675SRob Herring
12*724ba675SRob Herring	ahb {
13*724ba675SRob Herring		apb {
14*724ba675SRob Herring			mmc0: mmc@f0000000 {
15*724ba675SRob Herring				pinctrl-names = "default";
16*724ba675SRob Herring				pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
17*724ba675SRob Herring				status = "okay";
18*724ba675SRob Herring				slot@0 {
19*724ba675SRob Herring					reg = <0>;
20*724ba675SRob Herring					bus-width = <4>;
21*724ba675SRob Herring					cd-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
22*724ba675SRob Herring				};
23*724ba675SRob Herring			};
24*724ba675SRob Herring
25*724ba675SRob Herring			spi0: spi@f0004000 {
26*724ba675SRob Herring				dmas = <0>, <0>;	/*  Do not use DMA for spi0 */
27*724ba675SRob Herring
28*724ba675SRob Herring				flash@0 {
29*724ba675SRob Herring					compatible = "atmel,at25df321a";
30*724ba675SRob Herring					spi-max-frequency = <50000000>;
31*724ba675SRob Herring					reg = <0>;
32*724ba675SRob Herring				};
33*724ba675SRob Herring			};
34*724ba675SRob Herring
35*724ba675SRob Herring			ssc0: ssc@f0008000 {
36*724ba675SRob Herring				atmel,clk-from-rk-pin;
37*724ba675SRob Herring			};
38*724ba675SRob Herring
39*724ba675SRob Herring			/*
40*724ba675SRob Herring			 * i2c0 conflicts with ISI:
41*724ba675SRob Herring			 * disable it to allow the use of ISI
42*724ba675SRob Herring			 * can not enable audio when i2c0 disabled
43*724ba675SRob Herring			 */
44*724ba675SRob Herring			i2c0: i2c@f0014000 {
45*724ba675SRob Herring				wm8904: wm8904@1a {
46*724ba675SRob Herring					compatible = "wlf,wm8904";
47*724ba675SRob Herring					reg = <0x1a>;
48*724ba675SRob Herring					clocks = <&pmc PMC_TYPE_SYSTEM 8>;
49*724ba675SRob Herring					clock-names = "mclk";
50*724ba675SRob Herring				};
51*724ba675SRob Herring			};
52*724ba675SRob Herring
53*724ba675SRob Herring			i2c1: i2c@f0018000 {
54*724ba675SRob Herring				ov2640: camera@30 {
55*724ba675SRob Herring					compatible = "ovti,ov2640";
56*724ba675SRob Herring					reg = <0x30>;
57*724ba675SRob Herring					pinctrl-names = "default";
58*724ba675SRob Herring					pinctrl-0 = <&pinctrl_pck1_as_isi_mck &pinctrl_sensor_power &pinctrl_sensor_reset>;
59*724ba675SRob Herring					resetb-gpios = <&pioE 24 GPIO_ACTIVE_LOW>;
60*724ba675SRob Herring					pwdn-gpios = <&pioE 29 GPIO_ACTIVE_HIGH>;
61*724ba675SRob Herring					/* use pck1 for the master clock of ov2640 */
62*724ba675SRob Herring					clocks = <&pmc PMC_TYPE_SYSTEM 9>;
63*724ba675SRob Herring					clock-names = "xvclk";
64*724ba675SRob Herring					assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>;
65*724ba675SRob Herring					assigned-clock-rates = <25000000>;
66*724ba675SRob Herring
67*724ba675SRob Herring					port {
68*724ba675SRob Herring						ov2640_0: endpoint {
69*724ba675SRob Herring							remote-endpoint = <&isi_0>;
70*724ba675SRob Herring							bus-width = <8>;
71*724ba675SRob Herring						};
72*724ba675SRob Herring					};
73*724ba675SRob Herring				};
74*724ba675SRob Herring			};
75*724ba675SRob Herring
76*724ba675SRob Herring			usart1: serial@f0020000 {
77*724ba675SRob Herring				dmas = <0>, <0>;	/*  Do not use DMA for usart1 */
78*724ba675SRob Herring				pinctrl-names = "default";
79*724ba675SRob Herring				pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
80*724ba675SRob Herring				status = "okay";
81*724ba675SRob Herring			};
82*724ba675SRob Herring
83*724ba675SRob Herring			isi: isi@f0034000 {
84*724ba675SRob Herring				port {
85*724ba675SRob Herring					isi_0: endpoint {
86*724ba675SRob Herring						remote-endpoint = <&ov2640_0>;
87*724ba675SRob Herring						bus-width = <8>;
88*724ba675SRob Herring						vsync-active = <1>;
89*724ba675SRob Herring						hsync-active = <1>;
90*724ba675SRob Herring					};
91*724ba675SRob Herring				};
92*724ba675SRob Herring			};
93*724ba675SRob Herring
94*724ba675SRob Herring			mmc1: mmc@f8000000 {
95*724ba675SRob Herring				pinctrl-names = "default";
96*724ba675SRob Herring				pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
97*724ba675SRob Herring				status = "okay";
98*724ba675SRob Herring				slot@0 {
99*724ba675SRob Herring					reg = <0>;
100*724ba675SRob Herring					bus-width = <4>;
101*724ba675SRob Herring					cd-gpios = <&pioD 18 GPIO_ACTIVE_HIGH>;
102*724ba675SRob Herring				};
103*724ba675SRob Herring			};
104*724ba675SRob Herring
105*724ba675SRob Herring			adc0: adc@f8018000 {
106*724ba675SRob Herring				pinctrl-names = "default", "sleep";
107*724ba675SRob Herring				pinctrl-0 = <
108*724ba675SRob Herring					&pinctrl_adc0_adtrg
109*724ba675SRob Herring					&pinctrl_adc0_ad0
110*724ba675SRob Herring					&pinctrl_adc0_ad1
111*724ba675SRob Herring					&pinctrl_adc0_ad2
112*724ba675SRob Herring					&pinctrl_adc0_ad3
113*724ba675SRob Herring					&pinctrl_adc0_ad4
114*724ba675SRob Herring					>;
115*724ba675SRob Herring				pinctrl-1 = <
116*724ba675SRob Herring					&pinctrl_adc0_adtrg_sleep
117*724ba675SRob Herring					&pinctrl_adc0_ad0_sleep
118*724ba675SRob Herring					&pinctrl_adc0_ad1_sleep
119*724ba675SRob Herring					&pinctrl_adc0_ad2_sleep
120*724ba675SRob Herring					&pinctrl_adc0_ad3_sleep
121*724ba675SRob Herring					&pinctrl_adc0_ad4_sleep
122*724ba675SRob Herring					>;
123*724ba675SRob Herring				status = "okay";
124*724ba675SRob Herring			};
125*724ba675SRob Herring
126*724ba675SRob Herring			macb1: ethernet@f802c000 {
127*724ba675SRob Herring				phy-mode = "rmii";
128*724ba675SRob Herring
129*724ba675SRob Herring				#address-cells = <1>;
130*724ba675SRob Herring				#size-cells = <0>;
131*724ba675SRob Herring				phy0: ethernet-phy@1 {
132*724ba675SRob Herring					/*interrupt-parent = <&pioE>;*/
133*724ba675SRob Herring					/*interrupts = <30 IRQ_TYPE_EDGE_FALLING>;*/
134*724ba675SRob Herring					reg = <1>;
135*724ba675SRob Herring				};
136*724ba675SRob Herring			};
137*724ba675SRob Herring
138*724ba675SRob Herring			pinctrl@fffff200 {
139*724ba675SRob Herring				adc0 {
140*724ba675SRob Herring					pinctrl_adc0_adtrg_sleep: adc0_adtrg_1 {
141*724ba675SRob Herring						atmel,pins =
142*724ba675SRob Herring							<AT91_PIOD 19 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
143*724ba675SRob Herring					};
144*724ba675SRob Herring					pinctrl_adc0_ad0_sleep: adc0_ad0_1 {
145*724ba675SRob Herring						atmel,pins =
146*724ba675SRob Herring							<AT91_PIOD 20 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
147*724ba675SRob Herring					};
148*724ba675SRob Herring					pinctrl_adc0_ad1_sleep: adc0_ad1_1 {
149*724ba675SRob Herring						atmel,pins =
150*724ba675SRob Herring							<AT91_PIOD 21 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
151*724ba675SRob Herring					};
152*724ba675SRob Herring					pinctrl_adc0_ad2_sleep: adc0_ad2_1 {
153*724ba675SRob Herring						atmel,pins =
154*724ba675SRob Herring							<AT91_PIOD 22 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
155*724ba675SRob Herring					};
156*724ba675SRob Herring					pinctrl_adc0_ad3_sleep: adc0_ad3_1 {
157*724ba675SRob Herring						atmel,pins =
158*724ba675SRob Herring							<AT91_PIOD 23 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
159*724ba675SRob Herring					};
160*724ba675SRob Herring					pinctrl_adc0_ad4_sleep: adc0_ad4_1 {
161*724ba675SRob Herring						atmel,pins =
162*724ba675SRob Herring							<AT91_PIOD 24 AT91_PERIPH_GPIO (AT91_PINCTRL_OUTPUT | AT91_PINCTRL_OUTPUT_VAL(0))>;
163*724ba675SRob Herring					};
164*724ba675SRob Herring				};
165*724ba675SRob Herring
166*724ba675SRob Herring				board {
167*724ba675SRob Herring					pinctrl_gpio_keys: gpio_keys {
168*724ba675SRob Herring						atmel,pins =
169*724ba675SRob Herring							<AT91_PIOE 27 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP>;
170*724ba675SRob Herring					};
171*724ba675SRob Herring
172*724ba675SRob Herring					pinctrl_mmc0_cd: mmc0_cd {
173*724ba675SRob Herring						atmel,pins =
174*724ba675SRob Herring							<AT91_PIOD 17 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
175*724ba675SRob Herring					};
176*724ba675SRob Herring
177*724ba675SRob Herring					pinctrl_mmc1_cd: mmc1_cd {
178*724ba675SRob Herring						atmel,pins =
179*724ba675SRob Herring							<AT91_PIOD 18 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
180*724ba675SRob Herring					};
181*724ba675SRob Herring
182*724ba675SRob Herring					pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
183*724ba675SRob Herring						atmel,pins =
184*724ba675SRob Herring							<AT91_PIOD 30 AT91_PERIPH_B AT91_PINCTRL_NONE>;
185*724ba675SRob Herring					};
186*724ba675SRob Herring
187*724ba675SRob Herring					pinctrl_pck1_as_isi_mck: pck1_as_isi_mck-0 {
188*724ba675SRob Herring						atmel,pins =
189*724ba675SRob Herring							<AT91_PIOD 31 AT91_PERIPH_B AT91_PINCTRL_NONE>;
190*724ba675SRob Herring					};
191*724ba675SRob Herring
192*724ba675SRob Herring					pinctrl_sensor_reset: sensor_reset-0 {
193*724ba675SRob Herring						atmel,pins =
194*724ba675SRob Herring							<AT91_PIOE 24 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
195*724ba675SRob Herring					};
196*724ba675SRob Herring
197*724ba675SRob Herring					pinctrl_sensor_power: sensor_power-0 {
198*724ba675SRob Herring						atmel,pins =
199*724ba675SRob Herring							<AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_NONE>;
200*724ba675SRob Herring					};
201*724ba675SRob Herring
202*724ba675SRob Herring					pinctrl_usba_vbus: usba_vbus {
203*724ba675SRob Herring						atmel,pins =
204*724ba675SRob Herring							<AT91_PIOD 29 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;
205*724ba675SRob Herring					};
206*724ba675SRob Herring				};
207*724ba675SRob Herring			};
208*724ba675SRob Herring
209*724ba675SRob Herring			dbgu: serial@ffffee00 {
210*724ba675SRob Herring				dmas = <0>, <0>;	/*  Do not use DMA for dbgu */
211*724ba675SRob Herring				status = "okay";
212*724ba675SRob Herring			};
213*724ba675SRob Herring
214*724ba675SRob Herring			watchdog@fffffe40 {
215*724ba675SRob Herring				status = "okay";
216*724ba675SRob Herring			};
217*724ba675SRob Herring		};
218*724ba675SRob Herring
219*724ba675SRob Herring		usb0: gadget@500000 {
220*724ba675SRob Herring			atmel,vbus-gpio = <&pioD 29 GPIO_ACTIVE_HIGH>;
221*724ba675SRob Herring			pinctrl-names = "default";
222*724ba675SRob Herring			pinctrl-0 = <&pinctrl_usba_vbus>;
223*724ba675SRob Herring			status = "okay";
224*724ba675SRob Herring		};
225*724ba675SRob Herring	};
226*724ba675SRob Herring
227*724ba675SRob Herring	sound {
228*724ba675SRob Herring		compatible = "atmel,asoc-wm8904";
229*724ba675SRob Herring		pinctrl-names = "default";
230*724ba675SRob Herring		pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
231*724ba675SRob Herring
232*724ba675SRob Herring		atmel,model = "wm8904 @ SAMA5D3EK";
233*724ba675SRob Herring		atmel,audio-routing =
234*724ba675SRob Herring			"Headphone Jack", "HPOUTL",
235*724ba675SRob Herring			"Headphone Jack", "HPOUTR",
236*724ba675SRob Herring			"IN2L", "Line In Jack",
237*724ba675SRob Herring			"IN2R", "Line In Jack",
238*724ba675SRob Herring			"Mic", "MICBIAS",
239*724ba675SRob Herring			"IN1L", "Mic";
240*724ba675SRob Herring
241*724ba675SRob Herring		atmel,ssc-controller = <&ssc0>;
242*724ba675SRob Herring		atmel,audio-codec = <&wm8904>;
243*724ba675SRob Herring
244*724ba675SRob Herring		status = "disabled";
245*724ba675SRob Herring	};
246*724ba675SRob Herring
247*724ba675SRob Herring	/* Conflict with LCD pins */
248*724ba675SRob Herring	gpio_keys {
249*724ba675SRob Herring		compatible = "gpio-keys";
250*724ba675SRob Herring		status = "okay";
251*724ba675SRob Herring
252*724ba675SRob Herring		#address-cells = <1>;
253*724ba675SRob Herring		#size-cells = <0>;
254*724ba675SRob Herring		pinctrl-names = "default";
255*724ba675SRob Herring		pinctrl-0 = <&pinctrl_gpio_keys>;
256*724ba675SRob Herring
257*724ba675SRob Herring		pb_user1 {
258*724ba675SRob Herring			label = "pb_user1";
259*724ba675SRob Herring			gpios = <&pioE 27 GPIO_ACTIVE_HIGH>;
260*724ba675SRob Herring			linux,code = <0x100>;
261*724ba675SRob Herring			wakeup-source;
262*724ba675SRob Herring		};
263*724ba675SRob Herring	};
264*724ba675SRob Herring};
265