xref: /freebsd-src/sys/contrib/device-tree/src/arm/microchip/at91sam9rlek.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * at91sam9rlek.dts - Device Tree file for Atmel at91sam9rl reference board
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot *  Copyright (C) 2014 Microchip
6*f126890aSEmmanuel Vadot *  Alexandre Belloni <alexandre.belloni@free-electrons.com>
7*f126890aSEmmanuel Vadot */
8*f126890aSEmmanuel Vadot/dts-v1/;
9*f126890aSEmmanuel Vadot#include "at91sam9rl.dtsi"
10*f126890aSEmmanuel Vadot
11*f126890aSEmmanuel Vadot/ {
12*f126890aSEmmanuel Vadot	model = "Atmel at91sam9rlek";
13*f126890aSEmmanuel Vadot	compatible = "atmel,at91sam9rlek", "atmel,at91sam9rl", "atmel,at91sam9";
14*f126890aSEmmanuel Vadot
15*f126890aSEmmanuel Vadot	chosen {
16*f126890aSEmmanuel Vadot		bootargs = "rootfstype=ubifs root=ubi0:rootfs ubi.mtd=5 rw";
17*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
18*f126890aSEmmanuel Vadot	};
19*f126890aSEmmanuel Vadot
20*f126890aSEmmanuel Vadot	memory@20000000 {
21*f126890aSEmmanuel Vadot		reg = <0x20000000 0x4000000>;
22*f126890aSEmmanuel Vadot	};
23*f126890aSEmmanuel Vadot
24*f126890aSEmmanuel Vadot	clocks {
25*f126890aSEmmanuel Vadot		slow_xtal {
26*f126890aSEmmanuel Vadot			clock-frequency = <32768>;
27*f126890aSEmmanuel Vadot		};
28*f126890aSEmmanuel Vadot
29*f126890aSEmmanuel Vadot		main_xtal {
30*f126890aSEmmanuel Vadot			clock-frequency = <12000000>;
31*f126890aSEmmanuel Vadot		};
32*f126890aSEmmanuel Vadot	};
33*f126890aSEmmanuel Vadot
34*f126890aSEmmanuel Vadot	ahb {
35*f126890aSEmmanuel Vadot		fb0: fb@500000 {
36*f126890aSEmmanuel Vadot			display = <&display0>;
37*f126890aSEmmanuel Vadot			status = "okay";
38*f126890aSEmmanuel Vadot
39*f126890aSEmmanuel Vadot			display0: panel {
40*f126890aSEmmanuel Vadot				bits-per-pixel = <16>;
41*f126890aSEmmanuel Vadot				atmel,lcdcon-backlight;
42*f126890aSEmmanuel Vadot				atmel,dmacon = <0x1>;
43*f126890aSEmmanuel Vadot				atmel,lcdcon2 = <0x80008002>;
44*f126890aSEmmanuel Vadot				atmel,guard-time = <1>;
45*f126890aSEmmanuel Vadot				atmel,lcd-wiring-mode = "RGB";
46*f126890aSEmmanuel Vadot
47*f126890aSEmmanuel Vadot				display-timings {
48*f126890aSEmmanuel Vadot					native-mode = <&timing0>;
49*f126890aSEmmanuel Vadot					timing0: timing0 {
50*f126890aSEmmanuel Vadot						clock-frequency = <4965000>;
51*f126890aSEmmanuel Vadot						hactive = <240>;
52*f126890aSEmmanuel Vadot						vactive = <320>;
53*f126890aSEmmanuel Vadot						hback-porch = <1>;
54*f126890aSEmmanuel Vadot						hfront-porch = <33>;
55*f126890aSEmmanuel Vadot						vback-porch = <1>;
56*f126890aSEmmanuel Vadot						vfront-porch = <0>;
57*f126890aSEmmanuel Vadot						hsync-len = <5>;
58*f126890aSEmmanuel Vadot						vsync-len = <1>;
59*f126890aSEmmanuel Vadot						hsync-active = <1>;
60*f126890aSEmmanuel Vadot						vsync-active = <1>;
61*f126890aSEmmanuel Vadot					};
62*f126890aSEmmanuel Vadot				};
63*f126890aSEmmanuel Vadot			};
64*f126890aSEmmanuel Vadot		};
65*f126890aSEmmanuel Vadot
66*f126890aSEmmanuel Vadot		ebi: ebi@10000000 {
67*f126890aSEmmanuel Vadot			pinctrl-0 = <&pinctrl_ebi_addr_nand>;
68*f126890aSEmmanuel Vadot			pinctrl-names = "default";
69*f126890aSEmmanuel Vadot			status = "okay";
70*f126890aSEmmanuel Vadot
71*f126890aSEmmanuel Vadot			nand_controller: nand-controller {
72*f126890aSEmmanuel Vadot				status = "okay";
73*f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_nand_oe_we
74*f126890aSEmmanuel Vadot					     &pinctrl_nand_cs
75*f126890aSEmmanuel Vadot					     &pinctrl_nand_rb>;
76*f126890aSEmmanuel Vadot				pinctrl-names = "default";
77*f126890aSEmmanuel Vadot
78*f126890aSEmmanuel Vadot				nand@3 {
79*f126890aSEmmanuel Vadot					reg = <0x3 0x0 0x800000>;
80*f126890aSEmmanuel Vadot					rb-gpios = <&pioD 17 GPIO_ACTIVE_HIGH>;
81*f126890aSEmmanuel Vadot					cs-gpios = <&pioB 6 GPIO_ACTIVE_HIGH>;
82*f126890aSEmmanuel Vadot					nand-bus-width = <8>;
83*f126890aSEmmanuel Vadot					nand-ecc-mode = "soft";
84*f126890aSEmmanuel Vadot					nand-on-flash-bbt;
85*f126890aSEmmanuel Vadot					label = "atmel_nand";
86*f126890aSEmmanuel Vadot
87*f126890aSEmmanuel Vadot					partitions {
88*f126890aSEmmanuel Vadot						compatible = "fixed-partitions";
89*f126890aSEmmanuel Vadot						#address-cells = <1>;
90*f126890aSEmmanuel Vadot						#size-cells = <1>;
91*f126890aSEmmanuel Vadot
92*f126890aSEmmanuel Vadot						at91bootstrap@0 {
93*f126890aSEmmanuel Vadot							label = "at91bootstrap";
94*f126890aSEmmanuel Vadot							reg = <0x0 0x40000>;
95*f126890aSEmmanuel Vadot						};
96*f126890aSEmmanuel Vadot
97*f126890aSEmmanuel Vadot						bootloader@40000 {
98*f126890aSEmmanuel Vadot							label = "bootloader";
99*f126890aSEmmanuel Vadot							reg = <0x40000 0x80000>;
100*f126890aSEmmanuel Vadot						};
101*f126890aSEmmanuel Vadot
102*f126890aSEmmanuel Vadot						bootloaderenv@c0000 {
103*f126890aSEmmanuel Vadot							label = "bootloader env";
104*f126890aSEmmanuel Vadot							reg = <0xc0000 0xc0000>;
105*f126890aSEmmanuel Vadot						};
106*f126890aSEmmanuel Vadot
107*f126890aSEmmanuel Vadot						dtb@180000 {
108*f126890aSEmmanuel Vadot							label = "device tree";
109*f126890aSEmmanuel Vadot							reg = <0x180000 0x80000>;
110*f126890aSEmmanuel Vadot						};
111*f126890aSEmmanuel Vadot
112*f126890aSEmmanuel Vadot						kernel@200000 {
113*f126890aSEmmanuel Vadot							label = "kernel";
114*f126890aSEmmanuel Vadot							reg = <0x200000 0x600000>;
115*f126890aSEmmanuel Vadot						};
116*f126890aSEmmanuel Vadot
117*f126890aSEmmanuel Vadot						rootfs@800000 {
118*f126890aSEmmanuel Vadot							label = "rootfs";
119*f126890aSEmmanuel Vadot							reg = <0x800000 0x0f800000>;
120*f126890aSEmmanuel Vadot						};
121*f126890aSEmmanuel Vadot					};
122*f126890aSEmmanuel Vadot				};
123*f126890aSEmmanuel Vadot			};
124*f126890aSEmmanuel Vadot		};
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot		apb {
127*f126890aSEmmanuel Vadot			tcb0: timer@fffa0000 {
128*f126890aSEmmanuel Vadot				timer@0 {
129*f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
130*f126890aSEmmanuel Vadot					reg = <0>, <1>;
131*f126890aSEmmanuel Vadot				};
132*f126890aSEmmanuel Vadot
133*f126890aSEmmanuel Vadot				timer@2 {
134*f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
135*f126890aSEmmanuel Vadot					reg = <2>;
136*f126890aSEmmanuel Vadot				};
137*f126890aSEmmanuel Vadot			};
138*f126890aSEmmanuel Vadot
139*f126890aSEmmanuel Vadot			mmc0: mmc@fffa4000 {
140*f126890aSEmmanuel Vadot				pinctrl-0 = <
141*f126890aSEmmanuel Vadot					&pinctrl_board_mmc0
142*f126890aSEmmanuel Vadot					&pinctrl_mmc0_clk
143*f126890aSEmmanuel Vadot					&pinctrl_mmc0_slot0_cmd_dat0
144*f126890aSEmmanuel Vadot					&pinctrl_mmc0_slot0_dat1_3>;
145*f126890aSEmmanuel Vadot				status = "okay";
146*f126890aSEmmanuel Vadot				slot@0 {
147*f126890aSEmmanuel Vadot					reg = <0>;
148*f126890aSEmmanuel Vadot					bus-width = <4>;
149*f126890aSEmmanuel Vadot					cd-gpios = <&pioA 15 GPIO_ACTIVE_HIGH>;
150*f126890aSEmmanuel Vadot				};
151*f126890aSEmmanuel Vadot			};
152*f126890aSEmmanuel Vadot
153*f126890aSEmmanuel Vadot			usart0: serial@fffb0000 {
154*f126890aSEmmanuel Vadot				pinctrl-0 = <
155*f126890aSEmmanuel Vadot					&pinctrl_usart0
156*f126890aSEmmanuel Vadot					&pinctrl_usart0_rts
157*f126890aSEmmanuel Vadot					&pinctrl_usart0_cts>;
158*f126890aSEmmanuel Vadot				status = "okay";
159*f126890aSEmmanuel Vadot			};
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot			adc0: adc@fffd0000 {
162*f126890aSEmmanuel Vadot				pinctrl-names = "default";
163*f126890aSEmmanuel Vadot				pinctrl-0 = <
164*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad0
165*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad1
166*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad2
167*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad3
168*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad4
169*f126890aSEmmanuel Vadot					&pinctrl_adc0_ad5
170*f126890aSEmmanuel Vadot					&pinctrl_adc0_adtrg>;
171*f126890aSEmmanuel Vadot				atmel,adc-ts-wires = <4>;
172*f126890aSEmmanuel Vadot				status = "okay";
173*f126890aSEmmanuel Vadot			};
174*f126890aSEmmanuel Vadot
175*f126890aSEmmanuel Vadot			usb0: gadget@fffd4000 {
176*f126890aSEmmanuel Vadot				atmel,vbus-gpio = <&pioA 8 GPIO_ACTIVE_HIGH>;
177*f126890aSEmmanuel Vadot				status = "okay";
178*f126890aSEmmanuel Vadot			};
179*f126890aSEmmanuel Vadot
180*f126890aSEmmanuel Vadot			spi0: spi@fffcc000 {
181*f126890aSEmmanuel Vadot				status = "okay";
182*f126890aSEmmanuel Vadot				cs-gpios = <&pioA 28 0>, <0>, <0>, <0>;
183*f126890aSEmmanuel Vadot				flash@0 {
184*f126890aSEmmanuel Vadot					compatible = "atmel,at45", "atmel,dataflash";
185*f126890aSEmmanuel Vadot					spi-max-frequency = <15000000>;
186*f126890aSEmmanuel Vadot					reg = <0>;
187*f126890aSEmmanuel Vadot				};
188*f126890aSEmmanuel Vadot			};
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot			pwm0: pwm@fffc8000 {
191*f126890aSEmmanuel Vadot				status = "okay";
192*f126890aSEmmanuel Vadot
193*f126890aSEmmanuel Vadot				pinctrl-names = "default";
194*f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_pwm0_pwm1_2>,
195*f126890aSEmmanuel Vadot					<&pinctrl_pwm0_pwm2_2>;
196*f126890aSEmmanuel Vadot			};
197*f126890aSEmmanuel Vadot
198*f126890aSEmmanuel Vadot			dbgu: serial@fffff200 {
199*f126890aSEmmanuel Vadot				status = "okay";
200*f126890aSEmmanuel Vadot			};
201*f126890aSEmmanuel Vadot
202*f126890aSEmmanuel Vadot			pinctrl@fffff400 {
203*f126890aSEmmanuel Vadot				mmc0 {
204*f126890aSEmmanuel Vadot					pinctrl_board_mmc0: mmc0-board {
205*f126890aSEmmanuel Vadot						atmel,pins =
206*f126890aSEmmanuel Vadot							<AT91_PIOA 15 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
207*f126890aSEmmanuel Vadot					};
208*f126890aSEmmanuel Vadot				};
209*f126890aSEmmanuel Vadot			};
210*f126890aSEmmanuel Vadot
211*f126890aSEmmanuel Vadot			watchdog@fffffd40 {
212*f126890aSEmmanuel Vadot				status = "okay";
213*f126890aSEmmanuel Vadot			};
214*f126890aSEmmanuel Vadot
215*f126890aSEmmanuel Vadot			rtc@fffffd20 {
216*f126890aSEmmanuel Vadot				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
217*f126890aSEmmanuel Vadot			};
218*f126890aSEmmanuel Vadot
219*f126890aSEmmanuel Vadot			rtc@fffffe00 {
220*f126890aSEmmanuel Vadot				status = "okay";
221*f126890aSEmmanuel Vadot			};
222*f126890aSEmmanuel Vadot		};
223*f126890aSEmmanuel Vadot	};
224*f126890aSEmmanuel Vadot
225*f126890aSEmmanuel Vadot	led-controller-1 {
226*f126890aSEmmanuel Vadot		compatible = "pwm-leds";
227*f126890aSEmmanuel Vadot
228*f126890aSEmmanuel Vadot		led-1 {
229*f126890aSEmmanuel Vadot			label = "ds1";
230*f126890aSEmmanuel Vadot			pwms = <&pwm0 1 5000 PWM_POLARITY_INVERTED>;
231*f126890aSEmmanuel Vadot			max-brightness = <255>;
232*f126890aSEmmanuel Vadot		};
233*f126890aSEmmanuel Vadot
234*f126890aSEmmanuel Vadot		led-2 {
235*f126890aSEmmanuel Vadot			label = "ds2";
236*f126890aSEmmanuel Vadot			pwms = <&pwm0 2 5000 PWM_POLARITY_INVERTED>;
237*f126890aSEmmanuel Vadot			max-brightness = <255>;
238*f126890aSEmmanuel Vadot		};
239*f126890aSEmmanuel Vadot	};
240*f126890aSEmmanuel Vadot
241*f126890aSEmmanuel Vadot	led-controller-2 {
242*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
243*f126890aSEmmanuel Vadot
244*f126890aSEmmanuel Vadot		led-3 {
245*f126890aSEmmanuel Vadot			label = "ds3";
246*f126890aSEmmanuel Vadot			gpios = <&pioD 14 GPIO_ACTIVE_HIGH>;
247*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
248*f126890aSEmmanuel Vadot		};
249*f126890aSEmmanuel Vadot	};
250*f126890aSEmmanuel Vadot
251*f126890aSEmmanuel Vadot	gpio-keys {
252*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
253*f126890aSEmmanuel Vadot
254*f126890aSEmmanuel Vadot		button-right-click {
255*f126890aSEmmanuel Vadot			label = "right_click";
256*f126890aSEmmanuel Vadot			gpios = <&pioB 0 GPIO_ACTIVE_LOW>;
257*f126890aSEmmanuel Vadot			linux,code = <273>;
258*f126890aSEmmanuel Vadot			wakeup-source;
259*f126890aSEmmanuel Vadot		};
260*f126890aSEmmanuel Vadot
261*f126890aSEmmanuel Vadot		button-left-click {
262*f126890aSEmmanuel Vadot			label = "left_click";
263*f126890aSEmmanuel Vadot			gpios = <&pioB 1 GPIO_ACTIVE_LOW>;
264*f126890aSEmmanuel Vadot			linux,code = <272>;
265*f126890aSEmmanuel Vadot			wakeup-source;
266*f126890aSEmmanuel Vadot		};
267*f126890aSEmmanuel Vadot	};
268*f126890aSEmmanuel Vadot
269*f126890aSEmmanuel Vadot	i2c-gpio-0 {
270*f126890aSEmmanuel Vadot		status = "okay";
271*f126890aSEmmanuel Vadot	};
272*f126890aSEmmanuel Vadot
273*f126890aSEmmanuel Vadot	i2c-gpio-1 {
274*f126890aSEmmanuel Vadot		status = "okay";
275*f126890aSEmmanuel Vadot	};
276*f126890aSEmmanuel Vadot};
277