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