0001 // SPDX-License-Identifier: GPL-2.0
0002 // Copyright (c) 2018, Linaro Limited
0003
0004 #include <dt-bindings/spmi/spmi.h>
0005 #include <dt-bindings/input/linux-event-codes.h>
0006 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0007 #include <dt-bindings/thermal/thermal.h>
0008
0009 / {
0010 thermal-zones {
0011 pms405-thermal {
0012 polling-delay-passive = <250>;
0013 polling-delay = <1000>;
0014
0015 thermal-sensors = <&pms405_temp>;
0016
0017 trips {
0018 pms405_alert0: pms405-alert0 {
0019 temperature = <105000>;
0020 hysteresis = <2000>;
0021 type = "passive";
0022 };
0023 pms405_crit: pms405-crit {
0024 temperature = <125000>;
0025 hysteresis = <2000>;
0026 type = "critical";
0027 };
0028 };
0029 };
0030 };
0031 };
0032
0033 &spmi_bus {
0034 pms405_0: pms405@0 {
0035 compatible = "qcom,pms405", "qcom,spmi-pmic";
0036 reg = <0x0 SPMI_USID>;
0037 #address-cells = <1>;
0038 #size-cells = <0>;
0039
0040 pms405_gpios: gpio@c000 {
0041 compatible = "qcom,pms405-gpio", "qcom,spmi-gpio";
0042 reg = <0xc000>;
0043 gpio-controller;
0044 gpio-ranges = <&pms405_gpios 0 0 12>;
0045 #gpio-cells = <2>;
0046 interrupt-controller;
0047 #interrupt-cells = <2>;
0048 };
0049
0050 pon@800 {
0051 compatible = "qcom,pms405-pon";
0052 reg = <0x0800>;
0053 mode-bootloader = <0x2>;
0054 mode-recovery = <0x1>;
0055
0056 pwrkey {
0057 compatible = "qcom,pm8941-pwrkey";
0058 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0059 debounce = <15625>;
0060 bias-pull-up;
0061 linux,code = <KEY_POWER>;
0062 };
0063 };
0064
0065 pms405_temp: temp-alarm@2400 {
0066 compatible = "qcom,spmi-temp-alarm";
0067 reg = <0x2400>;
0068 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
0069 io-channels = <&pms405_adc ADC5_DIE_TEMP>;
0070 io-channel-names = "thermal";
0071 #thermal-sensor-cells = <0>;
0072 };
0073
0074 pms405_adc: adc@3100 {
0075 compatible = "qcom,pms405-adc", "qcom,spmi-adc-rev2";
0076 reg = <0x3100>;
0077 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0078 #address-cells = <1>;
0079 #size-cells = <0>;
0080 #io-channel-cells = <1>;
0081
0082 ref_gnd@0 {
0083 reg = <ADC5_REF_GND>;
0084 qcom,pre-scaling = <1 1>;
0085 };
0086
0087 vref_1p25@1 {
0088 reg = <ADC5_1P25VREF>;
0089 qcom,pre-scaling = <1 1>;
0090 };
0091
0092 pon_1: vph_pwr@131 {
0093 reg = <ADC5_VPH_PWR>;
0094 qcom,pre-scaling = <1 3>;
0095 };
0096
0097 die_temp@6 {
0098 reg = <ADC5_DIE_TEMP>;
0099 qcom,pre-scaling = <1 1>;
0100 };
0101
0102 pa_therm1: thermistor1@77 {
0103 reg = <ADC5_AMUX_THM1_100K_PU>;
0104 qcom,ratiometric;
0105 qcom,hw-settle-time = <200>;
0106 qcom,pre-scaling = <1 1>;
0107 };
0108
0109 pa_therm3: thermistor3@79 {
0110 reg = <ADC5_AMUX_THM3_100K_PU>;
0111 qcom,ratiometric;
0112 qcom,hw-settle-time = <200>;
0113 qcom,pre-scaling = <1 1>;
0114 };
0115
0116 xo_therm: xo_temp@76 {
0117 reg = <ADC5_XO_THERM_100K_PU>;
0118 qcom,ratiometric;
0119 qcom,hw-settle-time = <200>;
0120 qcom,pre-scaling = <1 1>;
0121 };
0122 };
0123
0124 rtc@6000 {
0125 compatible = "qcom,pm8941-rtc";
0126 reg = <0x6000>;
0127 reg-names = "rtc", "alarm";
0128 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
0129 };
0130 };
0131
0132 pms405_1: pms405@1 {
0133 compatible = "qcom,pms405", "qcom,spmi-pmic";
0134 reg = <0x1 SPMI_USID>;
0135
0136 pms405_spmi_regulators: regulators {
0137 compatible = "qcom,pms405-regulators";
0138 };
0139 };
0140 };