GNU Linux-libre 4.19.286-gnu1
[releases.git] / arch / arm / boot / dts / am335x-pcm-953.dtsi
1 /*
2  * Copyright (C) 2014-2017 Phytec Messtechnik GmbH
3  * Author: Wadim Egorov <w.egorov@phytec.de>
4  *         Teresa Remmet <t.remmet@phytec.de>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  */
10
11 #include <dt-bindings/input/input.h>
12
13 / {
14         model = "Phytec AM335x PCM-953";
15         compatible = "phytec,am335x-pcm-953", "phytec,am335x-phycore-som", "ti,am33xx";
16
17         /* Power */
18         vcc3v3: fixedregulator1 {
19                 compatible = "regulator-fixed";
20                 regulator-name = "vcc3v3";
21                 regulator-min-microvolt = <3300000>;
22                 regulator-max-microvolt = <3300000>;
23                 regulator-boot-on;
24         };
25
26         vcc1v8: fixedregulator2 {
27                 compatible = "regulator-fixed";
28                 regulator-name = "vcc1v8";
29                 regulator-min-microvolt = <1800000>;
30                 regulator-max-microvolt = <1800000>;
31                 regulator-boot-on;
32         };
33
34         /* User IO */
35         user_leds: user_leds {
36                 compatible = "gpio-leds";
37                 pinctrl-names = "default";
38                 pinctrl-0 = <&user_leds_pins>;
39
40                 green {
41                         label = "green:user";
42                         gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
43                         linux,default-trigger = "gpio";
44                         default-state = "on";
45                 };
46
47                 yellow {
48                         label = "yellow:user";
49                         gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
50                         linux,default-trigger = "gpio";
51                         default-state = "on";
52                 };
53         };
54
55         user_buttons: user_buttons {
56                 compatible = "gpio-keys";
57                 pinctrl-names = "default";
58                 pinctrl-0 = <&user_buttons_pins>;
59
60                 button@0 {
61                         label = "home";
62                         linux,code = <KEY_HOME>;
63                         gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
64                         wakeup-source;
65                 };
66
67                 button@1 {
68                         label = "menu";
69                         linux,code = <KEY_MENU>;
70                         gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
71                         wakeup-source;
72                 };
73
74         };
75 };
76
77 &am33xx_pinmux {
78         user_buttons_pins: pinmux_user_buttons {
79                 pinctrl-single,pins = <
80                         AM33XX_IOPAD(0x9e4, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* emu0.gpio3_7 */
81                         AM33XX_IOPAD(0x9e8, PIN_INPUT_PULLDOWN | MUX_MODE7)     /* emu1.gpio3_8 */
82                 >;
83         };
84
85         user_leds_pins: pinmux_user_leds {
86                 pinctrl-single,pins = <
87                         AM33XX_IOPAD(0x880, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_csn1.gpio1_30 */
88                         AM33XX_IOPAD(0x884, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* gpmc_csn2.gpio1_31 */
89                 >;
90         };
91 };
92
93 /* CAN */
94 &am33xx_pinmux {
95         dcan1_pins: pinmux_dcan1 {
96                 pinctrl-single,pins = <
97                         AM33XX_IOPAD(0x980, PIN_OUTPUT_PULLUP | MUX_MODE2)      /* uart1_rxd.dcan1_tx_mux2 */
98                         AM33XX_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE2)       /* uart1_txd.dcan1_rx_mux2 */
99                 >;
100         };
101 };
102
103 &dcan1 {
104         pinctrl-names = "default";
105         pinctrl-0 = <&dcan1_pins>;
106         status = "okay";
107 };
108
109 /* Ethernet */
110 &am33xx_pinmux {
111         ethernet1_pins: pinmux_ethernet1 {
112                 pinctrl-single,pins = <
113                         AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a0.rgmii2_tctl */
114                         AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a1.rgmii2_rctl */
115                         AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a2.rgmii2_td3 */
116                         AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a3.rgmii2_td2 */
117                         AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a4.rgmii2_td1 */
118                         AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a5.rgmii2_td0 */
119                         AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2)    /* gpmc_a6.rgmii2_tclk */
120                         AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a7.rgmii2_rclk */
121                         AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a8.rgmii2_rd3 */
122                         AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a9.rgmii2_rd2 */
123                         AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a10.rgmii2_rd1 */
124                         AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2)     /* gpmc_a11.rgmii2_rd0 */
125                 >;
126         };
127 };
128
129 &cpsw_emac1 {
130         phy-handle = <&phy1>;
131         phy-mode = "rgmii-id";
132         dual_emac_res_vlan = <2>;
133         status = "okay";
134 };
135
136 &davinci_mdio {
137         phy1: ethernet-phy@2 {
138                 reg = <2>;
139
140                 /* Register 260 (104h) – RGMII Clock and Control Pad Skew */
141                 rxc-skew-ps = <1400>;
142                 rxdv-skew-ps = <0>;
143                 txc-skew-ps = <1400>;
144                 txen-skew-ps = <0>;
145                 /* Register 261 (105h) – RGMII RX Data Pad Skew */
146                 rxd3-skew-ps = <0>;
147                 rxd2-skew-ps = <0>;
148                 rxd1-skew-ps = <0>;
149                 rxd0-skew-ps = <0>;
150                 /* Register 262 (106h) – RGMII TX Data Pad Skew */
151                 txd3-skew-ps = <0>;
152                 txd2-skew-ps = <0>;
153                 txd1-skew-ps = <0>;
154                 txd0-skew-ps = <0>;
155         };
156 };
157
158 &mac {
159         slaves = <2>;
160         pinctrl-names = "default";
161         pinctrl-0 = <&ethernet0_pins &ethernet1_pins>;
162         dual_emac;
163 };
164
165 /* Misc */
166 &am33xx_pinmux {
167         pinctrl-names = "default";
168         pinctrl-0 = <&cb_gpio_pins>;
169
170         cb_gpio_pins: pinmux_cb_gpio {
171                 pinctrl-single,pins = <
172                         AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* uart0_ctsn.gpio1_8 */
173                         AM33XX_IOPAD(0x96c, PIN_OUTPUT_PULLDOWN | MUX_MODE7)    /* uart0_rtsn.gpio1_9 */
174                 >;
175         };
176 };
177
178 /* MMC */
179 &am33xx_pinmux {
180         mmc1_pins: pinmux_mmc1_pins {
181                 pinctrl-single,pins = <
182                         AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3.mmc0_dat3 */
183                         AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2.mmc0_dat2 */
184                         AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1.mmc0_dat1 */
185                         AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0.mmc0_dat0 */
186                         AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk.mmc0_clk */
187                         AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd.mmc0_cmd */
188                         AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7)       /* spi0_cs1.mmc0_sdcd */
189                 >;
190         };
191 };
192
193 &mmc1 {
194         vmmc-supply = <&vcc3v3>;
195         bus-width = <4>;
196         pinctrl-names = "default";
197         pinctrl-0 = <&mmc1_pins>;
198         cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
199         status = "okay";
200 };
201
202 /* UARTs */
203 &am33xx_pinmux {
204         uart0_pins: pinmux_uart0 {
205                 pinctrl-single,pins = <
206                         AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart0_rxd.uart0_rxd */
207                         AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart0_txd.uart0_txd */
208                 >;
209         };
210
211         uart1_pins: pinmux_uart1 {
212                 pinctrl-single,pins = <
213                         AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
214                         AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
215                         AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)              /* uart1_ctsn.uart1_ctsn */
216                         AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_rtsn.uart1_rtsn */
217                 >;
218         };
219
220         uart2_pins: pinmux_uart2 {
221                 pinctrl-single,pins = <
222                         AM33XX_IOPAD(0x92c, PIN_INPUT_PULLUP | MUX_MODE1)       /* mii1_tx_clk.uart2_rxd */
223                         AM33XX_IOPAD(0x930, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_rx_clk.uart2_txd */
224                 >;
225         };
226
227         uart3_pins: pinmux_uart3 {
228                 pinctrl-single,pins = <
229                         AM33XX_IOPAD(0x934, PIN_INPUT_PULLUP | MUX_MODE1)       /* mii1_rxd3.uart3_rxd */
230                         AM33XX_IOPAD(0x938, PIN_OUTPUT_PULLDOWN | MUX_MODE1)    /* mii1_rxd2.uart3_txd */
231                 >;
232         };
233 };
234
235 &uart0 {
236         pinctrl-names = "default";
237         pinctrl-0 = <&uart0_pins>;
238         status = "okay";
239 };
240
241 &uart1 {
242         pinctrl-names = "default";
243         pinctrl-0 = <&uart1_pins>;
244 };
245
246 &uart2 {
247         pinctrl-names = "default";
248         pinctrl-0 = <&uart2_pins>;
249         status = "okay";
250 };
251
252 &uart3 {
253         pinctrl-names = "default";
254         pinctrl-0 = <&uart3_pins>;
255         status = "okay";
256 };
257
258 /* USB */
259 &cppi41dma {
260         status = "okay";
261 };
262
263 &usb_ctrl_mod {
264         status = "okay";
265 };
266
267 &usb {
268         status = "okay";
269 };
270
271 &usb0 {
272         status = "okay";
273 };
274
275 &usb0_phy {
276         status = "okay";
277 };
278
279 &usb1 {
280         status = "okay";
281         dr_mode = "host";
282 };
283
284 &usb1_phy {
285         status = "okay";
286 };