blob: e65049e0fb452407795e7ebf0a79c3d79bd68e98 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +03002#include <dt-bindings/iio/qcom,spmi-vadc.h>
3#include <dt-bindings/interrupt-controller/irq.h>
Ivan T. Ivanovc9127892015-02-03 14:17:59 +02004#include <dt-bindings/spmi/spmi.h>
5
6&spmi_bus {
7
Stephen Boyd134c5442015-11-20 15:31:20 -08008 pm8941_0: pm8941@0 {
9 compatible = "qcom,pm8941", "qcom,spmi-pmic";
Ivan T. Ivanovc9127892015-02-03 14:17:59 +020010 reg = <0x0 SPMI_USID>;
11 #address-cells = <1>;
12 #size-cells = <0>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030013
14 rtc@6000 {
15 compatible = "qcom,pm8941-rtc";
Stephen Boyd65d4e832015-11-25 14:27:36 -080016 reg = <0x6000>,
17 <0x6100>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030018 reg-names = "rtc", "alarm";
19 interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
20 };
21
22 pwrkey@800 {
23 compatible = "qcom,pm8941-pwrkey";
Stephen Boyd65d4e832015-11-25 14:27:36 -080024 reg = <0x800>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030025 interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
26 debounce = <15625>;
27 bias-pull-up;
28 };
29
Stephen Boyd4ac5a202017-01-26 16:47:26 -080030 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 };
36
37 smbb: charger@1000 {
Courtney Cavin982afd82015-07-30 10:53:57 -070038 compatible = "qcom,pm8941-charger";
Stephen Boyd65d4e832015-11-25 14:27:36 -080039 reg = <0x1000>;
Courtney Cavin982afd82015-07-30 10:53:57 -070040 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";
Bird, Timffb35d42017-01-26 16:47:25 -080056
57 usb-otg-in-supply = <&pm8941_5vs1>;
58
59 chg_otg: otg-vbus { };
Courtney Cavin982afd82015-07-30 10:53:57 -070060 };
61
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030062 pm8941_gpios: gpios@c000 {
Stephen Boyd2ca9c2a42015-11-20 17:49:46 -080063 compatible = "qcom,pm8941-gpio", "qcom,spmi-gpio";
Stephen Boyd65d4e832015-11-25 14:27:36 -080064 reg = <0xc000>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030065 gpio-controller;
66 #gpio-cells = <2>;
Brian Masney5f540fb2019-01-19 15:42:45 -050067 interrupt-controller;
68 #interrupt-cells = <2>;
Bhushan Shah73bae192016-07-29 11:39:07 +053069
70 boost_bypass_n_pin: boost-bypass {
71 pins = "gpio21";
72 function = "normal";
73 };
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030074 };
75
76 pm8941_mpps: mpps@a000 {
Stephen Boyd2ca9c2a42015-11-20 17:49:46 -080077 compatible = "qcom,pm8941-mpp", "qcom,spmi-mpp";
Stephen Boyd65d4e832015-11-25 14:27:36 -080078 reg = <0xa000>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030079 gpio-controller;
80 #gpio-cells = <2>;
81 interrupts = <0 0xa0 0 IRQ_TYPE_NONE>,
82 <0 0xa1 0 IRQ_TYPE_NONE>,
83 <0 0xa2 0 IRQ_TYPE_NONE>,
84 <0 0xa3 0 IRQ_TYPE_NONE>,
85 <0 0xa4 0 IRQ_TYPE_NONE>,
86 <0 0xa5 0 IRQ_TYPE_NONE>,
87 <0 0xa6 0 IRQ_TYPE_NONE>,
88 <0 0xa7 0 IRQ_TYPE_NONE>;
89 };
90
91 pm8941_temp: temp-alarm@2400 {
92 compatible = "qcom,spmi-temp-alarm";
Stephen Boyd65d4e832015-11-25 14:27:36 -080093 reg = <0x2400>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +030094 interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
95 io-channels = <&pm8941_vadc VADC_DIE_TEMP>;
96 io-channel-names = "thermal";
97 #thermal-sensor-cells = <0>;
98 };
99
100 pm8941_vadc: vadc@3100 {
101 compatible = "qcom,spmi-vadc";
Stephen Boyd65d4e832015-11-25 14:27:36 -0800102 reg = <0x3100>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300103 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
104 #address-cells = <1>;
105 #size-cells = <0>;
106 #io-channel-cells = <1>;
107
Craig Tatlor296a3642018-03-30 21:04:08 +0100108 bat_temp {
109 reg = <VADC_LR_MUX1_BAT_THERM>;
110 };
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300111 die_temp {
112 reg = <VADC_DIE_TEMP>;
113 };
114 ref_625mv {
115 reg = <VADC_REF_625MV>;
116 };
117 ref_1250v {
118 reg = <VADC_REF_1250MV>;
119 };
120 ref_gnd {
121 reg = <VADC_GND_REF>;
122 };
123 ref_vdd {
124 reg = <VADC_VDD_VADC>;
125 };
Craig Tatlor296a3642018-03-30 21:04:08 +0100126 vbat_sns {
127 reg = <VADC_VBAT_SNS>;
128 };
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300129 };
130
131 pm8941_iadc: iadc@3600 {
132 compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc";
Stephen Boyd65d4e832015-11-25 14:27:36 -0800133 reg = <0x3600>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300134 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
135 qcom,external-resistor-micro-ohms = <10000>;
136 };
Tim Birdccf97fe2015-07-16 16:55:33 -0700137
138 coincell@2800 {
139 compatible = "qcom,pm8941-coincell";
140 reg = <0x2800>;
141 status = "disabled";
142 };
Ivan T. Ivanovc9127892015-02-03 14:17:59 +0200143 };
144
Stephen Boyd134c5442015-11-20 15:31:20 -0800145 pm8941_1: pm8941@1 {
146 compatible = "qcom,pm8941", "qcom,spmi-pmic";
Ivan T. Ivanovc9127892015-02-03 14:17:59 +0200147 reg = <0x1 SPMI_USID>;
148 #address-cells = <1>;
149 #size-cells = <0>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300150
Bjorn Andersson7026d152015-11-23 11:04:07 -0800151 pm8941_wled: wled@d800 {
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300152 compatible = "qcom,pm8941-wled";
Stephen Boyd65d4e832015-11-25 14:27:36 -0800153 reg = <0xd800>;
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300154 label = "backlight";
155
Bjorn Andersson7026d152015-11-23 11:04:07 -0800156 status = "disabled";
Ivan T. Ivanov635ecad2015-04-20 10:45:36 +0300157 };
Stephen Boyd4ac5a202017-01-26 16:47:26 -0800158
159 regulators {
160 compatible = "qcom,pm8941-regulators";
161 interrupts = <0x1 0x83 0x2 0>, <0x1 0x84 0x2 0>;
162 interrupt-names = "ocp-5vs1", "ocp-5vs2";
163 vin_5vs-supply = <&pm8941_5v>;
164
165 pm8941_5v: s4 {
166 regulator-min-microvolt = <5000000>;
167 regulator-max-microvolt = <5000000>;
168 regulator-enable-ramp-delay = <500>;
169 };
170
171 pm8941_5vs1: 5vs1 {
172 regulator-enable-ramp-delay = <1000>;
173 regulator-pull-down;
174 regulator-over-current-protection;
175 qcom,ocp-max-retries = <10>;
176 qcom,ocp-retry-delay = <30>;
177 qcom,vs-soft-start-strength = <0>;
178 regulator-initial-mode = <1>;
179 };
180 };
Ivan T. Ivanovc9127892015-02-03 14:17:59 +0200181 };
182};