xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/pm8150l.dtsi (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
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		pm8150l {
14			polling-delay-passive = <100>;
15			polling-delay = <0>;
16
17			thermal-sensors = <&pm8150l_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@4 {
44		compatible = "qcom,pm8150l", "qcom,spmi-pmic";
45		reg = <0x4 SPMI_USID>;
46		#address-cells = <1>;
47		#size-cells = <0>;
48
49		power-on@800 {
50			compatible = "qcom,pm8916-pon";
51			reg = <0x0800>;
52
53			status = "disabled";
54		};
55
56		pm8150l_temp: temp-alarm@2400 {
57			compatible = "qcom,spmi-temp-alarm";
58			reg = <0x2400>;
59			interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
60			io-channels = <&pm8150l_adc ADC5_DIE_TEMP>;
61			io-channel-names = "thermal";
62			#thermal-sensor-cells = <0>;
63		};
64
65		pm8150l_adc: adc@3100 {
66			compatible = "qcom,spmi-adc5";
67			reg = <0x3100>;
68			#address-cells = <1>;
69			#size-cells = <0>;
70			#io-channel-cells = <1>;
71			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
72
73			ref-gnd@0 {
74				reg = <ADC5_REF_GND>;
75				qcom,pre-scaling = <1 1>;
76				label = "ref_gnd";
77			};
78
79			vref-1p25@1 {
80				reg = <ADC5_1P25VREF>;
81				qcom,pre-scaling = <1 1>;
82				label = "vref_1p25";
83			};
84
85			die-temp@6 {
86				reg = <ADC5_DIE_TEMP>;
87				qcom,pre-scaling = <1 1>;
88				label = "die_temp";
89			};
90		};
91
92		pm8150l_gpios: gpio@c000 {
93			compatible = "qcom,pm8150l-gpio";
94			reg = <0xc000>;
95			gpio-controller;
96			#gpio-cells = <2>;
97			interrupt-controller;
98			#interrupt-cells = <2>;
99		};
100	};
101
102	pmic@5 {
103		compatible = "qcom,pm8150l", "qcom,spmi-pmic";
104		reg = <0x5 SPMI_USID>;
105		#address-cells = <1>;
106		#size-cells = <0>;
107	};
108};
109