GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / am335x-boneblue.dts
1 /*
2  * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  */
8 /dts-v1/;
9
10 #include "am33xx.dtsi"
11 #include <dt-bindings/interrupt-controller/irq.h>
12
13 / {
14         model = "TI AM335x BeagleBone Blue";
15         compatible = "ti,am335x-bone-blue", "ti,am33xx";
16
17         cpus {
18                 cpu@0 {
19                         cpu0-supply = <&dcdc2_reg>;
20                 };
21         };
22
23         memory@80000000 {
24                 device_type = "memory";
25                 reg = <0x80000000 0x20000000>; /* 512 MB */
26         };
27
28         chosen {
29                 stdout-path = &uart0;
30         };
31
32         leds {
33                 pinctrl-names = "default";
34                 pinctrl-0 = <&user_leds_s0>;
35
36                 compatible = "gpio-leds";
37
38                 usr_0_led {
39                         label = "beaglebone:green:usr0";
40                         gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
41                         linux,default-trigger = "heartbeat";
42                         default-state = "off";
43                 };
44
45                 usr_1_led {
46                         label = "beaglebone:green:usr1";
47                         gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
48                         linux,default-trigger = "mmc0";
49                         default-state = "off";
50                 };
51
52                 usr_2_led {
53                         label = "beaglebone:green:usr2";
54                         gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
55                         linux,default-trigger = "cpu0";
56                         default-state = "off";
57                 };
58
59                 usr_3_led {
60                         label = "beaglebone:green:usr3";
61                         gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
62                         linux,default-trigger = "mmc1";
63                         default-state = "off";
64                 };
65
66                 wifi_led {
67                         label = "wifi";
68                         gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
69                         default-state = "off";
70                         linux,default-trigger = "phy0assoc";
71                 };
72
73                 red_led {
74                         label = "red";
75                         gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
76                         default-state = "off";
77                 };
78
79                 green_led {
80                         label = "green";
81                         gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
82                         default-state = "off";
83                 };
84
85                 batt_1_led {
86                         label = "bat25";
87                         gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
88                         default-state = "off";
89                 };
90
91                 batt_2_led {
92                         label = "bat50";
93                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
94                         default-state = "off";
95                 };
96
97                 batt_3_led {
98                         label = "bat75";
99                         gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
100                         default-state = "off";
101                 };
102
103                 batt_4_led {
104                         label = "bat100";
105                         gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
106                         default-state = "off";
107                 };
108         };
109
110         vmmcsd_fixed: fixedregulator0 {
111                 compatible = "regulator-fixed";
112                 regulator-name = "vmmcsd_fixed";
113                 regulator-min-microvolt = <3300000>;
114                 regulator-max-microvolt = <3300000>;
115         };
116
117         wlan_en_reg: fixedregulator@2 {
118                 compatible = "regulator-fixed";
119                 regulator-name = "wlan-en-regulator";
120                 regulator-min-microvolt = <1800000>;
121                 regulator-max-microvolt = <1800000>;
122                 startup-delay-us= <70000>;
123
124                 /* WL_EN */
125                 gpio = <&gpio3 9 0>;
126                 enable-active-high;
127         };
128 };
129
130 &am33xx_pinmux {
131         user_leds_s0: user_leds_s0 {
132                 pinctrl-single,pins = <
133                         AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE7) /* (V15) gpmc_a5.gpio1[21] - USR_LED_0 */
134                         AM33XX_IOPAD(0x858, PIN_OUTPUT | MUX_MODE7) /* (U15) gpmc_a6.gpio1[22] - USR_LED_1 */
135                         AM33XX_IOPAD(0x85c, PIN_OUTPUT | MUX_MODE7) /* (T15) gpmc_a7.gpio1[23] - USR_LED_2 */
136                         AM33XX_IOPAD(0x860, PIN_OUTPUT | MUX_MODE7) /* (V16) gpmc_a8.gpio1[24] - USR_LED_3 */
137                         AM33XX_IOPAD(0x9b0, PIN_OUTPUT | MUX_MODE7) /* (A15) xdma_event_intr0.gpio0[19] - WIFI_LED */
138                         AM33XX_IOPAD(0x890, PIN_OUTPUT | MUX_MODE7) /* (R7) gpmc_advn_ale.gpio2[2] - P8.7, LED_RED, GP1_PIN_5 */
139                         AM33XX_IOPAD(0x894, PIN_OUTPUT | MUX_MODE7) /* (T7) gpmc_oen_ren.gpio2[3] - P8.8, LED_GREEN, GP1_PIN_6 */
140                         AM33XX_IOPAD(0x82c, PIN_OUTPUT | MUX_MODE7) /* (U12) gpmc_ad11.gpio0[27] - P8.17, BATT_LED_1 */
141                         AM33XX_IOPAD(0x8dc, PIN_OUTPUT | MUX_MODE7) /* (T5) lcd_data15.gpio0[11] - P8.32, BATT_LED_2 */
142                         AM33XX_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE7) /* (V6) gpmc_csn0.gpio1[29] - P8.26, BATT_LED_3 */
143                         AM33XX_IOPAD(0x828, PIN_OUTPUT | MUX_MODE7) /* (T11) gpmc_ad10.gpio0[26] - P8.14, BATT_LED_4 */
144
145                 >;
146         };
147
148         i2c0_pins: pinmux_i2c0_pins {
149                 pinctrl-single,pins = <
150                         AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0)       /* (C17) I2C0_SDA.I2C0_SDA */
151                         AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0)       /* (C16) I2C0_SCL.I2C0_SCL */
152                 >;
153         };
154
155         i2c2_pins: pinmux_i2c2_pins {
156                 pinctrl-single,pins = <
157                         AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3)       /* (D18) uart1_ctsn.I2C2_SDA */
158                         AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3)       /* (D17) uart1_rtsn.I2C2_SCL */
159                 >;
160         };
161
162         /* UT0 */
163         uart0_pins: pinmux_uart0_pins {
164                 pinctrl-single,pins = <
165                         AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* (E15) uart0_rxd.uart0_rxd */
166                         AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* (E16) uart0_txd.uart0_txd */
167                 >;
168         };
169
170         /* UT1 */
171         uart1_pins: pinmux_uart1_pins {
172                 pinctrl-single,pins = <
173                         AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* (D16) uart1_rxd.uart1_rxd */
174                         AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* (D15) uart1_txd.uart1_txd */
175                 >;
176         };
177
178         /* GPS */
179         uart2_pins: pinmux_uart2_pins {
180                 pinctrl-single,pins = <
181                         AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE1)       /* (A17) spi0_sclk.uart2_rxd */
182                         AM33XX_IOPAD(0x954, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* (B17) spi0_d0.uart2_txd */
183                 >;
184         };
185
186         /* DSM2 */
187         uart4_pins: pinmux_uart4_pins {
188                 pinctrl-single,pins = <
189                         AM33XX_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE6)       /* (T17) gpmc_wait0.uart4_rxd */
190                 >;
191         };
192
193         /* UT5 */
194         uart5_pins: pinmux_uart5_pins {
195                 pinctrl-single,pins = <
196                         AM33XX_IOPAD(0x8C4, PIN_INPUT_PULLUP | MUX_MODE4)       /* (U2) lcd_data9.uart5_rxd */
197                         AM33XX_IOPAD(0x8C0, PIN_OUTPUT_PULLDOWN | MUX_MODE4)    /* (U1) lcd_data8.uart5_txd */
198                 >;
199         };
200
201         mmc1_pins: pinmux_mmc1_pins {
202                 pinctrl-single,pins = <
203                         AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7)              /* (C15) spi0_cs1.gpio0[6] */
204                 >;
205         };
206
207         mmc2_pins: pinmux_mmc2_pins {
208                 pinctrl-single,pins = <
209                         AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2)       /* (U9) gpmc_csn1.mmc1_clk */
210                         AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2)       /* (V9) gpmc_csn2.mmc1_cmd */
211                         AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1)       /* (U7) gpmc_ad0.mmc1_dat0 */
212                         AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1)       /* (V7) gpmc_ad1.mmc1_dat1 */
213                         AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1)       /* (R8) gpmc_ad2.mmc1_dat2 */
214                         AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1)       /* (T8) gpmc_ad3.mmc1_dat3 */
215                         AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1)       /* (U8) gpmc_ad4.mmc1_dat4 */
216                         AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1)       /* (V8) gpmc_ad5.mmc1_dat5 */
217                         AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1)       /* (R9) gpmc_ad6.mmc1_dat6 */
218                         AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1)       /* (T9) gpmc_ad7.mmc1_dat7 */
219                 >;
220         };
221
222         mmc3_pins: pinmux_mmc3_pins {
223                 pinctrl-single,pins = <
224                         AM33XX_IOPAD(0x93c, PIN_INPUT_PULLUP | MUX_MODE6)       /* (L15) gmii1_rxd1.mmc2_clk */
225                         AM33XX_IOPAD(0x914, PIN_INPUT_PULLUP | MUX_MODE6)       /* (J16) gmii1_txen.mmc2_cmd */
226                         AM33XX_IOPAD(0x918, PIN_INPUT_PULLUP | MUX_MODE5)       /* (J17) gmii1_rxdv.mmc2_dat0 */
227                         AM33XX_IOPAD(0x91c, PIN_INPUT_PULLUP | MUX_MODE5)       /* (J18) gmii1_txd3.mmc2_dat1 */
228                         AM33XX_IOPAD(0x920, PIN_INPUT_PULLUP | MUX_MODE5)       /* (K15) gmii1_txd2.mmc2_dat2 */
229                         AM33XX_IOPAD(0x908, PIN_INPUT_PULLUP | MUX_MODE5)       /* (H16) gmii1_col.mmc2_dat3 */
230                 >;
231         };
232
233         bt_pins: pinmux_bt_pins {
234                 pinctrl-single,pins = <
235                         AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* (K17) gmii1_txd0.gpio0[28] - BT_EN */
236                 >;
237         };
238
239         uart3_pins: pinmux_uart3_pins {
240                 pinctrl-single,pins = <
241                         AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1)       /* (L17) gmii1_rxd3.uart3_rxd */
242                         AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* (L16) gmii1_rxd2.uart3_txd */
243                         AM33XX_IOPAD(0x948, PIN_INPUT | MUX_MODE3)              /* (M17) mdio_data.uart3_ctsn */
244                         AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLDOWN | MUX_MODE3)    /* (M18) mdio_clk.uart3_rtsn */
245                 >;
246         };
247
248         wl18xx_pins: pinmux_wl18xx_pins {
249                 pinctrl-single,pins = <
250                         AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* (K18) gmii1_txclk.gpio3[9] - WL_EN */
251                         AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* (K16) gmii1_txd1.gpio0[21] - WL_IRQ */
252                         AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLUP | MUX_MODE7)      /* (L18) gmii1_rxclk.gpio3[10] - LS_BUF_EN */
253                 >;
254         };
255
256         /* DCAN */
257         dcan1_pins: pinmux_dcan1_pins {
258                 pinctrl-single,pins = <
259                         AM33XX_IOPAD(0x96c, PIN_INPUT | MUX_MODE2)              /* (E17) uart0_rtsn.dcan1_rx */
260                         AM33XX_IOPAD(0x968, PIN_OUTPUT | MUX_MODE2)             /* (E18) uart0_ctsn.dcan1_tx */
261                         AM33XX_IOPAD(0x940, PIN_OUTPUT | MUX_MODE7)             /* (M16) gmii1_rxd0.gpio2[21] */
262                 >;
263         };
264 };
265
266 &uart0 {
267         pinctrl-names = "default";
268         pinctrl-0 = <&uart0_pins>;
269
270         status = "okay";
271 };
272
273 &uart1 {
274         pinctrl-names = "default";
275         pinctrl-0 = <&uart1_pins>;
276
277         status = "okay";
278 };
279
280 &uart2 {
281         pinctrl-names = "default";
282         pinctrl-0 = <&uart2_pins>;
283
284         status = "okay";
285 };
286
287 &uart4 {
288         pinctrl-names = "default";
289         pinctrl-0 = <&uart4_pins>;
290
291         status = "okay";
292 };
293
294 &uart5 {
295         pinctrl-names = "default";
296         pinctrl-0 = <&uart5_pins>;
297
298         status = "okay";
299 };
300
301 &usb {
302         status = "okay";
303 };
304
305 &usb_ctrl_mod {
306         status = "okay";
307 };
308
309 &usb0_phy {
310         status = "okay";
311 };
312
313 &usb1_phy {
314         status = "okay";
315 };
316
317 &usb0 {
318         status = "okay";
319         dr_mode = "peripheral";
320         interrupts-extended = <&intc 18 &tps 0>;
321         interrupt-names = "mc", "vbus";
322 };
323
324 &usb1 {
325         status = "okay";
326         dr_mode = "host";
327 };
328
329 &cppi41dma  {
330         status = "okay";
331 };
332
333 &i2c0 {
334         pinctrl-names = "default";
335         pinctrl-0 = <&i2c0_pins>;
336
337         status = "okay";
338         clock-frequency = <400000>;
339
340         tps: tps@24 {
341                 reg = <0x24>;
342         };
343
344         baseboard_eeprom: baseboard_eeprom@50 {
345                 compatible = "atmel,24c256";
346                 reg = <0x50>;
347
348                 #address-cells = <1>;
349                 #size-cells = <1>;
350                 baseboard_data: baseboard_data@0 {
351                         reg = <0 0x100>;
352                 };
353         };
354 };
355
356 &i2c2 {
357         pinctrl-names = "default";
358         pinctrl-0 = <&i2c2_pins>;
359
360         status = "okay";
361         clock-frequency = <400000>;
362
363         mpu9250@68 {
364                 compatible = "invensense,mpu9250";
365                 reg = <0x68>;
366                 interrupt-parent = <&gpio3>;
367                 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
368                 i2c-gate {
369                         #address-cells = <1>;
370                         #size-cells = <0>;
371                         ax8975@c {
372                                 compatible = "ak,ak8975";
373                                 reg = <0x0c>;
374                         };
375                 };
376         };
377
378         pressure@76 {
379                 compatible = "bosch,bmp280";
380                 reg = <0x76>;
381         };
382 };
383
384 /include/ "tps65217.dtsi"
385
386 &tps {
387         interrupts = <7>; /* NMI */
388         interrupt-parent = <&intc>;
389
390         charger {
391                 interrupts = <0>, <1>;
392                 interrupt-names = "USB", "AC";
393                 status = "okay";
394         };
395
396         pwrbutton {
397                 interrupts = <2>;
398                 status = "okay";
399         };
400
401         regulators {
402                 dcdc1_reg: regulator@0 {
403                         regulator-name = "vdds_dpr";
404                         regulator-always-on;
405                 };
406
407                 dcdc2_reg: regulator@1 {
408                         /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
409                         regulator-name = "vdd_mpu";
410                         regulator-min-microvolt = <925000>;
411                         regulator-max-microvolt = <1351500>;
412                         regulator-boot-on;
413                         regulator-always-on;
414                 };
415
416                 dcdc3_reg: regulator@2 {
417                         /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
418                         regulator-name = "vdd_core";
419                         regulator-min-microvolt = <925000>;
420                         regulator-max-microvolt = <1150000>;
421                         regulator-boot-on;
422                         regulator-always-on;
423                 };
424
425                 ldo1_reg: regulator@3 {
426                         regulator-name = "vio,vrtc,vdds";
427                         regulator-always-on;
428                 };
429
430                 ldo2_reg: regulator@4 {
431                         regulator-name = "vdd_3v3aux";
432                         regulator-always-on;
433                 };
434
435                 ldo3_reg: regulator@5 {
436                         regulator-name = "vdd_1v8";
437                         regulator-min-microvolt = <1800000>;
438                         regulator-max-microvolt = <1800000>;
439                         regulator-always-on;
440                 };
441
442                 ldo4_reg: regulator@6 {
443                         regulator-name = "vdd_3v3a";
444                         regulator-always-on;
445                 };
446         };
447 };
448
449 &mmc1 {
450         status = "okay";
451         vmmc-supply = <&vmmcsd_fixed>;
452         bus-width = <4>;
453         pinctrl-names = "default";
454         pinctrl-0 = <&mmc1_pins>;
455         cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
456 };
457
458 &mmc2 {
459         status = "okay";
460         vmmc-supply = <&vmmcsd_fixed>;
461         bus-width = <8>;
462         pinctrl-names = "default";
463         pinctrl-0 = <&mmc2_pins>;
464 };
465
466 &mmc3 {
467         dmas = <&edma_xbar 12 0 1
468                 &edma_xbar 13 0 2>;
469         dma-names = "tx", "rx";
470         status = "okay";
471         vmmc-supply = <&wlan_en_reg>;
472         bus-width = <4>;
473         non-removable;
474         cap-power-off-card;
475         ti,needs-special-hs-handling;
476         keep-power-in-suspend;
477         pinctrl-names = "default";
478         pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
479
480         #address-cells = <1>;
481         #size-cells = <0>;
482         wlcore: wlcore@2 {
483                 compatible = "ti,wl1835";
484                 reg = <2>;
485                 interrupt-parent = <&gpio0>;
486                 interrupts = <21 IRQ_TYPE_EDGE_RISING>;
487         };
488 };
489
490 &tscadc {
491         status = "okay";
492         adc {
493                 ti,adc-channels = <0 1 2 3 4 5 6 7>;
494         };
495 };
496
497 &uart3 {
498         pinctrl-names = "default";
499         pinctrl-0 = <&uart3_pins &bt_pins>;
500         status = "okay";
501
502         bluetooth {
503                 compatible = "ti,wl1835-st";
504                 enable-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
505         };
506 };
507
508 &aes {
509         status = "okay";
510 };
511
512 &sham {
513         status = "okay";
514 };
515
516 &rtc {
517         system-power-controller;
518         clocks = <&clk_32768_ck>, <&l4_per_clkctrl AM3_CLKDIV32K_CLKCTRL 0>;
519         clock-names = "ext-clk", "int-clk";
520 };
521
522 &dcan1 {
523         pinctrl-names = "default";
524         pinctrl-0 = <&dcan1_pins>;
525         status = "okay";
526 };
527
528 &gpio3 {
529         ls_buf_en {
530                 gpio-hog;
531                 gpios = <10 GPIO_ACTIVE_HIGH>;
532                 output-high;
533                 line-name = "LS_BUF_EN";
534         };
535 };