xref: /freebsd/sys/contrib/device-tree/src/arm/qcom/pm8226.dtsi (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
1*8d13bc63SEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause
2*8d13bc63SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-vadc.h>
3*8d13bc63SEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h>
4*8d13bc63SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
5*8d13bc63SEmmanuel Vadot#include <dt-bindings/spmi/spmi.h>
6*8d13bc63SEmmanuel Vadot
7*8d13bc63SEmmanuel Vadot/ {
8*8d13bc63SEmmanuel Vadot	thermal-zones {
9*8d13bc63SEmmanuel Vadot		pm8226-thermal {
10*8d13bc63SEmmanuel Vadot			polling-delay-passive = <100>;
11*8d13bc63SEmmanuel Vadot			polling-delay = <0>;
12*8d13bc63SEmmanuel Vadot			thermal-sensors = <&pm8226_temp>;
13*8d13bc63SEmmanuel Vadot
14*8d13bc63SEmmanuel Vadot			trips {
15*8d13bc63SEmmanuel Vadot				trip0 {
16*8d13bc63SEmmanuel Vadot					temperature = <105000>;
17*8d13bc63SEmmanuel Vadot					hysteresis = <2000>;
18*8d13bc63SEmmanuel Vadot					type = "passive";
19*8d13bc63SEmmanuel Vadot				};
20*8d13bc63SEmmanuel Vadot
21*8d13bc63SEmmanuel Vadot				trip1 {
22*8d13bc63SEmmanuel Vadot					temperature = <125000>;
23*8d13bc63SEmmanuel Vadot					hysteresis = <2000>;
24*8d13bc63SEmmanuel Vadot					type = "hot";
25*8d13bc63SEmmanuel Vadot				};
26*8d13bc63SEmmanuel Vadot
27*8d13bc63SEmmanuel Vadot				crit {
28*8d13bc63SEmmanuel Vadot					temperature = <145000>;
29*8d13bc63SEmmanuel Vadot					hysteresis = <2000>;
30*8d13bc63SEmmanuel Vadot					type = "critical";
31*8d13bc63SEmmanuel Vadot				};
32*8d13bc63SEmmanuel Vadot			};
33*8d13bc63SEmmanuel Vadot		};
34*8d13bc63SEmmanuel Vadot	};
35*8d13bc63SEmmanuel Vadot};
36*8d13bc63SEmmanuel Vadot
37*8d13bc63SEmmanuel Vadot&spmi_bus {
38*8d13bc63SEmmanuel Vadot	pm8226_0: pm8226@0 {
39*8d13bc63SEmmanuel Vadot		compatible = "qcom,pm8226", "qcom,spmi-pmic";
40*8d13bc63SEmmanuel Vadot		reg = <0x0 SPMI_USID>;
41*8d13bc63SEmmanuel Vadot		#address-cells = <1>;
42*8d13bc63SEmmanuel Vadot		#size-cells = <0>;
43*8d13bc63SEmmanuel Vadot
44*8d13bc63SEmmanuel Vadot		pon@800 {
45*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8916-pon";
46*8d13bc63SEmmanuel Vadot			reg = <0x800>;
47*8d13bc63SEmmanuel Vadot
48*8d13bc63SEmmanuel Vadot			pwrkey {
49*8d13bc63SEmmanuel Vadot				compatible = "qcom,pm8941-pwrkey";
50*8d13bc63SEmmanuel Vadot				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
51*8d13bc63SEmmanuel Vadot				debounce = <15625>;
52*8d13bc63SEmmanuel Vadot				bias-pull-up;
53*8d13bc63SEmmanuel Vadot				linux,code = <KEY_POWER>;
54*8d13bc63SEmmanuel Vadot			};
55*8d13bc63SEmmanuel Vadot
56*8d13bc63SEmmanuel Vadot			pm8226_resin: resin {
57*8d13bc63SEmmanuel Vadot				compatible = "qcom,pm8941-resin";
58*8d13bc63SEmmanuel Vadot				interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
59*8d13bc63SEmmanuel Vadot				debounce = <15625>;
60*8d13bc63SEmmanuel Vadot				bias-pull-up;
61*8d13bc63SEmmanuel Vadot				status = "disabled";
62*8d13bc63SEmmanuel Vadot			};
63*8d13bc63SEmmanuel Vadot		};
64*8d13bc63SEmmanuel Vadot
65*8d13bc63SEmmanuel Vadot		smbb: charger@1000 {
66*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8226-charger";
67*8d13bc63SEmmanuel Vadot			reg = <0x1000>;
68*8d13bc63SEmmanuel Vadot			interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
69*8d13bc63SEmmanuel Vadot				     <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
70*8d13bc63SEmmanuel Vadot				     <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
71*8d13bc63SEmmanuel Vadot				     <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
72*8d13bc63SEmmanuel Vadot				     <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
73*8d13bc63SEmmanuel Vadot				     <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
74*8d13bc63SEmmanuel Vadot				     <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
75*8d13bc63SEmmanuel Vadot				     <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
76*8d13bc63SEmmanuel Vadot			interrupt-names = "chg-done",
77*8d13bc63SEmmanuel Vadot					  "chg-fast",
78*8d13bc63SEmmanuel Vadot					  "chg-trkl",
79*8d13bc63SEmmanuel Vadot					  "bat-temp-ok",
80*8d13bc63SEmmanuel Vadot					  "bat-present",
81*8d13bc63SEmmanuel Vadot					  "chg-gone",
82*8d13bc63SEmmanuel Vadot					  "usb-valid",
83*8d13bc63SEmmanuel Vadot					  "dc-valid";
84*8d13bc63SEmmanuel Vadot
85*8d13bc63SEmmanuel Vadot			status = "disabled";
86*8d13bc63SEmmanuel Vadot
87*8d13bc63SEmmanuel Vadot			chg_otg: otg-vbus { };
88*8d13bc63SEmmanuel Vadot		};
89*8d13bc63SEmmanuel Vadot
90*8d13bc63SEmmanuel Vadot		pm8226_temp: temp-alarm@2400 {
91*8d13bc63SEmmanuel Vadot			compatible = "qcom,spmi-temp-alarm";
92*8d13bc63SEmmanuel Vadot			reg = <0x2400>;
93*8d13bc63SEmmanuel Vadot			interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
94*8d13bc63SEmmanuel Vadot			io-channels = <&pm8226_vadc VADC_DIE_TEMP>;
95*8d13bc63SEmmanuel Vadot			io-channel-names = "thermal";
96*8d13bc63SEmmanuel Vadot			#thermal-sensor-cells = <0>;
97*8d13bc63SEmmanuel Vadot		};
98*8d13bc63SEmmanuel Vadot
99*8d13bc63SEmmanuel Vadot		pm8226_vadc: adc@3100 {
100*8d13bc63SEmmanuel Vadot			compatible = "qcom,spmi-vadc";
101*8d13bc63SEmmanuel Vadot			reg = <0x3100>;
102*8d13bc63SEmmanuel Vadot			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
103*8d13bc63SEmmanuel Vadot			#address-cells = <1>;
104*8d13bc63SEmmanuel Vadot			#size-cells = <0>;
105*8d13bc63SEmmanuel Vadot			#io-channel-cells = <1>;
106*8d13bc63SEmmanuel Vadot
107*8d13bc63SEmmanuel Vadot			channel@7 {
108*8d13bc63SEmmanuel Vadot				reg = <VADC_VSYS>;
109*8d13bc63SEmmanuel Vadot				qcom,pre-scaling = <1 3>;
110*8d13bc63SEmmanuel Vadot				label = "vph_pwr";
111*8d13bc63SEmmanuel Vadot			};
112*8d13bc63SEmmanuel Vadot			channel@8 {
113*8d13bc63SEmmanuel Vadot				reg = <VADC_DIE_TEMP>;
114*8d13bc63SEmmanuel Vadot				label = "die_temp";
115*8d13bc63SEmmanuel Vadot			};
116*8d13bc63SEmmanuel Vadot			channel@9 {
117*8d13bc63SEmmanuel Vadot				reg = <VADC_REF_625MV>;
118*8d13bc63SEmmanuel Vadot				label = "ref_625mv";
119*8d13bc63SEmmanuel Vadot			};
120*8d13bc63SEmmanuel Vadot			channel@a {
121*8d13bc63SEmmanuel Vadot				reg = <VADC_REF_1250MV>;
122*8d13bc63SEmmanuel Vadot				label = "ref_1250mv";
123*8d13bc63SEmmanuel Vadot			};
124*8d13bc63SEmmanuel Vadot			channel@e {
125*8d13bc63SEmmanuel Vadot				reg = <VADC_GND_REF>;
126*8d13bc63SEmmanuel Vadot			};
127*8d13bc63SEmmanuel Vadot			channel@f {
128*8d13bc63SEmmanuel Vadot				reg = <VADC_VDD_VADC>;
129*8d13bc63SEmmanuel Vadot			};
130*8d13bc63SEmmanuel Vadot		};
131*8d13bc63SEmmanuel Vadot
132*8d13bc63SEmmanuel Vadot		pm8226_iadc: adc@3600 {
133*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8226-iadc", "qcom,spmi-iadc";
134*8d13bc63SEmmanuel Vadot			reg = <0x3600>;
135*8d13bc63SEmmanuel Vadot			interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
136*8d13bc63SEmmanuel Vadot		};
137*8d13bc63SEmmanuel Vadot
138*8d13bc63SEmmanuel Vadot		rtc@6000 {
139*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8941-rtc";
140*8d13bc63SEmmanuel Vadot			reg = <0x6000>, <0x6100>;
141*8d13bc63SEmmanuel Vadot			reg-names = "rtc", "alarm";
142*8d13bc63SEmmanuel Vadot			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
143*8d13bc63SEmmanuel Vadot		};
144*8d13bc63SEmmanuel Vadot
145*8d13bc63SEmmanuel Vadot		pm8226_mpps: mpps@a000 {
146*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8226-mpp", "qcom,spmi-mpp";
147*8d13bc63SEmmanuel Vadot			reg = <0xa000>;
148*8d13bc63SEmmanuel Vadot			gpio-controller;
149*8d13bc63SEmmanuel Vadot			#gpio-cells = <2>;
150*8d13bc63SEmmanuel Vadot			gpio-ranges = <&pm8226_mpps 0 0 8>;
151*8d13bc63SEmmanuel Vadot			interrupt-controller;
152*8d13bc63SEmmanuel Vadot			#interrupt-cells = <2>;
153*8d13bc63SEmmanuel Vadot		};
154*8d13bc63SEmmanuel Vadot
155*8d13bc63SEmmanuel Vadot		pm8226_gpios: gpio@c000 {
156*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8226-gpio", "qcom,spmi-gpio";
157*8d13bc63SEmmanuel Vadot			reg = <0xc000>;
158*8d13bc63SEmmanuel Vadot			gpio-controller;
159*8d13bc63SEmmanuel Vadot			#gpio-cells = <2>;
160*8d13bc63SEmmanuel Vadot			gpio-ranges = <&pm8226_gpios 0 0 8>;
161*8d13bc63SEmmanuel Vadot			interrupt-controller;
162*8d13bc63SEmmanuel Vadot			#interrupt-cells = <2>;
163*8d13bc63SEmmanuel Vadot		};
164*8d13bc63SEmmanuel Vadot	};
165*8d13bc63SEmmanuel Vadot
166*8d13bc63SEmmanuel Vadot	pm8226_1: pm8226@1 {
167*8d13bc63SEmmanuel Vadot		compatible = "qcom,pm8226", "qcom,spmi-pmic";
168*8d13bc63SEmmanuel Vadot		reg = <0x1 SPMI_USID>;
169*8d13bc63SEmmanuel Vadot		#address-cells = <1>;
170*8d13bc63SEmmanuel Vadot		#size-cells = <0>;
171*8d13bc63SEmmanuel Vadot
172*8d13bc63SEmmanuel Vadot		pm8226_spmi_regulators: regulators {
173*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8226-regulators";
174*8d13bc63SEmmanuel Vadot		};
175*8d13bc63SEmmanuel Vadot
176*8d13bc63SEmmanuel Vadot		pm8226_vib: vibrator@c000 {
177*8d13bc63SEmmanuel Vadot			compatible = "qcom,pm8916-vib";
178*8d13bc63SEmmanuel Vadot			reg = <0xc000>;
179*8d13bc63SEmmanuel Vadot			status = "disabled";
180*8d13bc63SEmmanuel Vadot		};
181*8d13bc63SEmmanuel Vadot	};
182*8d13bc63SEmmanuel Vadot};
183