1// SPDX-License-Identifier: BSD-3-Clause 2/* 3 * Copyright (c) 2024, Barnabas Czeman 4 */ 5/dts-v1/; 6 7#include <dt-bindings/arm/qcom,ids.h> 8#include <dt-bindings/gpio/gpio.h> 9#include <dt-bindings/leds/common.h> 10 11#include "msm8937.dtsi" 12#include "pm8937.dtsi" 13#include "pmi8950.dtsi" 14 15/delete-node/ &qseecom_mem; 16 17/ { 18 model = "Xiaomi Redmi 3S (land)"; 19 compatible = "xiaomi,land", "qcom,msm8937"; 20 chassis-type = "handset"; 21 22 qcom,msm-id = <QCOM_ID_MSM8937 0x0>; 23 qcom,board-id = <0x1000b 1>, <0x2000b 1>; 24 25 aliases { 26 mmc0 = &sdhc_1; 27 mmc1 = &sdhc_2; 28 }; 29 30 battery: battery { 31 compatible = "simple-battery"; 32 33 charge-full-design-microamp-hours = <4100000>; 34 constant-charge-current-max-microamp = <1000000>; 35 voltage-min-design-microvolt = <3400000>; 36 voltage-max-design-microvolt = <4400000>; 37 }; 38 39 chosen { 40 #address-cells = <2>; 41 #size-cells = <2>; 42 ranges; 43 44 stdout-path = "framebuffer0"; 45 46 framebuffer0: framebuffer@8dd01000 { 47 compatible = "simple-framebuffer"; 48 reg = <0x0 0x8dd01000 0x0 (720 * 1280 * 3)>; 49 width = <720>; 50 height = <1280>; 51 stride = <(720 * 3)>; 52 format = "r8g8b8"; 53 54 clocks = <&gcc GCC_MDSS_AHB_CLK>, 55 <&gcc GCC_MDSS_AXI_CLK>, 56 <&gcc GCC_MDSS_VSYNC_CLK>, 57 <&gcc GCC_MDSS_MDP_CLK>, 58 <&gcc GCC_MDSS_BYTE0_CLK>, 59 <&gcc GCC_MDSS_PCLK0_CLK>, 60 <&gcc GCC_MDSS_ESC0_CLK>; 61 power-domains = <&gcc MDSS_GDSC>; 62 }; 63 }; 64 65 gpio-keys { 66 compatible = "gpio-keys"; 67 68 pinctrl-0 = <&gpio_keys_default>; 69 pinctrl-names = "default"; 70 71 key-volup { 72 label = "Volume Up"; 73 linux,code = <KEY_VOLUMEUP>; 74 gpios = <&tlmm 91 GPIO_ACTIVE_LOW>; 75 debounce-interval = <15>; 76 }; 77 }; 78 79 irled { 80 compatible = "gpio-ir-tx"; 81 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; 82 }; 83 84 reserved-memory { 85 reserved@84a00000 { 86 reg = <0x0 0x84a00000 0x0 0x1900000>; 87 no-map; 88 }; 89 90 framebuffer: memory@8dd01000 { 91 reg = <0x0 0x8dd01000 0x0 (720 * 1280 * 3)>; 92 no-map; 93 }; 94 }; 95 96 vph_pwr: vph-pwr-regulator { 97 compatible = "regulator-fixed"; 98 regulator-name = "vph_pwr"; 99 regulator-min-microvolt = <3700000>; 100 regulator-max-microvolt = <3700000>; 101 regulator-always-on; 102 regulator-boot-on; 103 }; 104}; 105 106&blsp1_i2c2 { 107 status = "okay"; 108 109 led-controller@45 { 110 compatible = "awinic,aw2013"; 111 reg = <0x45>; 112 #address-cells = <1>; 113 #size-cells = <0>; 114 115 vcc-supply = <&pm8937_l10>; 116 vio-supply = <&pm8937_l5>; 117 118 led@0 { 119 reg = <0>; 120 function = LED_FUNCTION_STATUS; 121 led-max-microamp = <5000>; 122 color = <LED_COLOR_ID_RED>; 123 }; 124 125 led@1 { 126 reg = <1>; 127 function = LED_FUNCTION_STATUS; 128 led-max-microamp = <5000>; 129 color = <LED_COLOR_ID_GREEN>; 130 }; 131 132 led@2 { 133 reg = <2>; 134 function = LED_FUNCTION_STATUS; 135 led-max-microamp = <5000>; 136 color = <LED_COLOR_ID_BLUE>; 137 }; 138 }; 139}; 140 141&blsp1_i2c3 { 142 status = "okay"; 143 144 touchscreen@3e { 145 compatible = "edt,edt-ft5306"; 146 reg = <0x3e>; 147 148 interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>; 149 reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; 150 vcc-supply = <&pm8937_l10>; 151 iovcc-supply = <&pm8937_l5>; 152 153 pinctrl-0 = <&tsp_int_rst_default>; 154 pinctrl-names = "default"; 155 156 touchscreen-size-x = <720>; 157 touchscreen-size-y = <1280>; 158 }; 159}; 160 161&pm8937_resin { 162 linux,code = <KEY_VOLUMEDOWN>; 163 164 status = "okay"; 165}; 166 167&pm8937_spmi_regulators { 168 /* APC */ 169 pm8937_s5: s5 { 170 regulator-min-microvolt = <1050000>; 171 regulator-max-microvolt = <1350000>; 172 regulator-always-on; 173 regulator-boot-on; 174 }; 175}; 176 177&pmi8950_wled { 178 qcom,num-strings = <2>; 179 qcom,external-pfet; 180 qcom,current-limit-microamp = <20000>; 181 qcom,ovp-millivolt = <29500>; 182 183 status = "okay"; 184}; 185 186&rpm_requests { 187 regulators-0 { 188 compatible = "qcom,rpm-pm8937-regulators"; 189 190 vdd_s1-supply = <&vph_pwr>; 191 vdd_s2-supply = <&vph_pwr>; 192 vdd_s3-supply = <&vph_pwr>; 193 vdd_s4-supply = <&vph_pwr>; 194 195 vdd_l1_l19-supply = <&pm8937_s3>; 196 vdd_l2_l23-supply = <&pm8937_s3>; 197 vdd_l3-supply = <&pm8937_s3>; 198 vdd_l4_l5_l6_l7_l16-supply = <&pm8937_s4>; 199 vdd_l8_l11_l12_l17_l22-supply = <&vph_pwr>; 200 vdd_l9_l10_l13_l14_l15_l18-supply = <&vph_pwr>; 201 202 pm8937_s1: s1 { 203 regulator-min-microvolt = <1000000>; 204 regulator-max-microvolt = <1225000>; 205 }; 206 207 pm8937_s3: s3 { 208 regulator-min-microvolt = <1300000>; 209 regulator-max-microvolt = <1300000>; 210 }; 211 212 pm8937_s4: s4 { 213 regulator-min-microvolt = <2050000>; 214 regulator-max-microvolt = <2050000>; 215 }; 216 217 pm8937_l2: l2 { 218 regulator-min-microvolt = <1200000>; 219 regulator-max-microvolt = <1200000>; 220 }; 221 222 pm8937_l5: l5 { 223 regulator-min-microvolt = <1800000>; 224 regulator-max-microvolt = <1800000>; 225 }; 226 227 pm8937_l6: l6 { 228 regulator-min-microvolt = <1800000>; 229 regulator-max-microvolt = <1800000>; 230 }; 231 232 pm8937_l7: l7 { 233 regulator-min-microvolt = <1800000>; 234 regulator-max-microvolt = <1800000>; 235 }; 236 237 pm8937_l8: l8 { 238 regulator-min-microvolt = <2850000>; 239 regulator-max-microvolt = <2900000>; 240 }; 241 242 pm8937_l9: l9 { 243 regulator-min-microvolt = <3000000>; 244 regulator-max-microvolt = <3300000>; 245 }; 246 247 pm8937_l10: l10 { 248 regulator-min-microvolt = <2800000>; 249 regulator-max-microvolt = <3000000>; 250 }; 251 252 pm8937_l11: l11 { 253 regulator-min-microvolt = <2950000>; 254 regulator-max-microvolt = <2950000>; 255 regulator-allow-set-load; 256 regulator-system-load = <200000>; 257 }; 258 259 pm8937_l12: l12 { 260 regulator-min-microvolt = <1800000>; 261 regulator-max-microvolt = <2950000>; 262 }; 263 264 pm8937_l13: l13 { 265 regulator-min-microvolt = <3075000>; 266 regulator-max-microvolt = <3075000>; 267 }; 268 269 pm8937_l14: l14 { 270 regulator-min-microvolt = <1800000>; 271 regulator-max-microvolt = <3300000>; 272 }; 273 274 pm8937_l15: l15 { 275 regulator-min-microvolt = <1800000>; 276 regulator-max-microvolt = <3300000>; 277 }; 278 279 pm8937_l16: l16 { 280 regulator-min-microvolt = <1800000>; 281 regulator-max-microvolt = <1800000>; 282 }; 283 284 pm8937_l17: l17 { 285 regulator-min-microvolt = <2800000>; 286 regulator-max-microvolt = <2900000>; 287 }; 288 289 pm8937_l19: l19 { 290 regulator-min-microvolt = <1225000>; 291 regulator-max-microvolt = <1350000>; 292 }; 293 294 pm8937_l22: l22 { 295 regulator-min-microvolt = <2800000>; 296 regulator-max-microvolt = <2800000>; 297 }; 298 299 pm8937_l23: l23 { 300 regulator-min-microvolt = <1200000>; 301 regulator-max-microvolt = <1200000>; 302 }; 303 }; 304}; 305 306&sdc2_cmd_default { 307 drive-strength = <12>; 308}; 309 310&sdc2_data_default { 311 drive-strength = <12>; 312}; 313 314&sdhc_1 { 315 vmmc-supply = <&pm8937_l8>; 316 vqmmc-supply = <&pm8937_l5>; 317 318 status = "okay"; 319}; 320 321&sdhc_2 { 322 cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>; 323 vmmc-supply = <&pm8937_l11>; 324 vqmmc-supply = <&pm8937_l12>; 325 pinctrl-0 = <&sdc2_default &sdc2_cd_default>; 326 pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; 327 pinctrl-names = "default", "sleep"; 328 329 status = "okay"; 330}; 331 332&sleep_clk { 333 clock-frequency = <32768>; 334}; 335 336&tlmm { 337 gpio-reserved-ranges = <0 4>, <20 4>; 338 339 gpio_keys_default: gpio-keys-default-state { 340 pins = "gpio91"; 341 function = "gpio"; 342 drive-strength = <2>; 343 bias-pull-up; 344 }; 345 346 sdc2_cd_default: sdc2-cd-default-state { 347 pins = "gpio67"; 348 function = "gpio"; 349 drive-strength = <2>; 350 bias-disable; 351 }; 352 353 tsp_int_rst_default: tsp-int-rst-default-state { 354 pins = "gpio64", "gpio65"; 355 function = "gpio"; 356 drive-strength = <8>; 357 bias-pull-up; 358 }; 359}; 360 361&wcnss { 362 vddpx-supply = <&pm8937_l5>; 363 364 status = "okay"; 365}; 366 367&wcnss_iris { 368 compatible = "qcom,wcn3620"; 369 vddxo-supply = <&pm8937_l7>; 370 vddrfa-supply = <&pm8937_l19>; 371 vddpa-supply = <&pm8937_l9>; 372 vdddig-supply = <&pm8937_l5>; 373}; 374 375&wcnss_mem { 376 status = "okay"; 377}; 378 379&xo_board { 380 clock-frequency = <19200000>; 381}; 382