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