1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * at91sam9261ek.dts - Device Tree file for Atmel at91sam9261 reference board
4*f126890aSEmmanuel Vadot *
5*f126890aSEmmanuel Vadot *  Copyright (C) 2013 Jean-Jacques Hiblot <jjhiblot@traphandler.com>
6*f126890aSEmmanuel Vadot */
7*f126890aSEmmanuel Vadot/dts-v1/;
8*f126890aSEmmanuel Vadot#include "at91sam9261.dtsi"
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot/ {
11*f126890aSEmmanuel Vadot	model = "Atmel at91sam9261ek";
12*f126890aSEmmanuel Vadot	compatible = "atmel,at91sam9261ek", "atmel,at91sam9261", "atmel,at91sam9";
13*f126890aSEmmanuel Vadot
14*f126890aSEmmanuel Vadot	chosen {
15*f126890aSEmmanuel Vadot		bootargs = "rootfstype=ubifs ubi.mtd=5 root=ubi0:rootfs rw";
16*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
17*f126890aSEmmanuel Vadot	};
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadot	memory@20000000 {
20*f126890aSEmmanuel Vadot		reg = <0x20000000 0x4000000>;
21*f126890aSEmmanuel Vadot	};
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot	clocks {
24*f126890aSEmmanuel Vadot		slow_xtal {
25*f126890aSEmmanuel Vadot			clock-frequency = <32768>;
26*f126890aSEmmanuel Vadot		};
27*f126890aSEmmanuel Vadot
28*f126890aSEmmanuel Vadot		main_xtal {
29*f126890aSEmmanuel Vadot			clock-frequency = <18432000>;
30*f126890aSEmmanuel Vadot		};
31*f126890aSEmmanuel Vadot	};
32*f126890aSEmmanuel Vadot
33*f126890aSEmmanuel Vadot	ahb {
34*f126890aSEmmanuel Vadot		usb0: ohci@500000 {
35*f126890aSEmmanuel Vadot			status = "okay";
36*f126890aSEmmanuel Vadot		};
37*f126890aSEmmanuel Vadot
38*f126890aSEmmanuel Vadot		fb0: fb@600000 {
39*f126890aSEmmanuel Vadot			display = <&display0>;
40*f126890aSEmmanuel Vadot			atmel,power-control-gpio = <&pioA 12 GPIO_ACTIVE_LOW>;
41*f126890aSEmmanuel Vadot			status = "okay";
42*f126890aSEmmanuel Vadot
43*f126890aSEmmanuel Vadot			display0: panel {
44*f126890aSEmmanuel Vadot				bits-per-pixel = <16>;
45*f126890aSEmmanuel Vadot				atmel,lcdcon-backlight;
46*f126890aSEmmanuel Vadot				atmel,dmacon = <0x1>;
47*f126890aSEmmanuel Vadot				atmel,lcdcon2 = <0x80008002>;
48*f126890aSEmmanuel Vadot				atmel,guard-time = <1>;
49*f126890aSEmmanuel Vadot				atmel,lcd-wiring-mode = "BRG";
50*f126890aSEmmanuel Vadot
51*f126890aSEmmanuel Vadot				display-timings {
52*f126890aSEmmanuel Vadot					native-mode = <&timing0>;
53*f126890aSEmmanuel Vadot					timing0: timing0 {
54*f126890aSEmmanuel Vadot						clock-frequency = <4965000>;
55*f126890aSEmmanuel Vadot						hactive = <240>;
56*f126890aSEmmanuel Vadot						vactive = <320>;
57*f126890aSEmmanuel Vadot						hback-porch = <1>;
58*f126890aSEmmanuel Vadot						hfront-porch = <33>;
59*f126890aSEmmanuel Vadot						vback-porch = <1>;
60*f126890aSEmmanuel Vadot						vfront-porch = <0>;
61*f126890aSEmmanuel Vadot						hsync-len = <5>;
62*f126890aSEmmanuel Vadot						vsync-len = <1>;
63*f126890aSEmmanuel Vadot						hsync-active = <1>;
64*f126890aSEmmanuel Vadot						vsync-active = <1>;
65*f126890aSEmmanuel Vadot					};
66*f126890aSEmmanuel Vadot				};
67*f126890aSEmmanuel Vadot			};
68*f126890aSEmmanuel Vadot		};
69*f126890aSEmmanuel Vadot
70*f126890aSEmmanuel Vadot		ebi: ebi@10000000 {
71*f126890aSEmmanuel Vadot			status = "okay";
72*f126890aSEmmanuel Vadot
73*f126890aSEmmanuel Vadot			nand_controller: nand-controller {
74*f126890aSEmmanuel Vadot				status = "okay";
75*f126890aSEmmanuel Vadot				pinctrl-0 = <&pinctrl_nand_cs &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 = <&pioC 15 GPIO_ACTIVE_HIGH>;
81*f126890aSEmmanuel Vadot					cs-gpios = <&pioC 14 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				timer0: timer@0 {
129*f126890aSEmmanuel Vadot					compatible = "atmel,tcb-timer";
130*f126890aSEmmanuel Vadot					reg = <0>, <1>;
131*f126890aSEmmanuel Vadot				};
132*f126890aSEmmanuel Vadot
133*f126890aSEmmanuel Vadot				timer1: 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			usb1: gadget@fffa4000 {
140*f126890aSEmmanuel Vadot				atmel,vbus-gpio = <&pioB 29 GPIO_ACTIVE_HIGH>;
141*f126890aSEmmanuel Vadot				status = "okay";
142*f126890aSEmmanuel Vadot			};
143*f126890aSEmmanuel Vadot
144*f126890aSEmmanuel Vadot			spi0: spi@fffc8000 {
145*f126890aSEmmanuel Vadot				cs-gpios = <&pioA 3 0>, <0>, <&pioA 28 0>, <0>;
146*f126890aSEmmanuel Vadot				status = "okay";
147*f126890aSEmmanuel Vadot
148*f126890aSEmmanuel Vadot				flash@0 {
149*f126890aSEmmanuel Vadot					compatible = "atmel,at45", "atmel,dataflash";
150*f126890aSEmmanuel Vadot					reg = <0>;
151*f126890aSEmmanuel Vadot					spi-max-frequency = <15000000>;
152*f126890aSEmmanuel Vadot				};
153*f126890aSEmmanuel Vadot
154*f126890aSEmmanuel Vadot				tsc2046@2 {
155*f126890aSEmmanuel Vadot					reg = <2>;
156*f126890aSEmmanuel Vadot					compatible = "ti,ads7843";
157*f126890aSEmmanuel Vadot					interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;
158*f126890aSEmmanuel Vadot					spi-max-frequency = <3000000>;
159*f126890aSEmmanuel Vadot					pendown-gpio = <&pioC 2 GPIO_ACTIVE_LOW>;
160*f126890aSEmmanuel Vadot
161*f126890aSEmmanuel Vadot					ti,x-min = /bits/ 16 <150>;
162*f126890aSEmmanuel Vadot					ti,x-max = /bits/ 16 <3830>;
163*f126890aSEmmanuel Vadot					ti,y-min = /bits/ 16 <190>;
164*f126890aSEmmanuel Vadot					ti,y-max = /bits/ 16 <3830>;
165*f126890aSEmmanuel Vadot					ti,vref-delay-usecs = /bits/ 16 <450>;
166*f126890aSEmmanuel Vadot					ti,x-plate-ohms = /bits/ 16 <450>;
167*f126890aSEmmanuel Vadot					ti,y-plate-ohms = /bits/ 16 <250>;
168*f126890aSEmmanuel Vadot					ti,pressure-max = /bits/ 16 <15000>;
169*f126890aSEmmanuel Vadot					ti,debounce-rep = /bits/ 16 <0>;
170*f126890aSEmmanuel Vadot					ti,debounce-tol = /bits/ 16 <65535>;
171*f126890aSEmmanuel Vadot					ti,debounce-max = /bits/ 16 <1>;
172*f126890aSEmmanuel Vadot
173*f126890aSEmmanuel Vadot					wakeup-source;
174*f126890aSEmmanuel Vadot				};
175*f126890aSEmmanuel Vadot			};
176*f126890aSEmmanuel Vadot
177*f126890aSEmmanuel Vadot			dbgu: serial@fffff200 {
178*f126890aSEmmanuel Vadot				status = "okay";
179*f126890aSEmmanuel Vadot			};
180*f126890aSEmmanuel Vadot
181*f126890aSEmmanuel Vadot			rtc@fffffd20 {
182*f126890aSEmmanuel Vadot				atmel,rtt-rtc-time-reg = <&gpbr 0x0>;
183*f126890aSEmmanuel Vadot			};
184*f126890aSEmmanuel Vadot
185*f126890aSEmmanuel Vadot			watchdog@fffffd40 {
186*f126890aSEmmanuel Vadot				status = "okay";
187*f126890aSEmmanuel Vadot			};
188*f126890aSEmmanuel Vadot
189*f126890aSEmmanuel Vadot		};
190*f126890aSEmmanuel Vadot	};
191*f126890aSEmmanuel Vadot
192*f126890aSEmmanuel Vadot	leds {
193*f126890aSEmmanuel Vadot		compatible = "gpio-leds";
194*f126890aSEmmanuel Vadot
195*f126890aSEmmanuel Vadot		ds8 {
196*f126890aSEmmanuel Vadot			label = "ds8";
197*f126890aSEmmanuel Vadot			gpios = <&pioA 13 GPIO_ACTIVE_LOW>;
198*f126890aSEmmanuel Vadot			linux,default-trigger = "none";
199*f126890aSEmmanuel Vadot		};
200*f126890aSEmmanuel Vadot
201*f126890aSEmmanuel Vadot		ds7 {
202*f126890aSEmmanuel Vadot			label = "ds7";
203*f126890aSEmmanuel Vadot			gpios = <&pioA 14 GPIO_ACTIVE_LOW>;
204*f126890aSEmmanuel Vadot			linux,default-trigger = "nand-disk";
205*f126890aSEmmanuel Vadot		};
206*f126890aSEmmanuel Vadot
207*f126890aSEmmanuel Vadot		ds1 {
208*f126890aSEmmanuel Vadot			label = "ds1";
209*f126890aSEmmanuel Vadot			gpios = <&pioA 23 GPIO_ACTIVE_LOW>;
210*f126890aSEmmanuel Vadot			linux,default-trigger = "heartbeat";
211*f126890aSEmmanuel Vadot		};
212*f126890aSEmmanuel Vadot	};
213*f126890aSEmmanuel Vadot
214*f126890aSEmmanuel Vadot	gpio-keys {
215*f126890aSEmmanuel Vadot		compatible = "gpio-keys";
216*f126890aSEmmanuel Vadot
217*f126890aSEmmanuel Vadot		button-0 {
218*f126890aSEmmanuel Vadot			label = "button_0";
219*f126890aSEmmanuel Vadot			gpios = <&pioA 27 GPIO_ACTIVE_LOW>;
220*f126890aSEmmanuel Vadot			linux,code = <256>;
221*f126890aSEmmanuel Vadot			wakeup-source;
222*f126890aSEmmanuel Vadot		};
223*f126890aSEmmanuel Vadot
224*f126890aSEmmanuel Vadot		button-1 {
225*f126890aSEmmanuel Vadot			label = "button_1";
226*f126890aSEmmanuel Vadot			gpios = <&pioA 26 GPIO_ACTIVE_LOW>;
227*f126890aSEmmanuel Vadot			linux,code = <257>;
228*f126890aSEmmanuel Vadot			wakeup-source;
229*f126890aSEmmanuel Vadot		};
230*f126890aSEmmanuel Vadot
231*f126890aSEmmanuel Vadot		button-2 {
232*f126890aSEmmanuel Vadot			label = "button_2";
233*f126890aSEmmanuel Vadot			gpios = <&pioA 25 GPIO_ACTIVE_LOW>;
234*f126890aSEmmanuel Vadot			linux,code = <258>;
235*f126890aSEmmanuel Vadot			wakeup-source;
236*f126890aSEmmanuel Vadot		};
237*f126890aSEmmanuel Vadot
238*f126890aSEmmanuel Vadot		button-3 {
239*f126890aSEmmanuel Vadot			label = "button_3";
240*f126890aSEmmanuel Vadot			gpios = <&pioA 24 GPIO_ACTIVE_LOW>;
241*f126890aSEmmanuel Vadot			linux,code = <259>;
242*f126890aSEmmanuel Vadot			wakeup-source;
243*f126890aSEmmanuel Vadot		};
244*f126890aSEmmanuel Vadot	};
245*f126890aSEmmanuel Vadot};
246