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/input/input.h>
0008 #include <dt-bindings/interrupt-controller/irq.h>
0009 #include <dt-bindings/spmi/spmi.h>
0010 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0011
0012 / {
0013 thermal-zones {
0014 pm8150-thermal {
0015 polling-delay-passive = <100>;
0016 polling-delay = <0>;
0017
0018 thermal-sensors = <&pm8150_temp>;
0019
0020 trips {
0021 trip0 {
0022 temperature = <95000>;
0023 hysteresis = <0>;
0024 type = "passive";
0025 };
0026
0027 trip1 {
0028 temperature = <115000>;
0029 hysteresis = <0>;
0030 type = "hot";
0031 };
0032
0033 trip2 {
0034 temperature = <145000>;
0035 hysteresis = <0>;
0036 type = "critical";
0037 };
0038 };
0039 };
0040 };
0041 };
0042
0043 &spmi_bus {
0044 pm8150_0: pmic@0 {
0045 compatible = "qcom,pm8150", "qcom,spmi-pmic";
0046 reg = <0x0 SPMI_USID>;
0047 #address-cells = <1>;
0048 #size-cells = <0>;
0049
0050 pon: power-on@800 {
0051 compatible = "qcom,pm8998-pon";
0052 reg = <0x0800>;
0053 mode-bootloader = <0x2>;
0054 mode-recovery = <0x1>;
0055
0056 pon_pwrkey: pwrkey {
0057 compatible = "qcom,pm8941-pwrkey";
0058 interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
0059 debounce = <15625>;
0060 bias-pull-up;
0061 linux,code = <KEY_POWER>;
0062
0063 status = "disabled";
0064 };
0065
0066 pon_resin: resin {
0067 compatible = "qcom,pm8941-resin";
0068 interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
0069 debounce = <15625>;
0070 bias-pull-up;
0071
0072 status = "disabled";
0073 };
0074 };
0075
0076 pm8150_temp: temp-alarm@2400 {
0077 compatible = "qcom,spmi-temp-alarm";
0078 reg = <0x2400>;
0079 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
0080 io-channels = <&pm8150_adc ADC5_DIE_TEMP>;
0081 io-channel-names = "thermal";
0082 #thermal-sensor-cells = <0>;
0083 };
0084
0085 pm8150_adc: adc@3100 {
0086 compatible = "qcom,spmi-adc5";
0087 reg = <0x3100>;
0088 #address-cells = <1>;
0089 #size-cells = <0>;
0090 #io-channel-cells = <1>;
0091 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0092
0093 ref-gnd@0 {
0094 reg = <ADC5_REF_GND>;
0095 qcom,pre-scaling = <1 1>;
0096 label = "ref_gnd";
0097 };
0098
0099 vref-1p25@1 {
0100 reg = <ADC5_1P25VREF>;
0101 qcom,pre-scaling = <1 1>;
0102 label = "vref_1p25";
0103 };
0104
0105 die-temp@6 {
0106 reg = <ADC5_DIE_TEMP>;
0107 qcom,pre-scaling = <1 1>;
0108 label = "die_temp";
0109 };
0110 };
0111
0112 pm8150_adc_tm: adc-tm@3500 {
0113 compatible = "qcom,spmi-adc-tm5";
0114 reg = <0x3500>;
0115 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
0116 #thermal-sensor-cells = <1>;
0117 #address-cells = <1>;
0118 #size-cells = <0>;
0119 status = "disabled";
0120 };
0121
0122 rtc@6000 {
0123 compatible = "qcom,pm8941-rtc";
0124 reg = <0x6000>;
0125 reg-names = "rtc", "alarm";
0126 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
0127 };
0128
0129 pm8150_gpios: gpio@c000 {
0130 compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
0131 reg = <0xc000>;
0132 gpio-controller;
0133 gpio-ranges = <&pm8150_gpios 0 0 10>;
0134 #gpio-cells = <2>;
0135 interrupt-controller;
0136 #interrupt-cells = <2>;
0137 };
0138 };
0139
0140 pmic@1 {
0141 compatible = "qcom,pm8150", "qcom,spmi-pmic";
0142 reg = <0x1 SPMI_USID>;
0143 #address-cells = <1>;
0144 #size-cells = <0>;
0145 };
0146 };