Merge "ARM: dts: msm: Add PMIC support for cape"

This commit is contained in:
qctecmdr
2021-10-19 08:48:06 -07:00
committed by Gerrit - the friendly Code Review server
4 changed files with 665 additions and 2 deletions

View File

@@ -1 +1,43 @@
&soc { };
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "cape-pmic-overlay.dtsi"
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};
&pm8350c_switch0 {
qcom,led-mask = <9>; /* Channels 1 & 4 */
qcom,symmetry-en;
};
&pm8350c_switch1 {
qcom,led-mask = <6>; /* Channels 2 & 3 */
qcom,symmetry-en;
};
&pm8350c_switch2 {
qcom,led-mask = <15>; /* All Channels */
qcom,symmetry-en;
};
&pm8350c_flash {
status = "ok";
};

View File

@@ -1 +1,49 @@
&soc { };
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "cape-pmic-overlay.dtsi"
&soc {
gpio_keys {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;
vol_up {
label = "volume_up";
gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
debounce-interval = <15>;
linux,can-disable;
};
};
};
&pm8350c_switch0 {
qcom,led-mask = <9>; /* Channels 1 & 4 */
qcom,symmetry-en;
};
&pm8350c_switch1 {
qcom,led-mask = <6>; /* Channels 2 & 3 */
qcom,symmetry-en;
};
&pm8350c_switch2 {
qcom,led-mask = <15>; /* All Channels */
qcom,symmetry-en;
};
&pm8350c_flash {
status = "ok";
};
&battery_charger {
qcom,thermal-mitigation = <3000000 1500000 1000000 500000>;
qcom,wireless-fw-name = "idt9415.bin";
qcom,shutdown-voltage = <3100>;
};

382
qcom/cape-pmic-overlay.dtsi Normal file
View File

