Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions arch/arm64/boot/dts/qcom/pm4125.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,81 @@
};
};

pm4125_tz: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
io-channels = <&pm4125_vadc ADC5_DIE_TEMP>;
io-channel-names = "thermal";
#thermal-sensor-cells = <0>;
};

pm4125_vadc: vadc@3100 {
compatible = "qcom,spmi-adc5";
reg = <0x3100>;
#address-cells = <1>;
#size-cells = <0>;
#io-channel-cells = <1>;
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;

/* Channel nodes */
channel@0 {
reg = <ADC5_REF_GND>;
label = "ref_gnd";
qcom,pre-scaling = <1 1>;
};

channel@1 {
reg = <ADC5_1P25VREF>;
label = "vref_1p25";
qcom,pre-scaling = <1 1>;
};

channel@6 {
reg = <ADC5_DIE_TEMP>;
label = "die_temp";
qcom,pre-scaling = <1 1>;
};

channel@7 {
reg = <ADC5_USB_IN_I>;
label = "usb_in_i_uv";
qcom,pre-scaling = <1 1>;
};

channel@8 {
reg = <ADC5_USB_IN_V_16>;
label = "usb_in_v_div_16";
qcom,pre-scaling = <1 16>;
};

channel@9 {
reg = <ADC5_CHG_TEMP>;
label = "chg_temp";
qcom,pre-scaling = <1 1>;
};

channel@83 {
reg = <ADC5_VPH_PWR>;
label = "vph_pwr";
qcom,pre-scaling = <1 3>;
};

channel@84 {
reg = <ADC5_VBAT_SNS>;
label = "vbat_sns";
qcom,pre-scaling = <1 3>;
};

channel@4b {
reg = <ADC5_BAT_ID_100K_PU>;
label = "bat_id";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};

pm4125_vbus: usb-vbus-regulator@1100 {
compatible = "qcom,pm4125-vbus-reg", "qcom,pm8150b-vbus-reg";
reg = <0x1100>;
Expand Down
7 changes: 7 additions & 0 deletions arch/arm64/boot/dts/qcom/pm8005.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
#address-cells = <1>;
#size-cells = <0>;

pm8005_tz: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
#thermal-sensor-cells = <0>;
};

pm8005_gpios: gpio@c000 {
compatible = "qcom,pm8005-gpio", "qcom,spmi-gpio";
reg = <0xc000>;
Expand Down
222 changes: 222 additions & 0 deletions arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,96 @@
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/iio/qcom,spmi-vadc.h>
#include <dt-bindings/input/input.h>

#include "shikra.dtsi"
#include "pm4125.dtsi"
#include "pm8005.dtsi"

/* Modem, Cocos + Kunlun PMIC */

&pm4125_gpios {
key_vol_up {
key_vol_up_default: key_vol_up_default {
pins = "gpio9";
function = "normal";
input-enable;
bias-pull-up;
power-source = <0>;
};
};

adc_gpio5 {
pm4125_adc_gpio5_default: pm4125_adc_gpio5_default {
pins = "gpio5";
bias-high-impedance;
};
};

adc_gpio6 {
pm4125_adc_gpio6_default: pm4125_adc_gpio6_default {
pins = "gpio6";
bias-high-impedance;
};
};
};

&pm4125_vadc {
pinctrl-0 = <&pm4125_adc_gpio5_default>, <&pm4125_adc_gpio6_default>;
pinctrl-names = "default";

channel@54 {
reg = <ADC5_GPIO3_100K_PU>;
label = "chgr_skin";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};

channel@55 {
reg = <ADC5_GPIO4_100K_PU>;
label = "gnss_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};

channel@4d {
reg = <ADC5_AMUX_THM1_100K_PU>;
label = "pa_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};

channel@4e {
reg = <ADC5_AMUX_THM2_100K_PU>;
label = "quiet_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};

channel@4f {
reg = <ADC5_AMUX_THM3_100K_PU>;
label = "msm_therm";
qcom,ratiometric;
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};
};

&pm4125_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};

&pm8005_regulators {
status = "disabled";
};

&rpm_requests {
regulators {
compatible = "qcom,rpm-pm2250-regulators";
Expand Down Expand Up @@ -137,3 +223,139 @@
};
};
};

&soc {
gpio_key {
compatible = "gpio-keys";
label = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&key_vol_up_default>;

vol_up {
label = "volume_up";
gpios = <&pm4125_gpios 9 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
wakeup-source;
debounce-interval = <15>;
linux,can-disable;
};
};

pm4125_pa_therm_bridge: pm4125_pa_therm_bridge {
compatible = "generic-adc-thermal";
io-channels = <&pm4125_vadc ADC5_AMUX_THM1_100K_PU>;
io-channel-names = "sensor-channel";
#thermal-sensor-cells = <0>;
};

pm4125_quiet_therm_bridge: pm4125_quiet_therm_bridge {
compatible = "generic-adc-thermal";
io-channels = <&pm4125_vadc ADC5_AMUX_THM2_100K_PU>;
io-channel-names = "sensor-channel";
#thermal-sensor-cells = <0>;
};

pm4125_msm_therm_bridge: pm4125_msm_therm_bridge {
compatible = "generic-adc-thermal";
io-channels = <&pm4125_vadc ADC5_AMUX_THM3_100K_PU>;
io-channel-names = "sensor-channel";
#thermal-sensor-cells = <0>;
};
};

&thermal_zones {
pm4125-tz {
polling-delay-passive = <100>;
polling-delay = <0>;
thermal-sensors = <&pm4125_tz>;

trips {
pm4125_trip0: trip0 {
temperature = <105000>;
hysteresis = <0>;
type = "passive";
};

pm4125_trip1: trip1 {
temperature = <125000>;
hysteresis = <0>;
type = "hot";
};

pm4125_trip2: trip2 {
temperature = <155000>;
hysteresis = <0>;
type = "critical";
};
};
};

pm8005-tz {
polling-delay-passive = <0>;
polling-delay = <0>;
thermal-sensors = <&pm8005_tz>;

trips {
pm8005_trip0: trip0 {
temperature = <105000>;
hysteresis = <0>;
type = "passive";
};

pm8005_trip1: trip1 {
temperature = <125000>;
hysteresis = <0>;
type = "passive";
};

pm8005_trip2: trip2 {
temperature = <145000>;
hysteresis = <0>;
type = "passive";
};
};
};

sys-therm-1 {
polling-delay-passive = <2000>;
polling-delay = <0>;
thermal-sensors = <&pm4125_pa_therm_bridge>;

trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};

sys-therm-2 {
polling-delay-passive = <2000>;
polling-delay = <0>;
thermal-sensors = <&pm4125_quiet_therm_bridge>;

trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};

sys-therm-3 {
polling-delay-passive = <2000>;
polling-delay = <0>;
thermal-sensors = <&pm4125_msm_therm_bridge>;

trips {
active-config0 {
temperature = <125000>;
hysteresis = <1000>;
type = "passive";
};
};
};
};
Loading