xref: /freebsd/sys/contrib/device-tree/src/arm/microchip/at91-nattis-2-natte-2.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * at91-nattis-2-natte-2.dts - Device Tree file for the Linea/Nattis board
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot * Copyright (C) 2017 Axentia Technologies AB
6*f126890aSEmmanuel Vadot *
7*f126890aSEmmanuel Vadot * Author: Peter Rosin <peda@axentia.se>
8*f126890aSEmmanuel Vadot */
9*f126890aSEmmanuel Vadot/dts-v1/;
10*f126890aSEmmanuel Vadot#include "at91-linea.dtsi"
11*f126890aSEmmanuel Vadot#include "at91-natte.dtsi"
12*f126890aSEmmanuel Vadot
13*f126890aSEmmanuel Vadot/ {
14*f126890aSEmmanuel Vadot	model = "Axentia Linea-Nattis v2 Natte v2";
15*f126890aSEmmanuel Vadot	compatible = "axentia,nattis-2", "axentia,natte-2", "axentia,linea",
16*f126890aSEmmanuel Vadot		     "atmel,sama5d31", "atmel,sama5d3", "atmel,sama5";
17*f126890aSEmmanuel Vadot
18*f126890aSEmmanuel Vadot	gpio-keys {
19*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
20*f126890aSEmmanuel Vadot
21*f126890aSEmmanuel Vadot		key-wakeup {
22*f126890aSEmmanuel Vadot			label = "Wakeup";
23*f126890aSEmmanuel Vadot			linux,code = <10>;
24*f126890aSEmmanuel Vadot			wakeup-source;
25*f126890aSEmmanuel Vadot			gpios = <&pioB 27 GPIO_ACTIVE_LOW>;
26*f126890aSEmmanuel Vadot		};
27*f126890aSEmmanuel Vadot	};
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot	panel_reg: panel-regulator {
30*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
31*f126890aSEmmanuel Vadot		regulator-name = "panel-VCC";
32*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
33*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
34*f126890aSEmmanuel Vadot	};
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot	bl_reg: backlight-regulator {
37*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
38*f126890aSEmmanuel Vadot		regulator-name = "panel-VDD";
39*f126890aSEmmanuel Vadot		regulator-min-microvolt = <12000000>;
40*f126890aSEmmanuel Vadot		regulator-max-microvolt = <12000000>;
41*f126890aSEmmanuel Vadot	};
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel Vadot	panel_bl: backlight {
44*f126890aSEmmanuel Vadot		compatible = "pwm-backlight";
45*f126890aSEmmanuel Vadot		pwms = <&hlcdc_pwm 0 100000 0>;
46*f126890aSEmmanuel Vadot
47*f126890aSEmmanuel Vadot		brightness-levels = < 0  1  2  3  4  5  6  7  8  9
48*f126890aSEmmanuel Vadot				     10 11 12 13 14 15 16 17 18 19
49*f126890aSEmmanuel Vadot				     20 21 22 23 24 25 26 27 28 29
50*f126890aSEmmanuel Vadot				     30 31 32 33 34 35 36 37 38 39
51*f126890aSEmmanuel Vadot				     40 41 42 43 44 45 46 47 48 49
52*f126890aSEmmanuel Vadot				     50 51 52 53 54 55 56 57 58 59
53*f126890aSEmmanuel Vadot				     60 61 62 63 64 65 66 67 68 69
54*f126890aSEmmanuel Vadot				     70 71 72 73 74 75 76 77 78 79
55*f126890aSEmmanuel Vadot				     80 81 82 83 84 85 86 87 88 89
56*f126890aSEmmanuel Vadot				     90 91 92 93 94 95 96 97 98 99
57*f126890aSEmmanuel Vadot				    100>;
58*f126890aSEmmanuel Vadot		default-brightness-level = <40>;
59*f126890aSEmmanuel Vadot
60*f126890aSEmmanuel Vadot		power-supply = <&bl_reg>;
61*f126890aSEmmanuel Vadot		enable-gpios = <&pioA 20 GPIO_ACTIVE_HIGH>;
62*f126890aSEmmanuel Vadot		pinctrl-names = "default";
63*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_blon>;
64*f126890aSEmmanuel Vadot	};
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot	panel: panel {
67*f126890aSEmmanuel Vadot		compatible = "sharp,lq150x1lg11", "panel-lvds";
68*f126890aSEmmanuel Vadot
69*f126890aSEmmanuel Vadot		backlight = <&panel_bl>;
70*f126890aSEmmanuel Vadot		power-supply = <&panel_reg>;
71*f126890aSEmmanuel Vadot
72*f126890aSEmmanuel Vadot		width-mm = <304>;
73*f126890aSEmmanuel Vadot		height-mm = <228>;
74*f126890aSEmmanuel Vadot
75*f126890aSEmmanuel Vadot		data-mapping = "jeida-18";
76*f126890aSEmmanuel Vadot
77*f126890aSEmmanuel Vadot		panel-timing {
78*f126890aSEmmanuel Vadot			// 1024x768 @ 60Hz (typical)
79*f126890aSEmmanuel Vadot			clock-frequency = <50000000 65000000 80000000>;
80*f126890aSEmmanuel Vadot			hactive = <1024>;
81*f126890aSEmmanuel Vadot			vactive = <768>;
82*f126890aSEmmanuel Vadot			hfront-porch = <48 88 88>;
83*f126890aSEmmanuel Vadot			hback-porch = <96 168 168>;
84*f126890aSEmmanuel Vadot			hsync-len = <32 64 64>;
85*f126890aSEmmanuel Vadot			vsync-len = <3 13 74>;
86*f126890aSEmmanuel Vadot			vfront-porch = <3 13 74>;
87*f126890aSEmmanuel Vadot			vback-porch = <3 12 74>;
88*f126890aSEmmanuel Vadot		};
89*f126890aSEmmanuel Vadot
90*f126890aSEmmanuel Vadot		port {
91*f126890aSEmmanuel Vadot			panel_input: endpoint {
92*f126890aSEmmanuel Vadot				remote-endpoint = <&lvds_encoder_output>;
93*f126890aSEmmanuel Vadot			};
94*f126890aSEmmanuel Vadot		};
95*f126890aSEmmanuel Vadot	};
96*f126890aSEmmanuel Vadot
97*f126890aSEmmanuel Vadot	lvds-encoder {
98*f126890aSEmmanuel Vadot		compatible = "ti,ds90c185", "lvds-encoder";
99*f126890aSEmmanuel Vadot
100*f126890aSEmmanuel Vadot		pinctrl-names = "default";
101*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_lvds_prlud0 &pinctrl_lvds_hipow0>;
102*f126890aSEmmanuel Vadot
103*f126890aSEmmanuel Vadot		ports {
104*f126890aSEmmanuel Vadot			#address-cells = <1>;
105*f126890aSEmmanuel Vadot			#size-cells = <0>;
106*f126890aSEmmanuel Vadot
107*f126890aSEmmanuel Vadot			port@0 {
108*f126890aSEmmanuel Vadot				reg = <0>;
109*f126890aSEmmanuel Vadot
110*f126890aSEmmanuel Vadot				lvds_encoder_input: endpoint {
111*f126890aSEmmanuel Vadot					remote-endpoint = <&hlcdc_output>;
112*f126890aSEmmanuel Vadot				};
113*f126890aSEmmanuel Vadot			};
114*f126890aSEmmanuel Vadot
115*f126890aSEmmanuel Vadot			port@1 {
116*f126890aSEmmanuel Vadot				reg = <1>;
117*f126890aSEmmanuel Vadot
118*f126890aSEmmanuel Vadot				lvds_encoder_output: endpoint {
119*f126890aSEmmanuel Vadot					remote-endpoint = <&panel_input>;
120*f126890aSEmmanuel Vadot				};
121*f126890aSEmmanuel Vadot			};
122*f126890aSEmmanuel Vadot		};
123*f126890aSEmmanuel Vadot	};
124*f126890aSEmmanuel Vadot
125*f126890aSEmmanuel Vadot	sound {
126*f126890aSEmmanuel Vadot		compatible = "simple-audio-card";
127*f126890aSEmmanuel Vadot
128*f126890aSEmmanuel Vadot		simple-audio-card,name = "nattis-tfa9879";
129*f126890aSEmmanuel Vadot		simple-audio-card,format = "i2s";
130*f126890aSEmmanuel Vadot		simple-audio-card,bitclock-master = <&cpu_dai>;
131*f126890aSEmmanuel Vadot		simple-audio-card,frame-master = <&cpu_dai>;
132*f126890aSEmmanuel Vadot		simple-audio-card,widgets = "Line", "Line Out Jack";
133*f126890aSEmmanuel Vadot		simple-audio-card,routing = "Line Out Jack", "LINEOUT";
134*f126890aSEmmanuel Vadot
135*f126890aSEmmanuel Vadot		cpu_dai: simple-audio-card,cpu {
136*f126890aSEmmanuel Vadot			sound-dai = <&ssc0>;
137*f126890aSEmmanuel Vadot		};
138*f126890aSEmmanuel Vadot
139*f126890aSEmmanuel Vadot		simple-audio-card,codec {
140*f126890aSEmmanuel Vadot			sound-dai = <&amp>;
141*f126890aSEmmanuel Vadot		};
142*f126890aSEmmanuel Vadot	};
143*f126890aSEmmanuel Vadot};
144*f126890aSEmmanuel Vadot
145*f126890aSEmmanuel Vadot&pinctrl {
146*f126890aSEmmanuel Vadot	nattis {
147*f126890aSEmmanuel Vadot		pinctrl_usba_vbus: usba_vbus {
148*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOD 28 AT91_PERIPH_GPIO
149*f126890aSEmmanuel Vadot				      AT91_PINCTRL_DEGLITCH>;
150*f126890aSEmmanuel Vadot		};
151*f126890aSEmmanuel Vadot
152*f126890aSEmmanuel Vadot		pinctrl_mmc0_cd: mmc0_cd {
153*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOD  5 AT91_PERIPH_GPIO
154*f126890aSEmmanuel Vadot				      AT91_PINCTRL_PULL_UP_DEGLITCH>;
155*f126890aSEmmanuel Vadot		};
156*f126890aSEmmanuel Vadot
157*f126890aSEmmanuel Vadot		pinctrl_lvds_prlud0: lvds_prlud0 {
158*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOA 21 AT91_PERIPH_GPIO
159*f126890aSEmmanuel Vadot				      (AT91_PINCTRL_OUTPUT |
160*f126890aSEmmanuel Vadot				       AT91_PINCTRL_OUTPUT_VAL(0))>;
161*f126890aSEmmanuel Vadot		};
162*f126890aSEmmanuel Vadot
163*f126890aSEmmanuel Vadot		pinctrl_lvds_hipow0: lvds_hipow0 {
164*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOA 23 AT91_PERIPH_GPIO
165*f126890aSEmmanuel Vadot				      (AT91_PINCTRL_OUTPUT |
166*f126890aSEmmanuel Vadot				       AT91_PINCTRL_OUTPUT_VAL(0))>;
167*f126890aSEmmanuel Vadot		};
168*f126890aSEmmanuel Vadot
169*f126890aSEmmanuel Vadot		pinctrl_blon: blon {
170*f126890aSEmmanuel Vadot			atmel,pins = <AT91_PIOA 20 AT91_PERIPH_GPIO
171*f126890aSEmmanuel Vadot				      (AT91_PINCTRL_OUTPUT |
172*f126890aSEmmanuel Vadot				       AT91_PINCTRL_OUTPUT_VAL(0))>;
173*f126890aSEmmanuel Vadot		};
174*f126890aSEmmanuel Vadot	};
175*f126890aSEmmanuel Vadot};
176*f126890aSEmmanuel Vadot
177*f126890aSEmmanuel Vadot&watchdog {
178*f126890aSEmmanuel Vadot	status = "okay";
179*f126890aSEmmanuel Vadot};
180*f126890aSEmmanuel Vadot
181*f126890aSEmmanuel Vadot&i2c0 {
182*f126890aSEmmanuel Vadot	status = "okay";
183*f126890aSEmmanuel Vadot
184*f126890aSEmmanuel Vadot	clock-frequency = <100000>;
185*f126890aSEmmanuel Vadot
186*f126890aSEmmanuel Vadot	temp@18 {
187*f126890aSEmmanuel Vadot		compatible = "nxp,se97b", "jedec,jc-42.4-temp";
188*f126890aSEmmanuel Vadot		reg = <0x18>;
189*f126890aSEmmanuel Vadot		smbus-timeout-disable;
190*f126890aSEmmanuel Vadot	};
191*f126890aSEmmanuel Vadot
192*f126890aSEmmanuel Vadot	eeprom@50 {
193*f126890aSEmmanuel Vadot		compatible = "nxp,se97b", "atmel,24c02";
194*f126890aSEmmanuel Vadot		reg = <0x50>;
195*f126890aSEmmanuel Vadot		pagesize = <16>;
196*f126890aSEmmanuel Vadot	};
197*f126890aSEmmanuel Vadot
198*f126890aSEmmanuel Vadot	amp: amplifier@6c {
199*f126890aSEmmanuel Vadot		 compatible = "nxp,tfa9879";
200*f126890aSEmmanuel Vadot		 reg = <0x6c>;
201*f126890aSEmmanuel Vadot		 #sound-dai-cells = <0>;
202*f126890aSEmmanuel Vadot	};
203*f126890aSEmmanuel Vadot};
204*f126890aSEmmanuel Vadot
205*f126890aSEmmanuel Vadot&ssc0 {
206*f126890aSEmmanuel Vadot	status = "okay";
207*f126890aSEmmanuel Vadot
208*f126890aSEmmanuel Vadot	atmel,clk-from-rk-pin;
209*f126890aSEmmanuel Vadot	#sound-dai-cells = <0>;
210*f126890aSEmmanuel Vadot};
211*f126890aSEmmanuel Vadot
212*f126890aSEmmanuel Vadot&hlcdc {
213*f126890aSEmmanuel Vadot	status = "okay";
214*f126890aSEmmanuel Vadot
215*f126890aSEmmanuel Vadot	hlcdc-display-controller {
216*f126890aSEmmanuel Vadot		pinctrl-names = "default";
217*f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>;
218*f126890aSEmmanuel Vadot
219*f126890aSEmmanuel Vadot		port@0 {
220*f126890aSEmmanuel Vadot			hlcdc_output: endpoint {
221*f126890aSEmmanuel Vadot				remote-endpoint = <&lvds_encoder_input>;
222*f126890aSEmmanuel Vadot				bus-width = <16>;
223*f126890aSEmmanuel Vadot			};
224*f126890aSEmmanuel Vadot		};
225*f126890aSEmmanuel Vadot	};
226*f126890aSEmmanuel Vadot};
227*f126890aSEmmanuel Vadot
228*f126890aSEmmanuel Vadot&mmc0 {
229*f126890aSEmmanuel Vadot	status = "okay";
230*f126890aSEmmanuel Vadot
231*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0
232*f126890aSEmmanuel Vadot		     &pinctrl_mmc0_dat1_3
233*f126890aSEmmanuel Vadot		     &pinctrl_mmc0_cd>;
234*f126890aSEmmanuel Vadot
235*f126890aSEmmanuel Vadot	slot@0 {
236*f126890aSEmmanuel Vadot		reg = <0>;
237*f126890aSEmmanuel Vadot		bus-width = <4>;
238*f126890aSEmmanuel Vadot		cd-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
239*f126890aSEmmanuel Vadot		cd-inverted;
240*f126890aSEmmanuel Vadot	};
241*f126890aSEmmanuel Vadot};
242*f126890aSEmmanuel Vadot
243*f126890aSEmmanuel Vadot&usart0 {
244*f126890aSEmmanuel Vadot	status = "okay";
245*f126890aSEmmanuel Vadot
246*f126890aSEmmanuel Vadot	pinctrl-names = "default";
247*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usart0>;
248*f126890aSEmmanuel Vadot	atmel,use-dma-rx;
249*f126890aSEmmanuel Vadot};
250*f126890aSEmmanuel Vadot
251*f126890aSEmmanuel Vadot&nand {
252*f126890aSEmmanuel Vadot	partitions {
253*f126890aSEmmanuel Vadot		compatible = "fixed-partitions";
254*f126890aSEmmanuel Vadot		#address-cells = <1>;
255*f126890aSEmmanuel Vadot		#size-cells = <1>;
256*f126890aSEmmanuel Vadot
257*f126890aSEmmanuel Vadot		at91bootstrap@0 {
258*f126890aSEmmanuel Vadot			label = "at91bootstrap";
259*f126890aSEmmanuel Vadot			reg = <0x0 0x40000>;
260*f126890aSEmmanuel Vadot		};
261*f126890aSEmmanuel Vadot
262*f126890aSEmmanuel Vadot		barebox@40000 {
263*f126890aSEmmanuel Vadot			label = "barebox";
264*f126890aSEmmanuel Vadot			reg = <0x40000 0x60000>;
265*f126890aSEmmanuel Vadot		};
266*f126890aSEmmanuel Vadot
267*f126890aSEmmanuel Vadot		bareboxenv@c0000 {
268*f126890aSEmmanuel Vadot			label = "bareboxenv";
269*f126890aSEmmanuel Vadot			reg = <0xc0000 0x40000>;
270*f126890aSEmmanuel Vadot		};
271*f126890aSEmmanuel Vadot
272*f126890aSEmmanuel Vadot		bareboxenv2@100000 {
273*f126890aSEmmanuel Vadot			label = "bareboxenv2";
274*f126890aSEmmanuel Vadot			reg = <0x100000 0x40000>;
275*f126890aSEmmanuel Vadot		};
276*f126890aSEmmanuel Vadot
277*f126890aSEmmanuel Vadot		oftree@180000 {
278*f126890aSEmmanuel Vadot			label = "oftree";
279*f126890aSEmmanuel Vadot			reg = <0x180000 0x20000>;
280*f126890aSEmmanuel Vadot		};
281*f126890aSEmmanuel Vadot
282*f126890aSEmmanuel Vadot		kernel@200000 {
283*f126890aSEmmanuel Vadot			label = "kernel";
284*f126890aSEmmanuel Vadot			reg = <0x200000 0x500000>;
285*f126890aSEmmanuel Vadot		};
286*f126890aSEmmanuel Vadot
287*f126890aSEmmanuel Vadot		rootfs@800000 {
288*f126890aSEmmanuel Vadot			label = "rootfs";
289*f126890aSEmmanuel Vadot			reg = <0x800000 0x1f800000>;
290*f126890aSEmmanuel Vadot		};
291*f126890aSEmmanuel Vadot	};
292*f126890aSEmmanuel Vadot};
293*f126890aSEmmanuel Vadot
294*f126890aSEmmanuel Vadot&dbgu {
295*f126890aSEmmanuel Vadot	status = "okay";
296*f126890aSEmmanuel Vadot
297*f126890aSEmmanuel Vadot	atmel,use-dma-rx;
298*f126890aSEmmanuel Vadot};
299*f126890aSEmmanuel Vadot
300*f126890aSEmmanuel Vadot&usb0 {
301*f126890aSEmmanuel Vadot	status = "okay";
302*f126890aSEmmanuel Vadot
303*f126890aSEmmanuel Vadot	atmel,vbus-gpio = <&pioD 28 GPIO_ACTIVE_HIGH>;
304*f126890aSEmmanuel Vadot	pinctrl-names = "default";
305*f126890aSEmmanuel Vadot	pinctrl-0 = <&pinctrl_usba_vbus>;
306*f126890aSEmmanuel Vadot};
307