18ea4ffcaSStephen Boyd// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 28ea4ffcaSStephen Boyd/* Copyright 2018 Google LLC. */ 38ea4ffcaSStephen Boyd 443fb4431SMatthias Kaehlcke#include <dt-bindings/iio/qcom,spmi-vadc.h> 561020aa5SBjorn Andersson#include <dt-bindings/input/linux-event-codes.h> 68ea4ffcaSStephen Boyd#include <dt-bindings/interrupt-controller/irq.h> 743fb4431SMatthias Kaehlcke#include <dt-bindings/spmi/spmi.h> 81b9d8bd6SMatthias Kaehlcke#include <dt-bindings/thermal/thermal.h> 98ea4ffcaSStephen Boyd 101b9d8bd6SMatthias Kaehlcke/ { 111b9d8bd6SMatthias Kaehlcke thermal-zones { 123a786086SManivannan Sadhasivam pm8998-thermal { 131b9d8bd6SMatthias Kaehlcke polling-delay-passive = <250>; 141b9d8bd6SMatthias Kaehlcke polling-delay = <1000>; 151b9d8bd6SMatthias Kaehlcke 161b9d8bd6SMatthias Kaehlcke thermal-sensors = <&pm8998_temp>; 171b9d8bd6SMatthias Kaehlcke 181b9d8bd6SMatthias Kaehlcke trips { 191b9d8bd6SMatthias Kaehlcke pm8998_alert0: pm8998-alert0 { 201b9d8bd6SMatthias Kaehlcke temperature = <105000>; 211b9d8bd6SMatthias Kaehlcke hysteresis = <2000>; 221b9d8bd6SMatthias Kaehlcke type = "passive"; 231b9d8bd6SMatthias Kaehlcke }; 241b9d8bd6SMatthias Kaehlcke pm8998_crit: pm8998-crit { 251b9d8bd6SMatthias Kaehlcke temperature = <125000>; 261b9d8bd6SMatthias Kaehlcke hysteresis = <2000>; 271b9d8bd6SMatthias Kaehlcke type = "critical"; 281b9d8bd6SMatthias Kaehlcke }; 291b9d8bd6SMatthias Kaehlcke }; 301b9d8bd6SMatthias Kaehlcke }; 311b9d8bd6SMatthias Kaehlcke }; 321b9d8bd6SMatthias Kaehlcke}; 3361020aa5SBjorn Andersson 348ea4ffcaSStephen Boyd&spmi_bus { 358ea4ffcaSStephen Boyd pm8998_lsid0: pmic@0 { 368ea4ffcaSStephen Boyd compatible = "qcom,pm8998", "qcom,spmi-pmic"; 378ea4ffcaSStephen Boyd reg = <0x0 SPMI_USID>; 388ea4ffcaSStephen Boyd #address-cells = <1>; 398ea4ffcaSStephen Boyd #size-cells = <0>; 408ea4ffcaSStephen Boyd 4161020aa5SBjorn Andersson pm8998_pon: pon@800 { 426fd7c4daSJohn Stultz compatible = "qcom,pm8998-pon"; 4361020aa5SBjorn Andersson 4461020aa5SBjorn Andersson reg = <0x800>; 4561020aa5SBjorn Andersson mode-bootloader = <0x2>; 4661020aa5SBjorn Andersson mode-recovery = <0x1>; 4761020aa5SBjorn Andersson 4831a233a5SStephen Boyd pm8998_pwrkey: pwrkey { 4961020aa5SBjorn Andersson compatible = "qcom,pm8941-pwrkey"; 5061020aa5SBjorn Andersson interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 5161020aa5SBjorn Andersson debounce = <15625>; 5261020aa5SBjorn Andersson bias-pull-up; 5361020aa5SBjorn Andersson linux,code = <KEY_POWER>; 5461020aa5SBjorn Andersson }; 55*f86ae6f2SDzmitry Sankouski 56*f86ae6f2SDzmitry Sankouski pm8998_resin: resin { 57*f86ae6f2SDzmitry Sankouski compatible = "qcom,pm8941-resin"; 58*f86ae6f2SDzmitry Sankouski interrupts = <GIC_SPI 0x8 1 IRQ_TYPE_EDGE_BOTH>; 59*f86ae6f2SDzmitry Sankouski debounce = <15625>; 60*f86ae6f2SDzmitry Sankouski bias-pull-up; 61*f86ae6f2SDzmitry Sankouski status = "disabled"; 62*f86ae6f2SDzmitry Sankouski }; 6361020aa5SBjorn Andersson }; 6461020aa5SBjorn Andersson 65104e6415SMatthias Kaehlcke pm8998_temp: temp-alarm@2400 { 66104e6415SMatthias Kaehlcke compatible = "qcom,spmi-temp-alarm"; 67104e6415SMatthias Kaehlcke reg = <0x2400>; 68104e6415SMatthias Kaehlcke interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; 697bfd90f5SMatthias Kaehlcke io-channels = <&pm8998_adc ADC5_DIE_TEMP>; 707bfd90f5SMatthias Kaehlcke io-channel-names = "thermal"; 71104e6415SMatthias Kaehlcke #thermal-sensor-cells = <0>; 72104e6415SMatthias Kaehlcke }; 73104e6415SMatthias Kaehlcke 744ab3acd6SLuca Weiss pm8998_coincell: charger@2800 { 7561020aa5SBjorn Andersson compatible = "qcom,pm8941-coincell"; 7661020aa5SBjorn Andersson reg = <0x2800>; 7761020aa5SBjorn Andersson 7861020aa5SBjorn Andersson status = "disabled"; 7961020aa5SBjorn Andersson }; 8061020aa5SBjorn Andersson 8143fb4431SMatthias Kaehlcke pm8998_adc: adc@3100 { 8243fb4431SMatthias Kaehlcke compatible = "qcom,spmi-adc-rev2"; 8343fb4431SMatthias Kaehlcke reg = <0x3100>; 8443fb4431SMatthias Kaehlcke interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 8543fb4431SMatthias Kaehlcke #address-cells = <1>; 8643fb4431SMatthias Kaehlcke #size-cells = <0>; 8743fb4431SMatthias Kaehlcke #io-channel-cells = <1>; 88a789fd0bSMatthias Kaehlcke 89e77cc85eSVinod Koul adc-chan@6 { 90a789fd0bSMatthias Kaehlcke reg = <ADC5_DIE_TEMP>; 91a789fd0bSMatthias Kaehlcke label = "die_temp"; 92a789fd0bSMatthias Kaehlcke }; 9343fb4431SMatthias Kaehlcke }; 9443fb4431SMatthias Kaehlcke 954cc7c85cSBjorn Andersson pm8998_adc_tm: adc-tm@3400 { 964cc7c85cSBjorn Andersson compatible = "qcom,spmi-adc-tm-hc"; 974cc7c85cSBjorn Andersson reg = <0x3400>; 984cc7c85cSBjorn Andersson interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; 994cc7c85cSBjorn Andersson #thermal-sensor-cells = <1>; 1004cc7c85cSBjorn Andersson #address-cells = <1>; 1014cc7c85cSBjorn Andersson #size-cells = <0>; 1024cc7c85cSBjorn Andersson status = "disabled"; 1034cc7c85cSBjorn Andersson }; 1044cc7c85cSBjorn Andersson 10561020aa5SBjorn Andersson rtc@6000 { 10661020aa5SBjorn Andersson compatible = "qcom,pm8941-rtc"; 10761020aa5SBjorn Andersson reg = <0x6000>, <0x6100>; 10861020aa5SBjorn Andersson reg-names = "rtc", "alarm"; 10961020aa5SBjorn Andersson interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; 11061020aa5SBjorn Andersson }; 11161020aa5SBjorn Andersson 112c95243eeSKrzysztof Kozlowski pm8998_gpio: gpio@c000 { 1138ea4ffcaSStephen Boyd compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio"; 1148ea4ffcaSStephen Boyd reg = <0xc000>; 1158ea4ffcaSStephen Boyd gpio-controller; 11699c70e72SBrian Masney gpio-ranges = <&pm8998_gpio 0 0 26>; 1178ea4ffcaSStephen Boyd #gpio-cells = <2>; 118a1738363SBrian Masney interrupt-controller; 119a1738363SBrian Masney #interrupt-cells = <2>; 1208ea4ffcaSStephen Boyd }; 1218ea4ffcaSStephen Boyd 1228ea4ffcaSStephen Boyd }; 1238ea4ffcaSStephen Boyd 1248ea4ffcaSStephen Boyd pm8998_lsid1: pmic@1 { 1258ea4ffcaSStephen Boyd compatible = "qcom,pm8998", "qcom,spmi-pmic"; 1268ea4ffcaSStephen Boyd reg = <0x1 SPMI_USID>; 1278ea4ffcaSStephen Boyd #address-cells = <1>; 1288ea4ffcaSStephen Boyd #size-cells = <0>; 1298ea4ffcaSStephen Boyd }; 1308ea4ffcaSStephen Boyd}; 131