1 // SPDX-License-Identifier: BSD-3-Clause 2 /* 3 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. 4 * Copyright (c) 2019, Linaro Limited 5 */ 6 7 #include <dt-bindings/iio/qcom,spmi-vadc.h> 8 #include <dt-bindings/interrupt-controller/irq.h> 9 #include <dt-bindings/spmi/spmi.h> 10 11 / { 12 thermal-zones { 13 pm8150b-thermal { 14 polling-delay-passive = <100>; 15 16 thermal-sensors = <&pm8150b_temp>; 17 18 trips { 19 trip0 { 20 temperature = <95000>; 21 hysteresis = <0>; 22 type = "passive"; 23 }; 24 25 trip1 { 26 temperature = <115000>; 27 hysteresis = <0>; 28 type = "hot"; 29 }; 30 31 trip2 { 32 temperature = <145000>; 33 hysteresis = <0>; 34 type = "critical"; 35 }; 36 }; 37 }; 38 }; 39 }; 40 41 &spmi_bus { 42 pmic@2 { 43 compatible = "qcom,pm8150b", "qcom,spmi-pmic"; 44 reg = <0x2 SPMI_USID>; 45 #address-cells = <1>; 46 #size-cells = <0>; 47 48 pon@800 { 49 compatible = "qcom,pm8916-pon"; 50 reg = <0x0800>; 51 52 status = "disabled"; 53 }; 54 55 pm8150b_vbus: usb-vbus-regulator@1100 { 56 compatible = "qcom,pm8150b-vbus-reg"; 57 status = "disabled"; 58 reg = <0x1100>; 59 }; 60 61 pm8150b_typec: typec@1500 { 62 compatible = "qcom,pm8150b-typec"; 63 status = "disabled"; 64 reg = <0x1500>, 65 <0x1700>; 66 interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>, 67 <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>, 68 <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>, 69 <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>, 70 <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>, 71 <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>, 72 <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>, 73 <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>, 74 <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>, 75 <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>, 76 <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>, 77 <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>, 78 <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>, 79 <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>, 80 <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>, 81 <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>; 82 interrupt-names = "or-rid-detect-change", 83 "vpd-detect", 84 "cc-state-change", 85 "vconn-oc", 86 "vbus-change", 87 "attach-detach", 88 "legacy-cable-detect", 89 "try-snk-src-detect", 90 "sig-tx", 91 "sig-rx", 92 "msg-tx", 93 "msg-rx", 94 "msg-tx-failed", 95 "msg-tx-discarded", 96 "msg-rx-discarded", 97 "fr-swap"; 98 vdd-vbus-supply = <&pm8150b_vbus>; 99 }; 100 101 pm8150b_temp: temp-alarm@2400 { 102 compatible = "qcom,spmi-temp-alarm"; 103 reg = <0x2400>; 104 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>; 105 io-channels = <&pm8150b_adc ADC5_DIE_TEMP>; 106 io-channel-names = "thermal"; 107 #thermal-sensor-cells = <0>; 108 }; 109 110 pm8150b_adc: adc@3100 { 111 compatible = "qcom,spmi-adc5"; 112 reg = <0x3100>; 113 #address-cells = <1>; 114 #size-cells = <0>; 115 #io-channel-cells = <1>; 116 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; 117 118 channel@0 { 119 reg = <ADC5_REF_GND>; 120 qcom,pre-scaling = <1 1>; 121 label = "ref_gnd"; 122 }; 123 124 channel@1 { 125 reg = <ADC5_1P25VREF>; 126 qcom,pre-scaling = <1 1>; 127 label = "vref_1p25"; 128 }; 129 130 channel@6 { 131 reg = <ADC5_DIE_TEMP>; 132 qcom,pre-scaling = <1 1>; 133 label = "die_temp"; 134 }; 135 136 channel@9 { 137 reg = <ADC5_CHG_TEMP>; 138 qcom,pre-scaling = <1 1>; 139 label = "chg_temp"; 140 }; 141 }; 142 143 pm8150b_adc_tm: adc-tm@3500 { 144 compatible = "qcom,spmi-adc-tm5"; 145 reg = <0x3500>; 146 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>; 147 #thermal-sensor-cells = <1>; 148 #address-cells = <1>; 149 #size-cells = <0>; 150 status = "disabled"; 151 }; 152 153 pm8150b_gpios: gpio@c000 { 154 compatible = "qcom,pm8150b-gpio", "qcom,spmi-gpio"; 155 reg = <0xc000>; 156 gpio-controller; 157 gpio-ranges = <&pm8150b_gpios 0 0 12>; 158 #gpio-cells = <2>; 159 interrupt-controller; 160 #interrupt-cells = <2>; 161 }; 162 }; 163 164 pmic@3 { 165 compatible = "qcom,pm8150b", "qcom,spmi-pmic"; 166 reg = <0x3 SPMI_USID>; 167 #address-cells = <1>; 168 #size-cells = <0>; 169 170 pm8150b_lpg: pwm { 171 compatible = "qcom,pm8150b-lpg"; 172 173 #address-cells = <1>; 174 #size-cells = <0>; 175 #pwm-cells = <2>; 176 177 status = "disabled"; 178 }; 179 }; 180 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.