0d95d54b6ae97880b555b3774909d26d4c1d3a7d
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / am335x-bone-common.dtsi
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
9 / {
10         model = "TI AM335x BeagleBone";
11         compatible = "ti,am335x-bone", "ti,am33xx";
12
13         cpus {
14                 cpu@0 {
15                         cpu0-supply = <&dcdc2_reg>;
16                 };
17         };
18
19         memory {
20                 device_type = "memory";
21                 reg = <0x80000000 0x10000000>; /* 256 MB */
22         };
23
24         am33xx_pinmux: pinmux@44e10800 {
25                 pinctrl-names = "default";
26                 pinctrl-0 = <&clkout2_pin>;
27
28                 user_leds_s0: user_leds_s0 {
29                         pinctrl-single,pins = <
30                                 0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a5.gpio1_21 */
31                                 0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a6.gpio1_22 */
32                                 0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)  /* gpmc_a7.gpio1_23 */
33                                 0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)    /* gpmc_a8.gpio1_24 */
34                         >;
35                 };
36
37                 i2c0_pins: pinmux_i2c0_pins {
38                         pinctrl-single,pins = <
39                                 0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
40                                 0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
41                         >;
42                 };
43
44                 uart0_pins: pinmux_uart0_pins {
45                         pinctrl-single,pins = <
46                                 0x170 (PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
47                                 0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
48                         >;
49                 };
50
51                 clkout2_pin: pinmux_clkout2_pin {
52                         pinctrl-single,pins = <
53                                 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */
54                         >;
55                 };
56
57                 cpsw_default: cpsw_default {
58                         pinctrl-single,pins = <
59                                 /* Slave 1 */
60                                 0x110 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxerr.mii1_rxerr */
61                                 0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txen.mii1_txen */
62                                 0x118 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxdv.mii1_rxdv */
63                                 0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd3.mii1_txd3 */
64                                 0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd2.mii1_txd2 */
65                                 0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd1.mii1_txd1 */
66                                 0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mii1_txd0.mii1_txd0 */
67                                 0x12c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_txclk.mii1_txclk */
68                                 0x130 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxclk.mii1_rxclk */
69                                 0x134 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd3.mii1_rxd3 */
70                                 0x138 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd2.mii1_rxd2 */
71                                 0x13c (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd1.mii1_rxd1 */
72                                 0x140 (PIN_INPUT_PULLUP | MUX_MODE0)    /* mii1_rxd0.mii1_rxd0 */
73                         >;
74                 };
75
76                 cpsw_sleep: cpsw_sleep {
77                         pinctrl-single,pins = <
78                                 /* Slave 1 reset value */
79                                 0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
80                                 0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
81                                 0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
82                                 0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
83                                 0x120 (PIN_INPUT_PULLDOWN | MUX_MODE7)
84                                 0x124 (PIN_INPUT_PULLDOWN | MUX_MODE7)
85                                 0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7)
86                                 0x12c (PIN_INPUT_PULLDOWN | MUX_MODE7)
87                                 0x130 (PIN_INPUT_PULLDOWN | MUX_MODE7)
88                                 0x134 (PIN_INPUT_PULLDOWN | MUX_MODE7)
89                                 0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
90                                 0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
91                                 0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
92                         >;
93                 };
94
95                 davinci_mdio_default: davinci_mdio_default {
96                         pinctrl-single,pins = <
97                                 /* MDIO */
98                                 0x148 (PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)    /* mdio_data.mdio_data */
99                                 0x14c (PIN_OUTPUT_PULLUP | MUX_MODE0)                   /* mdio_clk.mdio_clk */
100                         >;
101                 };
102
103                 davinci_mdio_sleep: davinci_mdio_sleep {
104                         pinctrl-single,pins = <
105                                 /* MDIO reset value */
106                                 0x148 (PIN_INPUT_PULLDOWN | MUX_MODE7)
107                                 0x14c (PIN_INPUT_PULLDOWN | MUX_MODE7)
108                         >;
109                 };
110
111                 mmc1_pins: pinmux_mmc1_pins {
112                         pinctrl-single,pins = <
113                                 0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
114                         >;
115                 };
116         };
117
118         ocp {
119                 uart0: serial@44e09000 {
120                         pinctrl-names = "default";
121                         pinctrl-0 = <&uart0_pins>;
122
123                         status = "okay";
124                 };
125
126                 musb: usb@47400000 {
127                         status = "okay";
128
129                         control@44e10000 {
130                                 status = "okay";
131                         };
132
133                         usb-phy@47401300 {
134                                 status = "okay";
135                         };
136
137                         usb-phy@47401b00 {
138                                 status = "okay";
139                         };
140
141                         usb@47401000 {
142                                 status = "okay";
143                         };
144
145                         usb@47401800 {
146                                 status = "okay";
147                                 dr_mode = "host";
148                         };
149
150                         dma-controller@07402000  {
151                                 status = "okay";
152                         };
153                 };
154
155                 i2c0: i2c@44e0b000 {
156                         pinctrl-names = "default";
157                         pinctrl-0 = <&i2c0_pins>;
158
159                         status = "okay";
160                         clock-frequency = <400000>;
161
162                         tps: tps@24 {
163                                 reg = <0x24>;
164                         };
165
166                 };
167         };
168
169         leds {
170                 pinctrl-names = "default";
171                 pinctrl-0 = <&user_leds_s0>;
172
173                 compatible = "gpio-leds";
174
175                 led@2 {
176                         label = "beaglebone:green:heartbeat";
177                         gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
178                         linux,default-trigger = "heartbeat";
179                         default-state = "off";
180                 };
181
182                 led@3 {
183                         label = "beaglebone:green:mmc0";
184                         gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
185                         linux,default-trigger = "mmc0";
186                         default-state = "off";
187                 };
188
189                 led@4 {
190                         label = "beaglebone:green:usr2";
191                         gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
192                         default-state = "off";
193                 };
194
195                 led@5 {
196                         label = "beaglebone:green:usr3";
197                         gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
198                         default-state = "off";
199                 };
200         };
201 };
202
203 /include/ "tps65217.dtsi"
204
205 &tps {
206         regulators {
207                 dcdc1_reg: regulator@0 {
208                         regulator-always-on;
209                 };
210
211                 dcdc2_reg: regulator@1 {
212                         /* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
213                         regulator-name = "vdd_mpu";
214                         regulator-min-microvolt = <925000>;
215                         regulator-max-microvolt = <1325000>;
216                         regulator-boot-on;
217                         regulator-always-on;
218                 };
219
220                 dcdc3_reg: regulator@2 {
221                         /* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
222                         regulator-name = "vdd_core";
223                         regulator-min-microvolt = <925000>;
224                         regulator-max-microvolt = <1150000>;
225                         regulator-boot-on;
226                         regulator-always-on;
227                 };
228
229                 ldo1_reg: regulator@3 {
230                         regulator-always-on;
231                 };
232
233                 ldo2_reg: regulator@4 {
234                         regulator-always-on;
235                 };
236
237                 ldo3_reg: regulator@5 {
238                         regulator-always-on;
239                 };
240
241                 ldo4_reg: regulator@6 {
242                         regulator-always-on;
243                 };
244         };
245 };
246
247 &cpsw_emac0 {
248         phy_id = <&davinci_mdio>, <0>;
249         phy-mode = "mii";
250 };
251
252 &cpsw_emac1 {
253         phy_id = <&davinci_mdio>, <1>;
254         phy-mode = "mii";
255 };
256
257 &mac {
258         pinctrl-names = "default", "sleep";
259         pinctrl-0 = <&cpsw_default>;
260         pinctrl-1 = <&cpsw_sleep>;
261
262 };
263
264 &davinci_mdio {
265         pinctrl-names = "default", "sleep";
266         pinctrl-0 = <&davinci_mdio_default>;
267         pinctrl-1 = <&davinci_mdio_sleep>;
268 };
269
270 &mmc1 {
271         status = "okay";
272         pinctrl-names = "default";
273         pinctrl-0 = <&mmc1_pins>;
274         cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
275         cd-inverted;
276 };