GNU Linux-libre 4.19.264-gnu1
[releases.git] / arch / arm / boot / dts / dra71-evm.dts
1 /*
2  * Copyright (C) 2016 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 #include "dra72-evm-common.dtsi"
10 #include "dra7-mmc-iodelay.dtsi"
11 #include "dra72x-mmc-iodelay.dtsi"
12 #include <dt-bindings/net/ti-dp83867.h>
13
14 / {
15         compatible = "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7";
16         model = "TI DRA718 EVM";
17
18         memory {
19                 device_type = "memory";
20                 reg = <0x0 0x80000000 0x0 0x80000000>; /* 2GB */
21         };
22
23         vpo_sd_1v8_3v3: gpio-regulator-TPS74801 {
24                 compatible = "regulator-gpio";
25
26                 regulator-name = "vddshv8";
27                 regulator-min-microvolt = <1800000>;
28                 regulator-max-microvolt = <3300000>;
29                 regulator-boot-on;
30                 vin-supply = <&evm_5v0>;
31
32                 gpios = <&gpio7 11 GPIO_ACTIVE_HIGH>;
33                 states = <1800000 0x0
34                           3300000 0x1>;
35         };
36
37         evm_1v8_sw: fixedregulator-evm_1v8 {
38                 compatible = "regulator-fixed";
39                 regulator-name = "evm_1v8";
40                 regulator-min-microvolt = <1800000>;
41                 regulator-max-microvolt = <1800000>;
42                 vin-supply = <&lp8732_buck0_reg>;
43                 regulator-always-on;
44                 regulator-boot-on;
45         };
46
47         poweroff: gpio-poweroff {
48                 compatible = "gpio-poweroff";
49                 gpios = <&gpio7 30 GPIO_ACTIVE_HIGH>;
50                 input;
51         };
52 };
53
54 &i2c1 {
55         status = "okay";
56         clock-frequency = <400000>;
57
58         lp8733: lp8733@60 {
59                 compatible = "ti,lp8733";
60                 reg = <0x60>;
61
62                 buck0-in-supply =<&vsys_3v3>;
63                 buck1-in-supply =<&vsys_3v3>;
64                 ldo0-in-supply =<&evm_5v0>;
65                 ldo1-in-supply =<&evm_5v0>;
66
67                 lp8733_regulators: regulators {
68                         lp8733_buck0_reg: buck0 {
69                                 /* FB_B0 -> LP8733-BUCK1 - VPO_S1_AVS - VDD_CORE_AVS (core, mpu, gpu) */
70                                 regulator-name = "lp8733-buck0";
71                                 regulator-min-microvolt = <850000>;
72                                 regulator-max-microvolt = <1250000>;
73                                 regulator-always-on;
74                                 regulator-boot-on;
75                         };
76
77                         lp8733_buck1_reg: buck1 {
78                                 /* FB_B1 -> LP8733-BUCK2 - VPO_S2_AVS - VDD_DSP_AVS (DSP/eve/iva) */
79                                 regulator-name = "lp8733-buck1";
80                                 regulator-min-microvolt = <850000>;
81                                 regulator-max-microvolt = <1250000>;
82                                 regulator-boot-on;
83                                 regulator-always-on;
84                         };
85
86                         lp8733_ldo0_reg: ldo0 {
87                                 /* LDO0 -> LP8733-LDO1 - VPO_L1_3V3 - VDDSHV8 (optional) */
88                                 regulator-name = "lp8733-ldo0";
89                                 regulator-min-microvolt = <3300000>;
90                                 regulator-max-microvolt = <3300000>;
91                         };
92
93                         lp8733_ldo1_reg: ldo1 {
94                                 /* LDO1 -> LP8733-LDO2 - VPO_L2_3V3 - VDDA_USB3V3 */
95                                 regulator-name = "lp8733-ldo1";
96                                 regulator-min-microvolt = <3300000>;
97                                 regulator-max-microvolt = <3300000>;
98                                 regulator-always-on;
99                                 regulator-boot-on;
100                         };
101                 };
102         };
103
104         lp8732: lp8732@61 {
105                 compatible = "ti,lp8732";
106                 reg = <0x61>;
107
108                 buck0-in-supply =<&vsys_3v3>;
109                 buck1-in-supply =<&vsys_3v3>;
110                 ldo0-in-supply =<&vsys_3v3>;
111                 ldo1-in-supply =<&vsys_3v3>;
112
113                 lp8732_regulators: regulators {
114                         lp8732_buck0_reg: buck0 {
115                                 /* FB_B0 -> LP8732-BUCK1 - VPO_S3_1V8 - VDDS_1V8 */
116                                 regulator-name = "lp8732-buck0";
117                                 regulator-min-microvolt = <1800000>;
118                                 regulator-max-microvolt = <1800000>;
119                                 regulator-always-on;
120                                 regulator-boot-on;
121                         };
122
123                         lp8732_buck1_reg: buck1 {
124                                 /* FB_B1 -> LP8732-BUCK2 - VPO_S4_DDR - VDD_DDR_1V35 */
125                                 regulator-name = "lp8732-buck1";
126                                 regulator-min-microvolt = <1350000>;
127                                 regulator-max-microvolt = <1350000>;
128                                 regulator-boot-on;
129                                 regulator-always-on;
130                         };
131
132                         lp8732_ldo0_reg: ldo0 {
133                                 /* LDO0 -> LP8732-LDO1 - VPO_L3_1V8 - VDA_1V8_PLL */
134                                 regulator-name = "lp8732-ldo0";
135                                 regulator-min-microvolt = <1800000>;
136                                 regulator-max-microvolt = <1800000>;
137                                 regulator-boot-on;
138                                 regulator-always-on;
139                         };
140
141                         lp8732_ldo1_reg: ldo1 {
142                                 /* LDO1 -> LP8732-LDO2 - VPO_L4_1V8 - VDA_1V8_PHY */
143                                 regulator-name = "lp8732-ldo1";
144                                 regulator-min-microvolt = <1800000>;
145                                 regulator-max-microvolt = <1800000>;
146                                 regulator-always-on;
147                                 regulator-boot-on;
148                         };
149                 };
150         };
151 };
152
153 &pcf_lcd {
154         interrupt-parent = <&gpio7>;
155         interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
156 };
157
158 &pcf_gpio_21 {
159         interrupt-parent = <&gpio7>;
160         interrupts = <31 IRQ_TYPE_EDGE_FALLING>;
161 };
162
163 &pcf_hdmi {
164         p0 {
165                 /*
166                  * PM_OEn to High: Disable routing I2C3 to PM_I2C
167                  * With this PM_SEL(p3) should not matter
168                  */
169                 gpio-hog;
170                 gpios = <0 GPIO_ACTIVE_LOW>;
171                 output-high;
172                 line-name = "pm_oe_n";
173         };
174 };
175
176 &mmc1 {
177         pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104";
178         pinctrl-0 = <&mmc1_pins_default_no_clk_pu>;
179         pinctrl-1 = <&mmc1_pins_hs>;
180         pinctrl-2 = <&mmc1_pins_sdr12>;
181         pinctrl-3 = <&mmc1_pins_sdr25>;
182         pinctrl-4 = <&mmc1_pins_sdr50>;
183         pinctrl-5 = <&mmc1_pins_ddr50_rev20 &mmc1_iodelay_ddr50_conf>;
184         pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>;
185         vqmmc-supply = <&vpo_sd_1v8_3v3>;
186 };
187
188 &mmc2 {
189         pinctrl-names = "default", "hs", "ddr_1_8v", "hs200_1_8v";
190         pinctrl-0 = <&mmc2_pins_default>;
191         pinctrl-1 = <&mmc2_pins_hs>;
192         pinctrl-2 = <&mmc2_pins_ddr_rev20 &mmc2_iodelay_ddr_conf>;
193         pinctrl-3 = <&mmc2_pins_hs200 &mmc2_iodelay_hs200_rev20_conf>;
194         vmmc-supply = <&evm_1v8_sw>;
195         vqmmc-supply = <&evm_1v8_sw>;
196 };
197
198 &mac {
199         mode-gpios = <&pcf_gpio_21 4 GPIO_ACTIVE_LOW>,
200                      <&pcf_hdmi 9 GPIO_ACTIVE_LOW>,     /* P11 */
201                      <&pcf_hdmi 10 GPIO_ACTIVE_LOW>;    /* P12 */
202         dual_emac;
203 };
204
205 &cpsw_emac0 {
206         phy_id = <&davinci_mdio>, <2>;
207         phy-mode = "rgmii-id";
208         dual_emac_res_vlan = <1>;
209 };
210
211 &cpsw_emac1 {
212         phy_id = <&davinci_mdio>, <3>;
213         phy-mode = "rgmii-id";
214         dual_emac_res_vlan = <2>;
215 };
216
217 &davinci_mdio {
218         dp83867_0: ethernet-phy@2 {
219                 reg = <2>;
220                 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
221                 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
222                 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
223                 ti,min-output-impedance;
224                 ti,dp83867-rxctrl-strap-quirk;
225         };
226
227         dp83867_1: ethernet-phy@3 {
228                 reg = <3>;
229                 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
230                 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
231                 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
232                 ti,min-output-impedance;
233                 ti,dp83867-rxctrl-strap-quirk;
234         };
235 };
236
237 /* No Sata on this device */
238 &sata_phy {
239         status = "disabled";
240 };
241
242 &sata {
243         status = "disabled";
244 };
245
246 /* No RTC on this device */
247 &rtc {
248         status = "disabled";
249 };
250
251 &usb2_phy1 {
252         phy-supply = <&lp8733_ldo1_reg>;
253 };
254
255 &usb2_phy2 {
256         phy-supply = <&lp8733_ldo1_reg>;
257 };
258
259 &dss {
260         /* Supplied by VDA_1V8_PLL */
261         vdda_video-supply = <&lp8732_ldo0_reg>;
262 };
263
264 &hdmi {
265         /* Supplied by VDA_1V8_PHY */
266         vdda_video-supply = <&lp8732_ldo1_reg>;
267 };
268
269 &extcon_usb1 {
270         vbus-gpio = <&pcf_lcd 14 GPIO_ACTIVE_HIGH>;
271 };
272
273 &extcon_usb2 {
274         vbus-gpio = <&pcf_lcd 15 GPIO_ACTIVE_HIGH>;
275 };