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