Debian Codegraph @

arch/arm/boot/dts/qcom/qcom-apq8064-ifc6410.dts

raw
1 // SPDX-License-Identifier: GPL-2.0
2 #include <dt-bindings/gpio/gpio.h>
3 #include <dt-bindings/leds/common.h>
4 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
5
6 #include "qcom-apq8064-v2.0.dtsi"
7 #include "pm8821.dtsi"
8 #include "pm8921.dtsi"
9
10 / {
11 model = "Qualcomm APQ8064/IFC6410";
12 compatible = "qcom,apq8064-ifc6410", "qcom,apq8064";
13
14 aliases {
15 serial0 = &gsbi7_serial;
16 serial1 = &gsbi6_serial;
17 i2c0 = &gsbi1_i2c;
18 i2c1 = &gsbi2_i2c;
19 i2c2 = &gsbi3_i2c;
20 i2c3 = &gsbi4_i2c;
21 spi0 = &gsbi5_spi;
22 };
23
24 chosen {
25 stdout-path = "serial0:115200n8";
26 };
27
28 leds {
29 compatible = "gpio-leds";
30 pinctrl-names = "default";
31 pinctrl-0 = <&notify_led>;
32
33 led-user1 {
34 label = "apq8064:green:user1";
35 color = <LED_COLOR_ID_GREEN>;
36 gpios = <&pm8921_gpio 18 GPIO_ACTIVE_HIGH>;
37 default-state = "on";
38 };
39 };
40
41 hdmi-out {
42 compatible = "hdmi-connector";
43 type = "d";
44
45 port {
46 hdmi_con: endpoint {
47 remote-endpoint = <&hdmi_out>;
48 };
49 };
50 };
51
52 sdcc4_pwrseq: pwrseq-sdcc4 {
53 pinctrl-names = "default";
54 pinctrl-0 = <&wlan_default_gpios>;
55 compatible = "mmc-pwrseq-simple";
56 reset-gpios = <&pm8921_gpio 43 GPIO_ACTIVE_LOW>;
57 };
58
59 ext_3p3v: regulator-ext-3p3v {
60 compatible = "regulator-fixed";
61 regulator-min-microvolt = <3300000>;
62 regulator-max-microvolt = <3300000>;
63 regulator-name = "ext_3p3v";
64 startup-delay-us = <0>;
65 gpio = <&tlmm_pinmux 77 GPIO_ACTIVE_HIGH>;
66 enable-active-high;
67 regulator-boot-on;
68 };
69 };
70
71 &gsbi1 {
72 qcom,mode = <GSBI_PROT_I2C>;
73 status = "okay";
74 };
75
76 &gsbi1_i2c {
77 clock-frequency = <200000>;
78 status = "okay";
79
80 eeprom@52 {
81 compatible = "atmel,24c128";
82 reg = <0x52>;
83 pagesize = <32>;
84 };
85 };
86
87 &gsbi3 {
88 qcom,mode = <GSBI_PROT_I2C>;
89 status = "okay";
90 };
91
92 &gsbi3_i2c {
93 status = "okay";
94 };
95
96 &gsbi4 {
97 qcom,mode = <GSBI_PROT_I2C>;
98 status = "okay";
99 };
100
101 /* CAM I2C MIPI-CSI connector */
102 &gsbi4_i2c {
103 status = "okay";
104 };
105
106 &gsbi5 {
107 qcom,mode = <GSBI_PROT_SPI>;
108 status = "okay";
109 };
110
111 &gsbi5_spi {
112 num-cs = <1>;
113 cs-gpios = <&tlmm_pinmux 53 0>;
114 status = "okay";
115 };
116
117 &gsbi6 {
118 qcom,mode = <GSBI_PROT_UART_W_FC>;
119 status = "okay";
120 };
121
122 &gsbi6_serial {
123 pinctrl-names = "default";
124 pinctrl-0 = <&gsbi6_uart_4pins>;
125 status = "okay";
126 };
127
128 &gsbi7 {
129 qcom,mode = <GSBI_PROT_I2C_UART>;
130 status = "okay";
131 };
132
133 &gsbi7_serial {
134 pinctrl-names = "default";
135 pinctrl-0 = <&gsbi7_uart_2pins>;
136 status = "okay";
137 };
138
139 &hdmi {
140 core-vdda-supply = <&pm8921_hdmi_switch>;
141 status = "okay";
142 };
143
144 &hdmi_in {
145 remote-endpoint = <&mdp_dtv_out>;
146 };
147
148 &hdmi_out {
149 remote-endpoint = <&hdmi_con>;
150 };
151
152 &hdmi_phy {
153 status = "okay";
154 core-vdda-supply = <&pm8921_hdmi_switch>;
155 };
156
157 &mdp {
158 status = "okay";
159 };
160
161 &mdp_dtv_out {
162 remote-endpoint = <&hdmi_in>;
163 };
164
165 &pcie {
166 status = "okay";
167 vdda-supply = <&pm8921_s3>;
168 vdda_phy-supply = <&pm8921_lvs6>;
169 vdda_refclk-supply = <&ext_3p3v>;
170 pinctrl-0 = <&pcie_pins>;
171 pinctrl-names = "default";
172 perst-gpios = <&tlmm_pinmux 27 GPIO_ACTIVE_LOW>;
173 };
174
175 &pm8821 {
176 interrupts-extended = <&tlmm_pinmux 76 IRQ_TYPE_LEVEL_LOW>;
177 };
178
179 &pm8921 {
180 interrupts-extended = <&tlmm_pinmux 74 IRQ_TYPE_LEVEL_LOW>;
181 };
182
183 &pm8921_gpio {
184 wlan_default_gpios: wlan-gpios-state {
185 pinconf {
186 pins = "gpio43";
187 function = "normal";
188 bias-disable;
189 power-source = <PM8921_GPIO_S4>;
190 };
191 };
192
193 notify_led: nled-state {
194 pinconf {
195 pins = "gpio18";
196 function = "normal";
197 bias-disable;
198 power-source = <PM8921_GPIO_S4>;
199 };
200 };
201 };
202
203 &rpm {
204 regulators {
205 compatible = "qcom,rpm-pm8921-regulators";
206
207 vin_lvs1_3_6-supply = <&pm8921_s4>;
208 vin_lvs2-supply = <&pm8921_s1>;
209 vin_lvs4_5_7-supply = <&pm8921_s4>;
210
211 vdd_l1_l2_l12_l18-supply = <&pm8921_s4>;
212 vdd_l24-supply = <&pm8921_s1>;
213 vdd_l25-supply = <&pm8921_s1>;
214 vdd_l26-supply = <&pm8921_s7>;
215 vdd_l27-supply = <&pm8921_s7>;
216 vdd_l28-supply = <&pm8921_s7>;
217
218 /* Buck SMPS */
219 pm8921_s1: s1 {
220 regulator-always-on;
221 regulator-min-microvolt = <1225000>;
222 regulator-max-microvolt = <1225000>;
223 qcom,switch-mode-frequency = <3200000>;
224 bias-pull-down;
225 };
226
227 pm8921_s3: s3 {
228 regulator-min-microvolt = <1000000>;
229 regulator-max-microvolt = <1400000>;
230 qcom,switch-mode-frequency = <4800000>;
231 };
232
233 pm8921_s4: s4 {
234 regulator-min-microvolt = <1800000>;
235 regulator-max-microvolt = <1800000>;
236 qcom,switch-mode-frequency = <3200000>;
237 };
238
239 pm8921_s7: s7 {
240 regulator-min-microvolt = <1300000>;
241 regulator-max-microvolt = <1300000>;
242 qcom,switch-mode-frequency = <3200000>;
243 };
244
245 pm8921_l3: l3 {
246 regulator-min-microvolt = <3050000>;
247 regulator-max-microvolt = <3300000>;
248 bias-pull-down;
249 };
250
251 pm8921_l4: l4 {
252 regulator-min-microvolt = <1000000>;
253 regulator-max-microvolt = <1800000>;
254 bias-pull-down;
255 };
256
257 pm8921_l5: l5 {
258 regulator-min-microvolt = <2750000>;
259 regulator-max-microvolt = <3000000>;
260 bias-pull-down;
261 };
262
263 pm8921_l6: l6 {
264 regulator-min-microvolt = <2950000>;
265 regulator-max-microvolt = <2950000>;
266 bias-pull-down;
267 };
268
269 pm8921_l23: l23 {
270 regulator-min-microvolt = <1700000>;
271 regulator-max-microvolt = <1900000>;
272 bias-pull-down;
273 };
274
275 pm8921_lvs1: lvs1 {
276 bias-pull-down;
277 };
278
279 pm8921_lvs6: lvs6 {
280 bias-pull-down;
281 };
282
283 pm8921_hdmi_switch: hdmi-switch {
284 bias-pull-down;
285 };
286 };
287 };
288
289 &sata_phy0 {
290 status = "okay";
291 };
292
293 &sata0 {
294 target-supply = <&pm8921_s4>;
295 status = "okay";
296 };
297
298 /* eMMC */
299 &sdcc1 {
300 vmmc-supply = <&pm8921_l5>;
301 vqmmc-supply = <&pm8921_s4>;
302 status = "okay";
303 };
304
305 /* External micro SD card */
306 &sdcc3 {
307 vmmc-supply = <&pm8921_l6>;
308 pinctrl-names = "default";
309 pinctrl-0 = <&card_detect>;
310 cd-gpios = <&tlmm_pinmux 26 GPIO_ACTIVE_LOW>;
311 status = "okay";
312 };
313
314 /* WLAN */
315 &sdcc4 {
316 vmmc-supply = <&ext_3p3v>;
317 vqmmc-supply = <&pm8921_lvs1>;
318 mmc-pwrseq = <&sdcc4_pwrseq>;
319 status = "okay";
320 };
321
322 &tlmm_pinmux {
323 card_detect: card-detect-state {
324 pins = "gpio26";
325 function = "gpio";
326 bias-disable;
327 };
328
329 pcie_pins: pcie-state {
330 pins = "gpio27";
331 function = "gpio";
332 drive-strength = <12>;
333 bias-disable;
334 };
335 };
336
337 &usb_hs1_phy {
338 v3p3-supply = <&pm8921_l3>;
339 v1p8-supply = <&pm8921_l4>;
340 };
341
342 &usb_hs3_phy {
343 v3p3-supply = <&pm8921_l3>;
344 v1p8-supply = <&pm8921_l23>;
345 };
346
347 &usb_hs4_phy {
348 v3p3-supply = <&pm8921_l3>;
349 v1p8-supply = <&pm8921_l23>;
350 };
351
352 /* OTG */
353 &usb1 {
354 dr_mode = "otg";
355 status = "okay";
356 };
357
358 &usb3 {
359 dr_mode = "host";
360 status = "okay";
361 };
362
363 &usb4 {
364 dr_mode = "host";
365 status = "okay";
366 };