GNU Linux-libre 4.14.251-gnu1
[releases.git] / arch / arm / boot / dts / motorola-cpcap-mapphone.dtsi
1 /*
2  * Common CPCAP configuration used on Motorola phones
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 &mcspi1 {
10         cpcap: pmic@0 {
11                 compatible = "motorola,cpcap", "st,6556002";
12                 reg = <0>;      /* cs0 */
13                 interrupt-parent = <&gpio1>;
14                 interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
15                 interrupt-controller;
16                 #interrupt-cells = <2>;
17                 #address-cells = <1>;
18                 #size-cells = <0>;
19                 spi-max-frequency = <9600000>;
20                 spi-cs-high;
21                 spi-cpol;
22                 spi-cpha;
23
24                 cpcap_adc: adc {
25                         compatible = "motorola,mapphone-cpcap-adc";
26                         interrupts-extended = <&cpcap 8 0>;
27                         interrupt-names = "adcdone";
28                         #io-channel-cells = <1>;
29                 };
30
31                 cpcap_battery: battery {
32                         compatible = "motorola,cpcap-battery";
33                         interrupts-extended = <
34                                 &cpcap 6 0 &cpcap 5 0 &cpcap 3 0
35                                 &cpcap 20 0 &cpcap 54 0
36                         >;
37                         interrupt-names =
38                                 "eol", "lowbph", "lowbpl",
39                                 "chrgcurr1", "battdetb";
40                         io-channels = <&cpcap_adc 0 &cpcap_adc 1
41                                        &cpcap_adc 5 &cpcap_adc 6>;
42                         io-channel-names = "battdetb", "battp",
43                                            "chg_isense", "batti";
44                         power-supplies = <&cpcap_charger>;
45                 };
46
47                 cpcap_charger: charger {
48                         compatible = "motorola,mapphone-cpcap-charger";
49                         interrupts-extended = <
50                                 &cpcap 13 0 &cpcap 12 0 &cpcap 29 0 &cpcap 28 0
51                                 &cpcap 22 0 &cpcap 20 0 &cpcap 19 0 &cpcap 54 0
52                         >;
53                         interrupt-names =
54                                 "chrg_det", "rvrs_chrg", "chrg_se1b", "se0conn",
55                                 "rvrs_mode", "chrgcurr1", "vbusvld", "battdetb";
56                         mode-gpios = <&gpio3 29 GPIO_ACTIVE_LOW
57                                       &gpio3 23 GPIO_ACTIVE_LOW>;
58                         io-channels = <&cpcap_adc 0 &cpcap_adc 1
59                                        &cpcap_adc 2 &cpcap_adc 5
60                                        &cpcap_adc 6>;
61                         io-channel-names = "battdetb", "battp",
62                                            "vbus", "chg_isense",
63                                            "batti";
64                 };
65
66                 cpcap_regulator: regulator {
67                         compatible = "motorola,mapphone-cpcap-regulator";
68
69                         cpcap_regulators: regulators {
70                         };
71                 };
72
73                 cpcap_rtc: rtc {
74                         compatible = "motorola,cpcap-rtc";
75
76                         interrupt-parent = <&cpcap>;
77                         interrupts = <39 IRQ_TYPE_NONE>, <26 IRQ_TYPE_NONE>;
78                 };
79
80                 power_button: button {
81                         compatible = "motorola,cpcap-pwrbutton";
82
83                         interrupts = <23 IRQ_TYPE_NONE>;
84                 };
85
86                 cpcap_usb2_phy: phy {
87                         compatible = "motorola,mapphone-cpcap-usb-phy";
88                         pinctrl-0 = <&usb_gpio_mux_sel1 &usb_gpio_mux_sel2>;
89                         pinctrl-1 = <&usb_ulpi_pins>;
90                         pinctrl-2 = <&usb_utmi_pins>;
91                         pinctrl-3 = <&uart3_pins>;
92                         pinctrl-names = "default", "ulpi", "utmi", "uart";
93                         #phy-cells = <0>;
94                         interrupts-extended = <
95                                 &cpcap 15 0 &cpcap 14 0 &cpcap 28 0 &cpcap 19 0
96                                 &cpcap 18 0 &cpcap 17 0 &cpcap 16 0 &cpcap 49 0
97                                 &cpcap 48 0
98                         >;
99                         interrupt-names =
100                                 "id_ground", "id_float", "se0conn", "vbusvld",
101                                 "sessvld", "sessend", "se1", "dm", "dp";
102                         mode-gpios = <&gpio2 28 GPIO_ACTIVE_HIGH
103                                       &gpio1 0 GPIO_ACTIVE_HIGH>;
104                         io-channels = <&cpcap_adc 2>, <&cpcap_adc 7>;
105                         io-channel-names = "vbus", "id";
106                         vusb-supply = <&vusb>;
107                 };
108
109                 led_red: led-red {
110                         compatible = "motorola,cpcap-led-red";
111                         vdd-supply = <&sw5>;
112                         label = "status-led:red";
113                 };
114
115                 led_green: led-green {
116                         compatible = "motorola,cpcap-led-green";
117                         vdd-supply = <&sw5>;
118                         label = "status-led:green";
119                 };
120
121                 led_blue: led-blue {
122                         compatible = "motorola,cpcap-led-blue";
123                         vdd-supply = <&sw5>;
124                         label = "status-led:blue";
125                 };
126
127                 led_adl: led-adl {
128                         compatible = "motorola,cpcap-led-adl";
129                         vdd-supply = <&sw5>;
130                         label = "button-backlight";
131                 };
132
133                 led_cp: led-cp {
134                         compatible = "motorola,cpcap-led-cp";
135                         vdd-supply = <&sw5>;
136                         label = "shift-key-light";
137                 };
138         };
139 };
140
141 &cpcap_regulators {
142         sw5: SW5 {
143                 regulator-min-microvolt = <5050000>;
144                 regulator-max-microvolt = <5050000>;
145                 regulator-enable-ramp-delay = <50000>;
146                 regulator-boot-on;
147         };
148
149         vcam: VCAM {
150                 regulator-min-microvolt = <2900000>;
151                 regulator-max-microvolt = <2900000>;
152                 regulator-enable-ramp-delay = <1000>;
153         };
154
155         /* Used by DSS */
156         vcsi: VCSI {
157                 regulator-min-microvolt = <1800000>;
158                 regulator-max-microvolt = <1800000>;
159                 regulator-enable-ramp-delay = <1000>;
160                 regulator-boot-on;
161         };
162
163         vdac: VDAC {
164                 regulator-min-microvolt = <1800000>;
165                 regulator-max-microvolt = <1800000>;
166                 regulator-enable-ramp-delay = <1000>;
167         };
168
169         vdig: VDIG {
170                 regulator-min-microvolt = <1875000>;
171                 regulator-max-microvolt = <1875000>;
172                 regulator-enable-ramp-delay = <1000>;
173         };
174
175         vfuse: VFUSE {
176                 regulator-min-microvolt = <1500000>;
177                 regulator-max-microvolt = <3150000>;
178                 regulator-enable-ramp-delay = <1000>;
179         };
180
181         vhvio: VHVIO {
182                 regulator-min-microvolt = <2775000>;
183                 regulator-max-microvolt = <2775000>;
184                 regulator-enable-ramp-delay = <1000>;
185                 regulator-always-on;
186         };
187
188         /* Used by eMMC at mmc2 */
189         vsdio: VSDIO {
190                 regulator-min-microvolt = <2900000>;
191                 regulator-max-microvolt = <2900000>;
192                 regulator-enable-ramp-delay = <1000>;
193         };
194
195         vpll: VPLL {
196                 regulator-min-microvolt = <1200000>;
197                 regulator-max-microvolt = <1800000>;
198                 regulator-enable-ramp-delay = <100>;
199         };
200
201         vrf1: VRF1 {
202                 regulator-min-microvolt = <2775000>;
203                 regulator-max-microvolt = <2775000>;
204                 regulator-enable-ramp-delay = <1000>;
205         };
206
207         vrf2: VRF2 {
208                 regulator-min-microvolt = <2775000>;
209                 regulator-max-microvolt = <2775000>;
210                 regulator-enable-ramp-delay = <1000>;
211         };
212
213         vrfref: VRFREF {
214                 regulator-min-microvolt = <2500000>;
215                 regulator-max-microvolt = <2775000>;
216                 regulator-enable-ramp-delay = <100>;
217         };
218
219         vwlan1: VWLAN1 {
220                 regulator-min-microvolt = <1800000>;
221                 regulator-max-microvolt = <1900000>;
222                 regulator-enable-ramp-delay = <1000>;
223         };
224
225         /* Used by micro-SDIO at mmc1 */
226         vwlan2: VWLAN2 {
227                 regulator-min-microvolt = <3000000>;
228                 regulator-max-microvolt = <3000000>;
229                 regulator-enable-ramp-delay = <1000>;
230         };
231
232         vsim: VSIM {
233                 regulator-min-microvolt = <1800000>;
234                 regulator-max-microvolt = <2900000>;
235                 regulator-enable-ramp-delay = <1000>;
236         };
237
238         vsimcard: VSIMCARD {
239                 regulator-min-microvolt = <1800000>;
240                 regulator-max-microvolt = <2900000>;
241                 regulator-enable-ramp-delay = <1000>;
242         };
243
244         vvib: VVIB {
245                 regulator-min-microvolt = <1300000>;
246                 regulator-max-microvolt = <3000000>;
247                 regulator-enable-ramp-delay = <500>;
248         };
249
250         vusb: VUSB {
251                 regulator-min-microvolt = <3300000>;
252                 regulator-max-microvolt = <3300000>;
253                 regulator-enable-ramp-delay = <1000>;
254         };
255
256         vaudio: VAUDIO {
257                 regulator-min-microvolt = <2775000>;
258                 regulator-max-microvolt = <2775000>;
259                 regulator-enable-ramp-delay = <1000>;
260                 regulator-initial-mode = <0x00>; /* NORMAL */
261         };
262 };