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