0001 // SPDX-License-Identifier: GPL-2.0
0002 #include "qcom-msm8974pro.dtsi"
0003 #include "qcom-pm8841.dtsi"
0004 #include "qcom-pm8941.dtsi"
0005 #include <dt-bindings/input/input.h>
0006 #include <dt-bindings/leds/common.h>
0007 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
0008
0009 / {
0010 model = "Fairphone 2";
0011 compatible = "fairphone,fp2", "qcom,msm8974";
0012
0013 aliases {
0014 mmc0 = &sdhc_1;
0015 mmc1 = &sdhc_2;
0016 serial0 = &blsp1_uart2;
0017 };
0018
0019 chosen {
0020 stdout-path = "serial0:115200n8";
0021 };
0022
0023 gpio-keys {
0024 compatible = "gpio-keys";
0025
0026 pinctrl-names = "default";
0027 pinctrl-0 = <&gpio_keys_pin_a>;
0028
0029 key-camera-snapshot {
0030 label = "camera_snapshot";
0031 gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>;
0032 linux,code = <KEY_CAMERA>;
0033 wakeup-source;
0034 debounce-interval = <15>;
0035 };
0036
0037 key-volume-down {
0038 label = "volume_down";
0039 gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>;
0040 linux,code = <KEY_VOLUMEDOWN>;
0041 wakeup-source;
0042 debounce-interval = <15>;
0043 };
0044
0045 key-volume-up {
0046 label = "volume_up";
0047 gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>;
0048 linux,code = <KEY_VOLUMEUP>;
0049 wakeup-source;
0050 debounce-interval = <15>;
0051 };
0052 };
0053
0054 vibrator {
0055 compatible = "gpio-vibrator";
0056 enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
0057 vcc-supply = <&pm8941_l18>;
0058 };
0059 };
0060
0061 &blsp1_i2c2 {
0062 status = "okay";
0063
0064 touchscreen@41 {
0065 compatible = "ilitek,ili2120";
0066 reg = <0x41>;
0067 interrupt-parent = <&tlmm>;
0068 interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
0069 reset-gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;
0070
0071 touchscreen-size-x = <1080>;
0072 touchscreen-size-y = <1920>;
0073 };
0074 };
0075
0076 &blsp1_uart2 {
0077 status = "okay";
0078 };
0079
0080 &imem {
0081 reboot-mode {
0082 mode-normal = <0x77665501>;
0083 mode-bootloader = <0x77665500>;
0084 mode-recovery = <0x77665502>;
0085 };
0086 };
0087
0088 &otg {
0089 status = "okay";
0090
0091 phys = <&usb_hs1_phy>;
0092 phy-select = <&tcsr 0xb000 0>;
0093 extcon = <&smbb>, <&usb_id>;
0094 vbus-supply = <&chg_otg>;
0095
0096 hnp-disable;
0097 srp-disable;
0098 adp-disable;
0099
0100 ulpi {
0101 phy@a {
0102 status = "okay";
0103
0104 v1p8-supply = <&pm8941_l6>;
0105 v3p3-supply = <&pm8941_l24>;
0106
0107 extcon = <&smbb>;
0108 qcom,init-seq = /bits/ 8 <0x1 0x64>;
0109 };
0110 };
0111 };
0112
0113 &pm8941_gpios {
0114 gpio_keys_pin_a: gpio-keys-active-state {
0115 pins = "gpio1", "gpio2", "gpio5";
0116 function = "normal";
0117
0118 bias-pull-up;
0119 power-source = <PM8941_GPIO_S3>;
0120 };
0121 };
0122
0123 &pm8941_lpg {
0124 status = "okay";
0125
0126 qcom,power-source = <1>;
0127
0128 multi-led {
0129 color = <LED_COLOR_ID_RGB>;
0130 function = LED_FUNCTION_STATUS;
0131
0132 #address-cells = <1>;
0133 #size-cells = <0>;
0134
0135 led@7 {
0136 reg = <7>;
0137 color = <LED_COLOR_ID_RED>;
0138 };
0139
0140 led@6 {
0141 reg = <6>;
0142 color = <LED_COLOR_ID_GREEN>;
0143 };
0144
0145 led@5 {
0146 reg = <5>;
0147 color = <LED_COLOR_ID_BLUE>;
0148 };
0149 };
0150 };
0151
0152 &pronto {
0153 status = "okay";
0154
0155 vddmx-supply = <&pm8841_s1>;
0156 vddcx-supply = <&pm8841_s2>;
0157 vddpx-supply = <&pm8941_s3>;
0158
0159 pinctrl-names = "default";
0160 pinctrl-0 = <&wcnss_pin_a>;
0161
0162 iris {
0163 vddxo-supply = <&pm8941_l6>;
0164 vddrfa-supply = <&pm8941_l11>;
0165 vddpa-supply = <&pm8941_l19>;
0166 vdddig-supply = <&pm8941_s3>;
0167 };
0168
0169 smd-edge {
0170 qcom,remote-pid = <4>;
0171 label = "pronto";
0172
0173 wcnss {
0174 status = "okay";
0175 };
0176 };
0177 };
0178
0179 &remoteproc_adsp {
0180 status = "okay";
0181 cx-supply = <&pm8841_s2>;
0182 };
0183
0184 &remoteproc_mss {
0185 status = "okay";
0186 cx-supply = <&pm8841_s2>;
0187 mss-supply = <&pm8841_s3>;
0188 mx-supply = <&pm8841_s1>;
0189 pll-supply = <&pm8941_l12>;
0190 };
0191
0192 &rpm_requests {
0193 pm8841-regulators {
0194 compatible = "qcom,rpm-pm8841-regulators";
0195
0196 pm8841_s1: s1 {
0197 regulator-min-microvolt = <675000>;
0198 regulator-max-microvolt = <1050000>;
0199 };
0200
0201 pm8841_s2: s2 {
0202 regulator-min-microvolt = <500000>;
0203 regulator-max-microvolt = <1050000>;
0204 };
0205
0206 pm8841_s3: s3 {
0207 regulator-min-microvolt = <1050000>;
0208 regulator-max-microvolt = <1050000>;
0209 };
0210 };
0211
0212 pm8941-regulators {
0213 compatible = "qcom,rpm-pm8941-regulators";
0214
0215 vdd_l1_l3-supply = <&pm8941_s1>;
0216 vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
0217 vdd_l4_l11-supply = <&pm8941_s1>;
0218 vdd_l5_l7-supply = <&pm8941_s2>;
0219 vdd_l6_l12_l14_l15-supply = <&pm8941_s2>;
0220 vdd_l9_l10_l17_l22-supply = <&vreg_boost>;
0221 vdd_l13_l20_l23_l24-supply = <&vreg_boost>;
0222 vdd_l21-supply = <&vreg_boost>;
0223
0224 pm8941_s1: s1 {
0225 regulator-min-microvolt = <1300000>;
0226 regulator-max-microvolt = <1300000>;
0227 regulator-always-on;
0228 regulator-boot-on;
0229 };
0230
0231 pm8941_s2: s2 {
0232 regulator-min-microvolt = <2150000>;
0233 regulator-max-microvolt = <2150000>;
0234 regulator-boot-on;
0235 };
0236
0237 pm8941_s3: s3 {
0238 regulator-min-microvolt = <1800000>;
0239 regulator-max-microvolt = <1800000>;
0240 regulator-always-on;
0241 regulator-boot-on;
0242 };
0243
0244 pm8941_l1: l1 {
0245 regulator-min-microvolt = <1225000>;
0246 regulator-max-microvolt = <1225000>;
0247 regulator-always-on;
0248 regulator-boot-on;
0249 };
0250
0251 pm8941_l2: l2 {
0252 regulator-min-microvolt = <1200000>;
0253 regulator-max-microvolt = <1200000>;
0254 };
0255
0256 pm8941_l3: l3 {
0257 regulator-min-microvolt = <1225000>;
0258 regulator-max-microvolt = <1225000>;
0259 };
0260
0261 pm8941_l4: l4 {
0262 regulator-min-microvolt = <1225000>;
0263 regulator-max-microvolt = <1225000>;
0264 };
0265
0266 pm8941_l5: l5 {
0267 regulator-min-microvolt = <1800000>;
0268 regulator-max-microvolt = <1800000>;
0269 };
0270
0271 pm8941_l6: l6 {
0272 regulator-min-microvolt = <1800000>;
0273 regulator-max-microvolt = <1800000>;
0274 regulator-boot-on;
0275 };
0276
0277 pm8941_l7: l7 {
0278 regulator-min-microvolt = <1800000>;
0279 regulator-max-microvolt = <1800000>;
0280 regulator-boot-on;
0281 };
0282
0283 pm8941_l8: l8 {
0284 regulator-min-microvolt = <1800000>;
0285 regulator-max-microvolt = <1800000>;
0286 };
0287
0288 pm8941_l9: l9 {
0289 regulator-min-microvolt = <1800000>;
0290 regulator-max-microvolt = <2950000>;
0291 };
0292
0293 pm8941_l10: l10 {
0294 regulator-min-microvolt = <1800000>;
0295 regulator-max-microvolt = <2950000>;
0296 };
0297
0298 pm8941_l11: l11 {
0299 regulator-min-microvolt = <1225000>;
0300 regulator-max-microvolt = <1350000>;
0301 };
0302
0303 pm8941_l12: l12 {
0304 regulator-min-microvolt = <1800000>;
0305 regulator-max-microvolt = <1800000>;
0306 regulator-always-on;
0307 regulator-boot-on;
0308 };
0309
0310 pm8941_l13: l13 {
0311 regulator-min-microvolt = <1800000>;
0312 regulator-max-microvolt = <2950000>;
0313 regulator-boot-on;
0314 };
0315
0316 pm8941_l14: l14 {
0317 regulator-min-microvolt = <1800000>;
0318 regulator-max-microvolt = <1800000>;
0319 };
0320
0321 pm8941_l15: l15 {
0322 regulator-min-microvolt = <2050000>;
0323 regulator-max-microvolt = <2050000>;
0324 };
0325
0326 pm8941_l16: l16 {
0327 regulator-min-microvolt = <2700000>;
0328 regulator-max-microvolt = <2700000>;
0329 };
0330
0331 pm8941_l17: l17 {
0332 regulator-min-microvolt = <2850000>;
0333 regulator-max-microvolt = <2850000>;
0334 };
0335
0336 pm8941_l18: l18 {
0337 regulator-min-microvolt = <2850000>;
0338 regulator-max-microvolt = <2850000>;
0339 };
0340
0341 pm8941_l19: l19 {
0342 regulator-min-microvolt = <2900000>;
0343 regulator-max-microvolt = <3350000>;
0344 };
0345
0346 pm8941_l20: l20 {
0347 regulator-min-microvolt = <2950000>;
0348 regulator-max-microvolt = <2950000>;
0349 regulator-system-load = <200000>;
0350 regulator-allow-set-load;
0351 regulator-boot-on;
0352 };
0353
0354 pm8941_l21: l21 {
0355 regulator-min-microvolt = <2950000>;
0356 regulator-max-microvolt = <2950000>;
0357 regulator-boot-on;
0358 };
0359
0360 pm8941_l22: l22 {
0361 regulator-min-microvolt = <3000000>;
0362 regulator-max-microvolt = <3300000>;
0363 };
0364
0365 pm8941_l23: l23 {
0366 regulator-min-microvolt = <3000000>;
0367 regulator-max-microvolt = <3000000>;
0368 };
0369
0370 pm8941_l24: l24 {
0371 regulator-min-microvolt = <3075000>;
0372 regulator-max-microvolt = <3075000>;
0373 regulator-boot-on;
0374 };
0375 };
0376 };
0377
0378 &sdhc_1 {
0379 status = "okay";
0380
0381 vmmc-supply = <&pm8941_l20>;
0382 vqmmc-supply = <&pm8941_s3>;
0383
0384 pinctrl-names = "default", "sleep";
0385 pinctrl-0 = <&sdc1_on>;
0386 pinctrl-1 = <&sdc1_off>;
0387 };
0388
0389 &sdhc_2 {
0390 status = "okay";
0391
0392 vmmc-supply = <&pm8941_l21>;
0393 vqmmc-supply = <&pm8941_l13>;
0394
0395 pinctrl-names = "default", "sleep";
0396 pinctrl-0 = <&sdc2_on>;
0397 pinctrl-1 = <&sdc2_off>;
0398 };
0399
0400 &smbb {
0401 usb-charge-current-limit = <1500000>;
0402 qcom,fast-charge-safe-current = <1500000>;
0403 qcom,fast-charge-current-limit = <1500000>;
0404 qcom,fast-charge-safe-voltage = <4380000>;
0405 qcom,fast-charge-high-threshold-voltage = <4350000>;
0406 qcom,auto-recharge-threshold-voltage = <4240000>;
0407 qcom,minimum-input-voltage = <4450000>;
0408 };
0409
0410 &tlmm {
0411 sdc1_on: sdc1-on {
0412 clk {
0413 pins = "sdc1_clk";
0414 drive-strength = <16>;
0415 bias-disable;
0416 };
0417
0418 cmd-data {
0419 pins = "sdc1_cmd", "sdc1_data";
0420 drive-strength = <10>;
0421 bias-pull-up;
0422 };
0423 };
0424
0425 sdc2_on: sdc2-on {
0426 clk {
0427 pins = "sdc2_clk";
0428 drive-strength = <10>;
0429 bias-disable;
0430 };
0431
0432 cmd-data {
0433 pins = "sdc2_cmd", "sdc2_data";
0434 drive-strength = <6>;
0435 bias-pull-up;
0436 };
0437 };
0438
0439 wcnss_pin_a: wcnss-pin-active {
0440 wlan {
0441 pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40";
0442 function = "wlan";
0443
0444 drive-strength = <6>;
0445 bias-pull-down;
0446 };
0447
0448 bt {
0449 pins = "gpio35", "gpio43", "gpio44";
0450 function = "bt";
0451
0452 drive-strength = <2>;
0453 bias-pull-down;
0454 };
0455
0456 fm {
0457 pins = "gpio41", "gpio42";
0458 function = "fm";
0459
0460 drive-strength = <2>;
0461 bias-pull-down;
0462 };
0463 };
0464 };