1aa17e707SEugene Lepshy// SPDX-License-Identifier: BSD-3-Clause 2aa17e707SEugene Lepshy/* 3aa17e707SEugene Lepshy * Copyright (c) 2022, Eugene Lepshy <fekz115@gmail.com> 4aa17e707SEugene Lepshy * Copyright (c) 2022, Gianluca Boiano <morf3089@gmail.com> 5aa17e707SEugene Lepshy */ 6aa17e707SEugene Lepshy/dts-v1/; 7aa17e707SEugene Lepshy 8aa17e707SEugene Lepshy#include "msm8953.dtsi" 9aa17e707SEugene Lepshy#include "pm8953.dtsi" 10aa17e707SEugene Lepshy#include "pmi8950.dtsi" 11aa17e707SEugene Lepshy#include <dt-bindings/leds/common.h> 12aa17e707SEugene Lepshy 13aa17e707SEugene Lepshy/delete-node/ &adsp_fw_mem; 14aa17e707SEugene Lepshy/delete-node/ &cont_splash_mem; 15aa17e707SEugene Lepshy/delete-node/ &qseecom_mem; 16aa17e707SEugene Lepshy/delete-node/ &wcnss_fw_mem; 17aa17e707SEugene Lepshy 18aa17e707SEugene Lepshy/ { 19aa17e707SEugene Lepshy model = "Xiaomi Redmi 5 Plus"; 20aa17e707SEugene Lepshy compatible = "xiaomi,vince", "qcom,msm8953"; 21aa17e707SEugene Lepshy chassis-type = "handset"; 22aa17e707SEugene Lepshy qcom,msm-id = <293 0>; 23aa17e707SEugene Lepshy qcom,board-id = <0x1000b 0x08>; 24aa17e707SEugene Lepshy 25aa17e707SEugene Lepshy gpio-keys { 26aa17e707SEugene Lepshy compatible = "gpio-keys"; 27aa17e707SEugene Lepshy 28aa17e707SEugene Lepshy pinctrl-names = "default"; 29aa17e707SEugene Lepshy pinctrl-0 = <&gpio_key_default>; 30aa17e707SEugene Lepshy 31aa17e707SEugene Lepshy key-volume-up { 32aa17e707SEugene Lepshy label = "volume_up"; 33aa17e707SEugene Lepshy linux,code = <KEY_VOLUMEUP>; 34aa17e707SEugene Lepshy gpios = <&tlmm 85 GPIO_ACTIVE_LOW>; 35aa17e707SEugene Lepshy }; 36aa17e707SEugene Lepshy }; 37aa17e707SEugene Lepshy 38aa17e707SEugene Lepshy reserved-memory { 39aa17e707SEugene Lepshy qseecom_mem: qseecom@84a00000 { 40aa17e707SEugene Lepshy reg = <0x0 0x84a00000 0x0 0x1900000>; 41aa17e707SEugene Lepshy no-map; 42aa17e707SEugene Lepshy }; 43aa17e707SEugene Lepshy 44aa17e707SEugene Lepshy cont_splash_mem: cont-splash@90001000 { 45aa17e707SEugene Lepshy reg = <0x0 0x90001000 0x0 (1080 * 2160 * 3)>; 46aa17e707SEugene Lepshy no-map; 47aa17e707SEugene Lepshy }; 48aa17e707SEugene Lepshy 49aa17e707SEugene Lepshy adsp_fw_mem: adsp@8d600000 { 50aa17e707SEugene Lepshy reg = <0x0 0x8d600000 0x0 0x1200000>; 51aa17e707SEugene Lepshy no-map; 52aa17e707SEugene Lepshy }; 53aa17e707SEugene Lepshy 54aa17e707SEugene Lepshy wcnss_fw_mem: wcnss@8e800000 { 55aa17e707SEugene Lepshy reg = <0x0 0x8e800000 0x0 0x700000>; 56aa17e707SEugene Lepshy no-map; 57aa17e707SEugene Lepshy }; 58aa17e707SEugene Lepshy 59aa17e707SEugene Lepshy ramoops@9ff00000 { 60aa17e707SEugene Lepshy compatible = "ramoops"; 61aa17e707SEugene Lepshy reg = <0x0 0x9ff00000 0x0 0x100000>; 62aa17e707SEugene Lepshy record-size = <0x1000>; 63aa17e707SEugene Lepshy console-size = <0x80000>; 64aa17e707SEugene Lepshy ftrace-size = <0x1000>; 65aa17e707SEugene Lepshy pmsg-size = <0x8000>; 66aa17e707SEugene Lepshy }; 67aa17e707SEugene Lepshy }; 68aa17e707SEugene Lepshy 69aa17e707SEugene Lepshy /* 70aa17e707SEugene Lepshy * We bitbang on &i2c_4 because BLSP is protected by TZ as sensors are 71aa17e707SEugene Lepshy * normally proxied via ADSP firmware. GPIOs aren't protected. 72aa17e707SEugene Lepshy */ 73aa17e707SEugene Lepshy i2c-sensors { 74aa17e707SEugene Lepshy compatible = "i2c-gpio"; 75aa17e707SEugene Lepshy sda-gpios = <&tlmm 14 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 76aa17e707SEugene Lepshy scl-gpios = <&tlmm 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 77aa17e707SEugene Lepshy i2c-gpio,delay-us = <2>; /* ~100 kHz */ 78aa17e707SEugene Lepshy #address-cells = <1>; 79aa17e707SEugene Lepshy #size-cells = <0>; 80aa17e707SEugene Lepshy 81aa17e707SEugene Lepshy imu@6a { 82aa17e707SEugene Lepshy compatible = "st,lsm6dsl"; 83aa17e707SEugene Lepshy reg = <0x6a>; 84aa17e707SEugene Lepshy vdd-supply = <&pm8953_l10>; 85aa17e707SEugene Lepshy vddio-supply = <&pm8953_l6>; 86aa17e707SEugene Lepshy mount-matrix = "1", "0", "0", 87aa17e707SEugene Lepshy "0", "-1", "0", 88aa17e707SEugene Lepshy "0", "0", "1"; 89aa17e707SEugene Lepshy }; 90aa17e707SEugene Lepshy }; 91aa17e707SEugene Lepshy 92aa17e707SEugene Lepshy vph_pwr: vph-pwr-regulator { 93aa17e707SEugene Lepshy compatible = "regulator-fixed"; 94aa17e707SEugene Lepshy regulator-name = "vph_pwr"; 95aa17e707SEugene Lepshy regulator-always-on; 96aa17e707SEugene Lepshy regulator-boot-on; 97aa17e707SEugene Lepshy }; 98aa17e707SEugene Lepshy}; 99aa17e707SEugene Lepshy 100aa17e707SEugene Lepshy&hsusb_phy { 101aa17e707SEugene Lepshy vdd-supply = <&pm8953_l3>; 102aa17e707SEugene Lepshy vdda-pll-supply = <&pm8953_l7>; 103aa17e707SEugene Lepshy vdda-phy-dpdm-supply = <&pm8953_l13>; 104aa17e707SEugene Lepshy 105aa17e707SEugene Lepshy status = "okay"; 106aa17e707SEugene Lepshy}; 107aa17e707SEugene Lepshy 108aa17e707SEugene Lepshy&i2c_2 { 109aa17e707SEugene Lepshy status = "okay"; 110aa17e707SEugene Lepshy 111aa17e707SEugene Lepshy led-controller@45 { 112aa17e707SEugene Lepshy compatible = "awinic,aw2013"; 113aa17e707SEugene Lepshy reg = <0x45>; 114aa17e707SEugene Lepshy 115aa17e707SEugene Lepshy vcc-supply = <&pm8953_l10>; 116*8c80b6c3SStephan Gerhold vio-supply = <&pm8953_l5>; 117aa17e707SEugene Lepshy 118aa17e707SEugene Lepshy #address-cells = <1>; 119aa17e707SEugene Lepshy #size-cells = <0>; 120aa17e707SEugene Lepshy 121aa17e707SEugene Lepshy led@0 { 122aa17e707SEugene Lepshy reg = <0>; 123aa17e707SEugene Lepshy led-max-microamp = <5000>; 124aa17e707SEugene Lepshy function = LED_FUNCTION_INDICATOR; 125aa17e707SEugene Lepshy color = <LED_COLOR_ID_WHITE>; 126aa17e707SEugene Lepshy }; 127aa17e707SEugene Lepshy }; 128aa17e707SEugene Lepshy}; 129aa17e707SEugene Lepshy 130aa17e707SEugene Lepshy&i2c_3 { 131aa17e707SEugene Lepshy status = "okay"; 132aa17e707SEugene Lepshy 133aa17e707SEugene Lepshy touchscreen@20 { 134aa17e707SEugene Lepshy reg = <0x20>; 135aa17e707SEugene Lepshy compatible = "syna,rmi4-i2c"; 136aa17e707SEugene Lepshy interrupts-extended = <&tlmm 65 IRQ_TYPE_EDGE_FALLING>; 137aa17e707SEugene Lepshy 138aa17e707SEugene Lepshy #address-cells = <1>; 139aa17e707SEugene Lepshy #size-cells = <0>; 140aa17e707SEugene Lepshy 141aa17e707SEugene Lepshy vdd-supply = <&pm8953_l10>; 142aa17e707SEugene Lepshy vio-supply = <&pm8953_l6>; 143aa17e707SEugene Lepshy 144aa17e707SEugene Lepshy pinctrl-names = "init", "suspend"; 145aa17e707SEugene Lepshy pinctrl-0 = <&ts_reset_active &ts_int_active>; 146aa17e707SEugene Lepshy pinctrl-1 = <&ts_reset_suspend &ts_int_suspend>; 147aa17e707SEugene Lepshy syna,reset-delay-ms = <200>; 148aa17e707SEugene Lepshy syna,startup-delay-ms = <500>; 149aa17e707SEugene Lepshy 150aa17e707SEugene Lepshy rmi4-f01@1 { 151aa17e707SEugene Lepshy reg = <0x01>; 152aa17e707SEugene Lepshy syna,nosleep-mode = <1>; 153aa17e707SEugene Lepshy }; 154aa17e707SEugene Lepshy 155aa17e707SEugene Lepshy rmi4-f12@12 { 156aa17e707SEugene Lepshy reg = <0x12>; 157aa17e707SEugene Lepshy syna,rezero-wait-ms = <20>; 158aa17e707SEugene Lepshy syna,sensor-type = <1>; 159aa17e707SEugene Lepshy touchscreen-x-mm = <68>; 160aa17e707SEugene Lepshy touchscreen-y-mm = <122>; 161aa17e707SEugene Lepshy }; 162aa17e707SEugene Lepshy }; 163aa17e707SEugene Lepshy}; 164aa17e707SEugene Lepshy 165aa17e707SEugene Lepshy&pm8953_resin { 166aa17e707SEugene Lepshy linux,code = <KEY_VOLUMEDOWN>; 167aa17e707SEugene Lepshy status = "okay"; 168aa17e707SEugene Lepshy}; 169aa17e707SEugene Lepshy 170aa17e707SEugene Lepshy&pmi8950_wled { 171aa17e707SEugene Lepshy qcom,current-limit-microamp = <20000>; 172aa17e707SEugene Lepshy qcom,ovp-millivolt = <29600>; 173aa17e707SEugene Lepshy qcom,num-strings = <2>; 174aa17e707SEugene Lepshy qcom,external-pfet; 175aa17e707SEugene Lepshy qcom,cabc; 176aa17e707SEugene Lepshy 177aa17e707SEugene Lepshy status = "okay"; 178aa17e707SEugene Lepshy}; 179aa17e707SEugene Lepshy 180aa17e707SEugene Lepshy&rpm_requests { 181aa17e707SEugene Lepshy regulators { 182aa17e707SEugene Lepshy compatible = "qcom,rpm-pm8953-regulators"; 183aa17e707SEugene Lepshy vdd_s1-supply = <&vph_pwr>; 184aa17e707SEugene Lepshy vdd_s2-supply = <&vph_pwr>; 185aa17e707SEugene Lepshy vdd_s3-supply = <&vph_pwr>; 186aa17e707SEugene Lepshy vdd_s4-supply = <&vph_pwr>; 187aa17e707SEugene Lepshy vdd_s5-supply = <&vph_pwr>; 188aa17e707SEugene Lepshy vdd_s6-supply = <&vph_pwr>; 189aa17e707SEugene Lepshy vdd_s7-supply = <&vph_pwr>; 190aa17e707SEugene Lepshy vdd_l1-supply = <&pm8953_s3>; 191aa17e707SEugene Lepshy vdd_l2_l3-supply = <&pm8953_s3>; 192aa17e707SEugene Lepshy vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>; 193aa17e707SEugene Lepshy vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>; 194aa17e707SEugene Lepshy vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>; 195aa17e707SEugene Lepshy 196aa17e707SEugene Lepshy pm8953_s1: s1 { 197aa17e707SEugene Lepshy regulator-min-microvolt = <870000>; 198aa17e707SEugene Lepshy regulator-max-microvolt = <1156000>; 199aa17e707SEugene Lepshy }; 200aa17e707SEugene Lepshy 201aa17e707SEugene Lepshy pm8953_s3: s3 { 202aa17e707SEugene Lepshy regulator-min-microvolt = <984000>; 203aa17e707SEugene Lepshy regulator-max-microvolt = <1224000>; 204aa17e707SEugene Lepshy }; 205aa17e707SEugene Lepshy 206aa17e707SEugene Lepshy pm8953_s4: s4 { 207aa17e707SEugene Lepshy regulator-min-microvolt = <1900000>; 208aa17e707SEugene Lepshy regulator-max-microvolt = <2050000>; 209aa17e707SEugene Lepshy }; 210aa17e707SEugene Lepshy 211aa17e707SEugene Lepshy pm8953_l1: l1 { 212aa17e707SEugene Lepshy regulator-min-microvolt = <1000000>; 213aa17e707SEugene Lepshy regulator-max-microvolt = <1100000>; 214aa17e707SEugene Lepshy }; 215aa17e707SEugene Lepshy 216aa17e707SEugene Lepshy pm8953_l2: l2 { 217aa17e707SEugene Lepshy regulator-min-microvolt = <1200000>; 218aa17e707SEugene Lepshy regulator-max-microvolt = <1225000>; 219aa17e707SEugene Lepshy }; 220aa17e707SEugene Lepshy 221aa17e707SEugene Lepshy pm8953_l3: l3 { 222aa17e707SEugene Lepshy regulator-min-microvolt = <925000>; 223aa17e707SEugene Lepshy regulator-max-microvolt = <925000>; 224aa17e707SEugene Lepshy }; 225aa17e707SEugene Lepshy 226aa17e707SEugene Lepshy pm8953_l5: l5 { 227aa17e707SEugene Lepshy regulator-min-microvolt = <1800000>; 228aa17e707SEugene Lepshy regulator-max-microvolt = <1800000>; 229aa17e707SEugene Lepshy }; 230aa17e707SEugene Lepshy 231aa17e707SEugene Lepshy pm8953_l6: l6 { 232aa17e707SEugene Lepshy regulator-min-microvolt = <1800000>; 233aa17e707SEugene Lepshy regulator-max-microvolt = <1800000>; 234aa17e707SEugene Lepshy }; 235aa17e707SEugene Lepshy 236aa17e707SEugene Lepshy pm8953_l7: l7 { 237aa17e707SEugene Lepshy regulator-min-microvolt = <1800000>; 238aa17e707SEugene Lepshy regulator-max-microvolt = <1900000>; 239aa17e707SEugene Lepshy }; 240aa17e707SEugene Lepshy 241aa17e707SEugene Lepshy pm8953_l8: l8 { 242aa17e707SEugene Lepshy regulator-min-microvolt = <2900000>; 243aa17e707SEugene Lepshy regulator-max-microvolt = <2900000>; 244aa17e707SEugene Lepshy }; 245aa17e707SEugene Lepshy 246aa17e707SEugene Lepshy pm8953_l9: l9 { 247aa17e707SEugene Lepshy regulator-min-microvolt = <3000000>; 248aa17e707SEugene Lepshy regulator-max-microvolt = <3300000>; 249aa17e707SEugene Lepshy }; 250aa17e707SEugene Lepshy 251aa17e707SEugene Lepshy pm8953_l10: l10 { 252aa17e707SEugene Lepshy regulator-min-microvolt = <2850000>; 253aa17e707SEugene Lepshy regulator-max-microvolt = <2850000>; 254aa17e707SEugene Lepshy }; 255aa17e707SEugene Lepshy 256aa17e707SEugene Lepshy pm8953_l11: l11 { 257aa17e707SEugene Lepshy regulator-min-microvolt = <2950000>; 258aa17e707SEugene Lepshy regulator-max-microvolt = <2950000>; 259aa17e707SEugene Lepshy }; 260aa17e707SEugene Lepshy 261aa17e707SEugene Lepshy pm8953_l12: l12 { 262aa17e707SEugene Lepshy regulator-min-microvolt = <1800000>; 263aa17e707SEugene Lepshy regulator-max-microvolt = <2950000>; 264aa17e707SEugene Lepshy }; 265aa17e707SEugene Lepshy 266aa17e707SEugene Lepshy pm8953_l13: l13 { 267aa17e707SEugene Lepshy regulator-min-microvolt = <3125000>; 268aa17e707SEugene Lepshy regulator-max-microvolt = <3125000>; 269aa17e707SEugene Lepshy }; 270aa17e707SEugene Lepshy 271aa17e707SEugene Lepshy pm8953_l16: l16 { 272aa17e707SEugene Lepshy regulator-min-microvolt = <1800000>; 273aa17e707SEugene Lepshy regulator-max-microvolt = <1800000>; 274aa17e707SEugene Lepshy }; 275aa17e707SEugene Lepshy 276aa17e707SEugene Lepshy pm8953_l17: l17 { 277aa17e707SEugene Lepshy regulator-min-microvolt = <2750000>; 278aa17e707SEugene Lepshy regulator-max-microvolt = <2850000>; 279aa17e707SEugene Lepshy }; 280aa17e707SEugene Lepshy 281aa17e707SEugene Lepshy pm8953_l19: l19 { 282aa17e707SEugene Lepshy regulator-min-microvolt = <1200000>; 283aa17e707SEugene Lepshy regulator-max-microvolt = <1380000>; 284aa17e707SEugene Lepshy }; 285aa17e707SEugene Lepshy 286aa17e707SEugene Lepshy pm8953_l22: l22 { 287aa17e707SEugene Lepshy regulator-min-microvolt = <2800000>; 288aa17e707SEugene Lepshy regulator-max-microvolt = <2800000>; 289aa17e707SEugene Lepshy }; 290aa17e707SEugene Lepshy 291aa17e707SEugene Lepshy pm8953_l23: l23 { 292aa17e707SEugene Lepshy regulator-min-microvolt = <1200000>; 293aa17e707SEugene Lepshy regulator-max-microvolt = <1225000>; 294aa17e707SEugene Lepshy }; 295aa17e707SEugene Lepshy }; 296aa17e707SEugene Lepshy}; 297aa17e707SEugene Lepshy 298aa17e707SEugene Lepshy&sdhc_1 { 299aa17e707SEugene Lepshy vmmc-supply = <&pm8953_l8>; 300aa17e707SEugene Lepshy vqmmc-supply = <&pm8953_l5>; 301aa17e707SEugene Lepshy 302aa17e707SEugene Lepshy status = "okay"; 303aa17e707SEugene Lepshy}; 304aa17e707SEugene Lepshy 305aa17e707SEugene Lepshy&sdhc_2 { 306aa17e707SEugene Lepshy vmmc-supply = <&pm8953_l11>; 307aa17e707SEugene Lepshy vqmmc-supply = <&pm8953_l12>; 308aa17e707SEugene Lepshy 309aa17e707SEugene Lepshy pinctrl-names = "default", "sleep"; 310aa17e707SEugene Lepshy pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>; 311aa17e707SEugene Lepshy pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>; 312aa17e707SEugene Lepshy 313aa17e707SEugene Lepshy status = "okay"; 314aa17e707SEugene Lepshy}; 315aa17e707SEugene Lepshy 316aa17e707SEugene Lepshy&tlmm { 317aa17e707SEugene Lepshy gpio-reserved-ranges = <0 4>, <16 4>, <135 4>; 318aa17e707SEugene Lepshy 319aa17e707SEugene Lepshy ts_reset_active: ts-reset-active-state { 320aa17e707SEugene Lepshy pins = "gpio64"; 321aa17e707SEugene Lepshy function = "gpio"; 322aa17e707SEugene Lepshy drive-strength = <8>; 323aa17e707SEugene Lepshy bias-pull-up; 324aa17e707SEugene Lepshy }; 325aa17e707SEugene Lepshy 326aa17e707SEugene Lepshy ts_reset_suspend: ts-reset-suspend-state { 327aa17e707SEugene Lepshy pins = "gpio64"; 328aa17e707SEugene Lepshy function = "gpio"; 329aa17e707SEugene Lepshy drive-strength = <2>; 330aa17e707SEugene Lepshy bias-pull-up; 331aa17e707SEugene Lepshy }; 332aa17e707SEugene Lepshy 333aa17e707SEugene Lepshy ts_int_active: ts-int-active-state { 334aa17e707SEugene Lepshy pins = "gpio65"; 335aa17e707SEugene Lepshy function = "gpio"; 336aa17e707SEugene Lepshy drive-strength = <8>; 337aa17e707SEugene Lepshy bias-pull-up; 338aa17e707SEugene Lepshy }; 339aa17e707SEugene Lepshy 340aa17e707SEugene Lepshy ts_int_suspend: ts-int-suspend-state { 341aa17e707SEugene Lepshy pins = "gpio65"; 342aa17e707SEugene Lepshy function = "gpio"; 343aa17e707SEugene Lepshy drive-strength = <2>; 344aa17e707SEugene Lepshy bias-pull-down; 345aa17e707SEugene Lepshy }; 346aa17e707SEugene Lepshy}; 347aa17e707SEugene Lepshy 348aa17e707SEugene Lepshy&uart_0 { 349aa17e707SEugene Lepshy pinctrl-names = "default"; 350aa17e707SEugene Lepshy pinctrl-0 = <&uart_console_active>; 351aa17e707SEugene Lepshy 352aa17e707SEugene Lepshy status = "okay"; 353aa17e707SEugene Lepshy}; 354aa17e707SEugene Lepshy 355aa17e707SEugene Lepshy&usb3 { 356aa17e707SEugene Lepshy status = "okay"; 357aa17e707SEugene Lepshy}; 358aa17e707SEugene Lepshy 359aa17e707SEugene Lepshy&usb3_dwc3 { 360aa17e707SEugene Lepshy dr_mode = "peripheral"; 361aa17e707SEugene Lepshy}; 362