blob: 5290f4671c7d5b158a11b7cf6d011d60c0d5b538 [file] [log] [blame]
David Collinsdba7baf2017-03-10 11:48:37 -08001/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#include <dt-bindings/spmi/spmi.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15
16&spmi_bus {
17 qcom,pm8998@0 {
18 compatible = "qcom,spmi-pmic";
19 reg = <0x0 SPMI_USID>;
20 #address-cells = <2>;
21 #size-cells = <0>;
22
23 pm8998_revid: qcom,revid@100 {
24 compatible = "qcom,qpnp-revid";
25 reg = <0x100 0x100>;
26 };
27
28 qcom,power-on@800 {
29 compatible = "qcom,qpnp-power-on";
30 reg = <0x800 0x100>;
31 interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>,
32 <0x0 0x8 0x1 IRQ_TYPE_NONE>,
33 <0x0 0x8 0x4 IRQ_TYPE_NONE>,
34 <0x0 0x8 0x5 IRQ_TYPE_NONE>;
35 interrupt-names = "kpdpwr", "resin",
36 "resin-bark", "kpdpwr-resin-bark";
37 qcom,pon-dbc-delay = <15625>;
38 qcom,system-reset;
39 qcom,store-hard-reset-reason;
40
41 qcom,pon_1 {
42 qcom,pon-type = <0>;
43 qcom,pull-up = <1>;
44 linux,code = <116>;
45 qcom,support-reset = <1>;
46 qcom,s1-timer = <10256>;
47 qcom,s2-timer = <2000>;
48 qcom,s2-type = <1>;
49 };
50
51 qcom,pon_2 {
52 qcom,pon-type = <1>;
53 qcom,pull-up = <1>;
54 linux,code = <114>;
55 };
56
57 qcom,pon_3 {
58 qcom,pon-type = <3>;
59 qcom,support-reset = <1>;
60 qcom,pull-up = <1>;
61 qcom,s1-timer = <6720>;
62 qcom,s2-timer = <2000>;
63 qcom,s2-type = <7>;
64 qcom,use-bark;
65 };
66 };
67
68 qcom,temp-alarm@2400 {
69 compatible = "qcom,qpnp-temp-alarm";
70 reg = <0x2400 0x100>;
71 interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
72 label = "pm8998_tz";
73 };
74
Fenglin Wu5a50fc82017-03-22 12:27:31 +080075 pm8998_gpios: pinctrl@c000 {
76 compatible = "qcom,spmi-gpio";
77 reg = <0xc000 0x1a00>;
78 interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>,
79 <0x0 0xc1 0 IRQ_TYPE_NONE>,
80 <0x0 0xc3 0 IRQ_TYPE_NONE>,
81 <0x0 0xc4 0 IRQ_TYPE_NONE>,
82 <0x0 0xc5 0 IRQ_TYPE_NONE>,
83 <0x0 0xc6 0 IRQ_TYPE_NONE>,
84 <0x0 0xc7 0 IRQ_TYPE_NONE>,
85 <0x0 0xc8 0 IRQ_TYPE_NONE>,
86 <0x0 0xc9 0 IRQ_TYPE_NONE>,
87 <0x0 0xca 0 IRQ_TYPE_NONE>,
88 <0x0 0xcb 0 IRQ_TYPE_NONE>,
89 <0x0 0xcc 0 IRQ_TYPE_NONE>,
90 <0x0 0xcd 0 IRQ_TYPE_NONE>,
91 <0x0 0xcf 0 IRQ_TYPE_NONE>,
92 <0x0 0xd0 0 IRQ_TYPE_NONE>,
93 <0x0 0xd1 0 IRQ_TYPE_NONE>,
94 <0x0 0xd2 0 IRQ_TYPE_NONE>,
95 <0x0 0xd4 0 IRQ_TYPE_NONE>,
96 <0x0 0xd6 0 IRQ_TYPE_NONE>;
97 interrupt-names = "pm8998_gpio1", "pm8998_gpio2",
98 "pm8998_gpio4", "pm8998_gpio5",
99 "pm8998_gpio6", "pm8998_gpio7",
100 "pm8998_gpio8", "pm8998_gpio9",
101 "pm8998_gpio10", "pm8998_gpio11",
102 "pm8998_gpio12", "pm8998_gpio13",
103 "pm8998_gpio14", "pm8998_gpio16",
104 "pm8998_gpio17", "pm8998_gpio18",
105 "pm8998_gpio19", "pm8998_gpio21",
106 "pm8998_gpio23";
David Collinsdba7baf2017-03-10 11:48:37 -0800107 gpio-controller;
108 #gpio-cells = <2>;
Fenglin Wu5a50fc82017-03-22 12:27:31 +0800109 qcom,gpios-disallowed = <3 15 20 22 24 25 26>;
David Collinsdba7baf2017-03-10 11:48:37 -0800110 };
111
112 pm8998_coincell: qcom,coincell@2800 {
113 compatible = "qcom,qpnp-coincell";
114 reg = <0x2800 0x100>;
115 };
116
117 pm8998_rtc: qcom,pm8998_rtc {
118 compatible = "qcom,qpnp-rtc";
119 #address-cells = <1>;
120 #size-cells = <1>;
121 qcom,qpnp-rtc-write = <0>;
122 qcom,qpnp-rtc-alarm-pwrup = <0>;
123
124 qcom,pm8998_rtc_rw@6000 {
125 reg = <0x6000 0x100>;
126 };
127 qcom,pm8998_rtc_alarm@6100 {
128 reg = <0x6100 0x100>;
129 interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
130 };
131 };
132
133 pm8998_vadc: vadc@3100 {
134 compatible = "qcom,qpnp-vadc-hc";
135 reg = <0x3100 0x100>;
136 #address-cells = <1>;
137 #size-cells = <0>;
138 interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
139 interrupt-names = "eoc-int-en-set";
140 qcom,adc-bit-resolution = <15>;
141 qcom,adc-vdd-reference = <1875>;
142
143 chan@6 {
144 label = "die_temp";
145 reg = <6>;
146 qcom,decimation = <2>;
147 qcom,pre-div-channel-scaling = <0>;
148 qcom,calibration-type = "absolute";
149 qcom,scale-function = <3>;
150 qcom,hw-settle-time = <0>;
151 qcom,fast-avg-setup = <0>;
152 qcom,cal-val = <0>;
153 };
154
155 chan@0 {
156 label = "ref_gnd";
157 reg = <0>;
158 qcom,decimation = <2>;
159 qcom,pre-div-channel-scaling = <0>;
160 qcom,calibration-type = "absolute";
161 qcom,scale-function = <0>;
162 qcom,hw-settle-time = <0>;
163 qcom,fast-avg-setup = <0>;
164 qcom,cal-val = <0>;
165 };
166
167 chan@1 {
168 label = "ref_1250v";
169 reg = <1>;
170 qcom,decimation = <2>;
171 qcom,pre-div-channel-scaling = <0>;
172 qcom,calibration-type = "absolute";
173 qcom,scale-function = <0>;
174 qcom,hw-settle-time = <0>;
175 qcom,fast-avg-setup = <0>;
176 qcom,cal-val = <0>;
177 };
178 };
179
180 pm8998_adc_tm: vadc@3400 {
181 compatible = "qcom,qpnp-adc-tm-hc";
182 reg = <0x3400 0x100>;
183 #address-cells = <1>;
184 #size-cells = <0>;
185 interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>;
186 interrupt-names = "eoc-int-en-set";
187 qcom,adc-bit-resolution = <15>;
188 qcom,adc-vdd-reference = <1875>;
189 qcom,adc_tm-vadc = <&pm8998_vadc>;
190 qcom,decimation = <0>;
191 qcom,fast-avg-setup = <0>;
192 };
193 };
194
195 qcom,pm8998@1 {
196 compatible ="qcom,spmi-pmic";
197 reg = <0x1 SPMI_USID>;
198 #address-cells = <2>;
199 #size-cells = <0>;
200 };
201};