xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/sdm632-fairphone-fp3.dts (revision a90b9d0159070121c221b966469c3e36d912bf82)
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&lpass {
84	status = "okay";
85};
86
87&pm8953_resin {
88	status = "okay";
89	linux,code = <KEY_VOLUMEDOWN>;
90};
91
92&pmi632_lpg {
93	status = "okay";
94
95	multi-led {
96		color = <LED_COLOR_ID_RGB>;
97		function = LED_FUNCTION_STATUS;
98
99		#address-cells = <1>;
100		#size-cells = <0>;
101
102		led@1 {
103			reg = <1>;
104			color = <LED_COLOR_ID_RED>;
105		};
106
107		led@2 {
108			reg = <2>;
109			color = <LED_COLOR_ID_GREEN>;
110		};
111
112		led@3 {
113			reg = <3>;
114			color = <LED_COLOR_ID_BLUE>;
115		};
116	};
117};
118
119&sdhc_1 {
120	status = "okay";
121	vmmc-supply = <&pm8953_l8>;
122	vqmmc-supply = <&pm8953_l5>;
123};
124
125&sdhc_2 {
126	status = "okay";
127	vmmc-supply = <&pm8953_l11>;
128	vqmmc-supply = <&pm8953_l12>;
129
130	cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
131};
132
133&rpm_requests {
134	regulators {
135		compatible = "qcom,rpm-pm8953-regulators";
136
137		vdd_l1-supply = <&pm8953_s3>;
138		vdd_l2_l3-supply = <&pm8953_s3>;
139		vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
140		vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
141		vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
142
143		pm8953_s3: s3 {
144			regulator-min-microvolt = <984000>;
145			regulator-max-microvolt = <1240000>;
146		};
147		pm8953_s4: s4 {
148			regulator-min-microvolt = <1036000>;
149			regulator-max-microvolt = <2040000>;
150		};
151		pm8953_s5: s5 {
152			regulator-min-microvolt = <1036000>;
153			regulator-max-microvolt = <2040000>;
154		};
155
156		pm8953_l1: l1 {
157			regulator-min-microvolt = <975000>;
158			regulator-max-microvolt = <1050000>;
159		};
160		pm8953_l2: l2 {
161			regulator-min-microvolt = <975000>;
162			regulator-max-microvolt = <1175000>;
163		};
164		pm8953_l3: l3 {
165			regulator-min-microvolt = <925000>;
166			regulator-max-microvolt = <925000>;
167		};
168		pm8953_l5: l5 {
169			regulator-min-microvolt = <1800000>;
170			regulator-max-microvolt = <1800000>;
171		};
172		pm8953_l6: l6 {
173			regulator-min-microvolt = <1800000>;
174			regulator-max-microvolt = <1800000>;
175		};
176		pm8953_l7: l7 {
177			regulator-min-microvolt = <1800000>;
178			regulator-max-microvolt = <1900000>;
179		};
180		pm8953_l8: l8 {
181			regulator-min-microvolt = <2900000>;
182			regulator-max-microvolt = <2900000>;
183		};
184		pm8953_l9: l9 {
185			regulator-min-microvolt = <3000000>;
186			regulator-max-microvolt = <3300000>;
187		};
188		pm8953_l10: l10 {
189			regulator-min-microvolt = <2800000>;
190			regulator-max-microvolt = <3000000>;
191		};
192		pm8953_l11: l11 {
193			regulator-min-microvolt = <2950000>;
194			regulator-max-microvolt = <2950000>;
195		};
196		pm8953_l12: l12 {
197			regulator-min-microvolt = <1800000>;
198			regulator-max-microvolt = <2950000>;
199		};
200		pm8953_l13: l13 {
201			regulator-min-microvolt = <3125000>;
202			regulator-max-microvolt = <3125000>;
203		};
204		pm8953_l16: l16 {
205			regulator-min-microvolt = <1800000>;
206			regulator-max-microvolt = <1800000>;
207		};
208		pm8953_l17: l17 {
209			regulator-min-microvolt = <2850000>;
210			regulator-max-microvolt = <2850000>;
211		};
212		pm8953_l19: l19 {
213			regulator-min-microvolt = <1200000>;
214			regulator-max-microvolt = <1350000>;
215		};
216		pm8953_l22: l22 {
217			regulator-min-microvolt = <2800000>;
218			regulator-max-microvolt = <2800000>;
219		};
220		pm8953_l23: l23 {
221			regulator-min-microvolt = <975000>;
222			regulator-max-microvolt = <1225000>;
223		};
224	};
225};
226
227&tlmm {
228	/*
229	 * 0-3: unused but protected by TZ
230	 * 135-138: fingerprint reader (SPI)
231	 */
232	gpio-reserved-ranges = <0 4>, <135 4>;
233};
234
235&uart_0 {
236	status = "okay";
237};
238
239&usb3 {
240	status = "okay";
241};
242
243&usb3_dwc3 {
244	dr_mode = "peripheral";
245};
246
247&wcnss {
248	status = "okay";
249
250	vddpx-supply = <&pm8953_l5>;
251};
252
253&wcnss_iris {
254	compatible = "qcom,wcn3680";
255
256	vddxo-supply = <&pm8953_l7>;
257	vddrfa-supply = <&pm8953_l19>;
258	vddpa-supply = <&pm8953_l9>;
259	vdddig-supply = <&pm8953_l5>;
260};
261