blob: 771154a14135b7ec11c9be7c91fb47bc2af4c3df [file] [log] [blame]
Tirupathi Reddy8f14a6a2017-06-09 11:13:21 +05301/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <dt-bindings/interrupt-controller/irq.h>
14#include <dt-bindings/spmi/spmi.h>
15#include <dt-bindings/msm/power-on.h>
16
17&spmi_bus {
18 qcom,pm660l@2 {
19 compatible = "qcom,spmi-pmic";
20 reg = <0x2 SPMI_USID>;
21 #address-cells = <2>;
22 #size-cells = <0>;
23
24 pm660l_revid: qcom,revid@100 {
25 compatible = "qcom,qpnp-revid";
26 reg = <0x100 0x100>;
27 };
28
29 pm660l_pbs: qcom,pbs@7300 {
30 compatible = "qcom,qpnp-pbs";
31 reg = <0x7300 0x100>;
32 };
33
34 qcom,power-on@800 {
35 compatible = "qcom,qpnp-power-on";
36 reg = <0x800 0x100>;
37 qcom,secondary-pon-reset;
38 qcom,hard-reset-poweroff-type =
39 <PON_POWER_OFF_SHUTDOWN>;
40 };
41
42 qcom,temp-alarm@2400 {
43 compatible = "qcom,qpnp-temp-alarm";
44 reg = <0x2400 0x100>;
45 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
46 label = "pm660l_tz";
47 };
48
Tirupathi Reddya1f73442017-08-11 12:31:00 +053049 pm660l_gpios: pinctrl@c000 {
50 compatible = "qcom,spmi-gpio";
51 reg = <0xc000 0xc00>;
52 interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
53 <0x2 0xc2 0 IRQ_TYPE_NONE>,
54 <0x2 0xc3 0 IRQ_TYPE_NONE>,
55 <0x2 0xc4 0 IRQ_TYPE_NONE>,
56 <0x2 0xc5 0 IRQ_TYPE_NONE>,
57 <0x2 0xc6 0 IRQ_TYPE_NONE>,
58 <0x2 0xc7 0 IRQ_TYPE_NONE>,
59 <0x2 0xc8 0 IRQ_TYPE_NONE>,
60 <0x2 0xca 0 IRQ_TYPE_NONE>,
61 <0x2 0xcb 0 IRQ_TYPE_NONE>;
62 interrupt-names = "pm660l_gpio1", "pm660l_gpio3",
63 "pm660l_gpio4", "pm660l_gpio5",
64 "pm660l_gpio6", "pm660l_gpio7",
65 "pm660l_gpio8", "pm660l_gpio9",
66 "pm660l_gpio11", "pm660l_gpio12";
Tirupathi Reddy8f14a6a2017-06-09 11:13:21 +053067 gpio-controller;
68 #gpio-cells = <2>;
Tirupathi Reddya1f73442017-08-11 12:31:00 +053069 qcom,gpios-disallowed = <2 10>;
Tirupathi Reddy8f14a6a2017-06-09 11:13:21 +053070 };
71 };
72
73 pm660l_3: qcom,pm660l@3 {
74 compatible ="qcom,spmi-pmic";
75 reg = <0x3 SPMI_USID>;
76 #address-cells = <2>;
77 #size-cells = <0>;
78
79 pm660l_pwm_1: pwm@b100 {
80 compatible = "qcom,qpnp-pwm";
81 reg = <0xb100 0x100>,
82 <0xb042 0x7e>;
83 reg-names = "qpnp-lpg-channel-base",
84 "qpnp-lpg-lut-base";
85 qcom,channel-id = <1>;
86 qcom,lpg-lut-size = <0x7e>;
87 qcom,supported-sizes = <6>, <9>;
88 qcom,ramp-index = <0>;
89 #pwm-cells = <2>;
90 };
91
92 pm660l_pwm_2: pwm@b200 {
93 compatible = "qcom,qpnp-pwm";
94 reg = <0xb200 0x100>,
95 <0xb042 0x7e>;
96 reg-names = "qpnp-lpg-channel-base",
97 "qpnp-lpg-lut-base";
98 qcom,channel-id = <2>;
99 qcom,lpg-lut-size = <0x7e>;
100 qcom,supported-sizes = <6>, <9>;
101 qcom,ramp-index = <1>;
102 #pwm-cells = <2>;
103 };
104
105 pm660l_pwm_3: pwm@b300 {
106 compatible = "qcom,qpnp-pwm";
107 reg = <0xb300 0x100>,
108 <0xb042 0x7e>;
109 reg-names = "qpnp-lpg-channel-base",
110 "qpnp-lpg-lut-base";
111 qcom,channel-id = <3>;
112 qcom,lpg-lut-size = <0x7e>;
113 qcom,supported-sizes = <6>, <9>;
114 qcom,ramp-index = <2>;
115 #pwm-cells = <2>;
116 qcom,period = <6000000>;
117
118 qcom,lpg {
119 label = "lpg";
120 cell-index = <0>;
121 qcom,duty-percents =
122 <0x01 0x0a 0x14 0x1e 0x28 0x32 0x3c
123 0x46 0x50 0x5a 0x64
124 0x64 0x5a 0x50 0x46 0x3c 0x32 0x28 0x1e
125 0x14 0x0a 0x01>;
126 };
127 };
128
129 pm660l_pwm_4: pwm@b400 {
130 compatible = "qcom,qpnp-pwm";
131 reg = <0xb400 0x100>,
132 <0xb042 0x7e>;
133 reg-names = "qpnp-lpg-channel-base",
134 "qpnp-lpg-lut-base";
135 qcom,channel-id = <4>;
136 qcom,lpg-lut-size = <0x7e>;
137 qcom,supported-sizes = <6>, <9>;
138 qcom,ramp-index = <3>;
139 #pwm-cells = <2>;
140 status = "disabled";
141 };
142
143 qcom,leds@d000 {
144 compatible = "qcom,leds-qpnp";
145 reg = <0xd000 0x100>;
146 label = "rgb";
147
148 red_led: qcom,rgb_0 {
149 label = "rgb";
150 qcom,id = <3>;
151 qcom,mode = "pwm";
152 pwms = <&pm660l_pwm_3 0 0>;
153 qcom,pwm-us = <1000>;
154 qcom,max-current = <12>;
155 qcom,default-state = "off";
156 linux,name = "red";
157 qcom,start-idx = <0>;
158 qcom,idx-len = <22>;
159 qcom,duty-pcts =
160 [01 0a 14 1e 28 32 3c 46 50 5a 64
161 64 5a 50 46 3c 32 28 1e 14 0a 01];
162 qcom,use-blink;
163 };
164
165 green_led: qcom,rgb_1 {
166 label = "rgb";
167 qcom,id = <4>;
168 qcom,mode = "pwm";
169 pwms = <&pm660l_pwm_2 0 0>;
170 qcom,pwm-us = <1000>;
171 qcom,max-current = <12>;
172 qcom,default-state = "off";
173 linux,name = "green";
174 };
175
176 blue_led: qcom,rgb_2 {
177 label = "rgb";
178 qcom,id = <5>;
179 qcom,mode = "pwm";
180 pwms = <&pm660l_pwm_1 0 0>;
181 qcom,pwm-us = <1000>;
182 qcom,max-current = <12>;
183 qcom,default-state = "off";
184 linux,name = "blue";
185 };
186 };
187
Tirupathi Reddy8f14a6a2017-06-09 11:13:21 +0530188 flash_led: qcom,leds@d300 {
189 compatible = "qcom,qpnp-flash-led-v2";
190 reg = <0xd300 0x100>;
191 label = "flash";
192 interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>,
193 <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>,
194 <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>;
195 interrupt-names = "led-fault-irq",
196 "all-ramp-down-done-irq",
197 "all-ramp-up-done-irq";
198 qcom,hdrm-auto-mode;
199 qcom,short-circuit-det;
200 qcom,open-circuit-det;
201 qcom,vph-droop-det;
202 qcom,thermal-derate-en;
203 qcom,thermal-derate-current = <200 500 1000>;
204 qcom,isc-delay = <192>;
205 qcom,pmic-revid = <&pm660l_revid>;
206
207 pm660l_flash0: qcom,flash_0 {
208 label = "flash";
209 qcom,led-name = "led:flash_0";
210 qcom,max-current = <1500>;
211 qcom,default-led-trigger = "flash0_trigger";
212 qcom,id = <0>;
213 qcom,current-ma = <1000>;
214 qcom,duration-ms = <1280>;
215 qcom,ires-ua = <12500>;
216 qcom,hdrm-voltage-mv = <325>;
217 qcom,hdrm-vol-hi-lo-win-mv = <100>;
218 };
219
220 pm660l_flash1: qcom,flash_1 {
221 label = "flash";
222 qcom,led-name = "led:flash_1";
223 qcom,max-current = <1500>;
224 qcom,default-led-trigger = "flash1_trigger";
225 qcom,id = <1>;
226 qcom,current-ma = <1000>;
227 qcom,duration-ms = <1280>;
228 qcom,ires-ua = <12500>;
229 qcom,hdrm-voltage-mv = <325>;
230 qcom,hdrm-vol-hi-lo-win-mv = <100>;
231 };
232
233 pm660l_flash2: qcom,flash_2 {
234 label = "flash";
235 qcom,led-name = "led:flash_2";
236 qcom,max-current = <750>;
237 qcom,default-led-trigger = "flash2_trigger";
238 qcom,id = <2>;
239 qcom,current-ma = <500>;
240 qcom,duration-ms = <1280>;
241 qcom,ires-ua = <12500>;
242 qcom,hdrm-voltage-mv = <325>;
243 qcom,hdrm-vol-hi-lo-win-mv = <100>;
244 };
245
246 pm660l_torch0: qcom,torch_0 {
247 label = "torch";
248 qcom,led-name = "led:torch_0";
249 qcom,max-current = <500>;
250 qcom,default-led-trigger = "torch0_trigger";
251 qcom,id = <0>;
252 qcom,current-ma = <300>;
253 qcom,ires-ua = <12500>;
254 qcom,hdrm-voltage-mv = <325>;
255 qcom,hdrm-vol-hi-lo-win-mv = <100>;
256 };
257
258 pm660l_torch1: qcom,torch_1 {
259 label = "torch";
260 qcom,led-name = "led:torch_1";
261 qcom,max-current = <500>;
262 qcom,default-led-trigger = "torch1_trigger";
263 qcom,id = <1>;
264 qcom,current-ma = <300>;
265 qcom,ires-ua = <12500>;
266 qcom,hdrm-voltage-mv = <325>;
267 qcom,hdrm-vol-hi-lo-win-mv = <100>;
268 };
269
270 pm660l_torch2: qcom,torch_2 {
271 label = "torch";
272 qcom,led-name = "led:torch_2";
273 qcom,max-current = <500>;
274 qcom,default-led-trigger = "torch2_trigger";
275 qcom,id = <2>;
276 qcom,current-ma = <300>;
277 qcom,ires-ua = <12500>;
278 qcom,hdrm-voltage-mv = <325>;
279 qcom,hdrm-vol-hi-lo-win-mv = <100>;
280 };
281
282 pm660l_switch0: qcom,led_switch_0 {
283 label = "switch";
284 qcom,led-name = "led:switch_0";
285 qcom,led-mask = <3>;
286 qcom,default-led-trigger = "switch0_trigger";
287 };
288
289 pm660l_switch1: qcom,led_switch_1 {
290 label = "switch";
291 qcom,led-name = "led:switch_1";
292 qcom,led-mask = <4>;
293 qcom,default-led-trigger = "switch1_trigger";
294 };
295 };
Tirupathi Reddy8f14a6a2017-06-09 11:13:21 +0530296 };
297};