blob: 3b76c17ab5595bc744bcef2501f3418c13a70448 [file] [log] [blame]
Karl Beldan44524a02016-08-05 20:29:49 +00001/*
2 * Copyright (c) 2016 BayLibre, Inc.
3 *
4 * Licensed under GPLv2.
5 */
6/dts-v1/;
7#include "da850.dtsi"
8#include <dt-bindings/gpio/gpio.h>
Bartosz Golaszewskie3d9e1e2016-12-19 10:53:54 +01009#include <dt-bindings/input/input.h>
Karl Beldan44524a02016-08-05 20:29:49 +000010
11/ {
12 model = "DA850/AM1808/OMAP-L138 LCDK";
13 compatible = "ti,da850-lcdk", "ti,da850";
14
15 aliases {
16 serial2 = &serial2;
Fabien Parente177e732016-11-24 15:35:45 +010017 ethernet0 = &eth0;
Karl Beldan44524a02016-08-05 20:29:49 +000018 };
19
20 chosen {
21 stdout-path = "serial2:115200n8";
22 };
23
24 memory {
25 device_type = "memory";
26 reg = <0xc0000000 0x08000000>;
27 };
Karl Beldan9d05b382016-08-17 12:54:54 +000028
29 sound {
30 compatible = "simple-audio-card";
31 simple-audio-card,name = "DA850/OMAP-L138 LCDK";
32 simple-audio-card,widgets =
33 "Line", "Line In",
34 "Line", "Line Out";
35 simple-audio-card,routing =
36 "LINE1L", "Line In",
37 "LINE1R", "Line In",
38 "Line Out", "LLOUT",
39 "Line Out", "RLOUT";
40 simple-audio-card,format = "dsp_b";
41 simple-audio-card,bitclock-master = <&link0_codec>;
42 simple-audio-card,frame-master = <&link0_codec>;
43 simple-audio-card,bitclock-inversion;
44
45 simple-audio-card,cpu {
46 sound-dai = <&mcasp0>;
47 system-clock-frequency = <24576000>;
48 };
49
50 link0_codec: simple-audio-card,codec {
51 sound-dai = <&tlv320aic3106>;
52 system-clock-frequency = <24576000>;
53 };
54 };
Bartosz Golaszewskie3d9e1e2016-12-19 10:53:54 +010055
56 gpio-keys {
57 compatible = "gpio-keys";
58 autorepeat;
59
60 user1 {
61 label = "GPIO Key USER1";
62 linux,code = <BTN_0>;
63 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
64 };
65
66 user2 {
67 label = "GPIO Key USER2";
68 linux,code = <BTN_1>;
69 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
70 };
71 };
Bartosz Golaszewskic9825342016-12-13 11:09:18 +010072
73 vga-bridge {
74 compatible = "ti,ths8135";
75 #address-cells = <1>;
76 #size-cells = <0>;
77
78 ports {
79 #address-cells = <1>;
80 #size-cells = <0>;
81
82 port@0 {
83 reg = <0>;
84
85 vga_bridge_in: endpoint {
86 remote-endpoint = <&lcdc_out_vga>;
87 };
88 };
89
90 port@1 {
91 reg = <1>;
92
93 vga_bridge_out: endpoint {
94 remote-endpoint = <&vga_con_in>;
95 };
96 };
97 };
98 };
99
100 vga {
101 compatible = "vga-connector";
102
103 ddc-i2c-bus = <&i2c0>;
104
105 port {
106 vga_con_in: endpoint {
107 remote-endpoint = <&vga_bridge_out>;
108 };
109 };
110 };
Karl Beldan44524a02016-08-05 20:29:49 +0000111};
112
113&pmx_core {
114 status = "okay";
Karl Beldan9d05b382016-08-17 12:54:54 +0000115
116 mcasp0_pins: pinmux_mcasp0_pins {
117 pinctrl-single,bits = <
118 /* AHCLKX AFSX ACLKX */
119 0x00 0x00101010 0x00f0f0f0
120 /* ARX13 ARX14 */
121 0x04 0x00000110 0x00000ff0
122 >;
123 };
Karl Beldan9304af12016-09-08 11:33:24 -0700124
125 nand_pins: nand_pins {
126 pinctrl-single,bits = <
127 /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
128 0x1c 0x10110010 0xf0ff00f0
129 /*
130 * EMA_D[0], EMA_D[1], EMA_D[2],
131 * EMA_D[3], EMA_D[4], EMA_D[5],
132 * EMA_D[6], EMA_D[7]
133 */
134 0x24 0x11111111 0xffffffff
135 /*
136 * EMA_D[8], EMA_D[9], EMA_D[10],
137 * EMA_D[11], EMA_D[12], EMA_D[13],
138 * EMA_D[14], EMA_D[15]
139 */
140 0x20 0x11111111 0xffffffff
141 /* EMA_A[1], EMA_A[2] */
142 0x30 0x01100000 0x0ff00000
143 >;
144 };
Karl Beldan44524a02016-08-05 20:29:49 +0000145};
146
147&serial2 {
148 pinctrl-names = "default";
149 pinctrl-0 = <&serial2_rxtx_pins>;
150 status = "okay";
151};
152
153&wdt {
154 status = "okay";
155};
156
157&rtc0 {
158 status = "okay";
159};
160
161&gpio {
162 status = "okay";
163};
164
165&mdio {
166 pinctrl-names = "default";
167 pinctrl-0 = <&mdio_pins>;
168 bus_freq = <2200000>;
169 status = "okay";
170};
171
172&eth0 {
173 pinctrl-names = "default";
174 pinctrl-0 = <&mii_pins>;
175 status = "okay";
176};
177
178&mmc0 {
179 max-frequency = <50000000>;
180 bus-width = <4>;
181 pinctrl-names = "default";
182 pinctrl-0 = <&mmc0_pins>;
Axel Haslama9aa4232016-11-21 16:41:55 +0100183 cd-gpios = <&gpio 64 GPIO_ACTIVE_LOW>;
Karl Beldan44524a02016-08-05 20:29:49 +0000184 status = "okay";
185};
Karl Beldan9d05b382016-08-17 12:54:54 +0000186
187&i2c0 {
188 pinctrl-names = "default";
189 pinctrl-0 = <&i2c0_pins>;
190 clock-frequency = <100000>;
191 status = "okay";
192
193 tlv320aic3106: tlv320aic3106@18 {
194 #sound-dai-cells = <0>;
195 compatible = "ti,tlv320aic3106";
196 reg = <0x18>;
197 status = "okay";
198 };
199};
200
201&mcasp0 {
202 #sound-dai-cells = <0>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&mcasp0_pins>;
205 status = "okay";
206
207 op-mode = <0>; /* DAVINCI_MCASP_IIS_MODE */
208 tdm-slots = <2>;
209 serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
210 0 0 0 0
211 0 0 0 0
212 0 0 0 0
213 0 1 2 0
214 >;
215 tx-num-evt = <32>;
216 rx-num-evt = <32>;
217};
Karl Beldan9304af12016-09-08 11:33:24 -0700218
Alexandre Bailon83de0862016-11-16 12:07:36 +0100219&usb_phy {
220 status = "okay";
221};
222
223&usb0 {
224 status = "okay";
225};
226
Karl Beldan9304af12016-09-08 11:33:24 -0700227&aemif {
228 pinctrl-names = "default";
229 pinctrl-0 = <&nand_pins>;
230 status = "okay";
231 cs3 {
232 #address-cells = <2>;
233 #size-cells = <1>;
234 clock-ranges;
235 ranges;
236
237 ti,cs-chipselect = <3>;
238
239 nand@2000000,0 {
240 compatible = "ti,davinci-nand";
241 #address-cells = <1>;
242 #size-cells = <1>;
243 reg = <0 0x02000000 0x02000000
244 1 0x00000000 0x00008000>;
245
246 ti,davinci-chipselect = <1>;
247 ti,davinci-mask-ale = <0>;
248 ti,davinci-mask-cle = <0>;
249 ti,davinci-mask-chipsel = <0>;
250
251 ti,davinci-nand-buswidth = <16>;
252 ti,davinci-ecc-mode = "hw";
253 ti,davinci-ecc-bits = <4>;
254 ti,davinci-nand-use-bbt;
255
256 /*
257 * The OMAP-L132/L138 Bootloader doc SPRAB41E reads:
258 * "To boot from NAND Flash, the AIS should be written
259 * to NAND block 1 (NAND block 0 is not used by default)".
260 * The same doc mentions that for ROM "Silicon Revision 2.1",
261 * "Updated NAND boot mode to offer boot from block 0 or block 1".
262 * However the limitaion is left here by default for compatibility
263 * with older silicon and because it needs new boot pin settings
264 * not possible in stock LCDK.
265 */
266 partitions {
267 compatible = "fixed-partitions";
268 #address-cells = <1>;
269 #size-cells = <1>;
270
271 partition@0 {
272 label = "u-boot env";
273 reg = <0 0x020000>;
274 };
275 partition@0x020000 {
276 /* The LCDK defaults to booting from this partition */
277 label = "u-boot";
278 reg = <0x020000 0x080000>;
279 };
280 partition@0x0a0000 {
281 label = "free space";
282 reg = <0x0a0000 0>;
283 };
284 };
285 };
286 };
287};
Bartosz Golaszewski878e9082016-11-24 10:31:24 +0100288
289&prictrl {
290 status = "okay";
291};
292
293&memctrl {
294 status = "okay";
295};
Bartosz Golaszewskic9825342016-12-13 11:09:18 +0100296
297&lcdc {
298 status = "okay";
299 pinctrl-names = "default";
300 pinctrl-0 = <&lcd_pins>;
301
302 port {
303 lcdc_out_vga: endpoint {
304 remote-endpoint = <&vga_bridge_in>;
305 };
306 };
307};