Merge branch 'pm-cpufreq'
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / am335x-wega.dtsi
1 /*
2  * Copyright (C) 2015 Phytec Messtechnik GmbH
3  * Author: Teresa Remmet <t.remmet@phytec.de>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  */
9
10 / {
11         model = "Phytec AM335x phyBOARD-WEGA";
12         compatible = "phytec,am335x-wega", "phytec,am335x-phycore-som", "ti,am33xx";
13
14         sound: sound_iface {
15                 compatible = "ti,da830-evm-audio";
16         };
17
18         regulators {
19                 compatible = "simple-bus";
20
21                 vcc3v3: fixedregulator1 {
22                         compatible = "regulator-fixed";
23                         regulator-name = "vcc3v3";
24                         regulator-min-microvolt = <3300000>;
25                         regulator-max-microvolt = <3300000>;
26                         regulator-boot-on;
27                 };
28         };
29 };
30
31 /* Audio */
32 &am33xx_pinmux {
33         mcasp0_pins: pinmux_mcasp0 {
34                 pinctrl-single,pins = <
35                         AM33XX_IOPAD(0x9AC, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_ahclkx.mcasp0_ahclkx */
36                         AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_aclkx.mcasp0_aclkx */
37                         AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_fsx.mcasp0_fsx */
38                         AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0)  /* mcasp0_axr0.mcasp0_axr0 */
39                         AM33XX_IOPAD(0x9A8, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr1.mcasp0_axr1 */
40                 >;
41         };
42 };
43
44 &i2c0 {
45         tlv320aic3007: tlv320aic3007@18 {
46                 compatible = "ti,tlv320aic3007";
47                 reg = <0x18>;
48                 AVDD-supply = <&vcc3v3>;
49                 IOVDD-supply = <&vcc3v3>;
50                 DRVDD-supply = <&vcc3v3>;
51                 DVDD-supply = <&vdig1_reg>;
52                 status = "okay";
53         };
54 };
55
56 &mcasp0 {
57         pinctrl-names = "default";
58         pinctrl-0 = <&mcasp0_pins>;
59         op-mode = <0>; /* DAVINCI_MCASP_IIS_MODE */
60         tdm-slots = <2>;
61         serial-dir = <
62                 2 1 0 0 /* # 0: INACTIVE, 1: TX, 2: RX */
63         >;
64         tx-num-evt = <16>;
65         rt-num-evt = <16>;
66         status = "okay";
67 };
68
69 &sound {
70         ti,model = "AM335x-Wega";
71         ti,audio-codec = <&tlv320aic3007>;
72         ti,mcasp-controller = <&mcasp0>;
73         ti,audio-routing =
74                 "Line Out",             "LLOUT",
75                 "Line Out",             "RLOUT",
76                 "LINE1L",               "Line In",
77                 "LINE1R",               "Line In";
78         clocks = <&mcasp0_fck>;
79         clock-names = "mclk";
80         status = "okay";
81 };
82
83 /* CAN Busses */
84 &am33xx_pinmux {
85         dcan1_pins: pinmux_dcan1 {
86                 pinctrl-single,pins = <
87                         AM33XX_IOPAD(0x968, PIN_OUTPUT_PULLUP | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
88                         AM33XX_IOPAD(0x96c, PIN_INPUT_PULLUP | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
89                 >;
90         };
91 };
92
93 &dcan1 {
94         pinctrl-names = "default";
95         pinctrl-0 = <&dcan1_pins>;
96         status = "okay";
97 };
98
99 /* Ethernet */
100 &am33xx_pinmux {
101         ethernet1_pins: pinmux_ethernet1 {
102                 pinctrl-single,pins = <
103                         AM33XX_IOPAD(0x840, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a0.mii2_txen */
104                         AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a1.mii2_rxdv */
105                         AM33XX_IOPAD(0x848, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a2.mii2_txd3 */
106                         AM33XX_IOPAD(0x84c, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a3.mii2_txd2 */
107                         AM33XX_IOPAD(0x850, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a4.mii2_txd1 */
108                         AM33XX_IOPAD(0x854, PIN_OUTPUT | MUX_MODE1)             /* gpmc_a5.mii2_txd0 */
109                         AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a6.mii2_txclk */
110                         AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a7.mii2_rxclk */
111                         AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a8.mii2_rxd3 */
112                         AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a9.mii2_rxd2 */
113                         AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a10.mii2_rxd1 */
114                         AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_a11.mii2_rxd0 */
115                         AM33XX_IOPAD(0x874, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_wpn.mii2_rxerr */
116                         AM33XX_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE1)     /* gpmc_ben1.mii2_col */
117                 >;
118         };
119 };
120
121 &cpsw_emac1 {
122         phy_id = <&davinci_mdio>, <1>;
123         phy-mode = "mii";
124         dual_emac_res_vlan = <2>;
125 };
126
127 &mac {
128         slaves = <2>;
129         pinctrl-names = "default";
130         pinctrl-0 = <&ethernet0_pins &ethernet1_pins>;
131         dual_emac = <1>;
132 };
133
134 /* MMC */
135 &am33xx_pinmux {
136         mmc1_pins: pinmux_mmc1 {
137                 pinctrl-single,pins = <
138                         AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat3.mmc0_dat3 */
139                         AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat2.mmc0_dat2 */
140                         AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat1.mmc0_dat1 */
141                         AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_dat0.mmc0_dat0 */
142                         AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_clk.mmc0_clk */
143                         AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)       /* mmc0_cmd.mmc0_cmd */
144                         AM33XX_IOPAD(0x960, PIN_INPUT_PULLUP | MUX_MODE7)       /* spi0_cs1.mmc0_sdcd */
145                 >;
146         };
147 };
148
149 &mmc1 {
150         vmmc-supply = <&vcc3v3>;
151         bus-width = <4>;
152         pinctrl-names = "default";
153         pinctrl-0 = <&mmc1_pins>;
154         cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
155         status = "okay";
156 };
157
158 /* Power */
159 &vdig1_reg {
160         regulator-boot-on;
161         regulator-always-on;
162 };
163
164 /* UARTs */
165 &am33xx_pinmux {
166         uart0_pins: pinmux_uart0 {
167                 pinctrl-single,pins = <
168                         AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0)    /* uart0_rxd.uart0_rxd */
169                         AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart0_txd.uart0_txd */
170                 >;
171         };
172
173         uart1_pins: pinmux_uart1_pins {
174                 pinctrl-single,pins = <
175                         AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0)       /* uart1_rxd.uart1_rxd */
176                         AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_txd.uart1_txd */
177                         AM33XX_IOPAD(0x978, PIN_INPUT | MUX_MODE0)              /* uart1_ctsn.uart1_ctsn */
178                         AM33XX_IOPAD(0x97c, PIN_OUTPUT_PULLDOWN | MUX_MODE0)    /* uart1_rtsn.uart1_rtsn */
179                 >;
180         };
181 };
182
183 &uart0 {
184         pinctrl-names = "default";
185         pinctrl-0 = <&uart0_pins>;
186         status = "okay";
187 };
188
189 &uart1 {
190         pinctrl-names = "default";
191         pinctrl-0 = <&uart1_pins>;
192         status = "okay";
193 };
194
195 /* USB */
196 &cppi41dma {
197         status = "okay";
198 };
199
200 &usb_ctrl_mod {
201         status = "okay";
202 };
203
204 &usb {
205         status = "okay";
206 };
207
208 &usb0 {
209         dr_mode = "peripheral";
210         status = "okay";
211 };
212
213 &usb0_phy {
214         status = "okay";
215 };
216
217 &usb1 {
218         dr_mode = "host";
219         status = "okay";
220 };
221
222 &usb1_phy {
223         status = "okay";
224 };