xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/pm8150b.dtsi (revision 77013d11e6483b970af25e13c9b892075742f7e5)
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		power-on@800 {
50			compatible = "qcom,pm8916-pon";
51			reg = <0x0800>;
52
53			status = "disabled";
54		};
55
56		pm8150b_temp: temp-alarm@2400 {
57			compatible = "qcom,spmi-temp-alarm";
58			reg = <0x2400>;
59			interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
60			io-channels = <&pm8150b_adc ADC5_DIE_TEMP>;
61			io-channel-names = "thermal";
62			#thermal-sensor-cells = <0>;
63		};
64
65		pm8150b_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 = <0x2 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			chg-temp@9 {
92				reg = <ADC5_CHG_TEMP>;
93				qcom,pre-scaling = <1 1>;
94				label = "chg_temp";
95			};
96		};
97
98		pm8150b_adc_tm: adc-tm@3500 {
99			compatible = "qcom,spmi-adc-tm5";
100			reg = <0x3500>;
101			interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
102			#thermal-sensor-cells = <1>;
103			#address-cells = <1>;
104			#size-cells = <0>;
105			status = "disabled";
106		};
107
108		pm8150b_gpios: gpio@c000 {
109			compatible = "qcom,pm8150b-gpio";
110			reg = <0xc000>;
111			gpio-controller;
112			#gpio-cells = <2>;
113			interrupt-controller;
114			#interrupt-cells = <2>;
115		};
116	};
117
118	pmic@3 {
119		compatible = "qcom,pm8150b", "qcom,spmi-pmic";
120		reg = <0x3 SPMI_USID>;
121		#address-cells = <1>;
122		#size-cells = <0>;
123	};
124};
125