mirror of
https://github.com/Evolution-X-Devices/kernel_oneplus_sm8550-devicetrees
synced 2026-01-31 22:47:58 +00:00
ARM: dts: qcom: Add pmic peripheral support for SCUBA
Add pmic peripherals support for SCUBA. Change-Id: I73c56e37d28a0dfd2b6ddbdf27f01a8102fb8795
This commit is contained in:
378
qcom/pm2250.dtsi
Normal file
378
qcom/pm2250.dtsi
Normal file
@@ -0,0 +1,378 @@
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/input/qcom,qpnp-power-on.h>
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/spmi/spmi.h>
|
||||
#include <dt-bindings/iio/qcom,spmi-vadc.h>
|
||||
|
||||
&spmi_bus {
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <4>;
|
||||
|
||||
qcom,pm2250@0 {
|
||||
compatible = "qcom,spmi-pmic";
|
||||
reg = <0 SPMI_USID>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
qcom,power-on@800 {
|
||||
compatible = "qcom,qpnp-power-on";
|
||||
reg = <0x800>;
|
||||
interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
|
||||
interrupt-names = "kpdpwr", "resin";
|
||||
qcom,pon-dbc-delay = <15625>;
|
||||
qcom,kpdpwr-sw-debounce;
|
||||
qcom,system-reset;
|
||||
qcom,store-hard-reset-reason;
|
||||
|
||||
qcom,pon_1 {
|
||||
qcom,pon-type = <PON_POWER_ON_TYPE_KPDPWR>;
|
||||
qcom,pull-up = <1>;
|
||||
linux,code = <KEY_POWER>;
|
||||
};
|
||||
|
||||
qcom,pon_2 {
|
||||
qcom,pon-type = <PON_POWER_ON_TYPE_RESIN>;
|
||||
qcom,pull-up = <1>;
|
||||
linux,code = <KEY_VOLUMEDOWN>;
|
||||
};
|
||||
};
|
||||
|
||||
pm2250_tz: qcom,temp-alarm@2400 {
|
||||
compatible = "qcom,spmi-temp-alarm";
|
||||
reg = <0x2400>;
|
||||
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
|
||||
io-channels = <&pm2250_vadc ADC5_DIE_TEMP>;
|
||||
io-channel-names = "thermal";
|
||||
#thermal-sensor-cells = <0>;
|
||||
qcom,temperature-threshold-set = <1>;
|
||||
};
|
||||
|
||||
pm2250_vadc: vadc@3100 {
|
||||
compatible = "qcom,spmi-adc5-lite";
|
||||
reg = <0x3100>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "eoc-int-en-set";
|
||||
#io-channel-cells = <1>;
|
||||
io-channel-ranges;
|
||||
|
||||
/* Channel nodes */
|
||||
ref_gnd {
|
||||
reg = <ADC5_REF_GND>;
|
||||
label = "ref_gnd";
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
vref_1p25 {
|
||||
reg = <ADC5_1P25VREF>;
|
||||
label = "vref_1p25";
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
die_temp {
|
||||
reg = <ADC5_DIE_TEMP>;
|
||||
label = "die_temp";
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
vph_pwr {
|
||||
reg = <ADC5_VPH_PWR>;
|
||||
label = "vph_pwr";
|
||||
qcom,pre-scaling = <1 3>;
|
||||
};
|
||||
|
||||
vbat_sns {
|
||||
reg = <ADC5_VBAT_SNS>;
|
||||
label = "vbat_sns";
|
||||
qcom,pre-scaling = <1 3>;
|
||||
};
|
||||
|
||||
usb_in_v_div_16 {
|
||||
reg = <ADC5_USB_IN_V_16>;
|
||||
label = "usb_in_v_div_16";
|
||||
qcom,pre-scaling = <1 16>;
|
||||
};
|
||||
|
||||
chg_temp {
|
||||
reg = <ADC5_CHG_TEMP>;
|
||||
label = "chg_temp";
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
bat_therm {
|
||||
reg = <ADC5_BAT_THERM_100K_PU>;
|
||||
label = "bat_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
bat_therm_30k {
|
||||
reg = <ADC5_BAT_THERM_30K_PU>;
|
||||
label = "bat_therm_30k";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
bat_therm_400k {
|
||||
reg = <ADC5_BAT_THERM_400K_PU>;
|
||||
label = "bat_therm_400k";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
i_parallel {
|
||||
reg = <ADC5_PARALLEL_ISENSE>;
|
||||
label = "i_parallel";
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
bat_id {
|
||||
reg = <ADC5_BAT_ID_100K_PU>;
|
||||
label = "bat_id";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
die_temp_s3 {
|
||||
reg = <ADC5_SBUx>;
|
||||
label = "die_temp_s3";
|
||||
qcom,pre-scaling = <1 3>;
|
||||
qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM2250_S3_DIE_TEMP>;
|
||||
};
|
||||
};
|
||||
|
||||
pm2250_gpios: pinctrl@c000 {
|
||||
compatible = "qcom,pm2250-gpio";
|
||||
reg = <0xc000>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
};
|
||||
|
||||
pm2250_rtc: qcom,pm2250_rtc {
|
||||
compatible = "qcom,pm8941-rtc";
|
||||
reg = <0x6000>, <0x6100>;
|
||||
reg-names = "rtc", "alarm";
|
||||
interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
|
||||
};
|
||||
|
||||
pm2250_qg: qpnp,qg {
|
||||
compatible = "qcom,qpnp-qg-lite";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
qcom,vbatt-cutoff-mv = <3400>;
|
||||
qcom,vbatt-low-mv = <3500>;
|
||||
qcom,vbatt-low-cold-mv = <3800>;
|
||||
qcom,vbatt-empty-mv = <3200>;
|
||||
qcom,vbatt-empty-cold-mv = <3000>;
|
||||
qcom,s3-entry-fifo-length = <2>;
|
||||
|
||||
io-channels = <&pm2250_vadc ADC5_BAT_THERM_100K_PU>,
|
||||
<&pm2250_vadc ADC5_BAT_ID_100K_PU>;
|
||||
io-channel-names = "batt-therm", "batt-id";
|
||||
|
||||
qcom,qgauge@4800 {
|
||||
status = "okay";
|
||||
reg = <0x4800>;
|
||||
interrupts =
|
||||
<0x0 0x48 0x2 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x48 0x3 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x48 0x5 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "qg-vbat-empty",
|
||||
"qg-fifo-done",
|
||||
"qg-good-ocv";
|
||||
};
|
||||
|
||||
qcom,qg-sdam@b600 {
|
||||
status = "okay";
|
||||
reg = <0xb600>;
|
||||
};
|
||||
};
|
||||
|
||||
pm2250_charger: qcom,qpnp-smblite {
|
||||
compatible = "qcom,qpnp-smblite";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#cooling-cells = <2>;
|
||||
|
||||
qcom,chgr@1000 {
|
||||
reg = <0x1000>;
|
||||
interrupts =
|
||||
<0x0 0x10 0x1 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x10 0x0 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x10 0x4 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x10 0x7 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
interrupt-names = "chgr-error",
|
||||
"chg-state-change",
|
||||
"buck-oc",
|
||||
"vph-ov";
|
||||
};
|
||||
|
||||
qcom,batif@1200 {
|
||||
reg = <0x1200>;
|
||||
interrupts =
|
||||
<0x0 0x12 0x0 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 0x1 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 0x2 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 0x3 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x12 0x4 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
interrupt-names = "bat-temp",
|
||||
"bat-therm-or-id-missing",
|
||||
"bat-low",
|
||||
"bat-ov",
|
||||
"bsm-active";
|
||||
};
|
||||
|
||||
qcom,usb@1300 {
|
||||
reg = <0x1300>;
|
||||
interrupts =
|
||||
<0x0 0x13 0x0 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 0x1 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 0x2 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 0x3 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x13 0x4 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x13 0x6 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
interrupt-names = "usbin-plugin",
|
||||
"usbin-collapse",
|
||||
"usbin-uv",
|
||||
"usbin-ov",
|
||||
"usbin-gtvt",
|
||||
"usbin-icl-change";
|
||||
};
|
||||
|
||||
qcom,typec@1500 {
|
||||
reg = <0x1500>;
|
||||
interrupts =
|
||||
<0x0 0x15 0x0 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x15 0x1 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x15 0x2 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x15 0x4 IRQ_TYPE_EDGE_BOTH>,
|
||||
<0x0 0x15 0x5 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x15 0x6 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x15 0x7 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
interrupt-names = "typec-or-rid-detect-change",
|
||||
"typec-vpd-detect",
|
||||
"typec-cc-state-change",
|
||||
"typec-vbus-change",
|
||||
"typec-attach-detach",
|
||||
"typec-legacy-cable-detect",
|
||||
"typec-try-snk-src-detect";
|
||||
};
|
||||
|
||||
qcom,misc@1600 {
|
||||
reg = <0x1600>;
|
||||
interrupts =
|
||||
<0x0 0x16 0x0 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x1 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x2 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x3 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x4 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x5 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0x16 0x6 IRQ_TYPE_EDGE_BOTH>;
|
||||
|
||||
interrupt-names = "wdog-snarl",
|
||||
"wdog-bark",
|
||||
"aicl-fail",
|
||||
"aicl-done",
|
||||
"imp-trigger",
|
||||
"all-chnl-cond-done",
|
||||
"temp-change";
|
||||
};
|
||||
|
||||
qcom,schgm-flashlite@a600 {
|
||||
reg = <0xa600>;
|
||||
interrupts =
|
||||
<0x0 0xa6 0x2 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0xa6 0x5 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0xa6 0x6 IRQ_TYPE_EDGE_RISING>,
|
||||
<0x0 0xa6 0x7 IRQ_TYPE_EDGE_BOTH>;
|
||||
|
||||
interrupt-names = "flash-state-change",
|
||||
"ilim1-s1",
|
||||
"ilim2-s2",
|
||||
"vreg-ok";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pm2250_1: qcom,pm2250@1 {
|
||||
compatible = "qcom,spmi-pmic";
|
||||
reg = <1 SPMI_USID>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
pm2250_vib: qcom,vibrator@5600 {
|
||||
compatible = "qcom,qpnp-vibrator-ldo";
|
||||
reg = <0x5600>;
|
||||
qcom,vib-ldo-volt-uv = <3000000>;
|
||||
qcom,disable-overdrive;
|
||||
};
|
||||
|
||||
pm2250_pwm1: qcom,pwms@bc00 {
|
||||
compatible = "qcom,pwm-lpg";
|
||||
reg = <0xbc00>;
|
||||
reg-names = "lpg-base";
|
||||
qcom,num-lpg-channels = <1>;
|
||||
#pwm-cells = <2>;
|
||||
};
|
||||
|
||||
pm2250_pwm2: qcom,pwms@bd00 {
|
||||
compatible = "qcom,pwm-lpg";
|
||||
reg = <0xbd00>;
|
||||
reg-names = "lpg-base";
|
||||
qcom,num-lpg-channels = <1>;
|
||||
#pwm-cells = <2>;
|
||||
};
|
||||
|
||||
pm2250_pwm3: qcom,pwms@be00 {
|
||||
compatible = "qcom,pwm-lpg";
|
||||
reg = <0xbe00>;
|
||||
reg-names = "lpg-base";
|
||||
qcom,num-lpg-channels = <1>;
|
||||
#pwm-cells = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&thermal_zones {
|
||||
pm2250-tz {
|
||||
polling-delay-passive = <100>;
|
||||
polling-delay = <0>;
|
||||
thermal-governor = "step_wise";
|
||||
thermal-sensors = <&pm2250_tz>;
|
||||
|
||||
trips {
|
||||
pm2250_trip0: trip0 {
|
||||
temperature = <95000>;
|
||||
hysteresis = <0>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
pm2250_trip1: trip1 {
|
||||
temperature = <115000>;
|
||||
hysteresis = <0>;
|
||||
type = "passive";
|
||||
};
|
||||
|
||||
trip2 {
|
||||
temperature = <145000>;
|
||||
hysteresis = <0>;
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
152
qcom/scuba_auto-pmic.dtsi
Normal file
152
qcom/scuba_auto-pmic.dtsi
Normal file
@@ -0,0 +1,152 @@
|
||||
#include "pm2250.dtsi"
|
||||
|
||||
&pm2250_gpios {
|
||||
skin_therm {
|
||||
skin_therm_default: skin_therm_default {
|
||||
pins = "gpio5";
|
||||
bias-high-impedance;
|
||||
};
|
||||
};
|
||||
|
||||
conn_therm {
|
||||
conn_therm_default: conn_therm_default {
|
||||
pins = "gpio6";
|
||||
bias-high-impedance;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&pm2250_vadc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&conn_therm_default &skin_therm_default>;
|
||||
|
||||
xo_therm {
|
||||
reg = <ADC5_XO_THERM_100K_PU>;
|
||||
label = "xo_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
pa_therm {
|
||||
reg = <ADC5_AMUX_THM1_100K_PU>;
|
||||
label = "pa_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
quiet_therm {
|
||||
reg = <ADC5_AMUX_THM2_100K_PU>;
|
||||
label = "quiet_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
msm_therm {
|
||||
reg = <ADC5_AMUX_THM3_100K_PU>;
|
||||
label = "msm_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
skin_therm {
|
||||
reg = <ADC5_GPIO3_100K_PU>;
|
||||
label = "skin_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
conn_therm {
|
||||
reg = <ADC5_GPIO4_100K_PU>;
|
||||
label = "conn_therm";
|
||||
qcom,ratiometric;
|
||||
qcom,hw-settle-time = <200>;
|
||||
qcom,pre-scaling = <1 1>;
|
||||
};
|
||||
|
||||
/delete-node/ vbat_sns;
|
||||
/delete-node/ usb_in_v_div_16;
|
||||
/delete-node/ chg_temp;
|
||||
/delete-node/ bat_therm;
|
||||
/delete-node/ bat_therm_30k;
|
||||
/delete-node/ bat_therm_400k;
|
||||
/delete-node/ i_parallel;
|
||||
/delete-node/ bat_id;
|
||||
/delete-node/ die_temp_s3;
|
||||
};
|
||||
|
||||
&spmi_bus {
|
||||
qcom,pm2250@0 {
|
||||
pm2250_adc_tm_iio: adc_tm@3400 {
|
||||
compatible = "qcom,spmi-adc-tm5-iio";
|
||||
reg = <0x3400>;
|
||||
#thermal-sensor-cells = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
xo_therm {
|
||||
reg = <0>;
|
||||
io-channels = <&pm2250_vadc ADC5_XO_THERM_100K_PU>;
|
||||
};
|
||||
|
||||
pa_therm {
|
||||
reg = <1>;
|
||||
io-channels = <&pm2250_vadc ADC5_AMUX_THM1_100K_PU>;
|
||||
};
|
||||
|
||||
quiet_therm {
|
||||
reg = <2>;
|
||||
io-channels = <&pm2250_vadc ADC5_AMUX_THM2_100K_PU>;
|
||||
};
|
||||
|
||||
msm_therm {
|
||||
reg = <3>;
|
||||
io-channels = <&pm2250_vadc ADC5_AMUX_THM3_100K_PU>;
|
||||
};
|
||||
|
||||
skin_therm {
|
||||
reg = <4>;
|
||||
io-channels = <&pm2250_vadc ADC5_GPIO3_100K_PU>;
|
||||
};
|
||||
|
||||
conn_therm {
|
||||
reg = <5>;
|
||||
io-channels = <&pm2250_vadc ADC5_GPIO4_100K_PU>;
|
||||
};
|
||||
};
|
||||
|
||||
/delete-node/ pm2250_qg;
|
||||
/delete-node/ pm2250_charger;
|
||||
};
|
||||
|
||||
qcom,pm2250@1 {
|
||||
/delete-node/ pm2250_vib;
|
||||
/delete-node/ pm2250_pwm1;
|
||||
/delete-node/ pm2250_pwm2;
|
||||
/delete-node/ pm2250_pwm3;
|
||||
};
|
||||
};
|
||||
|
||||
&thermal_zones {
|
||||
pm2250-tz {
|
||||
trips {
|
||||
trip0 {
|
||||
temperature = <105000>;
|
||||
};
|
||||
|
||||
trip1 {
|
||||
temperature = <125000>;
|
||||
};
|
||||
|
||||
trip2 {
|
||||
temperature = <155000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -973,6 +973,27 @@
|
||||
#freq-domain-cells = <1>;
|
||||
};
|
||||
|
||||
spmi_bus: qcom,spmi@1c40000 {
|
||||
compatible = "qcom,spmi-pmic-arb";
|
||||
reg = <0x1c40000 0x1100>,
|
||||
<0x1e00000 0x2000000>,
|
||||
<0x3e00000 0x100000>,
|
||||
<0x3f00000 0xa0000>,
|
||||
<0x1c0a000 0x26000>;
|
||||
reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
|
||||
interrupt-names = "periph_irq";
|
||||
interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
|
||||
qcom,ee = <0>;
|
||||
qcom,channel = <0>;
|
||||
#address-cells = <2>;
|
||||
#size-cells = <0>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <4>;
|
||||
cell-index = <0>;
|
||||
};
|
||||
|
||||
thermal_zones: thermal-zones { };
|
||||
|
||||
clk_virt: interconnect@0 {
|
||||
compatible = "qcom,scuba-clk_virt";
|
||||
qcom,keepalive;
|
||||
@@ -1091,6 +1112,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
#include "scuba_auto-pmic.dtsi"
|
||||
#include "pm2250-rpm-regulator.dtsi"
|
||||
#include "scuba-regulator.dtsi"
|
||||
#include "monaco-gdsc.dtsi"
|
||||
|
||||
Reference in New Issue
Block a user