arm64: dts: qcom: sc8280xp-pmics: add pmk8280 rtc
[platform/kernel/linux-starfive.git] / arch / arm64 / boot / dts / qcom / sc8280xp-pmics.dtsi
1 // SPDX-License-Identifier: BSD-3-Clause
2 /*
3  * Copyright (c) 2022, Linaro Limited
4  */
5
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/interrupt-controller/irq.h>
8 #include <dt-bindings/spmi/spmi.h>
9
10 / {
11         thermal-zones {
12                 pm8280_1_thermal: pm8280-1-thermal {
13                         polling-delay-passive = <100>;
14                         polling-delay = <0>;
15                         thermal-sensors = <&pm8280_1_temp_alarm>;
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 = "critical";
28                                 };
29                         };
30                 };
31
32                 pm8280_2_thermal: pm8280-2-thermal {
33                         polling-delay-passive = <100>;
34                         polling-delay = <0>;
35                         thermal-sensors = <&pm8280_2_temp_alarm>;
36
37                         trips {
38                                 trip0 {
39                                         temperature = <95000>;
40                                         hysteresis = <0>;
41                                         type = "passive";
42                                 };
43
44                                 trip1 {
45                                         temperature = <115000>;
46                                         hysteresis = <0>;
47                                         type = "critical";
48                                 };
49                         };
50                 };
51         };
52 };
53
54 &spmi_bus {
55         pmk8280: pmic@0 {
56                 compatible = "qcom,pmk8350", "qcom,spmi-pmic";
57                 reg = <0x0 SPMI_USID>;
58                 #address-cells = <1>;
59                 #size-cells = <0>;
60
61                 pmk8280_pon: pon@1300 {
62                         compatible = "qcom,pm8998-pon";
63                         reg = <0x1300>;
64
65                         pmk8280_pon_pwrkey: pwrkey {
66                                 compatible = "qcom,pmk8350-pwrkey";
67                                 interrupts-extended = <&spmi_bus 0x0 0x13 0x7 IRQ_TYPE_EDGE_BOTH>;
68                                 linux,code = <KEY_POWER>;
69                                 status = "disabled";
70                         };
71
72                         pmk8280_pon_resin: resin {
73                                 compatible = "qcom,pmk8350-resin";
74                                 interrupts-extended = <&spmi_bus 0x0 0x13 0x6 IRQ_TYPE_EDGE_BOTH>;
75                                 status = "disabled";
76                         };
77                 };
78
79                 pmk8280_vadc: adc@3100 {
80                         compatible = "qcom,spmi-adc7";
81                         reg = <0x3100>;
82                         interrupts-extended = <&spmi_bus 0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
83                         #address-cells = <1>;
84                         #size-cells = <0>;
85                         #io-channel-cells = <1>;
86                         status = "disabled";
87                 };
88
89                 pmk8280_adc_tm: adc-tm@3400 {
90                         compatible = "qcom,spmi-adc-tm5-gen2";
91                         reg = <0x3400>;
92                         interrupts-extended = <&spmi_bus 0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
93                         #address-cells = <1>;
94                         #size-cells = <0>;
95                         #thermal-sensor-cells = <1>;
96                         status = "disabled";
97                 };
98
99                 pmk8280_rtc: rtc@6100 {
100                         compatible = "qcom,pmk8350-rtc";
101                         reg = <0x6100>, <0x6200>;
102                         reg-names = "rtc", "alarm";
103                         interrupts = <0x0 0x62 0x1 IRQ_TYPE_EDGE_RISING>;
104                         wakeup-source;
105                         status = "disabled";
106                 };
107         };
108
109         pmc8280_1: pmic@1 {
110                 compatible = "qcom,pm8350", "qcom,spmi-pmic";
111                 reg = <0x1 SPMI_USID>;
112                 #address-cells = <1>;
113                 #size-cells = <0>;
114
115                 pm8280_1_temp_alarm: temp-alarm@a00 {
116                         compatible = "qcom,spmi-temp-alarm";
117                         reg = <0xa00>;
118                         interrupts-extended = <&spmi_bus 0x1 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
119                         #thermal-sensor-cells = <0>;
120                 };
121
122                 pmc8280_1_gpios: gpio@8800 {
123                         compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
124                         reg = <0x8800>;
125                         gpio-controller;
126                         gpio-ranges = <&pmc8280_1_gpios 0 0 10>;
127                         #gpio-cells = <2>;
128                         interrupt-controller;
129                         #interrupt-cells = <2>;
130                 };
131         };
132
133         pmc8280c: pmic@2 {
134                 compatible = "qcom,pm8350c", "qcom,spmi-pmic";
135                 reg = <0x2 SPMI_USID>;
136                 #address-cells = <1>;
137                 #size-cells = <0>;
138
139                 pmc8280c_gpios: gpio@8800 {
140                         compatible = "qcom,pm8350c-gpio", "qcom,spmi-gpio";
141                         reg = <0x8800>;
142                         gpio-controller;
143                         gpio-ranges = <&pmc8280c_gpios 0 0 9>;
144                         #gpio-cells = <2>;
145                         interrupt-controller;
146                         #interrupt-cells = <2>;
147                 };
148
149                 pmc8280c_lpg: pwm {
150                         compatible = "qcom,pm8350c-pwm";
151
152                         #address-cells = <1>;
153                         #size-cells = <0>;
154
155                         #pwm-cells = <2>;
156
157                         status = "disabled";
158                 };
159         };
160
161         pmc8280_2: pmic@3 {
162                 compatible = "qcom,pm8350", "qcom,spmi-pmic";
163                 reg = <0x3 SPMI_USID>;
164                 #address-cells = <1>;
165                 #size-cells = <0>;
166
167                 pm8280_2_temp_alarm: temp-alarm@a00 {
168                         compatible = "qcom,spmi-temp-alarm";
169                         reg = <0xa00>;
170                         interrupts-extended = <&spmi_bus 0x2 0xa 0x0 IRQ_TYPE_EDGE_BOTH>;
171                         #thermal-sensor-cells = <0>;
172                 };
173
174                 pmc8280_2_gpios: gpio@8800 {
175                         compatible = "qcom,pm8350-gpio", "qcom,spmi-gpio";
176                         reg = <0x8800>;
177                         gpio-controller;
178                         gpio-ranges = <&pmc8280_2_gpios 0 0 10>;
179                         #gpio-cells = <2>;
180                         interrupt-controller;
181                         #interrupt-cells = <2>;
182                 };
183         };
184
185         pmr735a: pmic@4 {
186                 compatible = "qcom,pmr735a", "qcom,spmi-pmic";
187                 reg = <0x4 SPMI_USID>;
188                 #address-cells = <1>;
189                 #size-cells = <0>;
190
191                 pmr735a_gpios: gpio@8800 {
192                         compatible = "qcom,pmr735a-gpio", "qcom,spmi-gpio";
193                         reg = <0x8800>;
194                         gpio-controller;
195                         gpio-ranges = <&pmr735a_gpios 0 0 4>;
196                         #gpio-cells = <2>;
197                         interrupt-controller;
198                         #interrupt-cells = <2>;
199                 };
200         };
201 };