Merge tag 'selinux-pr-20190312' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / da850-lcdk.dts
1 /*
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>
9 #include <dt-bindings/input/input.h>
10
11 / {
12         model = "DA850/AM1808/OMAP-L138 LCDK";
13         compatible = "ti,da850-lcdk", "ti,da850";
14
15         aliases {
16                 serial2 = &serial2;
17                 ethernet0 = &eth0;
18         };
19
20         chosen {
21                 stdout-path = "serial2:115200n8";
22         };
23
24         memory@c0000000 {
25                 /* 128 MB DDR2 SDRAM @ 0xc0000000 */
26                 reg = <0xc0000000 0x08000000>;
27         };
28
29         reserved-memory {
30                 #address-cells = <1>;
31                 #size-cells = <1>;
32                 ranges;
33
34                 dsp_memory_region: dsp-memory@c3000000 {
35                         compatible = "shared-dma-pool";
36                         reg = <0xc3000000 0x1000000>;
37                         reusable;
38                         status = "okay";
39                 };
40         };
41
42         vcc_5vd: fixedregulator-vcc_5vd {
43                 compatible = "regulator-fixed";
44                 regulator-name = "vcc_5vd";
45                 regulator-min-microvolt = <5000000>;
46                 regulator-max-microvolt = <5000000>;
47                 regulator-boot-on;
48         };
49
50         vcc_3v3d: fixedregulator-vcc_3v3d {
51                 /* TPS650250 - VDCDC1 */
52                 compatible = "regulator-fixed";
53                 regulator-name = "vcc_3v3d";
54                 regulator-min-microvolt = <3300000>;
55                 regulator-max-microvolt = <3300000>;
56                 vin-supply = <&vcc_5vd>;
57                 regulator-always-on;
58                 regulator-boot-on;
59         };
60
61         vcc_1v8d: fixedregulator-vcc_1v8d {
62                 /* TPS650250 - VDCDC2 */
63                 compatible = "regulator-fixed";
64                 regulator-name = "vcc_1v8d";
65                 regulator-min-microvolt = <1800000>;
66                 regulator-max-microvolt = <1800000>;
67                 vin-supply = <&vcc_5vd>;
68                 regulator-always-on;
69                 regulator-boot-on;
70         };
71
72         sound {
73                 compatible = "simple-audio-card";
74                 simple-audio-card,name = "DA850-OMAPL138 LCDK";
75                 simple-audio-card,widgets =
76                         "Line", "Line In",
77                         "Line", "Line Out",
78                         "Microphone", "Mic Jack";
79                 simple-audio-card,routing =
80                         "LINE1L", "Line In",
81                         "LINE1R", "Line In",
82                         "Line Out", "LLOUT",
83                         "Line Out", "RLOUT",
84                         "MIC3L", "Mic Jack",
85                         "MIC3R", "Mic Jack",
86                         "Mic Jack", "Mic Bias";
87                 simple-audio-card,format = "dsp_b";
88                 simple-audio-card,bitclock-master = <&link0_codec>;
89                 simple-audio-card,frame-master = <&link0_codec>;
90                 simple-audio-card,bitclock-inversion;
91
92                 simple-audio-card,cpu {
93                         sound-dai = <&mcasp0>;
94                         system-clock-frequency = <24576000>;
95                 };
96
97                 link0_codec: simple-audio-card,codec {
98                         sound-dai = <&tlv320aic3106>;
99                         system-clock-frequency = <24576000>;
100                 };
101         };
102
103         gpio-keys {
104                 compatible = "gpio-keys";
105                 autorepeat;
106
107                 user1 {
108                         label = "GPIO Key USER1";
109                         linux,code = <BTN_0>;
110                         gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
111                 };
112
113                 user2 {
114                         label = "GPIO Key USER2";
115                         linux,code = <BTN_1>;
116                         gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
117                 };
118         };
119
120         vga-bridge {
121                 compatible = "ti,ths8135";
122                 #address-cells = <1>;
123                 #size-cells = <0>;
124
125                 ports {
126                         #address-cells = <1>;
127                         #size-cells = <0>;
128
129                         port@0 {
130                                 reg = <0>;
131
132                                 vga_bridge_in: endpoint {
133                                         remote-endpoint = <&lcdc_out_vga>;
134                                 };
135                         };
136
137                         port@1 {
138                                 reg = <1>;
139
140                                 vga_bridge_out: endpoint {
141                                         remote-endpoint = <&vga_con_in>;
142                                 };
143                         };
144                 };
145         };
146
147         vga {
148                 compatible = "vga-connector";
149
150                 ddc-i2c-bus = <&i2c0>;
151
152                 port {
153                         vga_con_in: endpoint {
154                                 remote-endpoint = <&vga_bridge_out>;
155                         };
156                 };
157         };
158 };
159
160 &ref_clk {
161         clock-frequency = <24000000>;
162 };
163
164 &pmx_core {
165         status = "okay";
166
167         mcasp0_pins: pinmux_mcasp0_pins {
168                 pinctrl-single,bits = <
169                         /* AHCLKX AFSX ACLKX */
170                         0x00 0x00101010 0x00f0f0f0
171                         /* ARX13 ARX14 */
172                         0x04 0x00000110 0x00000ff0
173                 >;
174         };
175
176         nand_pins: nand_pins {
177                 pinctrl-single,bits = <
178                         /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */
179                         0x1c 0x10110010  0xf0ff00f0
180                         /*
181                          * EMA_D[0], EMA_D[1], EMA_D[2],
182                          * EMA_D[3], EMA_D[4], EMA_D[5],
183                          * EMA_D[6], EMA_D[7]
184                          */
185                         0x24 0x11111111  0xffffffff
186                         /*
187                          * EMA_D[8],  EMA_D[9],  EMA_D[10],
188                          * EMA_D[11], EMA_D[12], EMA_D[13],
189                          * EMA_D[14], EMA_D[15]
190                          */
191                         0x20 0x11111111  0xffffffff
192                         /* EMA_A[1], EMA_A[2] */
193                         0x30 0x01100000  0x0ff00000
194                 >;
195         };
196 };
197
198 &serial2 {
199         pinctrl-names = "default";
200         pinctrl-0 = <&serial2_rxtx_pins>;
201         status = "okay";
202 };
203
204 &wdt {
205         status = "okay";
206 };
207
208 &rtc0 {
209         status = "okay";
210 };
211
212 &gpio {
213         status = "okay";
214 };
215
216 &sata_refclk {
217         status = "okay";
218         clock-frequency = <100000000>;
219 };
220
221 &sata {
222         status = "okay";
223 };
224
225 &mdio {
226         pinctrl-names = "default";
227         pinctrl-0 = <&mdio_pins>;
228         bus_freq = <2200000>;
229         status = "okay";
230 };
231
232 &eth0 {
233         pinctrl-names = "default";
234         pinctrl-0 = <&mii_pins>;
235         status = "okay";
236 };
237
238 &mmc0 {
239         max-frequency = <50000000>;
240         bus-width = <4>;
241         pinctrl-names = "default";
242         pinctrl-0 = <&mmc0_pins>;
243         cd-gpios = <&gpio 64 GPIO_ACTIVE_LOW>;
244         status = "okay";
245 };
246
247 &i2c0 {
248         pinctrl-names = "default";
249         pinctrl-0 = <&i2c0_pins>;
250         clock-frequency = <100000>;
251         status = "okay";
252
253         tlv320aic3106: tlv320aic3106@18 {
254                 #sound-dai-cells = <0>;
255                 compatible = "ti,tlv320aic3106";
256                 reg = <0x18>;
257                 adc-settle-ms = <40>;
258                 ai3x-micbias-vg = <1>;          /* 2.0V */
259                 status = "okay";
260
261                 /* Regulators */
262                 IOVDD-supply = <&vcc_3v3d>;
263                 AVDD-supply = <&vcc_3v3d>;
264                 DRVDD-supply = <&vcc_3v3d>;
265                 DVDD-supply = <&vcc_1v8d>;
266         };
267 };
268
269 &mcasp0 {
270         #sound-dai-cells = <0>;
271         pinctrl-names = "default";
272         pinctrl-0 = <&mcasp0_pins>;
273         status = "okay";
274
275         op-mode = <0>;   /* DAVINCI_MCASP_IIS_MODE */
276         tdm-slots = <2>;
277         serial-dir = <   /* 0: INACTIVE, 1: TX, 2: RX */
278                 0 0 0 0
279                 0 0 0 0
280                 0 0 0 0
281                 0 1 2 0
282         >;
283         tx-num-evt = <32>;
284         rx-num-evt = <32>;
285 };
286
287 &usb_phy {
288         status = "okay";
289 };
290
291 &usb0 {
292         status = "okay";
293 };
294
295 &usb1 {
296         status = "okay";
297 };
298
299 &aemif {
300         pinctrl-names = "default";
301         pinctrl-0 = <&nand_pins>;
302         status = "okay";
303         cs3 {
304                 #address-cells = <2>;
305                 #size-cells = <1>;
306                 clock-ranges;
307                 ranges;
308
309                 ti,cs-chipselect = <3>;
310
311                 nand@2000000,0 {
312                         compatible = "ti,davinci-nand";
313                         #address-cells = <1>;
314                         #size-cells = <1>;
315                         reg = <0 0x02000000 0x02000000
316                                1 0x00000000 0x00008000>;
317
318                         ti,davinci-chipselect = <1>;
319                         ti,davinci-mask-ale = <0>;
320                         ti,davinci-mask-cle = <0>;
321                         ti,davinci-mask-chipsel = <0>;
322
323                         ti,davinci-nand-buswidth = <16>;
324                         ti,davinci-ecc-mode = "hw";
325                         ti,davinci-ecc-bits = <4>;
326                         ti,davinci-nand-use-bbt;
327
328                         /*
329                          * The OMAP-L132/L138 Bootloader doc SPRAB41E reads:
330                          * "To boot from NAND Flash, the AIS should be written
331                          * to NAND block 1 (NAND block 0 is not used by default)".
332                          * The same doc mentions that for ROM "Silicon Revision 2.1",
333                          * "Updated NAND boot mode to offer boot from block 0 or block 1".
334                          * However the limitaion is left here by default for compatibility
335                          * with older silicon and because it needs new boot pin settings
336                          * not possible in stock LCDK.
337                          */
338                         partitions {
339                                 compatible = "fixed-partitions";
340                                 #address-cells = <1>;
341                                 #size-cells = <1>;
342
343                                 partition@0 {
344                                         label = "u-boot env";
345                                         reg = <0 0x020000>;
346                                 };
347                                 partition@20000 {
348                                         /* The LCDK defaults to booting from this partition */
349                                         label = "u-boot";
350                                         reg = <0x020000 0x080000>;
351                                 };
352                                 partition@a0000 {
353                                         label = "free space";
354                                         reg = <0x0a0000 0>;
355                                 };
356                         };
357                 };
358         };
359 };
360
361 &prictrl {
362         status = "okay";
363 };
364
365 &memctrl {
366         status = "okay";
367 };
368
369 &lcdc {
370         status = "okay";
371         pinctrl-names = "default";
372         pinctrl-0 = <&lcd_pins>;
373
374         port {
375                 lcdc_out_vga: endpoint {
376                         remote-endpoint = <&vga_bridge_in>;
377                 };
378         };
379 };
380
381 &vpif {
382         pinctrl-names = "default";
383         pinctrl-0 = <&vpif_capture_pins>;
384         status = "okay";
385 };
386
387 &dsp {
388         memory-region = <&dsp_memory_region>;
389         status = "okay";
390 };