1// SPDX-License-Identifier: GPL-2.0 2#include <dt-bindings/iio/qcom,spmi-vadc.h> 3#include <dt-bindings/interrupt-controller/irq.h> 4#include <dt-bindings/spmi/spmi.h> 5 6 7/ { 8 thermal-zones { 9 pm8941-thermal { 10 polling-delay-passive = <100>; 11 polling-delay = <0>; 12 thermal-sensors = <&pm8941_temp>; 13 14 trips { 15 trip0 { 16 temperature = <105000>; 17 hysteresis = <2000>; 18 type = "passive"; 19 }; 20 21 trip1 { 22 temperature = <125000>; 23 hysteresis = <2000>; 24 type = "hot"; 25 }; 26 27 crit { 28 temperature = <145000>; 29 hysteresis = <2000>; 30 type = "critical"; 31 }; 32 }; 33 }; 34 }; 35}; 36 37&spmi_bus { 38 39 pm8941_0: pm8941@0 { 40 compatible = "qcom,pm8941", "qcom,spmi-pmic"; 41 reg = <0x0 SPMI_USID>; 42 #address-cells = <1>; 43 #size-cells = <0>; 44 45 rtc@6000 { 46 compatible = "qcom,pm8941-rtc"; 47 reg = <0x6000>, 48 <0x6100>; 49 reg-names = "rtc", "alarm"; 50 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; 51 }; 52 53 pon@800 { 54 compatible = "qcom,pm8941-pon"; 55 reg = <0x800>; 56 57 pwrkey { 58 compatible = "qcom,pm8941-pwrkey"; 59 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 60 debounce = <15625>; 61 bias-pull-up; 62 }; 63 64 pm8941_resin: resin { 65 compatible = "qcom,pm8941-resin"; 66 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 67 debounce = <15625>; 68 bias-pull-up; 69 status = "disabled"; 70 }; 71 }; 72 73 usb_id: usb-detect@900 { 74 compatible = "qcom,pm8941-misc"; 75 reg = <0x900>; 76 interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>; 77 interrupt-names = "usb_id"; 78 }; 79 80 smbb: charger@1000 { 81 compatible = "qcom,pm8941-charger"; 82 reg = <0x1000>; 83 interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, 84 <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, 85 <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>, 86 <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, 87 <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, 88 <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, 89 <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, 90 <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>; 91 interrupt-names = "chg-done", 92 "chg-fast", 93 "chg-trkl", 94 "bat-temp-ok", 95 "bat-present", 96 "chg-gone", 97 "usb-valid", 98 "dc-valid"; 99 100 usb-otg-in-supply = <&pm8941_5vs1>; 101 102 chg_otg: otg-vbus { }; 103 }; 104 105 pm8941_gpios: gpio@c000 { 106 compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio"; 107 reg = <0xc000>; 108 gpio-controller; 109 gpio-ranges = <&pm8941_gpios 0 0 36>; 110 #gpio-cells = <2>; 111 interrupt-controller; 112 #interrupt-cells = <2>; 113 114 boost_bypass_n_pin: boost-bypass-state { 115 pins = "gpio21"; 116 function = "normal"; 117 }; 118 }; 119 120 pm8941_mpps: mpps@a000 { 121 compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp"; 122 reg = <0xa000>; 123 gpio-controller; 124 #gpio-cells = <2>; 125 gpio-ranges = <&pm8941_mpps 0 0 8>; 126 interrupt-controller; 127 #interrupt-cells = <2>; 128 }; 129 130 pm8941_temp: temp-alarm@2400 { 131 compatible = "qcom,spmi-temp-alarm"; 132 reg = <0x2400>; 133 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; 134 io-channels = <&pm8941_vadc VADC_DIE_TEMP>; 135 io-channel-names = "thermal"; 136 #thermal-sensor-cells = <0>; 137 }; 138 139 pm8941_vadc: adc@3100 { 140 compatible = "qcom,spmi-vadc"; 141 reg = <0x3100>; 142 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 143 #address-cells = <1>; 144 #size-cells = <0>; 145 #io-channel-cells = <1>; 146 147 148 channel@6 { 149 reg = <VADC_VBAT_SNS>; 150 }; 151 152 channel@8 { 153 reg = <VADC_DIE_TEMP>; 154 }; 155 156 channel@9 { 157 reg = <VADC_REF_625MV>; 158 }; 159 160 channel@a { 161 reg = <VADC_REF_1250MV>; 162 }; 163 164 channel@e { 165 reg = <VADC_GND_REF>; 166 }; 167 168 channel@f { 169 reg = <VADC_VDD_VADC>; 170 }; 171 172 channel@30 { 173 reg = <VADC_LR_MUX1_BAT_THERM>; 174 }; 175 }; 176 177 pm8941_iadc: adc@3600 { 178 compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc"; 179 reg = <0x3600>; 180 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; 181 qcom,external-resistor-micro-ohms = <10000>; 182 }; 183 184 pm8941_coincell: charger@2800 { 185 compatible = "qcom,pm8941-coincell"; 186 reg = <0x2800>; 187 status = "disabled"; 188 }; 189 }; 190 191 pm8941_1: pm8941@1 { 192 compatible = "qcom,pm8941", "qcom,spmi-pmic"; 193 reg = <0x1 SPMI_USID>; 194 #address-cells = <1>; 195 #size-cells = <0>; 196 197 pm8941_lpg: pwm { 198 compatible = "qcom,pm8941-lpg"; 199 200 #address-cells = <1>; 201 #size-cells = <0>; 202 #pwm-cells = <2>; 203 204 status = "disabled"; 205 }; 206 207 pm8941_vib: vibrator@c000 { 208 compatible = "qcom,pm8916-vib"; 209 reg = <0xc000>; 210 status = "disabled"; 211 }; 212 213 pm8941_wled: wled@d800 { 214 compatible = "qcom,pm8941-wled"; 215 reg = <0xd800>; 216 label = "backlight"; 217 218 status = "disabled"; 219 }; 220 221 regulators { 222 compatible = "qcom,pm8941-regulators"; 223 interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>; 224 interrupt-names = "ocp-5vs1", "ocp-5vs2"; 225 vin_5vs-supply = <&pm8941_5v>; 226 227 pm8941_5v: s4 { 228 regulator-min-microvolt = <5000000>; 229 regulator-max-microvolt = <5000000>; 230 regulator-enable-ramp-delay = <500>; 231 }; 232 233 pm8941_5vs1: 5vs1 { 234 regulator-enable-ramp-delay = <1000>; 235 regulator-pull-down; 236 regulator-over-current-protection; 237 qcom,ocp-max-retries = <10>; 238 qcom,ocp-retry-delay = <30>; 239 qcom,vs-soft-start-strength = <0>; 240 regulator-initial-mode = <1>; 241 }; 242 243 pm8941_5vs2: 5vs2 { 244 regulator-enable-ramp-delay = <1000>; 245 regulator-pull-down; 246 regulator-over-current-protection; 247 qcom,ocp-max-retries = <10>; 248 qcom,ocp-retry-delay = <30>; 249 qcom,vs-soft-start-strength = <0>; 250 regulator-initial-mode = <1>; 251 }; 252 }; 253 }; 254}; 255