0001 // SPDX-License-Identifier: BSD-3-Clause
0002 // Copyright (c) 2019, The Linux Foundation. All rights reserved.
0003
0004 #include <dt-bindings/iio/qcom,spmi-vadc.h>
0005 #include <dt-bindings/input/linux-event-codes.h>
0006 #include <dt-bindings/interrupt-controller/irq.h>
0007 #include <dt-bindings/spmi/spmi.h>
0008 #include <dt-bindings/thermal/thermal.h>
0009
0010 / {
0011 thermal-zones {
0012 pm6150_thermal: pm6150-thermal {
0013 polling-delay-passive = <100>;
0014 polling-delay = <0>;
0015 thermal-sensors = <&pm6150_temp>;
0016
0017 trips {
0018 pm6150_trip0: trip0 {
0019 temperature = <95000>;
0020 hysteresis = <0>;
0021 type = "passive";
0022 };
0023
0024 pm6150_crit: crit {
0025 temperature = <115000>;
0026 hysteresis = <0>;
0027 type = "critical";
0028 };
0029 };
0030 };
0031 };
0032 };
0033
0034 &spmi_bus {
0035 pm6150_lsid0: pmic@0 {
0036 compatible = "qcom,pm6150", "qcom,spmi-pmic";
0037 reg = <0x0 SPMI_USID>;
0038 #address-cells = <1>;
0039 #size-cells = <0>;
0040
0041 pm6150_pon: pon@800 {
0042 compatible = "qcom,pm8998-pon";
0043 reg = <0x800>;
0044 mode-bootloader = <0x2>;
0045 mode-recovery = <0x1>;
0046
0047 pm6150_pwrkey: pwrkey {
0048 compatible = "qcom,pm8941-pwrkey";
0049 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
0050 debounce = <15625>;
0051 bias-pull-up;
0052 linux,code = <KEY_POWER>;
0053 };
0054 };
0055
0056 pm6150_temp: temp-alarm@2400 {
0057 compatible = "qcom,spmi-temp-alarm";
0058 reg = <0x2400>;
0059 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
0060 io-channels = <&pm6150_adc ADC5_DIE_TEMP>;
0061 io-channel-names = "thermal";
0062 #thermal-sensor-cells = <0>;
0063 };
0064
0065 pm6150_adc: adc@3100 {
0066 compatible = "qcom,spmi-adc5";
0067 reg = <0x3100>;
0068 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
0069 #address-cells = <1>;
0070 #size-cells = <0>;
0071 #io-channel-cells = <1>;
0072
0073 adc-chan@6 {
0074 reg = <ADC5_DIE_TEMP>;
0075 label = "die_temp";
0076 };
0077 };
0078
0079 pm6150_adc_tm: adc-tm@3500 {
0080 compatible = "qcom,spmi-adc-tm5";
0081 reg = <0x3500>;
0082 interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
0083 #thermal-sensor-cells = <1>;
0084 #address-cells = <1>;
0085 #size-cells = <0>;
0086 status = "disabled";
0087 };
0088
0089 pm6150_gpio: gpios@c000 {
0090 compatible = "qcom,pm6150-gpio", "qcom,spmi-gpio";
0091 reg = <0xc000>;
0092 gpio-controller;
0093 gpio-ranges = <&pm6150_gpio 0 0 10>;
0094 #gpio-cells = <2>;
0095 interrupt-controller;
0096 #interrupt-cells = <2>;
0097 };
0098 };
0099
0100 pm6150_lsid1: pmic@1 {
0101 compatible = "qcom,pm6150", "qcom,spmi-pmic";
0102 reg = <0x1 SPMI_USID>;
0103 #address-cells = <1>;
0104 #size-cells = <0>;
0105 };
0106 };