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