blob: 1ef8a7c57cb6dbbe604a98b64fe95d50e3b7abae [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 };
Karl Beldan44524a02016-08-05 20:29:49 +000072};
73
74&pmx_core {
75 status = "okay";
Karl Beldan9d05b382016-08-17 12:54:54 +000076
77 mcasp0_pins: pinmux_mcasp0_pins {
78 pinctrl-single,bits = <
79 /* AHCLKX AFSX ACLKX */
80 0x00 0x00101010 0x00f0f0f0
81 /* ARX13 ARX14 */
82 0x04 0x00000110 0x00000ff0
83 >;
84 };
Karl Beldan9304af12016-09-08 11:33:24 -070085
86 nand_pins: nand_pins {
87 pinctrl-single,bits = <
88 /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
89 0x1c 0x10110010 0xf0ff00f0
90 /*
91 * EMA_D[0], EMA_D[1], EMA_D[2],
92 * EMA_D[3], EMA_D[4], EMA_D[5],
93 * EMA_D[6], EMA_D[7]
94 */
95 0x24 0x11111111 0xffffffff
96 /*
97 * EMA_D[8], EMA_D[9], EMA_D[10],
98 * EMA_D[11], EMA_D[12], EMA_D[13],
99 * EMA_D[14], EMA_D[15]
100 */
101 0x20 0x11111111 0xffffffff
102 /* EMA_A[1], EMA_A[2] */
103 0x30 0x01100000 0x0ff00000
104 >;
105 };
Karl Beldan44524a02016-08-05 20:29:49 +0000106};
107
108&serial2 {
109 pinctrl-names = "default";
110 pinctrl-0 = <&serial2_rxtx_pins>;
111 status = "okay";
112};
113
114&wdt {
115 status = "okay";
116};
117
118&rtc0 {
119 status = "okay";
120};
121
122&gpio {
123 status = "okay";
124};
125
126&mdio {
127 pinctrl-names = "default";
128 pinctrl-0 = <&mdio_pins>;
129 bus_freq = <2200000>;
130 status = "okay";
131};
132
133&eth0 {
134 pinctrl-names = "default";
135 pinctrl-0 = <&mii_pins>;
136 status = "okay";
137};
138
139&mmc0 {
140 max-frequency = <50000000>;
141 bus-width = <4>;
142 pinctrl-names = "default";
143 pinctrl-0 = <&mmc0_pins>;
Axel Haslama9aa4232016-11-21 16:41:55 +0100144 cd-gpios = <&gpio 64 GPIO_ACTIVE_LOW>;
Karl Beldan44524a02016-08-05 20:29:49 +0000145 status = "okay";
146};
Karl Beldan9d05b382016-08-17 12:54:54 +0000147
148&i2c0 {
149 pinctrl-names = "default";
150 pinctrl-0 = <&i2c0_pins>;
151 clock-frequency = <100000>;
152 status = "okay";
153
154 tlv320aic3106: tlv320aic3106@18 {
155 #sound-dai-cells = <0>;
156 compatible = "ti,tlv320aic3106";
157 reg = <0x18>;
158 status = "okay";
159 };
160};
161
162&mcasp0 {
163 #sound-dai-cells = <0>;
164 pinctrl-names = "default";
165 pinctrl-0 = <&mcasp0_pins>;
166 status = "okay";
167
168 op-mode = <0>; /* DAVINCI_MCASP_IIS_MODE */
169 tdm-slots = <2>;
170 serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
171 0 0 0 0
172 0 0 0 0
173 0 0 0 0
174 0 1 2 0
175 >;
176 tx-num-evt = <32>;
177 rx-num-evt = <32>;
178};
Karl Beldan9304af12016-09-08 11:33:24 -0700179
Alexandre Bailon83de0862016-11-16 12:07:36 +0100180&usb_phy {
181 status = "okay";
182};
183
184&usb0 {
185 status = "okay";
186};
187
Karl Beldan9304af12016-09-08 11:33:24 -0700188&aemif {
189 pinctrl-names = "default";
190 pinctrl-0 = <&nand_pins>;
191 status = "okay";
192 cs3 {
193 #address-cells = <2>;
194 #size-cells = <1>;
195 clock-ranges;
196 ranges;
197
198 ti,cs-chipselect = <3>;
199
200 nand@2000000,0 {
201 compatible = "ti,davinci-nand";
202 #address-cells = <1>;
203 #size-cells = <1>;
204 reg = <0 0x02000000 0x02000000
205 1 0x00000000 0x00008000>;
206
207 ti,davinci-chipselect = <1>;
208 ti,davinci-mask-ale = <0>;
209 ti,davinci-mask-cle = <0>;
210 ti,davinci-mask-chipsel = <0>;
211
212 ti,davinci-nand-buswidth = <16>;
213 ti,davinci-ecc-mode = "hw";
214 ti,davinci-ecc-bits = <4>;
215 ti,davinci-nand-use-bbt;
216
217 /*
218 * The OMAP-L132/L138 Bootloader doc SPRAB41E reads:
219 * "To boot from NAND Flash, the AIS should be written
220 * to NAND block 1 (NAND block 0 is not used by default)".
221 * The same doc mentions that for ROM "Silicon Revision 2.1",
222 * "Updated NAND boot mode to offer boot from block 0 or block 1".
223 * However the limitaion is left here by default for compatibility
224 * with older silicon and because it needs new boot pin settings
225 * not possible in stock LCDK.
226 */
227 partitions {
228 compatible = "fixed-partitions";
229 #address-cells = <1>;
230 #size-cells = <1>;
231
232 partition@0 {
233 label = "u-boot env";
234 reg = <0 0x020000>;
235 };
236 partition@0x020000 {
237 /* The LCDK defaults to booting from this partition */
238 label = "u-boot";
239 reg = <0x020000 0x080000>;
240 };
241 partition@0x0a0000 {
242 label = "free space";
243 reg = <0x0a0000 0>;
244 };
245 };
246 };
247 };
248};
Bartosz Golaszewski878e9082016-11-24 10:31:24 +0100249
250&prictrl {
251 status = "okay";
252};
253
254&memctrl {
255 status = "okay";
256};