xref: /linux/arch/arm64/boot/dts/qcom/pm6125.dtsi (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1// SPDX-License-Identifier: BSD-3-Clause
2
3#include <dt-bindings/iio/qcom,spmi-vadc.h>
4#include <dt-bindings/input/input.h>
5#include <dt-bindings/input/linux-event-codes.h>
6#include <dt-bindings/interrupt-controller/irq.h>
7#include <dt-bindings/spmi/spmi.h>
8
9/ {
10	thermal-zones {
11		pm6125-thermal {
12			polling-delay-passive = <100>;
13
14			thermal-sensors = <&pm6125_temp>;
15
16			trips {
17				trip0 {
18					temperature = <95000>;
19					hysteresis = <0>;
20					type = "passive";
21				};
22
23				trip1 {
24					temperature = <115000>;
25					hysteresis = <0>;
26					type = "hot";
27				};
28
29				trip2 {
30					temperature = <145000>;
31					hysteresis = <0>;
32					type = "critical";
33				};
34			};
35		};
36	};
37};
38
39&spmi_bus {
40	pmic@0 {
41		compatible = "qcom,pm6125", "qcom,spmi-pmic";
42		reg = <0x0 SPMI_USID>;
43		#address-cells = <1>;
44		#size-cells = <0>;
45
46		pm6125_pon: pon@800 {
47			compatible = "qcom,pm8998-pon";
48			reg = <0x800>;
49			mode-bootloader = <0x2>;
50			mode-recovery = <0x1>;
51
52			pon_pwrkey: pwrkey {
53				compatible = "qcom,pm8941-pwrkey";
54				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
55				debounce = <15625>;
56				linux,code = <KEY_POWER>;
57				bias-pull-up;
58				status = "disabled";
59			};
60
61			pon_resin: resin {
62				compatible = "qcom,pm8941-resin";
63				interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
64				debounce = <15625>;
65				bias-pull-up;
66				status = "disabled";
67			};
68		};
69
70		pm6125_temp: temp-alarm@2400 {
71			compatible = "qcom,spmi-temp-alarm";
72			reg = <0x2400>;
73			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
74			io-channels = <&pm6125_adc ADC5_DIE_TEMP>;
75			io-channel-names = "thermal";
76			#thermal-sensor-cells = <0>;
77		};
78
79		pm6125_adc: adc@3100 {
80			compatible = "qcom,spmi-adc5";
81			reg = <0x3100>;
82			#address-cells = <1>;
83			#size-cells = <0>;
84			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
85			#io-channel-cells = <1>;
86
87			channel@0 {
88				reg = <ADC5_REF_GND>;
89				qcom,pre-scaling = <1 1>;
90				label = "ref_gnd";
91			};
92
93			channel@1 {
94				reg = <ADC5_1P25VREF>;
95				qcom,pre-scaling = <1 1>;
96				label = "vref_1p25";
97			};
98
99			channel@6 {
100				reg = <ADC5_DIE_TEMP>;
101				qcom,pre-scaling = <1 1>;
102				label = "die_temp";
103			};
104
105			channel@83 {
106				reg = <ADC5_VPH_PWR>;
107				qcom,pre-scaling = <1 3>;
108				label = "vph_pwr";
109			};
110
111			channel@85 {
112				reg = <ADC5_VCOIN>;
113				qcom,pre-scaling = <1 3>;
114				label = "vcoin";
115			};
116
117			channel@4c {
118				reg = <ADC5_XO_THERM_100K_PU>;
119				qcom,pre-scaling = <1 1>;
120				qcom,hw-settle-time = <200>;
121				qcom,ratiometric;
122				label = "xo_therm";
123			};
124		};
125
126		pm6125_adc_tm: adc-tm@3500 {
127			compatible = "qcom,spmi-adc-tm5";
128			reg = <0x3500>;
129			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
130			#address-cells = <1>;
131			#size-cells = <0>;
132			#thermal-sensor-cells = <1>;
133			status = "disabled";
134		};
135
136		pm6125_rtc: rtc@6000 {
137			compatible = "qcom,pm8941-rtc";
138			reg = <0x6000>, <0x6100>;
139			reg-names = "rtc", "alarm";
140			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
141			status = "disabled";
142		};
143
144		pm6125_gpios: gpio@c000 {
145			compatible = "qcom,pm6125-gpio", "qcom,spmi-gpio";
146			reg = <0xc000>;
147			gpio-controller;
148			gpio-ranges = <&pm6125_gpios 0 0 9>;
149			#gpio-cells = <2>;
150			interrupt-controller;
151			#interrupt-cells = <2>;
152		};
153	};
154
155	pmic@1 {
156		compatible = "qcom,pm6125", "qcom,spmi-pmic";
157		reg = <0x1 SPMI_USID>;
158	};
159};
160