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