12846c905SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0-only 22846c905SEmmanuel Vadot/* 32846c905SEmmanuel Vadot * Copyright (c) 2023, Barnabas Czeman 42846c905SEmmanuel Vadot */ 52846c905SEmmanuel Vadot 62846c905SEmmanuel Vadot/dts-v1/; 72846c905SEmmanuel Vadot 82846c905SEmmanuel Vadot#include <dt-bindings/arm/qcom,ids.h> 92846c905SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 102846c905SEmmanuel Vadot#include "msm8917.dtsi" 112846c905SEmmanuel Vadot#include "pm8937.dtsi" 122846c905SEmmanuel Vadot 132846c905SEmmanuel Vadot/delete-node/ &qseecom_mem; 142846c905SEmmanuel Vadot 152846c905SEmmanuel Vadot/ { 162846c905SEmmanuel Vadot model = "Xiaomi Redmi 5A (riva)"; 172846c905SEmmanuel Vadot compatible = "xiaomi,riva", "qcom,msm8917"; 182846c905SEmmanuel Vadot chassis-type = "handset"; 192846c905SEmmanuel Vadot 202846c905SEmmanuel Vadot qcom,msm-id = <QCOM_ID_MSM8917 0>; 212846c905SEmmanuel Vadot qcom,board-id = <0x1000b 2>, <0x2000b 2>; 222846c905SEmmanuel Vadot 23*ae5de77eSEmmanuel Vadot pwm_backlight: backlight { 24*ae5de77eSEmmanuel Vadot compatible = "pwm-backlight"; 25*ae5de77eSEmmanuel Vadot pwms = <&pm8937_pwm 0 100000>; 26*ae5de77eSEmmanuel Vadot brightness-levels = <0 255>; 27*ae5de77eSEmmanuel Vadot num-interpolated-steps = <255>; 28*ae5de77eSEmmanuel Vadot default-brightness-level = <128>; 29*ae5de77eSEmmanuel Vadot }; 30*ae5de77eSEmmanuel Vadot 312846c905SEmmanuel Vadot battery: battery { 322846c905SEmmanuel Vadot compatible = "simple-battery"; 332846c905SEmmanuel Vadot charge-full-design-microamp-hours = <3000000>; 342846c905SEmmanuel Vadot energy-full-design-microwatt-hours = <11500000>; 352846c905SEmmanuel Vadot constant-charge-current-max-microamp = <1000000>; 362846c905SEmmanuel Vadot constant-charge-voltage-max-microvolt = <4400000>; 372846c905SEmmanuel Vadot precharge-current-microamp = <256000>; 382846c905SEmmanuel Vadot charge-term-current-microamp = <60000>; 392846c905SEmmanuel Vadot voltage-min-design-microvolt = <3400000>; 402846c905SEmmanuel Vadot }; 412846c905SEmmanuel Vadot 422846c905SEmmanuel Vadot chosen { 432846c905SEmmanuel Vadot #address-cells = <2>; 442846c905SEmmanuel Vadot #size-cells = <2>; 452846c905SEmmanuel Vadot ranges; 462846c905SEmmanuel Vadot 472846c905SEmmanuel Vadot stdout-path = "framebuffer0"; 482846c905SEmmanuel Vadot 492846c905SEmmanuel Vadot framebuffer0: framebuffer@90001000 { 502846c905SEmmanuel Vadot compatible = "simple-framebuffer"; 512846c905SEmmanuel Vadot reg = <0x0 0x90001000 0x0 (720 * 1280 * 3)>; 522846c905SEmmanuel Vadot width = <720>; 532846c905SEmmanuel Vadot height = <1280>; 542846c905SEmmanuel Vadot stride = <(720 * 3)>; 552846c905SEmmanuel Vadot format = "r8g8b8"; 562846c905SEmmanuel Vadot 572846c905SEmmanuel Vadot clocks = <&gcc GCC_MDSS_AHB_CLK>, 582846c905SEmmanuel Vadot <&gcc GCC_MDSS_AXI_CLK>, 592846c905SEmmanuel Vadot <&gcc GCC_MDSS_VSYNC_CLK>, 602846c905SEmmanuel Vadot <&gcc GCC_MDSS_MDP_CLK>, 612846c905SEmmanuel Vadot <&gcc GCC_MDSS_BYTE0_CLK>, 622846c905SEmmanuel Vadot <&gcc GCC_MDSS_PCLK0_CLK>, 632846c905SEmmanuel Vadot <&gcc GCC_MDSS_ESC0_CLK>; 642846c905SEmmanuel Vadot power-domains = <&gcc MDSS_GDSC>; 652846c905SEmmanuel Vadot }; 662846c905SEmmanuel Vadot }; 672846c905SEmmanuel Vadot 682846c905SEmmanuel Vadot gpio-keys { 692846c905SEmmanuel Vadot compatible = "gpio-keys"; 702846c905SEmmanuel Vadot 712846c905SEmmanuel Vadot pinctrl-0 = <&gpio_keys_default>; 722846c905SEmmanuel Vadot pinctrl-names = "default"; 732846c905SEmmanuel Vadot 742846c905SEmmanuel Vadot key-volup { 752846c905SEmmanuel Vadot label = "Volume Up"; 762846c905SEmmanuel Vadot linux,code = <KEY_VOLUMEUP>; 772846c905SEmmanuel Vadot gpios = <&tlmm 91 GPIO_ACTIVE_LOW>; 782846c905SEmmanuel Vadot debounce-interval = <15>; 792846c905SEmmanuel Vadot }; 802846c905SEmmanuel Vadot }; 812846c905SEmmanuel Vadot 822846c905SEmmanuel Vadot vph_pwr: regulator-vph-pwr { 832846c905SEmmanuel Vadot compatible = "regulator-fixed"; 842846c905SEmmanuel Vadot regulator-name = "vph_pwr"; 852846c905SEmmanuel Vadot regulator-min-microvolt = <3700000>; 862846c905SEmmanuel Vadot regulator-max-microvolt = <3700000>; 872846c905SEmmanuel Vadot regulator-always-on; 882846c905SEmmanuel Vadot regulator-boot-on; 892846c905SEmmanuel Vadot }; 902846c905SEmmanuel Vadot 912846c905SEmmanuel Vadot reserved-memory { 922846c905SEmmanuel Vadot qseecom_mem: qseecom@84a00000 { 932846c905SEmmanuel Vadot reg = <0x0 0x84a00000 0x0 0x1900000>; 942846c905SEmmanuel Vadot no-map; 952846c905SEmmanuel Vadot }; 962846c905SEmmanuel Vadot 972846c905SEmmanuel Vadot framebuffer_mem: memory@90001000 { 982846c905SEmmanuel Vadot reg = <0x0 0x90001000 0x0 (720 * 1280 * 3)>; 992846c905SEmmanuel Vadot no-map; 1002846c905SEmmanuel Vadot }; 1012846c905SEmmanuel Vadot }; 1022846c905SEmmanuel Vadot}; 1032846c905SEmmanuel Vadot 1042846c905SEmmanuel Vadot&blsp1_i2c3 { 1052846c905SEmmanuel Vadot status = "okay"; 1062846c905SEmmanuel Vadot 1072846c905SEmmanuel Vadot touchscreen@38 { 1082846c905SEmmanuel Vadot compatible = "edt,edt-ft5306"; 1092846c905SEmmanuel Vadot reg = <0x38>; 1102846c905SEmmanuel Vadot interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>; 1112846c905SEmmanuel Vadot reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>; 1122846c905SEmmanuel Vadot pinctrl-0 = <&tsp_int_rst_default>; 1132846c905SEmmanuel Vadot pinctrl-names = "default"; 1142846c905SEmmanuel Vadot vcc-supply = <&pm8937_l10>; 1152846c905SEmmanuel Vadot iovcc-supply = <&pm8937_l5>; 1162846c905SEmmanuel Vadot touchscreen-size-x = <720>; 1172846c905SEmmanuel Vadot touchscreen-size-y = <1280>; 1182846c905SEmmanuel Vadot }; 1192846c905SEmmanuel Vadot}; 1202846c905SEmmanuel Vadot 1212846c905SEmmanuel Vadot&blsp2_i2c1 { 1222846c905SEmmanuel Vadot status = "okay"; 1232846c905SEmmanuel Vadot 1242846c905SEmmanuel Vadot bq27426@55 { 1252846c905SEmmanuel Vadot compatible = "ti,bq27426"; 1262846c905SEmmanuel Vadot reg = <0x55>; 1272846c905SEmmanuel Vadot monitored-battery = <&battery>; 1282846c905SEmmanuel Vadot }; 1292846c905SEmmanuel Vadot 1302846c905SEmmanuel Vadot bq25601@6b { 1312846c905SEmmanuel Vadot compatible = "ti,bq25601"; 1322846c905SEmmanuel Vadot reg = <0x6b>; 1332846c905SEmmanuel Vadot interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; 1342846c905SEmmanuel Vadot pinctrl-0 = <&bq25601_int_default>; 1352846c905SEmmanuel Vadot pinctrl-names = "default"; 1362846c905SEmmanuel Vadot input-voltage-limit-microvolt = <4400000>; 1372846c905SEmmanuel Vadot input-current-limit-microamp = <1000000>; 1382846c905SEmmanuel Vadot monitored-battery = <&battery>; 1392846c905SEmmanuel Vadot }; 1402846c905SEmmanuel Vadot}; 1412846c905SEmmanuel Vadot 142*ae5de77eSEmmanuel Vadot&pm8937_gpios { 143*ae5de77eSEmmanuel Vadot pwm_enable_default: pwm-enable-default-state { 144*ae5de77eSEmmanuel Vadot pins = "gpio8"; 145*ae5de77eSEmmanuel Vadot function = "dtest2"; 146*ae5de77eSEmmanuel Vadot output-low; 147*ae5de77eSEmmanuel Vadot bias-disable; 148*ae5de77eSEmmanuel Vadot qcom,drive-strength = <2>; 149*ae5de77eSEmmanuel Vadot }; 150*ae5de77eSEmmanuel Vadot}; 151*ae5de77eSEmmanuel Vadot 152*ae5de77eSEmmanuel Vadot&pm8937_pwm { 153*ae5de77eSEmmanuel Vadot pinctrl-0 = <&pwm_enable_default>; 154*ae5de77eSEmmanuel Vadot pinctrl-names = "default"; 155*ae5de77eSEmmanuel Vadot 156*ae5de77eSEmmanuel Vadot status = "okay"; 157*ae5de77eSEmmanuel Vadot}; 158*ae5de77eSEmmanuel Vadot 1592846c905SEmmanuel Vadot&pm8937_resin { 1602846c905SEmmanuel Vadot linux,code = <KEY_VOLUMEDOWN>; 1612846c905SEmmanuel Vadot 1622846c905SEmmanuel Vadot status = "okay"; 1632846c905SEmmanuel Vadot}; 1642846c905SEmmanuel Vadot 1652846c905SEmmanuel Vadot&rpm_requests { 1662846c905SEmmanuel Vadot regulators-0 { 1672846c905SEmmanuel Vadot compatible = "qcom,rpm-pm8937-regulators"; 1682846c905SEmmanuel Vadot 1692846c905SEmmanuel Vadot vdd_s1-supply = <&vph_pwr>; 1702846c905SEmmanuel Vadot vdd_s2-supply = <&vph_pwr>; 1712846c905SEmmanuel Vadot vdd_s3-supply = <&vph_pwr>; 1722846c905SEmmanuel Vadot vdd_s4-supply = <&vph_pwr>; 1732846c905SEmmanuel Vadot 1742846c905SEmmanuel Vadot vdd_l1_l19-supply = <&pm8937_s3>; 1752846c905SEmmanuel Vadot vdd_l2_l23-supply = <&pm8937_s3>; 1762846c905SEmmanuel Vadot vdd_l3-supply = <&pm8937_s3>; 1772846c905SEmmanuel Vadot vdd_l4_l5_l6_l7_l16-supply = <&pm8937_s4>; 1782846c905SEmmanuel Vadot vdd_l8_l11_l12_l17_l22-supply = <&vph_pwr>; 1792846c905SEmmanuel Vadot vdd_l9_l10_l13_l14_l15_l18-supply = <&vph_pwr>; 1802846c905SEmmanuel Vadot 1812846c905SEmmanuel Vadot pm8937_s1: s1 { 1822846c905SEmmanuel Vadot regulator-min-microvolt = <1000000>; 1832846c905SEmmanuel Vadot regulator-max-microvolt = <1225000>; 1842846c905SEmmanuel Vadot }; 1852846c905SEmmanuel Vadot 1862846c905SEmmanuel Vadot pm8937_s3: s3 { 1872846c905SEmmanuel Vadot regulator-min-microvolt = <1300000>; 1882846c905SEmmanuel Vadot regulator-max-microvolt = <1300000>; 1892846c905SEmmanuel Vadot }; 1902846c905SEmmanuel Vadot 1912846c905SEmmanuel Vadot pm8937_s4: s4 { 1922846c905SEmmanuel Vadot regulator-min-microvolt = <2050000>; 1932846c905SEmmanuel Vadot regulator-max-microvolt = <2050000>; 1942846c905SEmmanuel Vadot }; 1952846c905SEmmanuel Vadot 1962846c905SEmmanuel Vadot pm8937_l2: l2 { 1972846c905SEmmanuel Vadot regulator-min-microvolt = <1200000>; 1982846c905SEmmanuel Vadot regulator-max-microvolt = <1200000>; 1992846c905SEmmanuel Vadot }; 2002846c905SEmmanuel Vadot 2012846c905SEmmanuel Vadot pm8937_l5: l5 { 2022846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2032846c905SEmmanuel Vadot regulator-max-microvolt = <1800000>; 2042846c905SEmmanuel Vadot }; 2052846c905SEmmanuel Vadot 2062846c905SEmmanuel Vadot pm8937_l6: l6 { 2072846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2082846c905SEmmanuel Vadot regulator-max-microvolt = <1800000>; 2092846c905SEmmanuel Vadot }; 2102846c905SEmmanuel Vadot 2112846c905SEmmanuel Vadot pm8937_l7: l7 { 2122846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2132846c905SEmmanuel Vadot regulator-max-microvolt = <1800000>; 2142846c905SEmmanuel Vadot }; 2152846c905SEmmanuel Vadot 2162846c905SEmmanuel Vadot pm8937_l8: l8 { 2172846c905SEmmanuel Vadot regulator-min-microvolt = <2850000>; 2182846c905SEmmanuel Vadot regulator-max-microvolt = <2900000>; 2192846c905SEmmanuel Vadot }; 2202846c905SEmmanuel Vadot 2212846c905SEmmanuel Vadot pm8937_l9: l9 { 2222846c905SEmmanuel Vadot regulator-min-microvolt = <3000000>; 2232846c905SEmmanuel Vadot regulator-max-microvolt = <3300000>; 2242846c905SEmmanuel Vadot }; 2252846c905SEmmanuel Vadot 2262846c905SEmmanuel Vadot pm8937_l10: l10 { 2272846c905SEmmanuel Vadot regulator-min-microvolt = <2800000>; 2282846c905SEmmanuel Vadot regulator-max-microvolt = <3000000>; 2292846c905SEmmanuel Vadot }; 2302846c905SEmmanuel Vadot 2312846c905SEmmanuel Vadot pm8937_l11: l11 { 2322846c905SEmmanuel Vadot regulator-min-microvolt = <2950000>; 2332846c905SEmmanuel Vadot regulator-max-microvolt = <2950000>; 2342846c905SEmmanuel Vadot regulator-allow-set-load; 2352846c905SEmmanuel Vadot regulator-system-load = <200000>; 2362846c905SEmmanuel Vadot }; 2372846c905SEmmanuel Vadot 2382846c905SEmmanuel Vadot pm8937_l12: l12 { 2392846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2402846c905SEmmanuel Vadot regulator-max-microvolt = <2950000>; 2412846c905SEmmanuel Vadot }; 2422846c905SEmmanuel Vadot 2432846c905SEmmanuel Vadot pm8937_l13: l13 { 2442846c905SEmmanuel Vadot regulator-min-microvolt = <3075000>; 2452846c905SEmmanuel Vadot regulator-max-microvolt = <3075000>; 2462846c905SEmmanuel Vadot }; 2472846c905SEmmanuel Vadot 2482846c905SEmmanuel Vadot pm8937_l14: l14 { 2492846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2502846c905SEmmanuel Vadot regulator-max-microvolt = <3300000>; 2512846c905SEmmanuel Vadot }; 2522846c905SEmmanuel Vadot 2532846c905SEmmanuel Vadot pm8937_l15: l15 { 2542846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2552846c905SEmmanuel Vadot regulator-max-microvolt = <3300000>; 2562846c905SEmmanuel Vadot }; 2572846c905SEmmanuel Vadot 2582846c905SEmmanuel Vadot pm8937_l16: l16 { 2592846c905SEmmanuel Vadot regulator-min-microvolt = <1800000>; 2602846c905SEmmanuel Vadot regulator-max-microvolt = <1800000>; 2612846c905SEmmanuel Vadot }; 2622846c905SEmmanuel Vadot 2632846c905SEmmanuel Vadot pm8937_l17: l17 { 2642846c905SEmmanuel Vadot regulator-min-microvolt = <2800000>; 2652846c905SEmmanuel Vadot regulator-max-microvolt = <2900000>; 2662846c905SEmmanuel Vadot }; 2672846c905SEmmanuel Vadot 2682846c905SEmmanuel Vadot pm8937_l19: l19 { 2692846c905SEmmanuel Vadot regulator-min-microvolt = <1225000>; 2702846c905SEmmanuel Vadot regulator-max-microvolt = <1350000>; 2712846c905SEmmanuel Vadot }; 2722846c905SEmmanuel Vadot 2732846c905SEmmanuel Vadot pm8937_l22: l22 { 2742846c905SEmmanuel Vadot regulator-min-microvolt = <2800000>; 2752846c905SEmmanuel Vadot regulator-max-microvolt = <2800000>; 2762846c905SEmmanuel Vadot }; 2772846c905SEmmanuel Vadot 2782846c905SEmmanuel Vadot pm8937_l23: l23 { 2792846c905SEmmanuel Vadot regulator-min-microvolt = <1200000>; 2802846c905SEmmanuel Vadot regulator-max-microvolt = <1200000>; 2812846c905SEmmanuel Vadot }; 2822846c905SEmmanuel Vadot }; 2832846c905SEmmanuel Vadot 2842846c905SEmmanuel Vadot}; 2852846c905SEmmanuel Vadot 2862846c905SEmmanuel Vadot&sdhc_1 { 2872846c905SEmmanuel Vadot vmmc-supply = <&pm8937_l8>; 2882846c905SEmmanuel Vadot vqmmc-supply = <&pm8937_l5>; 2892846c905SEmmanuel Vadot 2902846c905SEmmanuel Vadot status = "okay"; 2912846c905SEmmanuel Vadot}; 2922846c905SEmmanuel Vadot 2932846c905SEmmanuel Vadot&sdhc_2 { 2942846c905SEmmanuel Vadot cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>; 2952846c905SEmmanuel Vadot vmmc-supply = <&pm8937_l11>; 2962846c905SEmmanuel Vadot vqmmc-supply = <&pm8937_l12>; 2972846c905SEmmanuel Vadot pinctrl-0 = <&sdc2_default &sdc2_cd_default>; 2982846c905SEmmanuel Vadot pinctrl-1 = <&sdc2_sleep &sdc2_cd_default>; 2992846c905SEmmanuel Vadot pinctrl-names = "default", "sleep"; 3002846c905SEmmanuel Vadot 3012846c905SEmmanuel Vadot status = "okay"; 3022846c905SEmmanuel Vadot}; 3032846c905SEmmanuel Vadot 3042846c905SEmmanuel Vadot&sleep_clk { 3052846c905SEmmanuel Vadot clock-frequency = <32768>; 3062846c905SEmmanuel Vadot}; 3072846c905SEmmanuel Vadot 3082846c905SEmmanuel Vadot&tlmm { 3092846c905SEmmanuel Vadot bq25601_int_default: bq25601-int-default-state { 3102846c905SEmmanuel Vadot pins = "gpio61"; 3112846c905SEmmanuel Vadot function = "gpio"; 3122846c905SEmmanuel Vadot drive-strength = <2>; 3132846c905SEmmanuel Vadot bias-pull-up; 3142846c905SEmmanuel Vadot }; 3152846c905SEmmanuel Vadot 3162846c905SEmmanuel Vadot gpio_keys_default: gpio-keys-default-state { 3172846c905SEmmanuel Vadot pins = "gpio91"; 3182846c905SEmmanuel Vadot function = "gpio"; 3192846c905SEmmanuel Vadot drive-strength = <2>; 3202846c905SEmmanuel Vadot bias-pull-up; 3212846c905SEmmanuel Vadot }; 3222846c905SEmmanuel Vadot 3232846c905SEmmanuel Vadot sdc2_cd_default: sdc2-cd-default-state { 3242846c905SEmmanuel Vadot pins = "gpio67"; 3252846c905SEmmanuel Vadot function = "gpio"; 3262846c905SEmmanuel Vadot drive-strength = <2>; 3272846c905SEmmanuel Vadot bias-disable; 3282846c905SEmmanuel Vadot }; 3292846c905SEmmanuel Vadot 3302846c905SEmmanuel Vadot tsp_int_rst_default: tsp-int-rst-default-state { 3312846c905SEmmanuel Vadot pins = "gpio64", "gpio65"; 3322846c905SEmmanuel Vadot function = "gpio"; 3332846c905SEmmanuel Vadot drive-strength = <8>; 3342846c905SEmmanuel Vadot bias-pull-up; 3352846c905SEmmanuel Vadot }; 3362846c905SEmmanuel Vadot}; 3372846c905SEmmanuel Vadot 3382846c905SEmmanuel Vadot&wcnss { 3392846c905SEmmanuel Vadot vddpx-supply = <&pm8937_l5>; 3402846c905SEmmanuel Vadot 3412846c905SEmmanuel Vadot status = "okay"; 3422846c905SEmmanuel Vadot}; 3432846c905SEmmanuel Vadot 3442846c905SEmmanuel Vadot&wcnss_iris { 3452846c905SEmmanuel Vadot compatible = "qcom,wcn3620"; 3462846c905SEmmanuel Vadot vddxo-supply = <&pm8937_l7>; 3472846c905SEmmanuel Vadot vddrfa-supply = <&pm8937_l19>; 3482846c905SEmmanuel Vadot vddpa-supply = <&pm8937_l9>; 3492846c905SEmmanuel Vadot vdddig-supply = <&pm8937_l5>; 3502846c905SEmmanuel Vadot}; 3512846c905SEmmanuel Vadot 3522846c905SEmmanuel Vadot&wcnss_mem { 3532846c905SEmmanuel Vadot status = "okay"; 3542846c905SEmmanuel Vadot}; 3552846c905SEmmanuel Vadot 3562846c905SEmmanuel Vadot&xo_board { 3572846c905SEmmanuel Vadot clock-frequency = <19200000>; 3582846c905SEmmanuel Vadot}; 359