Linux 5.6.13
[linux/fpc-iii.git] / arch / arm / boot / dts / qcom-pm8941.dtsi
blobc1f2012d1c8b615714ce0dc510dac6d4e748ad96
1 // SPDX-License-Identifier: GPL-2.0
2 #include <dt-bindings/iio/qcom,spmi-vadc.h>
3 #include <dt-bindings/interrupt-controller/irq.h>
4 #include <dt-bindings/spmi/spmi.h>
6 &spmi_bus {
8         pm8941_0: pm8941@0 {
9                 compatible = "qcom,pm8941", "qcom,spmi-pmic";
10                 reg = <0x0 SPMI_USID>;
11                 #address-cells = <1>;
12                 #size-cells = <0>;
14                 rtc@6000 {
15                         compatible = "qcom,pm8941-rtc";
16                         reg = <0x6000>,
17                               <0x6100>;
18                         reg-names = "rtc", "alarm";
19                         interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
20                 };
22                 pwrkey@800 {
23                         compatible = "qcom,pm8941-pwrkey";
24                         reg = <0x800>;
25                         interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
26                         debounce = <15625>;
27                         bias-pull-up;
28                 };
30                 usb_id: misc@900 {
31                         compatible = "qcom,pm8941-misc";
32                         reg = <0x900>;
33                         interrupts = <0x0 0x9 0 IRQ_TYPE_EDGE_BOTH>;
34                         interrupt-names = "usb_id";
35                 };
37                 smbb: charger@1000 {
38                         compatible = "qcom,pm8941-charger";
39                         reg = <0x1000>;
40                         interrupts = <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>,
41                                      <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>,
42                                      <0x0 0x10 4 IRQ_TYPE_EDGE_BOTH>,
43                                      <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>,
44                                      <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>,
45                                      <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>,
46                                      <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>,
47                                      <0x0 0x14 1 IRQ_TYPE_EDGE_BOTH>;
48                         interrupt-names = "chg-done",
49                                           "chg-fast",
50                                           "chg-trkl",
51                                           "bat-temp-ok",
52                                           "bat-present",
53                                           "chg-gone",
54                                           "usb-valid",
55                                           "dc-valid";
57                         usb-otg-in-supply = <&pm8941_5vs1>;
59                         chg_otg: otg-vbus { };
60                 };
62                 pm8941_gpios: gpios@c000 {
63                         compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
64                         reg = <0xc000>;
65                         gpio-controller;
66                         gpio-ranges = <&pm8941_gpios 0 0 36>;
67                         #gpio-cells = <2>;
68                         interrupt-controller;
69                         #interrupt-cells = <2>;
71                         boost_bypass_n_pin: boost-bypass {
72                                 pins = "gpio21";
73                                 function = "normal";
74                         };
75                 };
77                 pm8941_mpps: mpps@a000 {
78                         compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
79                         reg = <0xa000>;
80                         gpio-controller;
81                         #gpio-cells = <2>;
82                         interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
83                                      <0 0xa1 0 IRQ_TYPE_NONE>,
84                                      <0 0xa2 0 IRQ_TYPE_NONE>,
85                                      <0 0xa3 0 IRQ_TYPE_NONE>,
86                                      <0 0xa4 0 IRQ_TYPE_NONE>,
87                                      <0 0xa5 0 IRQ_TYPE_NONE>,
88                                      <0 0xa6 0 IRQ_TYPE_NONE>,
89                                      <0 0xa7 0 IRQ_TYPE_NONE>;
90                 };
92                 pm8941_temp: temp-alarm@2400 {
93                         compatible = "qcom,spmi-temp-alarm";
94                         reg = <0x2400>;
95                         interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
96                         io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
97                         io-channel-names = "thermal";
98                         #thermal-sensor-cells = <0>;
99                 };
101                 pm8941_vadc: vadc@3100 {
102                         compatible = "qcom,spmi-vadc";
103                         reg = <0x3100>;
104                         interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
105                         #address-cells = <1>;
106                         #size-cells = <0>;
107                         #io-channel-cells = <1>;
109                         bat_temp {
110                                 reg = <VADC_LR_MUX1_BAT_THERM>;
111                         };
112                         die_temp {
113                                 reg = <VADC_DIE_TEMP>;
114                         };
115                         ref_625mv {
116                                 reg = <VADC_REF_625MV>;
117                         };
118                         ref_1250v {
119                                 reg = <VADC_REF_1250MV>;
120                         };
121                         ref_gnd {
122                                 reg = <VADC_GND_REF>;
123                         };
124                         ref_vdd {
125                                 reg = <VADC_VDD_VADC>;
126                         };
127                         vbat_sns {
128                                 reg = <VADC_VBAT_SNS>;
129                         };
130                 };
132                 pm8941_iadc: iadc@3600 {
133                         compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
134                         reg = <0x3600>;
135                         interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
136                         qcom,external-resistor-micro-ohms = <10000>;
137                 };
139                 coincell@2800 {
140                         compatible = "qcom,pm8941-coincell";
141                         reg = <0x2800>;
142                         status = "disabled";
143                 };
144         };
146         pm8941_1: pm8941@1 {
147                 compatible = "qcom,pm8941", "qcom,spmi-pmic";
148                 reg = <0x1 SPMI_USID>;
149                 #address-cells = <1>;
150                 #size-cells = <0>;
152                 pm8941_wled: wled@d800 {
153                         compatible = "qcom,pm8941-wled";
154                         reg = <0xd800>;
155                         label = "backlight";
157                         status = "disabled";
158                 };
160                 regulators {
161                         compatible = "qcom,pm8941-regulators";
162                         interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
163                         interrupt-names = "ocp-5vs1", "ocp-5vs2";
164                         vin_5vs-supply = <&pm8941_5v>;
166                         pm8941_5v: s4 {
167                                 regulator-min-microvolt = <5000000>;
168                                 regulator-max-microvolt = <5000000>;
169                                 regulator-enable-ramp-delay = <500>;
170                         };
172                         pm8941_5vs1: 5vs1 {
173                                 regulator-enable-ramp-delay = <1000>;
174                                 regulator-pull-down;
175                                 regulator-over-current-protection;
176                                 qcom,ocp-max-retries = <10>;
177                                 qcom,ocp-retry-delay = <30>;
178                                 qcom,vs-soft-start-strength = <0>;
179                                 regulator-initial-mode = <1>;
180                         };
182                         pm8941_5vs2: 5vs2 {
183                                 regulator-enable-ramp-delay = <1000>;
184                                 regulator-pull-down;
185                                 regulator-over-current-protection;
186                                 qcom,ocp-max-retries = <10>;
187                                 qcom,ocp-retry-delay = <30>;
188                                 qcom,vs-soft-start-strength = <0>;
189                                 regulator-initial-mode = <1>;
190                         };
191                 };
192         };