1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2023, Dang Huynh <[email protected]> 4 */ 5 6#include <dt-bindings/iio/qcom,spmi-vadc.h> 7#include <dt-bindings/input/linux-event-codes.h> 8#include <dt-bindings/spmi/spmi.h> 9 10/ { 11 thermal-zones { 12 pm8937-thermal { 13 polling-delay-passive = <0>; 14 polling-delay = <0>; 15 thermal-sensors = <&pm8937_temp>; 16 17 trips { 18 trip0 { 19 temperature = <105000>; 20 hysteresis = <0>; 21 type = "passive"; 22 }; 23 24 trip1 { 25 temperature = <125000>; 26 hysteresis = <0>; 27 type = "hot"; 28 }; 29 30 trip2 { 31 temperature = <145000>; 32 hysteresis = <0>; 33 type = "critical"; 34 }; 35 }; 36 }; 37 }; 38}; 39 40&spmi_bus { 41 pmic@0 { 42 compatible = "qcom,pm8937", "qcom,spmi-pmic"; 43 reg = <0x0 SPMI_USID>; 44 #address-cells = <1>; 45 #size-cells = <0>; 46 47 pon@800 { 48 compatible = "qcom,pm8916-pon"; 49 reg = <0x800>; 50 mode-bootloader = <0x2>; 51 mode-recovery = <0x1>; 52 53 pm8937_pwrkey: pwrkey { 54 compatible = "qcom,pm8941-pwrkey"; 55 interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>; 56 debounce = <15625>; 57 bias-pull-up; 58 linux,code = <KEY_POWER>; 59 }; 60 61 pm8937_resin: resin { 62 compatible = "qcom,pm8941-resin"; 63 interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>; 64 debounce = <15625>; 65 bias-pull-up; 66 status = "disabled"; 67 }; 68 }; 69 70 pm8937_gpios: gpio@c000 { 71 compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio"; 72 reg = <0xc000>; 73 gpio-controller; 74 gpio-ranges = <&pm8937_gpios 0 0 8>; 75 #gpio-cells = <2>; 76 interrupt-controller; 77 #interrupt-cells = <2>; 78 }; 79 80 pm8937_mpps: mpps@a000 { 81 compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp"; 82 reg = <0xa000>; 83 gpio-controller; 84 gpio-ranges = <&pm8937_mpps 0 0 4>; 85 #gpio-cells = <2>; 86 interrupt-controller; 87 #interrupt-cells = <2>; 88 }; 89 90 pm8937_temp: temp-alarm@2400 { 91 compatible = "qcom,spmi-temp-alarm"; 92 reg = <0x2400>; 93 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; 94 io-channels = <&pm8937_vadc VADC_DIE_TEMP>; 95 io-channel-names = "thermal"; 96 #thermal-sensor-cells = <0>; 97 }; 98 99 pm8937_vadc: adc@3100 { 100 compatible = "qcom,spmi-vadc"; 101 reg = <0x3100>; 102 interrupts = <0 0x31 0 IRQ_TYPE_EDGE_RISING>; 103 #address-cells = <1>; 104 #size-cells = <0>; 105 #io-channel-cells = <1>; 106 107 channel@8 { 108 reg = <VADC_DIE_TEMP>; 109 }; 110 111 channel@9 { 112 reg = <VADC_REF_625MV>; 113 }; 114 115 channel@a { 116 reg = <VADC_REF_1250MV>; 117 }; 118 119 channel@c { 120 reg = <VADC_SPARE1>; 121 }; 122 123 channel@e { 124 reg = <VADC_GND_REF>; 125 }; 126 127 channel@f { 128 reg = <VADC_VDD_VADC>; 129 }; 130 }; 131 132 rtc@6000 { 133 compatible = "qcom,pm8941-rtc"; 134 reg = <0x6000>, <0x6100>; 135 reg-names = "rtc", "alarm"; 136 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; 137 }; 138 }; 139 140 pmic@1 { 141 compatible = "qcom,pm8937", "qcom,spmi-pmic"; 142 reg = <0x1 SPMI_USID>; 143 #address-cells = <1>; 144 #size-cells = <0>; 145 146 pm8937_spmi_regulators: regulators { 147 compatible = "qcom,pm8937-regulators"; 148 }; 149 }; 150}; 151