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 /* Dummy regulator until PMI632 has LCDB VSP/VSN support */ 40 lcdb_dummy: regulator-lcdb-dummy { 41 compatible = "regulator-fixed"; 42 regulator-name = "lcdb_dummy"; 43 regulator-min-microvolt = <5500000>; 44 regulator-max-microvolt = <5500000>; 45 }; 46 47 vph_pwr: vph-pwr-regulator { 48 compatible = "regulator-fixed"; 49 regulator-name = "vph_pwr"; 50 regulator-always-on; 51 regulator-boot-on; 52 }; 53}; 54 55&gpu { 56 status = "okay"; 57}; 58 59&gpu_zap_shader { 60 firmware-name = "qcom/msm8953/fairphone/fp3/a506_zap.mbn"; 61}; 62 63&hsusb_phy { 64 vdd-supply = <&pm8953_l3>; 65 vdda-pll-supply = <&pm8953_l7>; 66 vdda-phy-dpdm-supply = <&pm8953_l13>; 67 68 status = "okay"; 69}; 70 71&i2c_3 { 72 status = "okay"; 73 74 touchscreen@48 { 75 compatible = "himax,hx83112b"; 76 reg = <0x48>; 77 interrupt-parent = <&tlmm>; 78 interrupts = <65 IRQ_TYPE_LEVEL_LOW>; 79 touchscreen-size-x = <1080>; 80 touchscreen-size-y = <2160>; 81 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; 82 }; 83}; 84 85&i2c_5 { 86 status = "okay"; 87 88 nfc@28 { 89 compatible = "nxp,nq310", "nxp,nxp-nci-i2c"; 90 reg = <0x28>; 91 92 interrupt-parent = <&tlmm>; 93 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>; 94 95 enable-gpios = <&tlmm 16 GPIO_ACTIVE_HIGH>; 96 firmware-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; 97 }; 98}; 99 100&lpass { 101 firmware-name = "qcom/msm8953/fairphone/fp3/adsp.mbn"; 102 103 status = "okay"; 104}; 105 106&mdss { 107 status = "okay"; 108}; 109 110&mdss_dsi0 { 111 vdda-supply = <&pm8953_s3>; 112 status = "okay"; 113 114 panel@0 { 115 compatible = "djn,98-03057-6598b-i"; 116 reg = <0>; 117 118 reset-gpios = <&tlmm 61 GPIO_ACTIVE_LOW>; 119 120 iovcc-supply = <&pm8953_l6>; 121 vsn-supply = <&lcdb_dummy>; 122 vsp-supply = <&lcdb_dummy>; 123 124 pinctrl-0 = <&mdss_te_default>; 125 pinctrl-names = "default"; 126 127 port { 128 panel_in: endpoint { 129 remote-endpoint = <&mdss_dsi0_out>; 130 }; 131 }; 132 }; 133}; 134 135&mdss_dsi0_out { 136 data-lanes = <0 1 2 3>; 137 remote-endpoint = <&panel_in>; 138}; 139 140&mdss_dsi0_phy { 141 vcca-supply = <&pm8953_l3>; 142 status = "okay"; 143}; 144 145&mpss { 146 firmware-name = "qcom/msm8953/fairphone/fp3/mba.mbn", 147 "qcom/msm8953/fairphone/fp3/modem.mbn"; 148 pll-supply = <&pm8953_l7>; 149 150 status = "okay"; 151}; 152 153&pm8953_resin { 154 linux,code = <KEY_VOLUMEDOWN>; 155 status = "okay"; 156}; 157 158&pmi632_lpg { 159 status = "okay"; 160 161 multi-led { 162 color = <LED_COLOR_ID_RGB>; 163 function = LED_FUNCTION_STATUS; 164 165 #address-cells = <1>; 166 #size-cells = <0>; 167 168 led@1 { 169 reg = <1>; 170 color = <LED_COLOR_ID_RED>; 171 }; 172 173 led@2 { 174 reg = <2>; 175 color = <LED_COLOR_ID_GREEN>; 176 }; 177 178 led@3 { 179 reg = <3>; 180 color = <LED_COLOR_ID_BLUE>; 181 }; 182 }; 183}; 184 185&pmi632_typec { 186 status = "okay"; 187 188 connector { 189 compatible = "usb-c-connector"; 190 191 power-role = "dual"; 192 data-role = "dual"; 193 self-powered; 194 195 typec-power-opmode = "default"; 196 pd-disable; 197 198 port { 199 pmi632_hs_in: endpoint { 200 remote-endpoint = <&usb_dwc3_hs>; 201 }; 202 }; 203 }; 204}; 205 206&pmi632_vbus { 207 regulator-min-microamp = <500000>; 208 regulator-max-microamp = <1000000>; 209 status = "okay"; 210}; 211 212&pmi632_vib { 213 status = "okay"; 214}; 215 216&sdhc_1 { 217 vmmc-supply = <&pm8953_l8>; 218 vqmmc-supply = <&pm8953_l5>; 219 220 status = "okay"; 221}; 222 223&sdhc_2 { 224 vmmc-supply = <&pm8953_l11>; 225 vqmmc-supply = <&pm8953_l12>; 226 227 cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>; 228 229 status = "okay"; 230}; 231 232&rpm_requests { 233 regulators { 234 compatible = "qcom,rpm-pm8953-regulators"; 235 236 vdd_l1-supply = <&pm8953_s3>; 237 vdd_l2_l3-supply = <&pm8953_s3>; 238 vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>; 239 vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>; 240 vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>; 241 242 pm8953_s3: s3 { 243 regulator-min-microvolt = <984000>; 244 regulator-max-microvolt = <1240000>; 245 }; 246 247 pm8953_s4: s4 { 248 regulator-min-microvolt = <1036000>; 249 regulator-max-microvolt = <2040000>; 250 }; 251 252 pm8953_s5: s5 { 253 regulator-min-microvolt = <1036000>; 254 regulator-max-microvolt = <2040000>; 255 }; 256 257 pm8953_l1: l1 { 258 regulator-min-microvolt = <975000>; 259 regulator-max-microvolt = <1050000>; 260 }; 261 262 pm8953_l2: l2 { 263 regulator-min-microvolt = <975000>; 264 regulator-max-microvolt = <1175000>; 265 }; 266 267 pm8953_l3: l3 { 268 regulator-min-microvolt = <925000>; 269 regulator-max-microvolt = <925000>; 270 }; 271 272 pm8953_l5: l5 { 273 regulator-min-microvolt = <1800000>; 274 regulator-max-microvolt = <1800000>; 275 }; 276 277 pm8953_l6: l6 { 278 regulator-min-microvolt = <1800000>; 279 regulator-max-microvolt = <1800000>; 280 }; 281 282 pm8953_l7: l7 { 283 regulator-min-microvolt = <1800000>; 284 regulator-max-microvolt = <1900000>; 285 }; 286 287 pm8953_l8: l8 { 288 regulator-min-microvolt = <2900000>; 289 regulator-max-microvolt = <2900000>; 290 }; 291 292 pm8953_l9: l9 { 293 regulator-min-microvolt = <3000000>; 294 regulator-max-microvolt = <3300000>; 295 }; 296 297 pm8953_l10: l10 { 298 regulator-min-microvolt = <2800000>; 299 regulator-max-microvolt = <3000000>; 300 }; 301 302 pm8953_l11: l11 { 303 regulator-min-microvolt = <2950000>; 304 regulator-max-microvolt = <2950000>; 305 }; 306 307 pm8953_l12: l12 { 308 regulator-min-microvolt = <1800000>; 309 regulator-max-microvolt = <2950000>; 310 }; 311 312 pm8953_l13: l13 { 313 regulator-min-microvolt = <3125000>; 314 regulator-max-microvolt = <3125000>; 315 }; 316 317 pm8953_l16: l16 { 318 regulator-min-microvolt = <1800000>; 319 regulator-max-microvolt = <1800000>; 320 }; 321 322 pm8953_l17: l17 { 323 regulator-min-microvolt = <2850000>; 324 regulator-max-microvolt = <2850000>; 325 }; 326 327 pm8953_l19: l19 { 328 regulator-min-microvolt = <1200000>; 329 regulator-max-microvolt = <1350000>; 330 }; 331 332 pm8953_l22: l22 { 333 regulator-min-microvolt = <2800000>; 334 regulator-max-microvolt = <2800000>; 335 }; 336 337 pm8953_l23: l23 { 338 regulator-min-microvolt = <975000>; 339 regulator-max-microvolt = <1225000>; 340 }; 341 }; 342}; 343 344&tlmm { 345 /* 346 * 0-3: unused but protected by TZ 347 * 135-138: fingerprint reader (SPI) 348 */ 349 gpio-reserved-ranges = <0 4>, <135 4>; 350 351 mdss_te_default: mdss-te-default-state { 352 pins = "gpio24"; 353 function = "mdp_vsync"; 354 drive-strength = <2>; 355 bias-pull-down; 356 }; 357}; 358 359&uart_0 { 360 status = "okay"; 361}; 362 363&usb3 { 364 status = "okay"; 365}; 366 367&usb_dwc3_hs { 368 remote-endpoint = <&pmi632_hs_in>; 369}; 370 371&wcnss { 372 firmware-name = "qcom/msm8953/fairphone/fp3/wcnss.mbn"; 373 vddpx-supply = <&pm8953_l5>; 374 375 status = "okay"; 376}; 377 378&wcnss_ctrl { 379 firmware-name = "qcom/msm8953/fairphone/fp3/WCNSS_qcom_wlan_nv.bin"; 380}; 381 382&wcnss_iris { 383 compatible = "qcom,wcn3680"; 384 385 vddxo-supply = <&pm8953_l7>; 386 vddrfa-supply = <&pm8953_l19>; 387 vddpa-supply = <&pm8953_l9>; 388 vdddig-supply = <&pm8953_l5>; 389}; 390