xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm8150b.dtsi (revision 11696c5e)
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		pon@800 {
50			compatible = "qcom,pm8916-pon";
51			reg = <0x0800>;
52
53			status = "disabled";
54		};
55
56		pm8150b_vbus: usb-vbus-regulator@1100 {
57			compatible = "qcom,pm8150b-vbus-reg";
58			status = "disabled";
59			reg = <0x1100>;
60		};
61
62		pm8150b_temp: temp-alarm@2400 {
63			compatible = "qcom,spmi-temp-alarm";
64			reg = <0x2400>;
65			interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
66			io-channels = <&pm8150b_adc ADC5_DIE_TEMP>;
67			io-channel-names = "thermal";
68			#thermal-sensor-cells = <0>;
69		};
70
71		pm8150b_adc: adc@3100 {
72			compatible = "qcom,spmi-adc5";
73			reg = <0x3100>;
74			#address-cells = <1>;
75			#size-cells = <0>;
76			#io-channel-cells = <1>;
77			interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
78
79			ref-gnd@0 {
80				reg = <ADC5_REF_GND>;
81				qcom,pre-scaling = <1 1>;
82				label = "ref_gnd";
83			};
84
85			vref-1p25@1 {
86				reg = <ADC5_1P25VREF>;
87				qcom,pre-scaling = <1 1>;
88				label = "vref_1p25";
89			};
90
91			die-temp@6 {
92				reg = <ADC5_DIE_TEMP>;
93				qcom,pre-scaling = <1 1>;
94				label = "die_temp";
95			};
96
97			chg-temp@9 {
98				reg = <ADC5_CHG_TEMP>;
99				qcom,pre-scaling = <1 1>;
100				label = "chg_temp";
101			};
102		};
103
104		pm8150b_adc_tm: adc-tm@3500 {
105			compatible = "qcom,spmi-adc-tm5";
106			reg = <0x3500>;
107			interrupts = <0x2 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
108			#thermal-sensor-cells = <1>;
109			#address-cells = <1>;
110			#size-cells = <0>;
111			status = "disabled";
112		};
113
114		pm8150b_gpios: gpio@c000 {
115			compatible = "qcom,pm8150b-gpio", "qcom,spmi-gpio";
116			reg = <0xc000>;
117			gpio-controller;
118			gpio-ranges = <&pm8150b_gpios 0 0 12>;
119			#gpio-cells = <2>;
120			interrupt-controller;
121			#interrupt-cells = <2>;
122		};
123	};
124
125	pmic@3 {
126		compatible = "qcom,pm8150b", "qcom,spmi-pmic";
127		reg = <0x3 SPMI_USID>;
128		#address-cells = <1>;
129		#size-cells = <0>;
130
131		pm8150b_lpg: pwm {
132			compatible = "qcom,pm8150b-lpg";
133
134			#address-cells = <1>;
135			#size-cells = <0>;
136			#pwm-cells = <2>;
137
138			status = "disabled";
139		};
140	};
141};
142