xref: /freebsd-src/sys/contrib/device-tree/src/arm/microchip/at91sam9n12ek.dts (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-or-later
2f126890aSEmmanuel Vadot/*
3f126890aSEmmanuel Vadot * at91sam9n12ek.dts - Device Tree file for AT91SAM9N12-EK board
4f126890aSEmmanuel Vadot *
5f126890aSEmmanuel Vadot *  Copyright (C) 2012 Atmel,
6f126890aSEmmanuel Vadot *                2012 Hong Xu <hong.xu@atmel.com>
7f126890aSEmmanuel Vadot */
8f126890aSEmmanuel Vadot/dts-v1/;
9f126890aSEmmanuel Vadot#include "at91sam9n12.dtsi"
10f126890aSEmmanuel Vadot
11f126890aSEmmanuel Vadot/ {
12f126890aSEmmanuel Vadot	model = "Atmel AT91SAM9N12-EK";
13f126890aSEmmanuel Vadot	compatible = "atmel,at91sam9n12ek", "atmel,at91sam9n12", "atmel,at91sam9";
14f126890aSEmmanuel Vadot
15f126890aSEmmanuel Vadot	chosen {
16f126890aSEmmanuel Vadot		bootargs = "root=/dev/mtdblock1 rw rootfstype=jffs2";
17f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
18f126890aSEmmanuel Vadot	};
19f126890aSEmmanuel Vadot
20f126890aSEmmanuel Vadot	memory@20000000 {
21f126890aSEmmanuel Vadot		reg = <0x20000000 0x8000000>;
22f126890aSEmmanuel Vadot	};
23f126890aSEmmanuel Vadot
24f126890aSEmmanuel Vadot	clocks {
25f126890aSEmmanuel Vadot		slow_xtal {
26f126890aSEmmanuel Vadot			clock-frequency = <32768>;
27f126890aSEmmanuel Vadot		};
28f126890aSEmmanuel Vadot
29f126890aSEmmanuel Vadot		main_xtal {
30f126890aSEmmanuel Vadot			clock-frequency = <16000000>;
31f126890aSEmmanuel Vadot		};
32f126890aSEmmanuel Vadot	};
33f126890aSEmmanuel Vadot
34f126890aSEmmanuel Vadot	ahb {
35f126890aSEmmanuel Vadot		apb {
36f126890aSEmmanuel Vadot			dbgu: serial@fffff200 {
37f126890aSEmmanuel Vadot				status = "okay";
38f126890aSEmmanuel Vadot			};
39f126890aSEmmanuel Vadot
40f126890aSEmmanuel Vadot			ssc0: ssc@f0010000 {
41f126890aSEmmanuel Vadot				status = "okay";
42f126890aSEmmanuel Vadot			};
43f126890aSEmmanuel Vadot
44f126890aSEmmanuel Vadot			tcb0: timer@f8008000 {
45f126890aSEmmanuel Vadot				timer@0 {
46f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
47f126890aSEmmanuel Vadot					reg = <0>;
48f126890aSEmmanuel Vadot				};
49f126890aSEmmanuel Vadot
50f126890aSEmmanuel Vadot				timer@1 {
51f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
52f126890aSEmmanuel Vadot					reg = <1>;
53f126890aSEmmanuel Vadot				};
54f126890aSEmmanuel Vadot			};
55f126890aSEmmanuel Vadot
56f126890aSEmmanuel Vadot			i2c0: i2c@f8010000 {
57f126890aSEmmanuel Vadot				status = "okay";
58f126890aSEmmanuel Vadot
59f126890aSEmmanuel Vadot				wm8904: codec@1a {
60f126890aSEmmanuel Vadot					compatible = "wlf,wm8904";
61f126890aSEmmanuel Vadot					reg = <0x1a>;
62f126890aSEmmanuel Vadot					clocks = <&pmc PMC_TYPE_SYSTEM 8>;
63f126890aSEmmanuel Vadot					clock-names = "mclk";
64f126890aSEmmanuel Vadot				};
65f126890aSEmmanuel Vadot
66f126890aSEmmanuel Vadot				qt1070: keyboard@1b {
67f126890aSEmmanuel Vadot					compatible = "qt1070";
68f126890aSEmmanuel Vadot					reg = <0x1b>;
69f126890aSEmmanuel Vadot					interrupt-parent = <&pioA>;
70f126890aSEmmanuel Vadot					interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
71f126890aSEmmanuel Vadot					pinctrl-names = "default";
72f126890aSEmmanuel Vadot					pinctrl-0 = <&pinctrl_qt1070_irq>;
73f126890aSEmmanuel Vadot				};
74f126890aSEmmanuel Vadot			};
75f126890aSEmmanuel Vadot
76f126890aSEmmanuel Vadot			mmc0: mmc@f0008000 {
77f126890aSEmmanuel Vadot				pinctrl-0 = <
78f126890aSEmmanuel Vadot					&pinctrl_board_mmc0
79f126890aSEmmanuel Vadot					&pinctrl_mmc0_slot0_clk_cmd_dat0
80f126890aSEmmanuel Vadot					&pinctrl_mmc0_slot0_dat1_3>;
81f126890aSEmmanuel Vadot				status = "okay";
82f126890aSEmmanuel Vadot				slot@0 {
83f126890aSEmmanuel Vadot					reg = <0>;
84f126890aSEmmanuel Vadot					bus-width = <4>;
85f126890aSEmmanuel Vadot					cd-gpios = <&pioA 7 GPIO_ACTIVE_HIGH>;
86f126890aSEmmanuel Vadot				};
87f126890aSEmmanuel Vadot			};
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot			pinctrl@fffff400 {
90f126890aSEmmanuel Vadot				mmc0 {
91f126890aSEmmanuel Vadot					pinctrl_board_mmc0: mmc0-board {
92f126890aSEmmanuel Vadot						atmel,pins =
93f126890aSEmmanuel Vadot							<AT91_PIOA 7 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;	/* PA7 gpio CD pin pull up and deglitch */
94f126890aSEmmanuel Vadot					};
95f126890aSEmmanuel Vadot				};
96f126890aSEmmanuel Vadot
97f126890aSEmmanuel Vadot				qt1070 {
98f126890aSEmmanuel Vadot					pinctrl_qt1070_irq: qt1070_irq {
99f126890aSEmmanuel Vadot						atmel,pins =
100f126890aSEmmanuel Vadot							<AT91_PIOA 2 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
101f126890aSEmmanuel Vadot					};
102f126890aSEmmanuel Vadot				};
103f126890aSEmmanuel Vadot
104f126890aSEmmanuel Vadot				sound {
105f126890aSEmmanuel Vadot					pinctrl_pck0_as_audio_mck: pck0_as_audio_mck {
106f126890aSEmmanuel Vadot						atmel,pins =
107f126890aSEmmanuel Vadot							<AT91_PIOB 10 AT91_PERIPH_B AT91_PINCTRL_NONE>;
108f126890aSEmmanuel Vadot					};
109f126890aSEmmanuel Vadot				};
110f126890aSEmmanuel Vadot
111f126890aSEmmanuel Vadot				usb1 {
112f126890aSEmmanuel Vadot					pinctrl_usb1_vbus_sense: usb1_vbus_sense {
113f126890aSEmmanuel Vadot						atmel,pins =
114f126890aSEmmanuel Vadot							<AT91_PIOB 16 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>;	/* PB16 gpio usb vbus sense, no pull up and deglitch */
115f126890aSEmmanuel Vadot					};
116f126890aSEmmanuel Vadot				};
117f126890aSEmmanuel Vadot			};
118f126890aSEmmanuel Vadot
119f126890aSEmmanuel Vadot			spi0: spi@f0000000 {
120f126890aSEmmanuel Vadot				status = "okay";
121f126890aSEmmanuel Vadot				cs-gpios = <&pioA 14 0>, <0>, <0>, <0>;
122f126890aSEmmanuel Vadot				flash@0 {
123f126890aSEmmanuel Vadot					compatible = "atmel,at25df321a";
124f126890aSEmmanuel Vadot					spi-max-frequency = <50000000>;
125f126890aSEmmanuel Vadot					reg = <0>;
126f126890aSEmmanuel Vadot				};
127f126890aSEmmanuel Vadot			};
128f126890aSEmmanuel Vadot
129f126890aSEmmanuel Vadot			hlcdc: hlcdc@f8038000 {
130f126890aSEmmanuel Vadot				status = "okay";
131f126890aSEmmanuel Vadot
132f126890aSEmmanuel Vadot				hlcdc-display-controller {
133f126890aSEmmanuel Vadot					pinctrl-names = "default";
134f126890aSEmmanuel Vadot					pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888>;
135f126890aSEmmanuel Vadot
136f126890aSEmmanuel Vadot					port@0 {
137f126890aSEmmanuel Vadot						hlcdc_panel_output: endpoint@0 {
138f126890aSEmmanuel Vadot							reg = <0>;
139f126890aSEmmanuel Vadot							remote-endpoint = <&panel_input>;
140f126890aSEmmanuel Vadot						};
141f126890aSEmmanuel Vadot					};
142f126890aSEmmanuel Vadot				};
143f126890aSEmmanuel Vadot			};
144f126890aSEmmanuel Vadot
145f126890aSEmmanuel Vadot			usb1: gadget@f803c000 {
146f126890aSEmmanuel Vadot				pinctrl-names = "default";
147f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_usb1_vbus_sense>;
148f126890aSEmmanuel Vadot				atmel,vbus-gpio = <&pioB 16 GPIO_ACTIVE_HIGH>;
149f126890aSEmmanuel Vadot				status = "okay";
150f126890aSEmmanuel Vadot			};
151f126890aSEmmanuel Vadot
152f126890aSEmmanuel Vadot			watchdog@fffffe40 {
153f126890aSEmmanuel Vadot				status = "okay";
154f126890aSEmmanuel Vadot			};
155f126890aSEmmanuel Vadot
156f126890aSEmmanuel Vadot			rtc@fffffeb0 {
157f126890aSEmmanuel Vadot				status = "okay";
158f126890aSEmmanuel Vadot			};
159f126890aSEmmanuel Vadot		};
160f126890aSEmmanuel Vadot
161f126890aSEmmanuel Vadot		ebi: ebi@10000000 {
162f126890aSEmmanuel Vadot			status = "okay";
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot			nand_controller: nand-controller {
165f126890aSEmmanuel Vadot				status = "okay";
166f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_nand_cs &pinctrl_nand_rb>;
167f126890aSEmmanuel Vadot				pinctrl-names = "default";
168f126890aSEmmanuel Vadot
169f126890aSEmmanuel Vadot				nand@3 {
170f126890aSEmmanuel Vadot					reg = <0x3 0x0 0x800000>;
171f126890aSEmmanuel Vadot					rb-gpios = <&pioD 5 GPIO_ACTIVE_HIGH>;
172f126890aSEmmanuel Vadot					cs-gpios = <&pioD 4 GPIO_ACTIVE_HIGH>;
173f126890aSEmmanuel Vadot					nand-bus-width = <8>;
174f126890aSEmmanuel Vadot					nand-ecc-mode = "soft";
175f126890aSEmmanuel Vadot					nand-ecc-strength = <2>;
176f126890aSEmmanuel Vadot					nand-ecc-step-size = <512>;
177f126890aSEmmanuel Vadot					nand-on-flash-bbt;
178f126890aSEmmanuel Vadot					label = "atmel_nand";
179f126890aSEmmanuel Vadot				};
180f126890aSEmmanuel Vadot			};
181f126890aSEmmanuel Vadot		};
182f126890aSEmmanuel Vadot
183f126890aSEmmanuel Vadot		usb0: ohci@500000 {
184f126890aSEmmanuel Vadot			num-ports = <1>;
185f126890aSEmmanuel Vadot			atmel,vbus-gpio = <&pioB 7 GPIO_ACTIVE_LOW>;
186f126890aSEmmanuel Vadot			status = "okay";
187f126890aSEmmanuel Vadot		};
188f126890aSEmmanuel Vadot	};
189f126890aSEmmanuel Vadot
190f126890aSEmmanuel Vadot	backlight: backlight {
191f126890aSEmmanuel Vadot		compatible = "pwm-backlight";
192f126890aSEmmanuel Vadot		pwms = <&hlcdc_pwm 0 50000 0>;
193f126890aSEmmanuel Vadot		brightness-levels = <0 4 8 16 32 64 128 255>;
194f126890aSEmmanuel Vadot		default-brightness-level = <6>;
195f126890aSEmmanuel Vadot		power-supply = <&bl_reg>;
196f126890aSEmmanuel Vadot		status = "okay";
197f126890aSEmmanuel Vadot	};
198f126890aSEmmanuel Vadot
199f126890aSEmmanuel Vadot	bl_reg: backlight_regulator {
200f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
201f126890aSEmmanuel Vadot		regulator-name = "backlight-power-supply";
202f126890aSEmmanuel Vadot		regulator-min-microvolt = <5000000>;
203f126890aSEmmanuel Vadot		regulator-max-microvolt = <5000000>;
204f126890aSEmmanuel Vadot		status = "okay";
205f126890aSEmmanuel Vadot	};
206f126890aSEmmanuel Vadot
207f126890aSEmmanuel Vadot	leds {
208f126890aSEmmanuel Vadot		compatible = "gpio-leds";
209f126890aSEmmanuel Vadot
210*b2d2a78aSEmmanuel Vadot		led-d8 {
211f126890aSEmmanuel Vadot			label = "d8";
212f126890aSEmmanuel Vadot			gpios = <&pioB 4 GPIO_ACTIVE_LOW>;
213f126890aSEmmanuel Vadot			linux,default-trigger = "mmc0";
214f126890aSEmmanuel Vadot		};
215f126890aSEmmanuel Vadot
216*b2d2a78aSEmmanuel Vadot		led-d9 {
217f126890aSEmmanuel Vadot			label = "d9";
218f126890aSEmmanuel Vadot			gpios = <&pioB 5 GPIO_ACTIVE_LOW>;
219f126890aSEmmanuel Vadot			linux,default-trigger = "nand-disk";
220f126890aSEmmanuel Vadot		};
221f126890aSEmmanuel Vadot
222*b2d2a78aSEmmanuel Vadot		led-d10 {
223f126890aSEmmanuel Vadot			label = "d10";
224f126890aSEmmanuel Vadot			gpios = <&pioB 6 GPIO_ACTIVE_HIGH>;
225f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
226f126890aSEmmanuel Vadot		};
227f126890aSEmmanuel Vadot	};
228f126890aSEmmanuel Vadot
229f126890aSEmmanuel Vadot	gpio-keys {
230f126890aSEmmanuel Vadot		compatible = "gpio-keys";
231f126890aSEmmanuel Vadot
232f126890aSEmmanuel Vadot		button-enter {
233f126890aSEmmanuel Vadot			label = "Enter";
234f126890aSEmmanuel Vadot			gpios = <&pioB 3 GPIO_ACTIVE_LOW>;
235f126890aSEmmanuel Vadot			linux,code = <28>;
236f126890aSEmmanuel Vadot			wakeup-source;
237f126890aSEmmanuel Vadot		};
238f126890aSEmmanuel Vadot	};
239f126890aSEmmanuel Vadot
240f126890aSEmmanuel Vadot	panel: panel {
241f126890aSEmmanuel Vadot		compatible = "qiaodian,qd43003c0-40";
242f126890aSEmmanuel Vadot		backlight = <&backlight>;
243f126890aSEmmanuel Vadot		power-supply = <&panel_reg>;
244f126890aSEmmanuel Vadot		#address-cells = <1>;
245f126890aSEmmanuel Vadot		#size-cells = <0>;
246f126890aSEmmanuel Vadot		status = "okay";
247f126890aSEmmanuel Vadot
248f126890aSEmmanuel Vadot		port@0 {
249f126890aSEmmanuel Vadot			reg = <0>;
250f126890aSEmmanuel Vadot			#address-cells = <1>;
251f126890aSEmmanuel Vadot			#size-cells = <0>;
252f126890aSEmmanuel Vadot
253f126890aSEmmanuel Vadot			panel_input: endpoint@0 {
254f126890aSEmmanuel Vadot				reg = <0>;
255f126890aSEmmanuel Vadot				remote-endpoint = <&hlcdc_panel_output>;
256f126890aSEmmanuel Vadot			};
257f126890aSEmmanuel Vadot		};
258f126890aSEmmanuel Vadot	};
259f126890aSEmmanuel Vadot
260f126890aSEmmanuel Vadot	panel_reg: panel_regulator {
261f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
262f126890aSEmmanuel Vadot		regulator-name = "panel-power-supply";
263f126890aSEmmanuel Vadot		regulator-min-microvolt = <3300000>;
264f126890aSEmmanuel Vadot		regulator-max-microvolt = <3300000>;
265f126890aSEmmanuel Vadot		status = "okay";
266f126890aSEmmanuel Vadot	};
267f126890aSEmmanuel Vadot
268f126890aSEmmanuel Vadot	sound {
269f126890aSEmmanuel Vadot		compatible = "atmel,asoc-wm8904";
270f126890aSEmmanuel Vadot		pinctrl-names = "default";
271f126890aSEmmanuel Vadot		pinctrl-0 = <&pinctrl_pck0_as_audio_mck>;
272f126890aSEmmanuel Vadot
273f126890aSEmmanuel Vadot		atmel,model = "wm8904 @ AT91SAM9N12";
274f126890aSEmmanuel Vadot		atmel,audio-routing =
275f126890aSEmmanuel Vadot			"Headphone Jack", "HPOUTL",
276f126890aSEmmanuel Vadot			"Headphone Jack", "HPOUTR",
277f126890aSEmmanuel Vadot			"IN2L", "Line In Jack",
278f126890aSEmmanuel Vadot			"IN2R", "Line In Jack",
279f126890aSEmmanuel Vadot			"Mic", "MICBIAS",
280f126890aSEmmanuel Vadot			"IN1L", "Mic";
281f126890aSEmmanuel Vadot
282f126890aSEmmanuel Vadot		atmel,ssc-controller = <&ssc0>;
283f126890aSEmmanuel Vadot		atmel,audio-codec = <&wm8904>;
284f126890aSEmmanuel Vadot	};
285f126890aSEmmanuel Vadot};
286