1 // SPDX-License-Identifier: BSD-3-Clause 1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 2 /* 3 * Copyright (c) 2017-2019, The Linux Foundati 3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2021-2023, Linaro Limited 4 * Copyright (c) 2021-2023, Linaro Limited 5 */ 5 */ 6 6 7 #include <dt-bindings/input/input.h> 7 #include <dt-bindings/input/input.h> 8 #include <dt-bindings/interrupt-controller/irq 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/spmi/spmi.h> 9 #include <dt-bindings/spmi/spmi.h> 10 #include <dt-bindings/iio/qcom,spmi-vadc.h> 10 #include <dt-bindings/iio/qcom,spmi-vadc.h> 11 11 12 / { 12 / { 13 thermal-zones { 13 thermal-zones { 14 pmc8180-thermal { 14 pmc8180-thermal { 15 polling-delay-passive 15 polling-delay-passive = <100>; 16 16 17 thermal-sensors = <&pm 17 thermal-sensors = <&pmc8180_temp>; 18 18 19 trips { 19 trips { 20 trip0 { 20 trip0 { 21 temper 21 temperature = <95000>; 22 hyster 22 hysteresis = <0>; 23 type = 23 type = "passive"; 24 }; 24 }; 25 25 26 trip1 { 26 trip1 { 27 temper 27 temperature = <115000>; 28 hyster 28 hysteresis = <0>; 29 type = 29 type = "hot"; 30 }; 30 }; 31 31 32 trip2 { 32 trip2 { 33 temper 33 temperature = <145000>; 34 hyster 34 hysteresis = <0>; 35 type = 35 type = "critical"; 36 }; 36 }; 37 }; 37 }; 38 }; 38 }; 39 39 40 pmc8180c-thermal { 40 pmc8180c-thermal { 41 polling-delay-passive 41 polling-delay-passive = <100>; 42 42 43 thermal-sensors = <&pm 43 thermal-sensors = <&pmc8180c_temp>; 44 44 45 trips { 45 trips { 46 trip0 { 46 trip0 { 47 temper 47 temperature = <95000>; 48 hyster 48 hysteresis = <0>; 49 type = 49 type = "passive"; 50 }; 50 }; 51 51 52 trip1 { 52 trip1 { 53 temper 53 temperature = <115000>; 54 hyster 54 hysteresis = <0>; 55 type = 55 type = "hot"; 56 }; 56 }; 57 57 58 trip2 { 58 trip2 { 59 temper 59 temperature = <145000>; 60 hyster 60 hysteresis = <0>; 61 type = 61 type = "critical"; 62 }; 62 }; 63 }; 63 }; 64 }; 64 }; 65 }; 65 }; 66 }; 66 }; 67 67 68 &spmi_bus { 68 &spmi_bus { 69 pmc8180_0: pmic@0 { 69 pmc8180_0: pmic@0 { 70 compatible = "qcom,pm8150", "q 70 compatible = "qcom,pm8150", "qcom,spmi-pmic"; 71 reg = <0x0 SPMI_USID>; 71 reg = <0x0 SPMI_USID>; 72 #address-cells = <1>; 72 #address-cells = <1>; 73 #size-cells = <0>; 73 #size-cells = <0>; 74 74 75 pon: pon@800 { 75 pon: pon@800 { 76 compatible = "qcom,pm8 76 compatible = "qcom,pm8916-pon"; 77 reg = <0x0800>; 77 reg = <0x0800>; 78 pmc8180_pwrkey: pwrkey !! 78 pwrkey { 79 compatible = " 79 compatible = "qcom,pm8941-pwrkey"; 80 interrupts = < 80 interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>; 81 debounce = <15 81 debounce = <15625>; 82 bias-pull-up; 82 bias-pull-up; 83 linux,code = < 83 linux,code = <KEY_POWER>; 84 84 85 status = "disa 85 status = "disabled"; 86 }; 86 }; 87 }; 87 }; 88 88 89 pmc8180_temp: temp-alarm@2400 89 pmc8180_temp: temp-alarm@2400 { 90 compatible = "qcom,spm 90 compatible = "qcom,spmi-temp-alarm"; 91 reg = <0x2400>; 91 reg = <0x2400>; 92 interrupts = <0x0 0x24 92 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; 93 io-channels = <&pmc818 93 io-channels = <&pmc8180_adc ADC5_DIE_TEMP>; 94 io-channel-names = "th 94 io-channel-names = "thermal"; 95 #thermal-sensor-cells 95 #thermal-sensor-cells = <0>; 96 }; 96 }; 97 97 98 pmc8180_adc: adc@3100 { 98 pmc8180_adc: adc@3100 { 99 compatible = "qcom,spm 99 compatible = "qcom,spmi-adc5"; 100 reg = <0x3100>; 100 reg = <0x3100>; 101 #address-cells = <1>; 101 #address-cells = <1>; 102 #size-cells = <0>; 102 #size-cells = <0>; 103 #io-channel-cells = <1 103 #io-channel-cells = <1>; 104 interrupts = <0x0 0x31 104 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 105 105 106 channel@0 { 106 channel@0 { 107 reg = <ADC5_RE 107 reg = <ADC5_REF_GND>; 108 qcom,pre-scali 108 qcom,pre-scaling = <1 1>; 109 label = "ref_g 109 label = "ref_gnd"; 110 }; 110 }; 111 111 112 channel@1 { 112 channel@1 { 113 reg = <ADC5_1P 113 reg = <ADC5_1P25VREF>; 114 qcom,pre-scali 114 qcom,pre-scaling = <1 1>; 115 label = "vref_ 115 label = "vref_1p25"; 116 }; 116 }; 117 117 118 channel@6 { 118 channel@6 { 119 reg = <ADC5_DI 119 reg = <ADC5_DIE_TEMP>; 120 qcom,pre-scali 120 qcom,pre-scaling = <1 1>; 121 label = "die_t 121 label = "die_temp"; 122 }; 122 }; 123 }; 123 }; 124 124 125 pmc8180_adc_tm: adc-tm@3500 { 125 pmc8180_adc_tm: adc-tm@3500 { 126 compatible = "qcom,spm 126 compatible = "qcom,spmi-adc-tm5"; 127 reg = <0x3500>; 127 reg = <0x3500>; 128 interrupts = <0x0 0x35 128 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 129 #thermal-sensor-cells 129 #thermal-sensor-cells = <1>; 130 #address-cells = <1>; 130 #address-cells = <1>; 131 #size-cells = <0>; 131 #size-cells = <0>; 132 status = "disabled"; 132 status = "disabled"; 133 }; 133 }; 134 134 135 rtc@6000 { 135 rtc@6000 { 136 compatible = "qcom,pm8 136 compatible = "qcom,pm8941-rtc"; 137 reg = <0x6000>; 137 reg = <0x6000>; 138 reg-names = "rtc", "al 138 reg-names = "rtc", "alarm"; 139 interrupts = <0x0 0x61 139 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; 140 }; 140 }; 141 141 142 pmc8180_1_gpios: gpio@c000 { !! 142 pmc8180_gpios: gpio@c000 { 143 compatible = "qcom,pmc 143 compatible = "qcom,pmc8180-gpio", "qcom,spmi-gpio"; 144 reg = <0xc000>; 144 reg = <0xc000>; 145 gpio-controller; 145 gpio-controller; 146 gpio-ranges = <&pmc818 !! 146 gpio-ranges = <&pmc8180_gpios 0 0 10>; 147 #gpio-cells = <2>; 147 #gpio-cells = <2>; 148 interrupt-controller; 148 interrupt-controller; 149 #interrupt-cells = <2> 149 #interrupt-cells = <2>; 150 }; 150 }; 151 }; 151 }; 152 152 153 pmic@1 { 153 pmic@1 { 154 compatible = "qcom,pmc8180", " 154 compatible = "qcom,pmc8180", "qcom,spmi-pmic"; 155 reg = <0x1 SPMI_USID>; 155 reg = <0x1 SPMI_USID>; 156 #address-cells = <1>; 156 #address-cells = <1>; 157 #size-cells = <0>; 157 #size-cells = <0>; 158 }; 158 }; 159 159 160 pmic@2 { 160 pmic@2 { 161 compatible = "qcom,smb2351", " 161 compatible = "qcom,smb2351", "qcom,spmi-pmic"; 162 reg = <0x2 SPMI_USID>; 162 reg = <0x2 SPMI_USID>; 163 #address-cells = <1>; 163 #address-cells = <1>; 164 #size-cells = <0>; 164 #size-cells = <0>; 165 165 166 adc@3100 { 166 adc@3100 { 167 compatible = "qcom,spm 167 compatible = "qcom,spmi-adc-rev2"; 168 reg = <0x3100>; 168 reg = <0x3100>; 169 #address-cells = <1>; 169 #address-cells = <1>; 170 #size-cells = <0>; 170 #size-cells = <0>; 171 #io-channel-cells = <1 171 #io-channel-cells = <1>; 172 interrupts = <0x2 0x31 172 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 173 173 174 channel@0 { 174 channel@0 { 175 reg = <ADC5_RE 175 reg = <ADC5_REF_GND>; 176 qcom,pre-scali 176 qcom,pre-scaling = <1 1>; 177 label = "ref_g 177 label = "ref_gnd"; 178 }; 178 }; 179 179 180 channel@1 { 180 channel@1 { 181 reg = <ADC5_1P 181 reg = <ADC5_1P25VREF>; 182 qcom,pre-scali 182 qcom,pre-scaling = <1 1>; 183 label = "vref_ 183 label = "vref_1p25"; 184 }; 184 }; 185 185 186 channel@85 { 186 channel@85 { 187 reg = <0x85>; 187 reg = <0x85>; 188 qcom,pre-scali 188 qcom,pre-scaling = <1 1>; 189 label = "vcoin 189 label = "vcoin2"; 190 }; 190 }; 191 }; 191 }; 192 }; 192 }; 193 193 194 pmic@6 { 194 pmic@6 { 195 compatible = "qcom,pm8150c", " 195 compatible = "qcom,pm8150c", "qcom,spmi-pmic"; 196 reg = <0x6 SPMI_USID>; 196 reg = <0x6 SPMI_USID>; 197 #address-cells = <1>; 197 #address-cells = <1>; 198 #size-cells = <0>; 198 #size-cells = <0>; 199 }; 199 }; 200 200 201 pmc8180_2: pmic@8 { !! 201 pmic@8 { 202 compatible = "qcom,pm8150", "q 202 compatible = "qcom,pm8150", "qcom,spmi-pmic"; 203 reg = <0x8 SPMI_USID>; 203 reg = <0x8 SPMI_USID>; 204 #address-cells = <1>; 204 #address-cells = <1>; 205 #size-cells = <0>; 205 #size-cells = <0>; 206 << 207 pmc8180_2_gpios: gpio@c000 { << 208 compatible = "qcom,pmc << 209 reg = <0xc000>; << 210 gpio-controller; << 211 gpio-ranges = <&pmc818 << 212 #gpio-cells = <2>; << 213 interrupt-controller; << 214 #interrupt-cells = <2> << 215 }; << 216 }; 206 }; 217 207 218 pmic@a { 208 pmic@a { 219 compatible = "qcom,smb2351", " 209 compatible = "qcom,smb2351", "qcom,spmi-pmic"; 220 reg = <0xa SPMI_USID>; 210 reg = <0xa SPMI_USID>; 221 #address-cells = <1>; 211 #address-cells = <1>; 222 #size-cells = <0>; 212 #size-cells = <0>; 223 213 224 adc@3100 { 214 adc@3100 { 225 compatible = "qcom,spm 215 compatible = "qcom,spmi-adc-rev2"; 226 reg = <0x3100>; 216 reg = <0x3100>; 227 #address-cells = <1>; 217 #address-cells = <1>; 228 #size-cells = <0>; 218 #size-cells = <0>; 229 #io-channel-cells = <1 219 #io-channel-cells = <1>; 230 interrupts = <0xa 0x31 220 interrupts = <0xa 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 231 221 232 channel@0 { 222 channel@0 { 233 reg = <ADC5_RE 223 reg = <ADC5_REF_GND>; 234 qcom,pre-scali 224 qcom,pre-scaling = <1 1>; 235 label = "ref_g 225 label = "ref_gnd"; 236 }; 226 }; 237 227 238 channel@1 { 228 channel@1 { 239 reg = <ADC5_1P 229 reg = <ADC5_1P25VREF>; 240 qcom,pre-scali 230 qcom,pre-scaling = <1 1>; 241 label = "vref_ 231 label = "vref_1p25"; 242 }; 232 }; 243 233 244 channel@85 { 234 channel@85 { 245 reg = <0x85>; 235 reg = <0x85>; 246 qcom,pre-scali 236 qcom,pre-scaling = <1 1>; 247 label = "vcoin 237 label = "vcoin"; 248 }; 238 }; 249 }; 239 }; 250 }; 240 }; 251 241 252 pmic@4 { 242 pmic@4 { 253 compatible = "qcom,pm8150c", " 243 compatible = "qcom,pm8150c", "qcom,spmi-pmic"; 254 reg = <0x4 SPMI_USID>; 244 reg = <0x4 SPMI_USID>; 255 #address-cells = <1>; 245 #address-cells = <1>; 256 #size-cells = <0>; 246 #size-cells = <0>; 257 247 258 pon@800 { 248 pon@800 { 259 compatible = "qcom,pm8 249 compatible = "qcom,pm8916-pon"; 260 reg = <0x0800>; 250 reg = <0x0800>; 261 251 262 status = "disabled"; 252 status = "disabled"; 263 }; 253 }; 264 254 265 pmc8180c_temp: temp-alarm@2400 255 pmc8180c_temp: temp-alarm@2400 { 266 compatible = "qcom,spm 256 compatible = "qcom,spmi-temp-alarm"; 267 reg = <0x2400>; 257 reg = <0x2400>; 268 interrupts = <0x4 0x24 258 interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; 269 io-channels = <&pmc818 259 io-channels = <&pmc8180c_adc ADC5_DIE_TEMP>; 270 io-channel-names = "th 260 io-channel-names = "thermal"; 271 #thermal-sensor-cells 261 #thermal-sensor-cells = <0>; 272 }; 262 }; 273 263 274 pmc8180c_adc: adc@3100 { 264 pmc8180c_adc: adc@3100 { 275 compatible = "qcom,spm 265 compatible = "qcom,spmi-adc5"; 276 reg = <0x3100>; 266 reg = <0x3100>; 277 #address-cells = <1>; 267 #address-cells = <1>; 278 #size-cells = <0>; 268 #size-cells = <0>; 279 #io-channel-cells = <1 269 #io-channel-cells = <1>; 280 interrupts = <0x4 0x31 270 interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 281 271 282 channel@0 { 272 channel@0 { 283 reg = <ADC5_RE 273 reg = <ADC5_REF_GND>; 284 qcom,pre-scali 274 qcom,pre-scaling = <1 1>; 285 label = "ref_g 275 label = "ref_gnd"; 286 }; 276 }; 287 277 288 channel@1 { 278 channel@1 { 289 reg = <ADC5_1P 279 reg = <ADC5_1P25VREF>; 290 qcom,pre-scali 280 qcom,pre-scaling = <1 1>; 291 label = "vref_ 281 label = "vref_1p25"; 292 }; 282 }; 293 283 294 channel@6 { 284 channel@6 { 295 reg = <ADC5_DI 285 reg = <ADC5_DIE_TEMP>; 296 qcom,pre-scali 286 qcom,pre-scaling = <1 1>; 297 label = "die_t 287 label = "die_temp"; 298 }; 288 }; 299 }; 289 }; 300 290 301 pmc8180c_adc_tm: adc-tm@3500 { 291 pmc8180c_adc_tm: adc-tm@3500 { 302 compatible = "qcom,spm 292 compatible = "qcom,spmi-adc-tm5"; 303 reg = <0x3500>; 293 reg = <0x3500>; 304 interrupts = <0x4 0x35 294 interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 305 #thermal-sensor-cells 295 #thermal-sensor-cells = <1>; 306 #address-cells = <1>; 296 #address-cells = <1>; 307 #size-cells = <0>; 297 #size-cells = <0>; 308 status = "disabled"; 298 status = "disabled"; 309 }; 299 }; 310 300 311 pmc8180c_gpios: gpio@c000 { 301 pmc8180c_gpios: gpio@c000 { 312 compatible = "qcom,pmc 302 compatible = "qcom,pmc8180c-gpio", "qcom,spmi-gpio"; 313 reg = <0xc000>; 303 reg = <0xc000>; 314 gpio-controller; 304 gpio-controller; 315 gpio-ranges = <&pmc818 305 gpio-ranges = <&pmc8180c_gpios 0 0 12>; 316 #gpio-cells = <2>; 306 #gpio-cells = <2>; 317 interrupt-controller; 307 interrupt-controller; 318 #interrupt-cells = <2> 308 #interrupt-cells = <2>; 319 }; 309 }; 320 }; 310 }; 321 311 322 pmic@5 { 312 pmic@5 { 323 compatible = "qcom,pmc8180c", 313 compatible = "qcom,pmc8180c", "qcom,spmi-pmic"; 324 reg = <0x5 SPMI_USID>; 314 reg = <0x5 SPMI_USID>; 325 315 326 pmc8180c_lpg: pwm { 316 pmc8180c_lpg: pwm { 327 compatible = "qcom,pmc 317 compatible = "qcom,pmc8180c-lpg"; 328 318 329 #address-cells = <1>; 319 #address-cells = <1>; 330 #size-cells = <0>; 320 #size-cells = <0>; 331 #pwm-cells = <2>; 321 #pwm-cells = <2>; 332 322 333 status = "disabled"; 323 status = "disabled"; 334 }; 324 }; 335 }; 325 }; 336 }; 326 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.