blob: 390ba0de8e9d6d52943fd2680fc5709b0e4b1271 [file] [log] [blame]
/* Copyright (c) 2017-2019, 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,pmi632@2 {
compatible = "qcom,spmi-pmic";
reg = <0x2 SPMI_USID>;
#address-cells = <1>;
#size-cells = <1>;
pmi632_revid: qcom,revid@100 {
compatible = "qcom,qpnp-revid";
reg = <0x100 0x100>;
};
pmi632_pon: qcom,power-on@800 {
compatible = "qcom,qpnp-power-on";
reg = <0x800 0x100>;
qcom,secondary-pon-reset;
qcom,s3-src = "kpdpwr";
};
pmi632_vadc: vadc@3100 {
compatible = "qcom,qpnp-vadc-hc",
"qcom,qpnp-adc-hc-pm5";
reg = <0x3100 0x100>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-vdd-reference = <1875>;
qcom,adc-full-scale-code = <0x70e4>;
qcom,pmic-revid = <&pmi632_revid>;
chan@0 {
label = "ref_gnd";
reg = <0>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@1 {
label = "ref_1250v";
reg = <1>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@83 {
label = "vph_pwr";
reg = <0x83>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <1>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@84 {
label = "vbat_sns";
reg = <0x84>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <1>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@6 {
label = "die_temp";
reg = <6>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <19>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@7 {
label = "usb_in_i";
reg = <7>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <21>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@8 {
label = "usb_in_v";
reg = <8>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <8>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@9 {
label = "chg_temp";
reg = <9>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <18>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@4a {
label = "bat_therm";
reg = <0x4a>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <17>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@2a {
label = "bat_therm_PU30";
reg = <0x2a>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <24>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@6a {
label = "bat_therm_PU400";
reg = <0x6a>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <25>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@4b {
label = "bat_id";
reg = <0x4b>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@4c {
label = "xo_therm";
reg = <0x4c>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <4>;
qcom,hw-settle-time = <8>;
qcom,fast-avg-setup = <0>;
};
chan@1e {
label = "mid_chg";
reg = <0x1e>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <3>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@52 {
label = "typec_therm";
reg = <0x52>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@53 {
label = "quiet_therm";
reg = <0x53>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
chan@54 {
label = "smb_therm";
reg = <0x54>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
};
};
pmi632_adc_tm: vadc@3500 {
compatible = "qcom,qpnp-adc-tm-hc",
"qcom,qpnp-adc-tm-hc-pm5";
reg = <0x3500 0x100>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-vdd-reference = <1875>;
qcom,adc-full-scale-code = <0x70e4>;
qcom,adc_tm-vadc = <&pmi632_vadc>;
qcom,decimation = <0>;
qcom,fast-avg-setup = <0>;
#thermal-sensor-cells = <1>;
chan@53 {
label = "quiet_therm";
reg = <0x53>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <0>;
qcom,btm-channel-number = <0x60>;
qcom,thermal-node;
};
};
pmi632_tz: qcom,temp-alarm@2400 {
compatible = "qcom,qpnp-temp-alarm";
reg = <0x2400 0x100>;
interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
label = "pmi632_tz";
#thermal-sensor-cells = <0>;
};
pmi632_gpios: pinctrl@c000 {
compatible = "qcom,spmi-gpio";
reg = <0xc000 0x800>;
interrupts = <0x2 0xc0 0 IRQ_TYPE_NONE>,
<0x2 0xc1 0 IRQ_TYPE_NONE>,
<0x2 0xc2 0 IRQ_TYPE_NONE>,
<0x2 0xc3 0 IRQ_TYPE_NONE>,
<0x2 0xc4 0 IRQ_TYPE_NONE>,
<0x2 0xc5 0 IRQ_TYPE_NONE>,
<0x2 0xc6 0 IRQ_TYPE_NONE>,
<0x2 0xc7 0 IRQ_TYPE_NONE>;
interrupt-names = "pmi632_gpio1", "pmi632_gpio2",
"pmi632_gpio3", "pmi632_gpio4",
"pmi632_gpio5", "pmi632_gpio6",
"pmi632_gpio7", "pmi632_gpio8";
gpio-controller;
#gpio-cells = <2>;
};
pmi632_charger: qcom,qpnp-smb5 {
compatible = "qcom,qpnp-smb5";
#address-cells = <1>;
#size-cells = <1>;
#cooling-cells = <2>;
qcom,pmic-revid = <&pmi632_revid>;
dpdm-supply = <&qusb_phy>;
//<2020/04/24-JessicaTseng, Re-charge condition for battery to 4.3V
qcom,auto-recharge-vbat-mv = <4300>;
//qcom,auto-recharge-soc = <98>;
//>2020/04/24-JessicaTseng
qcom,chg-vadc = <&pmi632_vadc>;
qcom,flash-disable-soc = <10>;
qcom,sw-jeita-enable;
qcom,step-charging-enable;
qcom,hw-die-temp-mitigation;
qcom,hw-connector-mitigation;
qcom,connector-internal-pull-kohm = <100>;
//<2020/04/28-JessicaTseng, Add condition of charging current for thermal-mitigation
qcom,thermal-mitigation
= <2000000 1500000 1000000 500000
500000 500000>;
//>2020/04/28-JessicaTseng
//<2020/06/04-JessicaTseng, modify charging termination current
qcom,chg-term-src = <1>;
qcom,chg-term-current-ma = <(-100)>;
//>2020/06/04-JessicaTseng
qcom,chgr@1000 {
reg = <0x1000 0x100>;
interrupts =
<0x2 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x3 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x5 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "chgr-error",
"chg-state-change",
"step-chg-state-change",
"step-chg-soc-update-fail",
"step-chg-soc-update-req",
"fg-fvcal-qualified",
"vph-alarm",
"vph-drop-prechg";
};
qcom,dcdc@1100 {
reg = <0x1100 0x100>;
interrupts =
<0x2 0x11 0x0 IRQ_TYPE_EDGE_RISING>,
<0x2 0x11 0x1 IRQ_TYPE_EDGE_RISING>,
<0x2 0x11 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x11 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x11 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x11 0x5 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x11 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0x11 0x7 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "otg-fail",
"otg-oc-disable-sw",
"otg-oc-hiccup",
"bsm-active",
"high-duty-cycle",
"input-current-limiting",
"concurrent-mode-disable",
"switcher-power-ok";
};
qcom,batif@1200 {
reg = <0x1200 0x100>;
interrupts =
<0x2 0x12 0x0 IRQ_TYPE_EDGE_RISING>,
<0x2 0x12 0x1 IRQ_TYPE_EDGE_RISING>,
<0x2 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x12 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x12 0x5 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x12 0x6 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x12 0x7 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "bat-temp",
"all-chnl-conv-done",
"bat-ov",
"bat-low",
"bat-therm-or-id-missing",
"bat-terminal-missing",
"buck-oc",
"vph-ov";
};
qcom,usb@1300 {
reg = <0x1300 0x100>;
interrupts =
<0x2 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x13 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x13 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x13 0x5 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x13 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0x13 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "usbin-collapse",
"usbin-vashdn",
"usbin-uv",
"usbin-ov",
"usbin-plugin",
"usbin-revi-change",
"usbin-src-change",
"usbin-icl-change";
};
qcom,typec@1500 {
reg = <0x1500 0x100>;
interrupts =
<0x2 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x3 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "typec-or-rid-detect-change",
"typec-vpd-detect",
"typec-cc-state-change",
"typec-vconn-oc",
"typec-vbus-change",
"typec-attach-detach",
"typec-legacy-cable-detect",
"typec-try-snk-src-detect";
};
qcom,misc@1600 {
reg = <0x1600 0x100>;
interrupts =
<0x2 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x4 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0x16 0x7 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "wdog-snarl",
"wdog-bark",
"aicl-fail",
"aicl-done",
"smb-en",
"imp-trigger",
"temp-change",
"temp-change-smb";
};
qcom,schgm-flash@a600 {
reg = <0xa600 0x100>;
interrupts =
<0x2 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
<0x2 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
<0x2 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "flash-state-change",
"ilim1-s1",
"ilim2-s2",
"vreg-ok";
};
smb5_vbus: qcom,smb5-vbus {
regulator-name = "smb5-vbus";
};
};
pmi632_qg: qpnp,qg {
compatible = "qcom,qpnp-qg";
#address-cells = <1>;
#size-cells = <1>;
//<2020/06/04-JessicaTseng, modify charging termination current
//qcom,qg-iterm-ma = <100>;
qcom,qg-iterm-ma = <150>;
//>2020/06/04-JessicaTseng
//<2020/04/24-JessicaTseng, Re-charge condition for battery to 4.3V
//qcom,hold-soc-while-full;
//qcom,linearize-soc;
//>2020/04/24-JessicaTseng
qcom,qg-vadc = <&pmi632_vadc>;
qcom,pmic-revid = <&pmi632_revid>;
qcom,qgauge@4800 {
status = "okay";
reg = <0x4800 0x100>;
interrupts =
<0x2 0x48 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x48 0x1 IRQ_TYPE_EDGE_BOTH>,
<0x2 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
<0x2 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
<0x2 0x48 0x4 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "qg-batt-missing",
"qg-vbat-low",
"qg-vbat-empty",
"qg-fifo-done",
"qg-good-ocv";
};
qcom,qg-sdam@b100 {
status = "okay";
reg = <0xb100 0x100>;
};
};
bcl_sensor: bcl@3d00 {
compatible = "qcom,bcl-v5";
reg = <0x3d00 0x100>;
interrupts = <0x2 0x3d 0x0 IRQ_TYPE_NONE>,
<0x2 0x3d 0x1 IRQ_TYPE_NONE>,
<0x2 0x3d 0x0 IRQ_TYPE_NONE>,
<0x2 0x3d 0x1 IRQ_TYPE_NONE>,
<0x2 0x3d 0x2 IRQ_TYPE_NONE>;
interrupt-names = "bcl-ibat-lvl0",
"bcl-ibat-lvl1",
"bcl-vbat-lvl0",
"bcl-vbat-lvl1",
"bcl-vbat-lvl2";
#thermal-sensor-cells = <1>;
};
bcl_soc: bcl-soc {
compatible = "qcom,msm-bcl-soc";
#thermal-sensor-cells = <0>;
};
pmi632_pbs_client3: qcom,pbs@7400 {
compatible = "qcom,qpnp-pbs";
reg = <0x7400 0x100>;
};
pmi632_sdam7: qcom,sdam@b600 {
compatible = "qcom,spmi-sdam";
reg = <0xb600 0x100>;
};
};
pmi632_3: qcom,pmi632@3 {
compatible ="qcom,spmi-pmic";
reg = <0x3 SPMI_USID>;
#address-cells = <1>;
#size-cells = <1>;
pmi632_vib: qcom,vibrator@5700 {
compatible = "qcom,qpnp-vibrator-ldo";
reg = <0x5700 0x100>;
qcom,vib-ldo-volt-uv = <3000000>;
qcom,disable-overdrive;
};
pmi632_pwm: qcom,pwms@b300 {
compatible = "qcom,pwm-lpg";
reg = <0xb300 0x500>;
reg-names = "lpg-base";
#pwm-cells = <2>;
nvmem-names = "ppg_sdam";
nvmem = <&pmi632_sdam7>;
qcom,pbs-client = <&pmi632_pbs_client3>;
qcom,lut-sdam-base = <0x80>;
//<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
#if 1
qcom,lut-patterns = <0 0 0 0 0 0 0 0 2 16 30 44 58 72 86 96 100 100
100 100 96 86 72 58 44 30 16 2 0 0 0 0 0 0 0 0>;
#else
/* Code default */
qcom,lut-patterns = <0 0 0 14 28 42 56 70 84 100
100 84 70 56 42 28 14 0 0 0>;
#endif
//>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
lpg@1 {
qcom,lpg-chan-id = <1>;
//<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
#if 1
qcom,ramp-step-ms = <60>;
qcom,ramp-pause-hi-count = <80>;
qcom,ramp-pause-lo-count = <80>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <35>;
//qcom,ramp-toggle; /* ramp from high to low */
//qcom,ramp-from-low-to-high;
qcom,ramp-pattern-repeat;
#else
/* Code default */
qcom,ramp-step-ms = <200>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <19>;
qcom,ramp-pattern-repeat;
#endif
//>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
qcom,lpg-sdam-base = <0x48>;
};
lpg@2 {
qcom,lpg-chan-id = <2>;
//<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
#if 1
qcom,ramp-step-ms = <60>;
qcom,ramp-pause-hi-count = <80>;
qcom,ramp-pause-lo-count = <80>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <35>;
//qcom,ramp-toggle; /* ramp from high to low */
//qcom,ramp-from-low-to-high;
qcom,ramp-pattern-repeat;
#else
/* Code default */
qcom,ramp-step-ms = <200>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <19>;
qcom,ramp-pattern-repeat;
#endif
//>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
qcom,lpg-sdam-base = <0x56>;
};
lpg@3 {
qcom,lpg-chan-id = <3>;
//<2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][]Modified for breath ramp and timing.
#if 1
qcom,ramp-step-ms = <60>;
qcom,ramp-pause-hi-count = <80>;
qcom,ramp-pause-lo-count = <80>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <35>;
//qcom,ramp-toggle; /* ramp from high to low */
//qcom,ramp-from-low-to-high;
qcom,ramp-pattern-repeat;
#else
/* Code default */
qcom,ramp-step-ms = <200>;
qcom,ramp-low-index = <0>;
qcom,ramp-high-index = <19>;
qcom,ramp-pattern-repeat;
#endif
//>2020/04/21-Yuting Shih.[FAIRPHONE-Q][MISC][COMMON][LED][][].
qcom,lpg-sdam-base = <0x64>;
};
};
pmi632_rgb: qcom,leds@d000 {
compatible = "qcom,tri-led";
reg = <0xd000 0x100>;
red {
label = "red";
pwms = <&pmi632_pwm 0 1000000>;
led-sources = <0>;
linux,default-trigger = "timer";
};
green {
label = "green";
pwms = <&pmi632_pwm 1 1000000>;
led-sources = <1>;
linux,default-trigger = "timer";
};
blue {
label = "blue";
pwms = <&pmi632_pwm 2 1000000>;
led-sources = <2>;
linux,default-trigger = "timer";
};
};
pmi632_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 = <&pmi632_revid>;
qcom,voltage-step-ramp;
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>;
};
lcdb_bst_vreg: bst {
label = "bst";
regulator-name = "lcdb_bst";
regulator-min-microvolt = <4700000>;
regulator-max-microvolt = <6275000>;
};
};
flash_led: qcom,leds@d300 {
compatible = "qcom,qpnp-flash-led-v2";
status = "okay";
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,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 = <&pmi632_revid>;
pmi632_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 = <400>;
qcom,hdrm-vol-hi-lo-win-mv = <100>;
};
pmi632_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 = <400>;
qcom,hdrm-vol-hi-lo-win-mv = <100>;
};
pmi632_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 = <400>;
qcom,hdrm-vol-hi-lo-win-mv = <100>;
};
pmi632_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 = <400>;
qcom,hdrm-vol-hi-lo-win-mv = <100>;
};
pmi632_switch0: qcom,led_switch_0 {
label = "switch";
qcom,led-name = "led:switch_0";
qcom,led-mask = <3>;
qcom,default-led-trigger = "switch0_trigger";
};
pmi632_switch1: qcom,led_switch_1 {
label = "switch";
qcom,led-name = "led:switch_1";
qcom,led-mask = <2>;
qcom,default-led-trigger = "switch1_trigger";
};
};
};
};
&soc {
led_flash0: qcom,camera-flash {
cell-index = <0>;
compatible = "qcom,camera-flash";
qcom,flash-type = <1>;
qcom,flash-source = <&pmi632_flash0 &pmi632_flash1>;
qcom,torch-source = <&pmi632_torch0 &pmi632_torch1>;
qcom,switch-source = <&pmi632_switch0>;
};
};
&thermal_zones {
pmi-ibat-lvl0 {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&bcl_sensor 0>;
wake-capable-sensor;
trips {
pmi632_ibat_lvl0: ibat-lvl0 {
temperature = <4000>;
hysteresis = <200>;
type = "passive";
};
};
};
pmi-ibat-lvl1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&bcl_sensor 1>;
wake-capable-sensor;
trips {
ibat-lvl1 {
temperature = <4200>;
hysteresis = <200>;
type = "passive";
};
};
};
pmi-vbat-lvl0 {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-governor = "low_limits_cap";
thermal-sensors = <&bcl_sensor 2>;
wake-capable-sensor;
tracks-low;
trips {
pmi632_vbat_lvl0: vbat-lvl0 {
temperature = <3000>;
hysteresis = <100>;
type = "passive";
};
};
};
pmi-vbat-lvl1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "low_limits_cap";
thermal-sensors = <&bcl_sensor 3>;
wake-capable-sensor;
tracks-low;
trips {
vbat-lvl1 {
temperature = <2800>;
hysteresis = <100>;
type = "passive";
};
};
};
pmi-vbat-lvl2 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "low_limits_cap";
thermal-sensors = <&bcl_sensor 4>;
wake-capable-sensor;
tracks-low;
trips {
vbat-lvl1 {
temperature = <2600>;
hysteresis = <100>;
type = "passive";
};
};
};
soc {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-governor = "low_limits_cap";
thermal-sensors = <&bcl_soc>;
wake-capable-sensor;
tracks-low;
trips {
pmi632_low_soc: low-soc {
temperature = <10>;
hysteresis = <0>;
type = "passive";
};
};
};
pmi632_tz {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&pmi632_tz>;
wake-capable-sensor;
trips {
pmi632_tz_trip0: pmi632-trip0 {
temperature = <105000>;
hysteresis = <0>;
type = "passive";
};
pmi632_tz_trip1: pmi632-trip1 {
temperature = <125000>;
hysteresis = <0>;
type = "passive";
};
pmi632_tz_trip2: pmi632-trip2 {
temperature = <145000>;
hysteresis = <0>;
type = "passive";
};
};
};
};