@ -11,6 +11,7 @@
*/
#include <dt-bindings/spmi/spmi.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/interrupt-controller/irq.h>
&spmi_bus {
@ -59,105 +60,39 @@
};
};
qcom,temp-alarm@2400 {
compatible = "qcom,qpnp -temp-alarm";
pm660_tz: qcom,temp-alarm@2400 {
compatible = "qcom,spmi -temp-alarm";
reg = <0x2400 0x100>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
label = "pm660_tz";
qcom,channel-num = <6>;
qcom,temp_alarm-vadc = <&pm660_vadc>;
#thermal-sensor-cells = <0>;
qcom,temperature-threshold-set = <1>;
};
pm660_gpios: gpios {
compatible = "qcom,qpnp-pin";
pm660_gpios: pinctrl@c000 {
compatible = "qcom,spmi-gpio";
reg = <0xc000 0xd00>;
interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
<0x0 0xc1 0 IRQ_TYPE_NONE>,
<0x0 0xc2 0 IRQ_TYPE_NONE>,
<0x0 0xc3 0 IRQ_TYPE_NONE>,
<0x0 0xc4 0 IRQ_TYPE_NONE>,
<0x0 0xc5 0 IRQ_TYPE_NONE>,
<0x0 0xc6 0 IRQ_TYPE_NONE>,
<0x0 0xc7 0 IRQ_TYPE_NONE>,
<0x0 0xc8 0 IRQ_TYPE_NONE>,
<0x0 0xc9 0 IRQ_TYPE_NONE>,
<0x0 0xca 0 IRQ_TYPE_NONE>,
<0x0 0xcb 0 IRQ_TYPE_NONE>,
<0x0 0xcc 0 IRQ_TYPE_NONE>;
interrupt-names = "pm660_gpio1", "pm660_gpio2",
"pm660_gpio3", "pm660_gpio4",
"pm660_gpio5", "pm660_gpio6",
"pm660_gpio7", "pm660_gpio8",
"pm660_gpio9", "pm660_gpio10",
"pm660_gpio11", "pm660_gpio12",
"pm660_gpio13";
gpio-controller;
#gpio-cells = <2>;
#address-cells = <1>;
#size-cells = <1>;
label = "pm660-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";
};
gpio@cc00 {
reg = <0xcc00 0x100>;
qcom,pin-num = <13>;
status = "disabled";
};
};
pm660_coincell: qcom,coincell@2800 {
compatible = "qcom,qpnp-coincell";
reg = <0x2800 0x100>;
};
pm660_rtc: qcom,pm660_rtc {
@ -177,140 +112,91 @@
};
pm660_vadc: vadc@3100 {
compatible = "qcom,qpnp-vadc-hc ";
compatible = "qcom,spmi-adc-rev2 ";
reg = <0x3100 0x100>;
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-bit-resolution = <15 >;
qcom,adc-vdd-reference = <1875> ;
#io-channel-cells = <1 >;
io-channel-ranges ;
chan@6 {
/* Channel nodes */
die_temp {
reg = <ADC_DIE_TEMP>;
label = "die_temp";
reg = <6>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <3>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
qcom,pre-scaling = <1 1>;
};
chan@0 {
ref_gnd {
reg = <ADC_REF_GND>;
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 {
qcom,pre-scaling = <1 1>;
};
vref_1p25 {
reg = <ADC_1P25VREF>;
label = "vref_1p25";
qcom,pre-scaling = <1 1>;
};
vph_pwr {
reg = <ADC_VPH_PWR>;
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,pre-scaling = <1 3>;
};
chan@85 {
vcoin {
reg = <ADC_VCOIN>;
label = "vcoin";
reg = <0x85>;
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,pre-scaling = <1 3>;
};
chan@4c {
xo_therm {
reg = <ADC_XO_THERM_PU2>;
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 = <2>;
qcom,fast-avg-setup = <0>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
chan@4d {
msm_therm{
reg = <ADC_AMUX_THM1_PU2>;
label = "msm_therm";
reg = <0x4d>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,fast-avg-setup = <0>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
chan@51 {
quiet_therm{
reg = <ADC_AMUX_THM5_PU2>;
label = "quiet_therm";
reg = <0x51>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,fast-avg-setup = <0>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
chan@4e {
emmc_therm{
reg = <ADC_AMUX_THM2_PU2>;
label = "emmc_therm";
reg = <0x4e>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,fast-avg-setup = <0>;
qcom,vadc-thermal-node;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
chan@4f {
pa_therm0{
reg = <ADC_AMUX_THM3_PU2>;
label = "pa_therm0";
reg = <0x4f>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,fast-avg-setup = <0>;
qcom,vadc-thermal-node;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
chan@1d {
drax_temp{
reg = <ANA_IN>;
label = "drax_temp";
reg = <0x1d>;
qcom,decimation = <2>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "absolute";
qcom,scale-function = <3>;
qcom,hw-settle-time = <0>;
qcom,fast-avg-setup = <0>;
qcom,cal-val = <0>;
qcom,pre-scaling = <1 1>;
};
};
@ -476,60 +362,14 @@
};
pm660_adc_tm: vadc@3400 {
compatible = "qcom,qpnp-adc-tm-hc ";
compatible = "qcom,adc-tm5 ";
reg = <0x3400 0x100>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "thr-int-en";
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "eoc-int-en-set";
qcom,adc-bit-resolution = <15>;
qcom,adc-vdd-reference = <1875>;
qcom,adc_tm-vadc = <&pm660_vadc>;
qcom,decimation = <0>;
qcom,fast-avg-setup = <0>;
chan@83 {
label = "vph_pwr";
reg = <0x83>;
qcom,pre-div-channel-scaling = <1>;
qcom,calibration-type = "absolute";
qcom,scale-function = <0>;
qcom,hw-settle-time = <0>;
qcom,btm-channel-number = <0x60>;
};
chan@4d {
label = "msm_therm";
reg = <0x4d>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,btm-channel-number = <0x68>;
qcom,thermal-node;
};
chan@51 {
label = "quiet_therm";
reg = <0x51>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <2>;
qcom,hw-settle-time = <2>;
qcom,btm-channel-number = <0x70>;
qcom,thermal-node;
};
chan@4c {
label = "xo_therm";
reg = <0x4c>;
qcom,pre-div-channel-scaling = <0>;
qcom,calibration-type = "ratiometric";
qcom,scale-function = <4>;
qcom,hw-settle-time = <2>;
qcom,btm-channel-number = <0x78>;
qcom,thermal-node;
};
#thermal-sensor-cells = <1>;
qcom,pmic-revid = <&pm660_revid>;
};
pm660_rradc: rradc@4500 {
@ -630,28 +470,98 @@
#size-cells = <0>;
pm660_haptics: qcom,haptic@c000 {
compatible = "qcom,qpnp-haptic ";
compatible = "qcom,pm660-haptics ";
reg = <0xc000 0x100>;
interrupts = <0x1 0xc0 0x0 IRQ_TYPE_EDGE_BOTH>,
<0x1 0xc0 0x1 IRQ_TYPE_EDGE_BOTH>;
interrupt-names = "sc-irq", "play-irq";
qcom,pmic-revid = <&pm660_revid>;
qcom,pmic-misc = <&pm660_misc>;
qcom,misc-clk-trim-error-reg = <0xf3>;
interrupt-names = "hap-sc-irq", "hap-play-irq";
qcom,actuator-type = "lra";
qcom,play-mode = "direct";
qcom,vmax-mv = <3200>;
qcom,ilim-ma = <800>;
qcom,wave-shape = "square";
qcom,wave-play-rate-us = <6667>;
qcom,int-pwm-freq-khz = <505>;
qcom,sc-debounce-cycles = <8>;
qcom,en-brake;
qcom,brake-pattern = [03 03 00 00];
qcom,lra-high-z = "opt0";
qcom,lra-auto-res-mode = "qwd";
qcom,lra-calibrate-at-eop = <0>;
qcom,correct-lra-drive-freq;
qcom,play-rate-us = <6667>;
qcom,lra-resonance-sig-shape = "sine";
qcom,lra-auto-resonance-mode = "qwd";
qcom,lra-allow-variable-play-rate;
wf_0 {
/* CLICK */
qcom,effect-id = <0>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [3e 3e 3e];
qcom,wf-play-rate-us = <6667>;
qcom,wf-brake-pattern = [01 00 00 00];
qcom,lra-auto-resonance-disable;
};
wf_1 {
/* DOUBLE CLICK */
qcom,effect-id = <1>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 02 02 02 02 02 02];
qcom,wf-play-rate-us = <7143>;
qcom,wf-repeat-count = <2>;
qcom,wf-s-repeat-count = <1>;
qcom,lra-auto-resonance-disable;
};
wf_2 {
/* TICK */
qcom,effect-id = <2>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e];
qcom,wf-play-rate-us = <4000>;
qcom,lra-auto-resonance-disable;
};
wf_3 {
/* THUD */
qcom,effect-id = <3>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 7e];
qcom,wf-play-rate-us = <6667>;
qcom,lra-auto-resonance-disable;
};
wf_4 {
/* POP */
qcom,effect-id = <4>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e];
qcom,wf-play-rate-us = <5000>;
qcom,lra-auto-resonance-disable;
};
wf_5 {
/* HEAVY CLICK */
qcom,effect-id = <5>;
qcom,wf-vmax-mv = <3600>;
qcom,wf-pattern = [7e 7e 7e];
qcom,wf-play-rate-us = <6667>;
qcom,wf-brake-pattern = [03 00 00 00];
qcom,lra-auto-resonance-disable;
};
};
};
};
&thermal_zones {
pm660_temp_alarm: pm660-tz {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-governor = "step_wise";
thermal-sensors = <&pm660_tz>;
wake-capable-sensor;
trips {
pm660_trip0: trip0 {
temperature = <95000>;
hysteresis = <0>;
type = "passive";
};
pm660_trip1: trip1 {
temperature = <115000>;
hysteresis = <0>;
type = "passive";
};
trip2 {
temperature = <145000>;
hysteresis = <0>;
type = "passive";
};
};
};
};