0001 // SPDX-License-Identifier: BSD-3-Clause
0002 /*
0003 * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
0004 * Copyright (c) 2019, Linaro Limited
0005 */
0006
0007 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0008 #include <dt-bindings/interrupt-controller/irq.h>
0009 #include <dt-bindings/spmi/spmi.h>
0010
0011 / {
0012 thermal-zones {
0013 pm8150b-thermal {
0014 polling-delay-passive = <100>;
0015 polling-delay = <0>;
0016
0017 thermal-sensors = <&pm8150b_temp>;
0018
0019 trips {
0020 trip0 {
0021 temperature = <95000>;
0022 hysteresis = <0>;
0023 type = "passive";
0024 };
0025
0026 trip1 {
0027 temperature = <115000>;
0028 hysteresis = <0>;
0029 type = "hot";
0030 };
0031
0032 trip2 {
0033 temperature = <145000>;
0034 hysteresis = <0>;
0035 type = "critical";
0036 };
0037 };
0038 };
0039 };
0040 };
0041
0042 &spmi_bus {
0043 pmic@2 {
0044 compatible = "qcom,pm8150b", "qcom,spmi-pmic";
0045 reg = <0x2 SPMI_USID>;
0046 #address-cells = <1>;
0047 #size-cells = <0>;
0048
0049 power-on@800 {
0050 compatible = "qcom,pm8916-pon";
0051 reg = <0x0800>;
0052
0053 status = "disabled";
0054 };
0055
0056 pm8150b_vbus: dcdc@1100 {
0057 compatible = "qcom,pm8150b-vbus-reg";
0058 status = "disabled";
0059 reg = <0x1100>;
0060 };
0061
0062 pm8150b_temp: temp-alarm@2400 {
0063 compatible = "qcom,spmi-temp-alarm";
0064 reg = <0x2400>;
0065 interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
0066 io-channels = <&pm8150b_adc ADC5_DIE_TEMP>;
0067 io-channel-names = "thermal";
0068 #thermal-sensor-cells = <0>;
0069 };
0070
0071 pm8150b_adc: adc@3100 {
0072 compatible = "qcom,spmi-adc5";
0073 reg = <0x3100>;
0074 #address-cells = <1>;
0075 #size-cells = <0>;
0076 #io-channel-cells = <1>;
0077 interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0078
0079 ref-gnd@0 {
0080 reg = <ADC5_REF_GND>;
0081 qcom,pre-scaling = <1 1>;
0082 label = "ref_gnd";
0083 };
0084
0085 vref-1p25@1 {
0086 reg = <ADC5_1P25VREF>;
0087 qcom,pre-scaling = <1 1>;
0088 label = "vref_1p25";
0089 };
0090
0091 die-temp@6 {
0092 reg = <ADC5_DIE_TEMP>;
0093 qcom,pre-scaling = <1 1>;
0094 label = "die_temp";
0095 };
0096
0097 chg-temp@9 {
0098 reg = <ADC5_CHG_TEMP>;
0099 qcom,pre-scaling = <1 1>;
0100 label = "chg_temp";
0101 };
0102 };
0103
0104 pm8150b_adc_tm: adc-tm@3500 {
0105 compatible = "qcom,spmi-adc-tm5";
0106 reg = <0x3500>;
0107 interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
0108 #thermal-sensor-cells = <1>;
0109 #address-cells = <1>;
0110 #size-cells = <0>;
0111 status = "disabled";
0112 };
0113
0114 pm8150b_gpios: gpio@c000 {
0115 compatible = "qcom,pm8150b-gpio", "qcom,spmi-gpio";
0116 reg = <0xc000>;
0117 gpio-controller;
0118 gpio-ranges = <&pm8150b_gpios 0 0 12>;
0119 #gpio-cells = <2>;
0120 interrupt-controller;
0121 #interrupt-cells = <2>;
0122 };
0123 };
0124
0125 pmic@3 {
0126 compatible = "qcom,pm8150b", "qcom,spmi-pmic";
0127 reg = <0x3 SPMI_USID>;
0128 #address-cells = <1>;
0129 #size-cells = <0>;
0130
0131 pm8150b_lpg: lpg {
0132 compatible = "qcom,pm8150b-lpg";
0133
0134 #address-cells = <1>;
0135 #size-cells = <0>;
0136 #pwm-cells = <2>;
0137
0138 status = "disabled";
0139 };
0140 };
0141 };