xref: /linux/arch/arm64/boot/dts/qcom/sdm632-fairphone-fp3.dts (revision f9bff0e31881d03badf191d3b0005839391f5f2b)
1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2022, Luca Weiss <luca@z3ntu.xyz>
4 */
5/dts-v1/;
6
7#include <dt-bindings/leds/common.h>
8#include "sdm632.dtsi"
9#include "pm8953.dtsi"
10#include "pmi632.dtsi"
11
12/ {
13	model = "Fairphone 3";
14	compatible = "fairphone,fp3", "qcom,sdm632";
15	chassis-type = "handset";
16	qcom,msm-id = <349 0>;
17	qcom,board-id = <8 0x10000>;
18
19	aliases {
20		mmc0 = &sdhc_1;
21		mmc1 = &sdhc_2;
22		serial0 = &uart_0;
23	};
24
25	chosen {
26		stdout-path = "serial0:115200n8";
27	};
28
29	gpio-keys {
30		compatible = "gpio-keys";
31
32		key-volume-up {
33			label = "volume_up";
34			linux,code = <KEY_VOLUMEUP>;
35			gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
36		};
37	};
38
39	vph_pwr: vph-pwr-regulator {
40		compatible = "regulator-fixed";
41		regulator-name = "vph_pwr";
42		regulator-always-on;
43		regulator-boot-on;
44	};
45};
46
47&hsusb_phy {
48	status = "okay";
49	vdd-supply = <&pm8953_l3>;
50	vdda-pll-supply = <&pm8953_l7>;
51	vdda-phy-dpdm-supply = <&pm8953_l13>;
52};
53
54&i2c_3 {
55	status = "okay";
56
57	touchscreen@48 {
58		compatible = "himax,hx83112b";
59		reg = <0x48>;
60		interrupt-parent = <&tlmm>;
61		interrupts = <65 IRQ_TYPE_LEVEL_LOW>;
62		touchscreen-size-x = <1080>;
63		touchscreen-size-y = <2160>;
64		reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
65	};
66};
67
68&i2c_5 {
69	status = "okay";
70
71	nfc@28 {
72		compatible = "nxp,nq310", "nxp,nxp-nci-i2c";
73		reg = <0x28>;
74
75		interrupt-parent = <&tlmm>;
76		interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
77
78		enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>;
79		firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>;
80	};
81};
82
83&pm8953_resin {
84	status = "okay";
85	linux,code = <KEY_VOLUMEDOWN>;
86};
87
88&pmi632_lpg {
89	status = "okay";
90
91	multi-led {
92		color = <LED_COLOR_ID_RGB>;
93		function = LED_FUNCTION_STATUS;
94
95		#address-cells = <1>;
96		#size-cells = <0>;
97
98		led@1 {
99			reg = <1>;
100			color = <LED_COLOR_ID_RED>;
101		};
102
103		led@2 {
104			reg = <2>;
105			color = <LED_COLOR_ID_GREEN>;
106		};
107
108		led@3 {
109			reg = <3>;
110			color = <LED_COLOR_ID_BLUE>;
111		};
112	};
113};
114
115&sdhc_1 {
116	status = "okay";
117	vmmc-supply = <&pm8953_l8>;
118	vqmmc-supply = <&pm8953_l5>;
119};
120
121&sdhc_2 {
122	status = "okay";
123	vmmc-supply = <&pm8953_l11>;
124	vqmmc-supply = <&pm8953_l12>;
125
126	cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
127};
128
129&rpm_requests {
130	regulators {
131		compatible = "qcom,rpm-pm8953-regulators";
132
133		vdd_l1-supply = <&pm8953_s3>;
134		vdd_l2_l3-supply = <&pm8953_s3>;
135		vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
136		vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
137		vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
138
139		pm8953_s3: s3 {
140			regulator-min-microvolt = <984000>;
141			regulator-max-microvolt = <1240000>;
142		};
143		pm8953_s4: s4 {
144			regulator-min-microvolt = <1036000>;
145			regulator-max-microvolt = <2040000>;
146		};
147		pm8953_s5: s5 {
148			regulator-min-microvolt = <1036000>;
149			regulator-max-microvolt = <2040000>;
150		};
151
152		pm8953_l1: l1 {
153			regulator-min-microvolt = <975000>;
154			regulator-max-microvolt = <1050000>;
155		};
156		pm8953_l2: l2 {
157			regulator-min-microvolt = <975000>;
158			regulator-max-microvolt = <1175000>;
159		};
160		pm8953_l3: l3 {
161			regulator-min-microvolt = <925000>;
162			regulator-max-microvolt = <925000>;
163		};
164		pm8953_l5: l5 {
165			regulator-min-microvolt = <1800000>;
166			regulator-max-microvolt = <1800000>;
167		};
168		pm8953_l6: l6 {
169			regulator-min-microvolt = <1800000>;
170			regulator-max-microvolt = <1800000>;
171		};
172		pm8953_l7: l7 {
173			regulator-min-microvolt = <1800000>;
174			regulator-max-microvolt = <1900000>;
175		};
176		pm8953_l8: l8 {
177			regulator-min-microvolt = <2900000>;
178			regulator-max-microvolt = <2900000>;
179		};
180		pm8953_l9: l9 {
181			regulator-min-microvolt = <3000000>;
182			regulator-max-microvolt = <3300000>;
183		};
184		pm8953_l10: l10 {
185			regulator-min-microvolt = <2800000>;
186			regulator-max-microvolt = <3000000>;
187		};
188		pm8953_l11: l11 {
189			regulator-min-microvolt = <2950000>;
190			regulator-max-microvolt = <2950000>;
191		};
192		pm8953_l12: l12 {
193			regulator-min-microvolt = <1800000>;
194			regulator-max-microvolt = <2950000>;
195		};
196		pm8953_l13: l13 {
197			regulator-min-microvolt = <3125000>;
198			regulator-max-microvolt = <3125000>;
199		};
200		pm8953_l16: l16 {
201			regulator-min-microvolt = <1800000>;
202			regulator-max-microvolt = <1800000>;
203		};
204		pm8953_l17: l17 {
205			regulator-min-microvolt = <2850000>;
206			regulator-max-microvolt = <2850000>;
207		};
208		pm8953_l19: l19 {
209			regulator-min-microvolt = <1200000>;
210			regulator-max-microvolt = <1350000>;
211		};
212		pm8953_l22: l22 {
213			regulator-min-microvolt = <2800000>;
214			regulator-max-microvolt = <2800000>;
215		};
216		pm8953_l23: l23 {
217			regulator-min-microvolt = <975000>;
218			regulator-max-microvolt = <1225000>;
219		};
220	};
221};
222
223&tlmm {
224	/*
225	 * 0-3: unused but protected by TZ
226	 * 135-138: fingerprint reader (SPI)
227	 */
228	gpio-reserved-ranges = <0 4>, <135 4>;
229};
230
231&uart_0 {
232	status = "okay";
233};
234
235&usb3 {
236	status = "okay";
237};
238
239&usb3_dwc3 {
240	dr_mode = "peripheral";
241};
242