Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, AngeloGioacchino Del Regno
4 * <angelogioacchino.delregno@somainline.org>
5 * Copyright (c) 2022, Marijn Suijten <marijn.suijten@somainline.org>
6 */
7
8#include <dt-bindings/iio/qcom,spmi-vadc.h>
9#include <dt-bindings/input/linux-event-codes.h>
10#include <dt-bindings/interrupt-controller/irq.h>
11#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
12#include <dt-bindings/spmi/spmi.h>
13
14&spmi_bus {
15 pmic@0 {
16 compatible = "qcom,pm8950", "qcom,spmi-pmic";
17 reg = <0x0 SPMI_USID>;
18 #address-cells = <1>;
19 #size-cells = <0>;
20
21 pm8950_pon: pon@800 {
22 compatible = "qcom,pm8916-pon";
23 reg = <0x0800>;
24 mode-bootloader = <0x2>;
25 mode-recovery = <0x1>;
26
27 pwrkey {
28 compatible = "qcom,pm8941-pwrkey";
29 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
30 debounce = <15625>;
31 bias-pull-up;
32 linux,code = <KEY_POWER>;
33 };
34
35 pm8950_resin: resin {
36 compatible = "qcom,pm8941-resin";
37 interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
38 debounce = <15625>;
39 bias-pull-up;
40 status = "disabled";
41 };
42 };
43
44 pm8950_temp: temp-alarm@2400 {
45 compatible = "qcom,spmi-temp-alarm";
46 reg = <0x2400>;
47 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
48 io-channels = <&pm8950_vadc VADC_DIE_TEMP>;
49 io-channel-names = "thermal";
50 #thermal-sensor-cells = <0>;
51 };
52
53 pm8950_vadc: adc@3100 {
54 compatible = "qcom,spmi-vadc";
55 reg = <0x3100>;
56 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
57 #address-cells = <1>;
58 #size-cells = <0>;
59 #io-channel-cells = <1>;
60
61 channel@5 {
62 reg = <VADC_VCOIN>;
63 qcom,pre-scaling = <1 1>;
64 label = "vcoin";
65 };
66
67 channel@7 {
68 reg = <VADC_VSYS>;
69 qcom,pre-scaling = <1 1>;
70 label = "vph_pwr";
71 };
72
73 channel@8 {
74 reg = <VADC_DIE_TEMP>;
75 qcom,pre-scaling = <1 1>;
76 label = "die_temp";
77 };
78
79 channel@9 {
80 reg = <VADC_REF_625MV>;
81 qcom,pre-scaling = <1 1>;
82 label = "ref_625mv";
83 };
84
85 channel@a {
86 reg = <VADC_REF_1250MV>;
87 qcom,pre-scaling = <1 1>;
88 label = "ref_1250mv";
89 };
90
91 channel@c {
92 reg = <VADC_SPARE1>;
93 qcom,pre-scaling = <1 1>;
94 label = "ref_buf_625mv";
95 };
96
97 channel@e {
98 reg = <VADC_GND_REF>;
99 label = "ref_gnd";
100 };
101
102 channel@f {
103 reg = <VADC_VDD_VADC>;
104 label = "ref_vdd";
105 };
106
107 channel@11 {
108 reg = <VADC_P_MUX2_1_1>;
109 qcom,pre-scaling = <1 1>;
110 qcom,ratiometric;
111 qcom,hw-settle-time = <200>;
112 label = "pa_therm1";
113 };
114
115 channel@13 {
116 reg = <VADC_P_MUX4_1_1>;
117 qcom,pre-scaling = <1 1>;
118 qcom,ratiometric;
119 qcom,hw-settle-time = <200>;
120 label = "case_therm";
121 };
122
123 channel@32 {
124 reg = <VADC_LR_MUX3_XO_THERM>;
125 qcom,pre-scaling = <1 1>;
126 qcom,ratiometric;
127 qcom,hw-settle-time = <200>;
128 label = "xo_therm";
129 };
130
131 channel@36 {
132 reg = <VADC_LR_MUX7_HW_ID>;
133 qcom,pre-scaling = <1 1>;
134 qcom,ratiometric;
135 qcom,hw-settle-time = <200>;
136 label = "pa_therm0";
137 };
138
139 channel@3c {
140 reg = <VADC_LR_MUX3_BUF_XO_THERM>;
141 qcom,pre-scaling = <1 1>;
142 qcom,ratiometric;
143 qcom,hw-settle-time = <200>;
144 label = "xo_therm_buf";
145 };
146 };
147
148 rtc@6000 {
149 compatible = "qcom,pm8941-rtc";
150 reg = <0x6000>, <0x6100>;
151 reg-names = "rtc", "alarm";
152 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
153 };
154
155 pm8950_mpps: mpps@a000 {
156 compatible = "qcom,pm8950-mpp", "qcom,spmi-mpp";
157 reg = <0xa000>;
158 gpio-controller;
159 gpio-ranges = <&pm8950_mpps 0 0 4>;
160 #gpio-cells = <2>;
161 interrupt-controller;
162 #interrupt-cells = <2>;
163 };
164
165 pm8950_gpios: gpio@c000 {
166 compatible = "qcom,pm8950-gpio", "qcom,spmi-gpio";
167 reg = <0xc000>;
168 gpio-controller;
169 gpio-ranges = <&pm8950_gpios 0 0 8>;
170 #gpio-cells = <2>;
171 interrupt-controller;
172 #interrupt-cells = <2>;
173 };
174 };
175
176 pmic@1 {
177 compatible = "qcom,pm8950", "qcom,spmi-pmic";
178 reg = <0x1 SPMI_USID>;
179 #address-cells = <1>;
180 #size-cells = <0>;
181
182 pm8950_spmi_regulators: regulators {
183 compatible = "qcom,pm8950-regulators";
184 };
185 };
186};