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