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