@@ -0,0 +1,382 @@
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-adc7-smb139x.h>
#include "pmk8350.dtsi"
#include "pm8350.dtsi"
#include "pm8350c.dtsi"
#include "pm8350b.dtsi"
#include "pmr735a.dtsi"
#include "pmr735b.dtsi"
#include "pm8450.dtsi"
&pmk8350 {
/delete-node/ pon_pbs@800;
/delete-node/ pon_hlos@1300;
pon_hlos@1300 {
compatible = "qcom,pm8998-pon";
reg = <0x1300>, <0x800>;
reg-names = "pon_hlos", "pon_pbs";
pwrkey {
compatible = "qcom,pmk8350-pwrkey";
interrupts = <0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
linux,code = <KEY_POWER>;
};
resin {
compatible = "qcom,pmk8350-resin";
interrupts = <0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
linux,code = <KEY_VOLUMEDOWN>;
};
};
};
&pm8350_gpios {
pm8350_rear_tof_therm {
pm8350_rear_tof_therm_default: pm8350_rear_tof_therm_default {
pins = "gpio1";
bias-high-impedance;
};
};
key_vol_up {
key_vol_up_default: key_vol_up_default {
pins = "gpio6";
function = "normal";
input-enable;
bias-pull-up;
power-source = <1>;
};
};
};
&pmk8350_sdam_2 {
hap_cl_brake: cl_brake@7c {
reg = <0x7c 0x1>;
bits = <0 8>;
};
};
&pm8350b_haptics {
status = "ok";
nvmem-cell-names = "hap_cl_brake";
nvmem-cells = <&hap_cl_brake>;
nvmem-names = "hap_cfg_sdam";
nvmem = <&pmk8350_sdam_46>;
qcom,pbs-client = <&pm8350b_pbs2>;
};
&soc {
pmic-pon-log {
compatible = "qcom,pmic-pon-log";
nvmem = <&pmk8350_sdam_5>;
nvmem-names = "pon_log";
};
};
&pmk8350_vadc {
pinctrl-names = "default";
pinctrl-0 = <&pm8350_rear_tof_therm_default>;
pm8350_msm_therm {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU>;
label = "pm8350_msm_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_cam_flash_therm {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU>;
label = "pm8350_cam_flash_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_hot_pocket_therm {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU>;
label = "pm8350_hot_pocket_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_wide_rfc_therm {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
label = "pm8350_wide_rfc_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350_rear_tof_therm {
reg = <PM8350_ADC7_AMUX_THM5_100K_PU>;
label = "pm8350_rear_tof_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_usb_conn_therm {
reg = <PM8350B_ADC7_AMUX_THM4_100K_PU>;
label = "pm8350b_usb_conn_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_wl_chg_therm {
reg = <PM8350B_ADC7_GPIO2_100K_PU>;
label = "pm8350b_wl_chg_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm8350b_chg_temp {
reg = <PM8350B_ADC7_CHG_TEMP>;
label = "pm8350b_chg_temp";
qcom,pre-scaling = <1 1>;
};
pm8350b_iin_fb {
reg = <PM8350B_ADC7_IIN_FB>;
label = "pm8350b_iin_fb";
qcom,pre-scaling = <32 100>;
};
pm8350b_ichg_fb {
reg = <PM8350B_ADC7_ICHG_FB>;
label = "pm8350b_ichg_fb";
qcom,pre-scaling = <1000 305185>;
};
pm8350b_usb_in_v_div_16 {
reg = <PM8350B_ADC7_USB_IN_V_16>;
label = "pm8350b_usb_in_v_div_16";
qcom,pre-scaling = <1 16>;
};
smb139x_1_smb_temp {
reg = <SMB1394_1_ADC7_SMB_TEMP>;
label = "smb139x_1_smb_temp";
qcom,hw-settle-time = <200>;
};
smb139x_1_ichg_smb {
reg = <SMB1394_1_ADC7_ICHG_SMB>;
label = "smb139x_1_ichg_smb";
qcom,hw-settle-time = <200>;
};
smb139x_1_iin_smb {
reg = <SMB1394_1_ADC7_IIN_SMB>;
label = "smb139x_1_iin_smb";
qcom,hw-settle-time = <200>;
};
smb139x_2_smb_temp {
reg = <SMB1394_2_ADC7_SMB_TEMP>;
label = "smb139x_2_smb_temp";
qcom,hw-settle-time = <200>;
};
smb139x_2_ichg_smb {
reg = <SMB1394_2_ADC7_ICHG_SMB>;
label = "smb139x_2_ichg_smb";
qcom,hw-settle-time = <200>;
};
smb139x_2_iin_smb {
reg = <SMB1394_2_ADC7_IIN_SMB>;
label = "smb139x_2_iin_smb";
qcom,hw-settle-time = <200>;
};
};
&pm8350_tz {
io-channels = <&pmk8350_vadc PM8350_ADC7_DIE_TEMP>;
io-channel-names = "thermal";
};
&pm8350b_tz {
io-channels = <&pmk8350_vadc PM8350B_ADC7_DIE_TEMP>;
io-channel-names = "thermal";
};
&pmr735a_tz {
io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>;
io-channel-names = "thermal";
};
&pmr735b_tz {
io-channels = <&pmk8350_vadc PMR735B_ADC7_DIE_TEMP>;
io-channel-names = "thermal";
};
&pmk8350_adc_tm {
io-channels = <&pmk8350_vadc PM8350_ADC7_AMUX_THM1_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM2_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM3_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM4_100K_PU>,
<&pmk8350_vadc PM8350_ADC7_AMUX_THM5_100K_PU>,
<&pmk8350_vadc PM8350B_ADC7_AMUX_THM4_100K_PU>,
<&pmk8350_vadc PM8350B_ADC7_GPIO2_100K_PU>,
<&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>;
pm8350_msm_therm {
reg = <PM8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_cam_flash_therm {
reg = <PM8350_ADC7_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_hot_pocket_therm {
reg = <PM8350_ADC7_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_wide_rfc_therm {
reg = <PM8350_ADC7_AMUX_THM4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350_rear_tof_therm {
reg = <PM8350_ADC7_AMUX_THM5_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350b_usb_conn_therm {
reg = <PM8350B_ADC7_AMUX_THM4_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm8350b_wl_chg_therm {
reg = <PM8350B_ADC7_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pmk8350_xo_therm {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&thermal_zones {
skin-msm-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM1_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
camera-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM2_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
hot-pock-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM3_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
rear-cam-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM4_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
tof-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350_ADC7_AMUX_THM5_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
conn-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350B_ADC7_AMUX_THM4_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
wlc-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM8350B_ADC7_GPIO2_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
xo-therm {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PMK8350_ADC7_AMUX_THM1_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};

View File

@@ -1,5 +1,6 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/spmi/spmi.h>
/ {
model = "Qualcomm Technologies, Inc. Cape";
compatible = "qcom,cape";
@@ -473,6 +474,196 @@
interrupt-controller;
};
thermal_zones: thermal-zones {
};
spmi_bus: spmi0_bus: qcom,spmi@c42d000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0xc42d000 0x4000>,
<0xc400000 0x3000>,
<0xc500000 0x400000>,
<0xc440000 0x80000>,
<0xc4c0000 0x10000>;
reg-names = "cnfg", "core", "chnls", "obsrvr", "intr";
interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "periph_irq";
interrupt-controller;
#interrupt-cells = <4>;
#address-cells = <2>;
#size-cells = <0>;
cell-index = <0>;
qcom,channel = <0>;
qcom,ee = <0>;
qcom,bus-id = <0>;
};
spmi1_bus: qcom,spmi@c432000 {
compatible = "qcom,spmi-pmic-arb";
reg = <0xc432000 0x4000>,
<0xc400000 0x3000>,
<0xc500000 0x400000>,
<0xc440000 0x80000>,
<0xc4d0000 0x10000>;
reg-names = "cnfg", "core", "chnls", "obsrvr", "intr";
interrupts-extended = <&pdc 3 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "periph_irq";
interrupt-controller;
#interrupt-cells = <4>;
#address-cells = <2>;
#size-cells = <0>;
cell-index = <0>;
qcom,channel = <0>;
qcom,ee = <0>;
qcom,bus-id = <1>;
depends-on-supply = <&spmi0_bus>;
};
spmi0_debug_bus: qcom,spmi-debug@10b14000 {
compatible = "qcom,spmi-pmic-arb-debug";
reg = <0x10b14000 0x60>, <0x221c8784 0x4>;
reg-names = "core", "fuse";
clock-names = "core_clk";
qcom,fuse-enable-bit = <18>;
#address-cells = <2>;
#size-cells = <0>;
depends-on-supply = <&spmi1_bus>;
depends-on2-supply = <&smb1394_glink_debug>;
qcom,pmk8350-debug@0 {
compatible = "qcom,spmi-pmic";
reg = <0 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm8350-debug@1 {
compatible = "qcom,spmi-pmic";
reg = <1 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm8350c-debug@2 {
compatible = "qcom,spmi-pmic";
reg = <2 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm8350b-debug@3 {
compatible = "qcom,spmi-pmic";
reg = <3 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pmr735a-debug@4 {
compatible = "qcom,spmi-pmic";
reg = <4 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pmr735b-debug@5 {
compatible = "qcom,spmi-pmic";
reg = <5 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm8450-debug@7 {
compatible = "qcom,spmi-pmic";
reg = <7 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
};
qcom,pmic_glink {
compatible = "qcom,pmic-glink";
qcom,pmic-glink-channel = "PMIC_RTR_ADSP_APPS";
qcom,subsys-name = "lpass";
qcom,protection-domain = "tms/servreg", "msm/adsp/charger_pd";
depends-on-supply = <&ipcc_mproc>;
battery_charger: qcom,battery_charger {
compatible = "qcom,battery-charger";
};
ucsi: qcom,ucsi {
compatible = "qcom,ucsi-glink";
};
altmode: qcom,altmode {
compatible = "qcom,altmode-glink";
#altmode-cells = <1>;
};
};
qcom,pmic_glink_log {
compatible = "qcom,pmic-glink";
qcom,pmic-glink-channel = "PMIC_LOGS_ADSP_APPS";
qcom,battery_debug {
compatible = "qcom,battery-debug";
};
qcom,charger_ulog_glink {
compatible = "qcom,charger-ulog-glink";
};
qcom,spmi_glink_debug {
compatible = "qcom,spmi-glink-debug";
#address-cells = <1>;
#size-cells = <0>;
depends-on-supply = <&spmi1_bus>;
/* Primary SPMI bus */
spmi@0 {
reg = <0>;
#address-cells = <2>;
#size-cells = <0>;
qcom,pm8350b-debug@3 {
compatible = "qcom,spmi-pmic";
reg = <3 SPMI_USID>;
qcom,can-sleep;
};
};
/* Secondary SPMI bus */
spmi@1 {
reg = <1>;
#address-cells = <2>;
#size-cells = <0>;
smb1394_glink_debug: qcom,smb1394-debug@9 {
compatible = "qcom,spmi-pmic";
reg = <9 SPMI_USID>;
qcom,can-sleep;
};
qcom,smb1394-debug@b {
compatible = "qcom,spmi-pmic";
reg = <11 SPMI_USID>;
qcom,can-sleep;
};
qcom,smb1396-debug@d {
compatible = "qcom,spmi-pmic";
reg = <13 SPMI_USID>;
qcom,can-sleep;
};
};
};
};
soc-sleep-stats@c3f0000 {
compatible = "qcom,rpmh-sleep-stats";
reg = <0xc3f0000 0x400>;