| /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. |
| * |
| * This program is free software; you can redistribute it and/or modify |
| * it under the terms of the GNU General Public License version 2 and |
| * only version 2 as published by the Free Software Foundation. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| */ |
| |
| #include <dt-bindings/interrupt-controller/irq.h> |
| #include <dt-bindings/spmi/spmi.h> |
| #include <dt-bindings/msm/power-on.h> |
| |
| &spmi_bus { |
| qcom,pm660l@2 { |
| compatible = "qcom,spmi-pmic"; |
| reg = <0x2 SPMI_USID>; |
| #address-cells = <2>; |
| #size-cells = <0>; |
| |
| pm660l_revid: qcom,revid@100 { |
| compatible = "qcom,qpnp-revid"; |
| reg = <0x100 0x100>; |
| }; |
| |
| pm660l_pbs: qcom,pbs@7300 { |
| compatible = "qcom,qpnp-pbs"; |
| reg = <0x7300 0x100>; |
| }; |
| |
| qcom,power-on@800 { |
| compatible = "qcom,qpnp-power-on"; |
| reg = <0x800 0x100>; |
| qcom,secondary-pon-reset; |
| qcom,hard-reset-poweroff-type = |
| <PON_POWER_OFF_SHUTDOWN>; |
| }; |
| |
| qcom,temp-alarm@2400 { |
| compatible = "qcom,qpnp-temp-alarm"; |
| reg = <0x2400 0x100>; |
| interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| label = "pm660l_tz"; |
| }; |
| |
| pm660l_gpios: gpios { |
| compatible = "qcom,qpnp-pin"; |
| gpio-controller; |
| #gpio-cells = <2>; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| label = "pm660l-gpio"; |
| |
| gpio@c000 { |
| reg = <0xc000 0x100>; |
| qcom,pin-num = <1>; |
| status = "disabled"; |
| }; |
| |
| gpio@c100 { |
| reg = <0xc100 0x100>; |
| qcom,pin-num = <2>; |
| status = "disabled"; |
| }; |
| |
| gpio@c200 { |
| reg = <0xc200 0x100>; |
| qcom,pin-num = <3>; |
| status = "disabled"; |
| }; |
| |
| gpio@c300 { |
| reg = <0xc300 0x100>; |
| qcom,pin-num = <4>; |
| status = "disabled"; |
| }; |
| |
| gpio@c400 { |
| reg = <0xc400 0x100>; |
| qcom,pin-num = <5>; |
| status = "disabled"; |
| }; |
| |
| gpio@c500 { |
| reg = <0xc500 0x100>; |
| qcom,pin-num = <6>; |
| status = "disabled"; |
| }; |
| |
| gpio@c600 { |
| reg = <0xc600 0x100>; |
| qcom,pin-num = <7>; |
| status = "disabled"; |
| }; |
| |
| gpio@c700 { |
| reg = <0xc700 0x100>; |
| qcom,pin-num = <8>; |
| status = "disabled"; |
| }; |
| |
| gpio@c800 { |
| reg = <0xc800 0x100>; |
| qcom,pin-num = <9>; |
| status = "disabled"; |
| }; |
| |
| gpio@c900 { |
| reg = <0xc900 0x100>; |
| qcom,pin-num = <10>; |
| status = "disabled"; |
| }; |
| |
| gpio@ca00 { |
| reg = <0xca00 0x100>; |
| qcom,pin-num = <11>; |
| status = "disabled"; |
| }; |
| |
| gpio@cb00 { |
| reg = <0xcb00 0x100>; |
| qcom,pin-num = <12>; |
| status = "disabled"; |
| }; |
| |
| }; |
| }; |
| |
| pm660l_3: qcom,pm660l@3 { |
| compatible ="qcom,spmi-pmic"; |
| reg = <0x3 SPMI_USID>; |
| #address-cells = <2>; |
| #size-cells = <0>; |
| |
| pm660l_pwm_1: pwm@b100 { |
| compatible = "qcom,qpnp-pwm"; |
| reg = <0xb100 0x100>, |
| <0xb042 0x7e>; |
| reg-names = "qpnp-lpg-channel-base", |
| "qpnp-lpg-lut-base"; |
| qcom,channel-id = <1>; |
| qcom,lpg-lut-size = <0x7e>; |
| qcom,supported-sizes = <6>, <9>; |
| qcom,ramp-index = <0>; |
| #pwm-cells = <2>; |
| }; |
| |
| pm660l_pwm_2: pwm@b200 { |
| compatible = "qcom,qpnp-pwm"; |
| reg = <0xb200 0x100>, |
| <0xb042 0x7e>; |
| reg-names = "qpnp-lpg-channel-base", |
| "qpnp-lpg-lut-base"; |
| qcom,channel-id = <2>; |
| qcom,lpg-lut-size = <0x7e>; |
| qcom,supported-sizes = <6>, <9>; |
| qcom,ramp-index = <1>; |
| #pwm-cells = <2>; |
| }; |
| |
| pm660l_pwm_3: pwm@b300 { |
| compatible = "qcom,qpnp-pwm"; |
| reg = <0xb300 0x100>, |
| <0xb042 0x7e>; |
| reg-names = "qpnp-lpg-channel-base", |
| "qpnp-lpg-lut-base"; |
| qcom,channel-id = <3>; |
| qcom,lpg-lut-size = <0x7e>; |
| qcom,supported-sizes = <6>, <9>; |
| qcom,ramp-index = <2>; |
| #pwm-cells = <2>; |
| qcom,period = <6000000>; |
| |
| qcom,lpg { |
| label = "lpg"; |
| cell-index = <0>; |
| qcom,duty-percents = |
| <0x01 0x0a 0x14 0x1e 0x28 0x32 0x3c |
| 0x46 0x50 0x5a 0x64 |
| 0x64 0x5a 0x50 0x46 0x3c 0x32 0x28 0x1e |
| 0x14 0x0a 0x01>; |
| }; |
| }; |
| |
| pm660l_pwm_4: pwm@b400 { |
| compatible = "qcom,qpnp-pwm"; |
| reg = <0xb400 0x100>, |
| <0xb042 0x7e>; |
| reg-names = "qpnp-lpg-channel-base", |
| "qpnp-lpg-lut-base"; |
| qcom,channel-id = <4>; |
| qcom,lpg-lut-size = <0x7e>; |
| qcom,supported-sizes = <6>, <9>; |
| qcom,ramp-index = <3>; |
| #pwm-cells = <2>; |
| status = "disabled"; |
| }; |
| |
| qcom,leds@d000 { |
| compatible = "qcom,leds-qpnp"; |
| reg = <0xd000 0x100>; |
| label = "rgb"; |
| |
| red_led: qcom,rgb_0 { |
| label = "rgb"; |
| qcom,id = <3>; |
| qcom,mode = "pwm"; |
| pwms = <&pm660l_pwm_3 0 0>; |
| qcom,pwm-us = <1000>; |
| qcom,max-current = <12>; |
| qcom,default-state = "off"; |
| linux,name = "red"; |
| qcom,start-idx = <0>; |
| qcom,idx-len = <22>; |
| qcom,duty-pcts = |
| [01 0a 14 1e 28 32 3c 46 50 5a 64 |
| 64 5a 50 46 3c 32 28 1e 14 0a 01]; |
| qcom,use-blink; |
| }; |
| |
| green_led: qcom,rgb_1 { |
| label = "rgb"; |
| qcom,id = <4>; |
| qcom,mode = "pwm"; |
| pwms = <&pm660l_pwm_2 0 0>; |
| qcom,pwm-us = <1000>; |
| qcom,max-current = <12>; |
| qcom,default-state = "off"; |
| linux,name = "green"; |
| }; |
| |
| blue_led: qcom,rgb_2 { |
| label = "rgb"; |
| qcom,id = <5>; |
| qcom,mode = "pwm"; |
| pwms = <&pm660l_pwm_1 0 0>; |
| qcom,pwm-us = <1000>; |
| qcom,max-current = <12>; |
| qcom,default-state = "off"; |
| linux,name = "blue"; |
| }; |
| }; |
| |
| pm660l_wled: qcom,leds@d800 { |
| compatible = "qcom,qpnp-wled"; |
| reg = <0xd800 0x100>, |
| <0xd900 0x100>; |
| reg-names = "qpnp-wled-ctrl-base", |
| "qpnp-wled-sink-base"; |
| interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>; |
| interrupt-names = "ovp-irq"; |
| linux,name = "wled"; |
| linux,default-trigger = "bkl-trigger"; |
| qcom,fdbk-output = "auto"; |
| qcom,vref-uv = <127500>; |
| qcom,switch-freq-khz = <800>; |
| qcom,ovp-mv = <29600>; |
| qcom,ilim-ma = <970>; |
| qcom,boost-duty-ns = <26>; |
| qcom,mod-freq-khz = <9600>; |
| qcom,dim-mode = "hybrid"; |
| qcom,hyb-thres = <625>; |
| qcom,sync-dly-us = <800>; |
| qcom,fs-curr-ua = <25000>; |
| qcom,cons-sync-write-delay-us = <1000>; |
| qcom,led-strings-list = [00 01 02]; |
| qcom,loop-auto-gm-en; |
| qcom,pmic-revid = <&pm660l_revid>; |
| qcom,auto-calibration-enable; |
| status = "ok"; |
| }; |
| |
| flash_led: qcom,leds@d300 { |
| compatible = "qcom,qpnp-flash-led-v2"; |
| reg = <0xd300 0x100>; |
| label = "flash"; |
| interrupts = <0x3 0xd3 0x0 IRQ_TYPE_EDGE_RISING>, |
| <0x3 0xd3 0x3 IRQ_TYPE_EDGE_RISING>, |
| <0x3 0xd3 0x4 IRQ_TYPE_EDGE_RISING>; |
| interrupt-names = "led-fault-irq", |
| "all-ramp-down-done-irq", |
| "all-ramp-up-done-irq"; |
| qcom,hdrm-auto-mode; |
| qcom,short-circuit-det; |
| qcom,open-circuit-det; |
| qcom,vph-droop-det; |
| qcom,thermal-derate-en; |
| qcom,thermal-derate-current = <200 500 1000>; |
| qcom,isc-delay = <192>; |
| qcom,pmic-revid = <&pm660l_revid>; |
| |
| pm660l_flash0: qcom,flash_0 { |
| label = "flash"; |
| qcom,led-name = "led:flash_0"; |
| qcom,max-current = <1500>; |
| qcom,default-led-trigger = "flash0_trigger"; |
| qcom,id = <0>; |
| qcom,current-ma = <1000>; |
| qcom,duration-ms = <1280>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_flash1: qcom,flash_1 { |
| label = "flash"; |
| qcom,led-name = "led:flash_1"; |
| qcom,max-current = <1500>; |
| qcom,default-led-trigger = "flash1_trigger"; |
| qcom,id = <1>; |
| qcom,current-ma = <1000>; |
| qcom,duration-ms = <1280>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_flash2: qcom,flash_2 { |
| label = "flash"; |
| qcom,led-name = "led:flash_2"; |
| qcom,max-current = <750>; |
| qcom,default-led-trigger = "flash2_trigger"; |
| qcom,id = <2>; |
| qcom,current-ma = <500>; |
| qcom,duration-ms = <1280>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_torch0: qcom,torch_0 { |
| label = "torch"; |
| qcom,led-name = "led:torch_0"; |
| qcom,max-current = <500>; |
| qcom,default-led-trigger = "torch0_trigger"; |
| qcom,id = <0>; |
| qcom,current-ma = <300>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_torch1: qcom,torch_1 { |
| label = "torch"; |
| qcom,led-name = "led:torch_1"; |
| qcom,max-current = <500>; |
| qcom,default-led-trigger = "torch1_trigger"; |
| qcom,id = <1>; |
| qcom,current-ma = <300>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_torch2: qcom,torch_2 { |
| label = "torch"; |
| qcom,led-name = "led:torch_2"; |
| qcom,max-current = <500>; |
| qcom,default-led-trigger = "torch2_trigger"; |
| qcom,id = <2>; |
| qcom,current-ma = <300>; |
| qcom,ires-ua = <12500>; |
| qcom,hdrm-voltage-mv = <325>; |
| qcom,hdrm-vol-hi-lo-win-mv = <100>; |
| }; |
| |
| pm660l_switch0: qcom,led_switch_0 { |
| label = "switch"; |
| qcom,led-name = "led:switch_0"; |
| qcom,led-mask = <3>; |
| qcom,default-led-trigger = "switch0_trigger"; |
| }; |
| |
| pm660l_switch1: qcom,led_switch_1 { |
| label = "switch"; |
| qcom,led-name = "led:switch_1"; |
| qcom,led-mask = <4>; |
| qcom,default-led-trigger = "switch1_trigger"; |
| }; |
| }; |
| |
| pm660l_lcdb: qpnp-lcdb@ec00 { |
| compatible = "qcom,qpnp-lcdb-regulator"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| reg = <0xec00 0x100>; |
| interrupts = <0x3 0xec 0x1 IRQ_TYPE_EDGE_RISING>; |
| interrupt-names = "sc-irq"; |
| |
| qcom,pmic-revid = <&pm660l_revid>; |
| |
| lcdb_ldo_vreg: ldo { |
| label = "ldo"; |
| regulator-name = "lcdb_ldo"; |
| regulator-min-microvolt = <4000000>; |
| regulator-max-microvolt = <6000000>; |
| }; |
| |
| lcdb_ncp_vreg: ncp { |
| label = "ncp"; |
| regulator-name = "lcdb_ncp"; |
| regulator-min-microvolt = <4000000>; |
| regulator-max-microvolt = <6000000>; |
| }; |
| }; |
| |
| pm660a_oledb: qpnp-oledb@e000 { |
| compatible = "qcom,qpnp-oledb-regulator"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| qcom,pmic-revid = <&pm660l_revid>; |
| reg = <0xe000 0x100>; |
| qcom,pbs-client = <&pm660l_pbs>; |
| |
| label = "oledb"; |
| regulator-name = "regulator-oledb"; |
| regulator-min-microvolt = <5000000>; |
| regulator-max-microvolt = <8100000>; |
| |
| qcom,swire-control; |
| qcom,ext-pin-control; |
| status = "disabled"; |
| }; |
| |
| pm660a_labibb: qpnp-labibb-regulator { |
| compatible = "qcom,qpnp-labibb-regulator"; |
| #address-cells = <1>; |
| #size-cells = <1>; |
| qcom,pmic-revid = <&pm660l_revid>; |
| qcom,swire-control; |
| status = "disabled"; |
| |
| ibb_regulator: qcom,ibb@dc00 { |
| reg = <0xdc00 0x100>; |
| reg-names = "ibb_reg"; |
| regulator-name = "ibb_reg"; |
| |
| regulator-min-microvolt = <4000000>; |
| regulator-max-microvolt = <6300000>; |
| |
| qcom,qpnp-ibb-min-voltage = <1400000>; |
| qcom,qpnp-ibb-step-size = <100000>; |
| qcom,qpnp-ibb-slew-rate = <2000000>; |
| qcom,qpnp-ibb-init-voltage = <4000000>; |
| qcom,qpnp-ibb-init-amoled-voltage = <4000000>; |
| }; |
| |
| lab_regulator: qcom,lab@de00 { |
| reg = <0xde00 0x100>; |
| reg-names = "lab"; |
| regulator-name = "lab_reg"; |
| |
| regulator-min-microvolt = <4600000>; |
| regulator-max-microvolt = <6100000>; |
| |
| qcom,qpnp-lab-min-voltage = <4600000>; |
| qcom,qpnp-lab-step-size = <100000>; |
| qcom,qpnp-lab-slew-rate = <5000>; |
| qcom,qpnp-lab-init-voltage = <4600000>; |
| qcom,qpnp-lab-init-amoled-voltage = <4600000>; |
| |
| qcom,notify-lab-vreg-ok-sts; |
| }; |
| }; |
| }; |
| }; |