| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
#include <dt-bindings/iio/qcom,spmi-vadc.h> |
| 3 |
#include <dt-bindings/input/linux-event-codes.h> |
| 4 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 5 |
#include <dt-bindings/spmi/spmi.h> |
| 6 |
|
| 7 |
/ { |
| 8 |
thermal-zones { |
| 9 |
pm8916-thermal { |
| 10 |
polling-delay-passive = <100>; |
| 11 |
|
| 12 |
thermal-sensors = <&pm8916_temp>; |
| 13 |
|
| 14 |
trips { |
| 15 |
trip0 { |
| 16 |
temperature = <105000>; |
| 17 |
hysteresis = <0>; |
| 18 |
type = "passive"; |
| 19 |
}; |
| 20 |
|
| 21 |
trip1 { |
| 22 |
temperature = <125000>; |
| 23 |
hysteresis = <0>; |
| 24 |
type = "hot"; |
| 25 |
}; |
| 26 |
|
| 27 |
trip2 { |
| 28 |
temperature = <145000>; |
| 29 |
hysteresis = <0>; |
| 30 |
type = "critical"; |
| 31 |
}; |
| 32 |
}; |
| 33 |
}; |
| 34 |
}; |
| 35 |
}; |
| 36 |
|
| 37 |
&spmi_bus { |
| 38 |
pm8916_0: pmic@0 { |
| 39 |
compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
| 40 |
reg = <0x0 SPMI_USID>; |
| 41 |
#address-cells = <1>; |
| 42 |
#size-cells = <0>; |
| 43 |
|
| 44 |
pon@800 { |
| 45 |
compatible = "qcom,pm8916-pon"; |
| 46 |
reg = <0x800>; |
| 47 |
mode-bootloader = <0x2>; |
| 48 |
mode-recovery = <0x1>; |
| 49 |
|
| 50 |
pwrkey { |
| 51 |
compatible = "qcom,pm8941-pwrkey"; |
| 52 |
interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; |
| 53 |
debounce = <15625>; |
| 54 |
bias-pull-up; |
| 55 |
linux,code = <KEY_POWER>; |
| 56 |
}; |
| 57 |
|
| 58 |
pm8916_resin: resin { |
| 59 |
compatible = "qcom,pm8941-resin"; |
| 60 |
interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; |
| 61 |
debounce = <15625>; |
| 62 |
bias-pull-up; |
| 63 |
status = "disabled"; |
| 64 |
}; |
| 65 |
|
| 66 |
watchdog { |
| 67 |
compatible = "qcom,pm8916-wdt"; |
| 68 |
interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>; |
| 69 |
timeout-sec = <60>; |
| 70 |
}; |
| 71 |
}; |
| 72 |
|
| 73 |
pm8916_charger: charger@1000 { |
| 74 |
compatible = "qcom,pm8916-lbc"; |
| 75 |
reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>; |
| 76 |
reg-names = "chgr", "bat_if", "usb", "misc"; |
| 77 |
|
| 78 |
interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>, |
| 79 |
<0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, |
| 80 |
<0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>, |
| 81 |
<0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, |
| 82 |
<0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, |
| 83 |
<0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, |
| 84 |
<0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>, |
| 85 |
<0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, |
| 86 |
<0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, |
| 87 |
<0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>; |
| 88 |
interrupt-names = "vbat_det", |
| 89 |
"fast_chg", |
| 90 |
"chg_fail", |
| 91 |
"chg_done", |
| 92 |
"bat_pres", |
| 93 |
"temp_ok", |
| 94 |
"coarse_det", |
| 95 |
"usb_vbus", |
| 96 |
"chg_gone", |
| 97 |
"overtemp"; |
| 98 |
|
| 99 |
status = "disabled"; |
| 100 |
}; |
| 101 |
|
| 102 |
pm8916_usbin: usb-detect@1300 { |
| 103 |
compatible = "qcom,pm8941-misc"; |
| 104 |
reg = <0x1300>; |
| 105 |
interrupts = <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>; |
| 106 |
interrupt-names = "usb_vbus"; |
| 107 |
status = "disabled"; |
| 108 |
}; |
| 109 |
|
| 110 |
pm8916_temp: temp-alarm@2400 { |
| 111 |
compatible = "qcom,spmi-temp-alarm"; |
| 112 |
reg = <0x2400>; |
| 113 |
interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; |
| 114 |
io-channels = <&pm8916_vadc VADC_DIE_TEMP>; |
| 115 |
io-channel-names = "thermal"; |
| 116 |
#thermal-sensor-cells = <0>; |
| 117 |
}; |
| 118 |
|
| 119 |
pm8916_vadc: adc@3100 { |
| 120 |
compatible = "qcom,spmi-vadc"; |
| 121 |
reg = <0x3100>; |
| 122 |
interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 123 |
#address-cells = <1>; |
| 124 |
#size-cells = <0>; |
| 125 |
#io-channel-cells = <1>; |
| 126 |
|
| 127 |
channel@0 { |
| 128 |
reg = <VADC_USBIN>; |
| 129 |
qcom,pre-scaling = <1 10>; |
| 130 |
}; |
| 131 |
channel@7 { |
| 132 |
reg = <VADC_VSYS>; |
| 133 |
qcom,pre-scaling = <1 3>; |
| 134 |
}; |
| 135 |
channel@8 { |
| 136 |
reg = <VADC_DIE_TEMP>; |
| 137 |
}; |
| 138 |
channel@9 { |
| 139 |
reg = <VADC_REF_625MV>; |
| 140 |
}; |
| 141 |
channel@a { |
| 142 |
reg = <VADC_REF_1250MV>; |
| 143 |
}; |
| 144 |
channel@e { |
| 145 |
reg = <VADC_GND_REF>; |
| 146 |
}; |
| 147 |
channel@f { |
| 148 |
reg = <VADC_VDD_VADC>; |
| 149 |
}; |
| 150 |
}; |
| 151 |
|
| 152 |
pm8916_bms: battery@4000 { |
| 153 |
compatible = "qcom,pm8916-bms-vm"; |
| 154 |
reg = <0x4000>; |
| 155 |
interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>, |
| 156 |
<0x0 0x40 1 IRQ_TYPE_EDGE_RISING>, |
| 157 |
<0x0 0x40 2 IRQ_TYPE_EDGE_RISING>, |
| 158 |
<0x0 0x40 3 IRQ_TYPE_EDGE_RISING>, |
| 159 |
<0x0 0x40 4 IRQ_TYPE_EDGE_RISING>, |
| 160 |
<0x0 0x40 5 IRQ_TYPE_EDGE_RISING>; |
| 161 |
interrupt-names = "cv_leave", |
| 162 |
"cv_enter", |
| 163 |
"ocv_good", |
| 164 |
"ocv_thr", |
| 165 |
"fifo", |
| 166 |
"state_chg"; |
| 167 |
|
| 168 |
status = "disabled"; |
| 169 |
}; |
| 170 |
|
| 171 |
rtc@6000 { |
| 172 |
compatible = "qcom,pm8941-rtc"; |
| 173 |
reg = <0x6000>, <0x6100>; |
| 174 |
reg-names = "rtc", "alarm"; |
| 175 |
interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; |
| 176 |
}; |
| 177 |
|
| 178 |
pm8916_mpps: mpps@a000 { |
| 179 |
compatible = "qcom,pm8916-mpp", "qcom,spmi-mpp"; |
| 180 |
reg = <0xa000>; |
| 181 |
gpio-controller; |
| 182 |
#gpio-cells = <2>; |
| 183 |
gpio-ranges = <&pm8916_mpps 0 0 4>; |
| 184 |
interrupt-controller; |
| 185 |
#interrupt-cells = <2>; |
| 186 |
}; |
| 187 |
|
| 188 |
pm8916_gpios: gpio@c000 { |
| 189 |
compatible = "qcom,pm8916-gpio", "qcom,spmi-gpio"; |
| 190 |
reg = <0xc000>; |
| 191 |
gpio-controller; |
| 192 |
gpio-ranges = <&pm8916_gpios 0 0 4>; |
| 193 |
#gpio-cells = <2>; |
| 194 |
interrupt-controller; |
| 195 |
#interrupt-cells = <2>; |
| 196 |
}; |
| 197 |
}; |
| 198 |
|
| 199 |
pm8916_1: pmic@1 { |
| 200 |
compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
| 201 |
reg = <0x1 SPMI_USID>; |
| 202 |
#address-cells = <1>; |
| 203 |
#size-cells = <0>; |
| 204 |
|
| 205 |
pm8916_pwm: pwm { |
| 206 |
compatible = "qcom,pm8916-pwm"; |
| 207 |
|
| 208 |
#pwm-cells = <2>; |
| 209 |
|
| 210 |
status = "disabled"; |
| 211 |
}; |
| 212 |
|
| 213 |
pm8916_vib: vibrator@c000 { |
| 214 |
compatible = "qcom,pm8916-vib"; |
| 215 |
reg = <0xc000>; |
| 216 |
status = "disabled"; |
| 217 |
}; |
| 218 |
|
| 219 |
pm8916_codec: audio-codec@f000 { |
| 220 |
compatible = "qcom,pm8916-wcd-analog-codec"; |
| 221 |
reg = <0xf000>; |
| 222 |
interrupt-parent = <&spmi_bus>; |
| 223 |
interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, |
| 224 |
<0x1 0xf0 0x1 IRQ_TYPE_NONE>, |
| 225 |
<0x1 0xf0 0x2 IRQ_TYPE_NONE>, |
| 226 |
<0x1 0xf0 0x3 IRQ_TYPE_NONE>, |
| 227 |
<0x1 0xf0 0x4 IRQ_TYPE_NONE>, |
| 228 |
<0x1 0xf0 0x5 IRQ_TYPE_NONE>, |
| 229 |
<0x1 0xf0 0x6 IRQ_TYPE_NONE>, |
| 230 |
<0x1 0xf0 0x7 IRQ_TYPE_NONE>, |
| 231 |
<0x1 0xf1 0x0 IRQ_TYPE_NONE>, |
| 232 |
<0x1 0xf1 0x1 IRQ_TYPE_NONE>, |
| 233 |
<0x1 0xf1 0x2 IRQ_TYPE_NONE>, |
| 234 |
<0x1 0xf1 0x3 IRQ_TYPE_NONE>, |
| 235 |
<0x1 0xf1 0x4 IRQ_TYPE_NONE>, |
| 236 |
<0x1 0xf1 0x5 IRQ_TYPE_NONE>; |
| 237 |
interrupt-names = "cdc_spk_cnp_int", |
| 238 |
"cdc_spk_clip_int", |
| 239 |
"cdc_spk_ocp_int", |
| 240 |
"mbhc_ins_rem_det1", |
| 241 |
"mbhc_but_rel_det", |
| 242 |
"mbhc_but_press_det", |
| 243 |
"mbhc_ins_rem_det", |
| 244 |
"mbhc_switch_int", |
| 245 |
"cdc_ear_ocp_int", |
| 246 |
"cdc_hphr_ocp_int", |
| 247 |
"cdc_hphl_ocp_det", |
| 248 |
"cdc_ear_cnp_int", |
| 249 |
"cdc_hphr_cnp_int", |
| 250 |
"cdc_hphl_cnp_int"; |
| 251 |
#sound-dai-cells = <1>; |
| 252 |
status = "disabled"; |
| 253 |
}; |
| 254 |
}; |
| 255 |
}; |