ARM: dts: msm: Add PMIC support for parrot

Add spmi-pmic-arb devices for the primary and secondary SPMI buses.
Add an SPMI debug bus device and associated child devices.
Add PMIC Glink devices and their client devices and Glink SPMI debug
controller device.
Add common PMIC configurations for all parrot platforms.
Add PMI-specific support for parrot, on PM7250B.

Change-Id: I2a897e2ba14a1f3288a8ef01b3d0e6a856dc593d
This commit is contained in:
Jishnu Prakash
2022-02-20 11:40:19 +05:30
committed by Gerrit - the friendly Code Review server
parent 7ad050ede2
commit 94b1ed50ab
4 changed files with 727 additions and 2 deletions

232
qcom/parrot-pm7250b.dtsi Normal file
View File

@@ -0,0 +1,232 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/thermal/thermal_qti.h>
#include "pm7250b.dtsi"
&soc {
qcom,pmic_glink {
status = "okay";
};
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";
};
spmi_glink_debug: 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,pm7250b-debug@8 {
compatible = "qcom,spmi-pmic";
reg = <8 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,smb1394-debug@c {
compatible = "qcom,spmi-pmic";
reg = <12 SPMI_USID>;
qcom,can-sleep;
};
};
};
};
};
&glink_edge {
qcom,pmic_glink_rpmsg {
qcom,glink-channels = "PMIC_RTR_ADSP_APPS";
};
qcom,pmic_glink_log_rpmsg {
qcom,glink-channels = "PMIC_LOGS_ADSP_APPS";
qcom,intents = <0x800 5
0xc00 3
0x2000 1>;
};
};
&battery_charger {
status = "okay";
};
&ucsi {
status = "okay";
};
&altmode {
status = "okay";
};
&spmi0_debug_bus {
depends-on2-supply = <&smb1394_glink_debug>;
qcom,pm7250b-debug@8 {
compatible = "qcom,spmi-pmic";
reg = <8 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm7250b-debug@9 {
compatible = "qcom,spmi-pmic";
reg = <9 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
};
&pm7250b_2 {
/* Slave ID - 8 */
reg = <8 SPMI_USID>;
};
&pm7250b_3 {
/* Slave ID - 9 */
reg = <9 SPMI_USID>;
};
&pm7250b_clkdiv {
clocks = <&rpmhcc RPMH_CXO_CLK>;
};
&pm7250b_vadc {
interrupts = <0x8 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
smb1390_therm@e {
qcom,scale-fn-type = <ADC_SCALE_HW_CALIB_PM5_SMB1398_TEMP>;
};
pm7250b_usb_conn_therm {
reg = <ADC5_AMUX_THM3_100K_PU>;
label = "pm7250b_usb_conn_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
pm7250b_smb_skin_therm {
reg = <ADC5_AMUX_THM1_100K_PU>;
label = "pm7250b_smb_skin_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pm7250b_adc_tm {
interrupts = <0x8 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
io-channels = <&pm7250b_vadc ADC5_AMUX_THM3_100K_PU>,
<&pm7250b_vadc ADC5_AMUX_THM1_100K_PU>;
pm7250b_usb_conn_therm {
reg = <ADC5_AMUX_THM3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm7250b_smb_skin_therm {
reg = <ADC5_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&thermal_zones {
sys-therm-6 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM3_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-7 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm7250b_adc_tm ADC5_AMUX_THM1_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};
&pm7250b_tz {
interrupts = <0x8 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
};
&pm7250b_bcl {
interrupts = <0x8 0x1d 0x0 IRQ_TYPE_EDGE_RISING>,
<0x8 0x1d 0x1 IRQ_TYPE_EDGE_RISING>,
<0x8 0x1d 0x2 IRQ_TYPE_EDGE_RISING>;
};
/* Below peripherals are supported over ADSP Glink */
&pm7250b_charger {
status = "disabled";
};
&pm7250b_qg {
status = "disabled";
};
&pm7250b_pdphy {
status = "disabled";
};

View File

@@ -0,0 +1,374 @@
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/iio/qcom,spmi-adc7-pm6450.h>
#include "pmk8350.dtsi"
#include "pm6450.dtsi"
#include "pm6150l.dtsi"
#include "pmr735a.dtsi"
&soc {
pmic-pon-log {
compatible = "qcom,pmic-pon-log";
nvmem = <&pmk8350_sdam_5>;
nvmem-names = "pon_log";
};
};
&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";
qcom,log-kpd-event;
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>;
};
};
};
&pmk8350_vadc {
/delete-node/ pm8350_ref_gnd;
/delete-node/ pm8350_vref_1p25;
/delete-node/ pm8350_die_temp;
/delete-node/ pm8350_vph_pwr;
/delete-node/ pm8350b_ref_gnd;
/delete-node/ pm8350b_vref_1p25;
/delete-node/ pm8350b_die_temp;
/delete-node/ pm8350b_vph_pwr;
/delete-node/ pm8350b_vbat_sns;
/delete-node/ pmr735b_ref_gnd;
/delete-node/ pmr735b_vref_1p25;
/delete-node/ pmr735b_die_temp;
/* PM6450 Channel nodes */
pm6450_ref_gnd {
reg = <PM6450_ADC7_REF_GND>;
label = "pm6450_ref_gnd";
qcom,pre-scaling = <1 1>;
};
pm6450_vref_1p25 {
reg = <PM6450_ADC7_1P25VREF>;
label = "pm6450_vref_1p25";
qcom,pre-scaling = <1 1>;
};
pm6450_die_temp {
reg = <PM6450_ADC7_DIE_TEMP>;
label = "pm6450_die_temp";
qcom,pre-scaling = <1 1>;
};
pm6450_quiet_therm {
reg = <PM6450_ADC7_AMUX1_GPIO2_100K_PU>;
label = "pm6450_quiet_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pmk8350_adc_tm {
io-channels = <&pmk8350_vadc PMK8350_ADC7_AMUX_THM1_100K_PU>,
<&pmk8350_vadc PM6450_ADC7_AMUX1_GPIO2_100K_PU>;
pmk8350_xo_therm {
reg = <PMK8350_ADC7_AMUX_THM1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
pm6450_quiet_therm {
reg = <PM6450_ADC7_AMUX1_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&pmk8350_sdam_23 {
adc_scaling: scaling@bf {
reg = <0xbf 0x1>;
bits = <0 2>;
};
};
&pm6450_gpios {
key_vol_up {
key_vol_up_default: key_vol_up_default {
pins = "gpio1";
function = "normal";
input-enable;
bias-pull-up;
power-source = <0>;
};
};
pm8010i_reset {
pm8010i_active: pm8010i_active {
pins = "gpio3";
function = "normal";
bias-disable;
output-high;
power-source = <0>;
};
};
pm8010j_reset {
pm8010j_active: pm8010j_active {
pins = "gpio4";
function = "normal";
bias-disable;
output-high;
power-source = <0>;
};
};
};
&pm6150l_revid {
status = "disabled";
};
&pm6150l_4 {
qcom,power-on@800 {
status = "disabled";
};
};
&pm6150l_clkdiv {
clocks = <&rpmhcc RPMH_CXO_CLK>;
};
&pm6150l_vadc {
pinctrl-names = "default";
pinctrl-0 = <
&ufs_therm_default
&rear_cam_flash_therm_default
&wide_rfc_therm_default>;
msm_therm {
reg = <ADC5_AMUX_THM2_100K_PU>;
label = "msm_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
ufs_therm {
reg = <ADC5_GPIO1_100K_PU>;
label = "ufs_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
cam_flash_therm {
reg = <ADC5_GPIO2_100K_PU>;
label = "cam_flash_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
wide_rfc_therm {
reg = <ADC5_GPIO3_100K_PU>;
label = "wide_rfc_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};
&pm6150l_gpios {
ufs_therm {
ufs_therm_default: ufs_therm_default {
pins = "gpio5";
bias-high-impedance;
};
};
rear_cam_flash_therm {
rear_cam_flash_therm_default: rear_cam_flash_therm_default {
pins = "gpio6";
bias-high-impedance;
};
};
wide_rfc_therm {
wide_rfc_therm_default: wide_rfc_therm_default {
pins = "gpio7";
bias-high-impedance;
};
};
};
&pm6150l_adc_tm {
io-channels = <&pm6150l_vadc ADC5_AMUX_THM2_100K_PU>,
<&pm6150l_vadc ADC5_GPIO1_100K_PU>,
<&pm6150l_vadc ADC5_GPIO2_100K_PU>,
<&pm6150l_vadc ADC5_GPIO3_100K_PU>;
/* Channel nodes */
msm_therm {
reg = <ADC5_AMUX_THM2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
ufs_therm {
reg = <ADC5_GPIO1_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
cam_flash_therm {
reg = <ADC5_GPIO2_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
wide_rfc_therm {
reg = <ADC5_GPIO3_100K_PU>;
qcom,ratiometric;
qcom,hw-settle-time = <200>;
};
};
&flash_led {
status = "ok";
};
&pmr735a_tz {
io-channels = <&pmk8350_vadc PMR735A_ADC7_DIE_TEMP>;
io-channel-names = "thermal";
};
&thermal_zones {
sys-therm-0 {
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";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-1 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pmk8350_adc_tm PM6450_ADC7_AMUX1_GPIO2_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-2 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm6150l_adc_tm ADC5_AMUX_THM2_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-3 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm6150l_adc_tm ADC5_GPIO1_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-4 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm6150l_adc_tm ADC5_GPIO2_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
sys-therm-5 {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm6150l_adc_tm ADC5_GPIO3_100K_PU>;
trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
active-config1 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};

View File

@@ -10,6 +10,7 @@
#include <dt-bindings/clock/qcom,gpucc-parrot.h>
#include <dt-bindings/clock/qcom,videocc-parrot.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator-levels.h>
#include <dt-bindings/spmi/spmi.h>
/ {
model = "Qualcomm Technologies, Inc. Parrot";
@@ -1713,6 +1714,124 @@
};
};
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";
clocks = <&aoss_qmp>;
clock-names = "core_clk";
qcom,fuse-enable-bit = <18>;
#address-cells = <2>;
#size-cells = <0>;
depends-on-supply = <&spmi1_bus>;
qcom,pmk8350-debug@0 {
compatible = "qcom,spmi-pmic";
reg = <0 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm6450-debug@1 {
compatible = "qcom,spmi-pmic";
reg = <1 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm6150l-debug@4 {
compatible = "qcom,spmi-pmic";
reg = <4 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
qcom,pm6150l-debug@5 {
compatible = "qcom,spmi-pmic";
reg = <5 SPMI_USID>;
#address-cells = <2>;
#size-cells = <0>;
qcom,can-sleep;
};
pmr735a_debug: qcom,pmr735a-debug@6 {
compatible = "qcom,spmi-pmic";
reg = <6 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>;
status = "disabled";
battery_charger: qcom,battery_charger {
compatible = "qcom,battery-charger";
status = "disabled";
};
ucsi: qcom,ucsi {
compatible = "qcom,ucsi-glink";
status = "disabled";
};
altmode: qcom,altmode {
compatible = "qcom,altmode-glink";
#altmode-cells = <1>;
status = "disabled";
};
};
vendor_hooks: qcom,cpu-vendor-hooks {
compatible = "qcom,cpu-vendor-hooks";
};

View File

@@ -9,7 +9,7 @@
interrupt-controller;
#interrupt-cells = <4>;
qcom,pm6150l@4 {
pm6150l_4: qcom,pm6150l@4 {
compatible = "qcom,spmi-pmic";
reg = <4 SPMI_USID>;
#address-cells = <1>;
@@ -114,7 +114,7 @@
};
};
qcom,pm6150l@5 {
pm6150l_5: qcom,pm6150l@5 {
compatible ="qcom,spmi-pmic";
reg = <5 SPMI_USID>;
#address-cells = <1>;