Skip to content

Commit

Permalink
arm64: dts: qcom: Add Xiaomi Xiaomi Redmi 3(S/X)
Browse files Browse the repository at this point in the history
* Add initial support for Xiaomi Redmi 3(S/X) (land).

Signed-off-by: Saalim Quadri <[email protected]>
  • Loading branch information
danascape committed Aug 21, 2024
1 parent 4d31701 commit 786844c
Show file tree
Hide file tree
Showing 2 changed files with 379 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/qcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ dtb-$(CONFIG_ARCH_QCOM) += msm8939-samsung-a7.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8939-sony-xperia-kanuti-tulip.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8939-wingtech-wt82918.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8939-wingtech-wt82918hd.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8940-xiaomi-land.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8940-xiaomi-santoni.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8953-motorola-potter.dtb
dtb-$(CONFIG_ARCH_QCOM) += msm8953-xiaomi-daisy.dtb
Expand Down
378 changes: 378 additions & 0 deletions arch/arm64/boot/dts/qcom/msm8940-xiaomi-land.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,378 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
* Copyright (c) 2023, Saalim Quadri <[email protected]>
*/

/dts-v1/;

#include <dt-bindings/arm/qcom,ids.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/leds/common.h>
#include "msm8940.dtsi"
#include "pm8937.dtsi"
#include "pmi8950.dtsi"

/ {
model = "Xiaomi Redmi 3(S/X) (land)";
compatible = "xiaomi,land", "qcom,msm8937";
chassis-type = "handset";

qcom,msm-id = <294 0>;
qcom,board-id = <0x1000b 1>, <0x2000b 1>;

chosen {
#address-cells = <2>;
#size-cells = <2>;
ranges;

stdout-path = "framebuffer0";

framebuffer0: framebuffer@90001000 {
compatible = "simple-framebuffer";
reg = <0x0 0x90001000 0x0 (720 * 1280 * 3)>;
width = <720>;
height = <1280>;
stride = <(720 * 3)>;
format = "r8g8b8";

clocks = <&gcc GCC_MDSS_AHB_CLK>,
<&gcc GCC_MDSS_AXI_CLK>,
<&gcc GCC_MDSS_VSYNC_CLK>,
<&gcc GCC_MDSS_MDP_CLK>,
<&gcc GCC_MDSS_BYTE0_CLK>,
<&gcc GCC_MDSS_PCLK0_CLK>,
<&gcc GCC_MDSS_ESC0_CLK>;
power-domains = <&gcc MDSS_GDSC>;
status = "disabled";
};
};

reserved-memory {
/delete-node/ reserved@85b00000;
/delete-node/ splash_region@90000000;

/* QSEECOM */
reserved@84a00000 {
reg = <0x0 0x84a00000 0x0 0x1900000>;
no-map;
};

splash_region@8dd00000 {
reg = <0x0 0x8dd00000 0x0 0x1400000>;
no-map;
};

framebuffer_mem: memory@90001000 {
reg = <0x0 0x90001000 0x0 (720 * 1280 * 3)>;
no-map;
};

ramoops@b0000000 {
compatible = "ramoops";
reg = <0x00 0xb0000000 0x00 0x800000>;
record-size = <0x200000>;
console-size = <0x200000>;
pmsg-size = <0x200000>;
};
};

vph_pwr: vph-pwr-regulator {
compatible = "regulator-fixed";
regulator-name = "vph_pwr";
regulator-min-microvolt = <3700000>;
regulator-max-microvolt = <3700000>;
regulator-always-on;
regulator-boot-on;
};

gpio-keys {
compatible = "gpio-keys";

button-volup {
label = "Volume Up";
linux,code = <KEY_VOLUMEUP>;
gpios = <&tlmm 91 GPIO_ACTIVE_LOW>;
debounce-interval = <15>;
};
};
};

&blsp_i2c2 {
status = "okay";

led-controller@45 {
compatible = "awinic,aw2013";
reg = <0x45>;
#address-cells = <1>;
#size-cells = <0>;

vcc-supply = <&pm8937_l10>;
vio-supply = <&pm8937_l5>;

led@0 {
reg = <0>;
function = LED_FUNCTION_INDICATOR;
led-max-microamp = <5000>;
color = <LED_COLOR_ID_RED>;
};

led@1 {
reg = <1>;
function = LED_FUNCTION_INDICATOR;
led-max-microamp = <5000>;
color = <LED_COLOR_ID_GREEN>;
};

led@2 {
reg = <2>;
function = LED_FUNCTION_INDICATOR;
led-max-microamp = <5000>;
color = <LED_COLOR_ID_BLUE>;
};
};
};

&blsp_i2c3 {
status = "okay";

touchscreen@38 {
compatible = "edt,edt-ft5406";
reg = <0x38>;

interrupt-parent = <&tlmm>;
interrupts = <65 IRQ_TYPE_EDGE_FALLING>;

reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;

vcc-supply = <&pm8937_l10>;
iovcc-supply = <&pm8937_l5>;
touchscreen-size-x = <720>;
touchscreen-size-y = <1280>;
};
};

&mdss_dsi0 {
vdda-supply = <&pm8937_l2>;
vddio-supply = <&pm8937_l6>;
panel@0 {
compatible = "mdss,hx8394f-boe";
reg = <0>;

reset-gpios = <&tlmm 60 GPIO_ACTIVE_LOW>;
backlight = <&pmi8950_wled>;

port {
panel_in: endpoint {
remote-endpoint = <&mdss_dsi0_out>;
};
};
};
};

&mdss_dsi0_out {
data-lanes = <0 1 2 3>;
remote-endpoint = <&panel_in>;
};

&mdss_dsi0_phy {
vddio-supply = <&pm8937_l6>;
qcom,dsi-phy-regulator-ldo-mode;
};

&pm8937_resin {
linux,code = <KEY_VOLUMEDOWN>;
status = "okay";
};

&pm8937_spmi_regulators {
/* PM8937 S5 + S6 = VDD_APC supply */
pm8937_s5: s5 {
regulator-min-microvolt = <1050000>;
regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-boot-on;
};
};

&pmi8950_usb_vbus {
status = "okay";
};

&pmi8950_wled {
qcom,num-strings = <2>;
qcom,external-pfet;
qcom,cabc;
qcom,current-limit-microamp = <20000>;
qcom,ovp-millivolt = <29600>;

status = "okay";
};

&rpm_requests {
regulators-0 {
compatible = "qcom,rpm-pm8937-regulators";

vdd_s1-supply = <&vph_pwr>;
vdd_s2-supply = <&vph_pwr>;
vdd_s3-supply = <&vph_pwr>;
vdd_s4-supply = <&vph_pwr>;

vdd_l1_l19-supply = <&pm8937_s3>;
vdd_l2_l23-supply = <&pm8937_s3>;
vdd_l3-supply = <&pm8937_s3>;
vdd_l4_l5_l6_l7_l16-supply = <&pm8937_s4>;
vdd_l8_l11_l12_l17_l22-supply = <&vph_pwr>;
vdd_l9_l10_l13_l14_l15_l18-supply = <&vph_pwr>;

pm8937_s1: s1 {
regulator-min-microvolt = <1000000>;
regulator-max-microvolt = <1225000>;
};

/* S2: VDD_CX */

pm8937_s3: s3 {
regulator-min-microvolt = <1300000>;
regulator-max-microvolt = <1300000>;
};

pm8937_s4: s4 {
regulator-min-microvolt = <2050000>;
regulator-max-microvolt = <2050000>;
};

pm8937_l2: l2 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};

/* L3: VDD_MX */

pm8937_l5: l5 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

pm8937_l6: l6 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};

pm8937_l7: l7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

pm8937_l8: l8 {
regulator-min-microvolt = <2850000>;
regulator-max-microvolt = <2900000>;
};

pm8937_l9: l9 {
regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <3300000>;
};

pm8937_l10: l10 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <3000000>;
};

pm8937_l11: l11 {
regulator-min-microvolt = <2950000>;
regulator-max-microvolt = <2950000>;
};

pm8937_l12: l12 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2950000>;
};

pm8937_l13: l13 {
regulator-min-microvolt = <3075000>;
regulator-max-microvolt = <3075000>;
};

pm8937_l14: l14 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};

pm8937_l15: l15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
};

pm8937_l16: l16 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};

pm8937_l17: l17 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2900000>;
};

pm8937_l19: l19 {
regulator-min-microvolt = <1225000>;
regulator-max-microvolt = <1350000>;
};

pm8937_l22: l22 {
regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2800000>;
};

pm8937_l23: l23 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
};
};
};

/* eMMC */
&sdhc_1 {
vmmc-supply = <&pm8937_l8>;
vqmmc-supply = <&pm8937_l5>;
status = "okay";
};

/* SD Card */
&sdhc_2 {
cd-gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
vmmc-supply = <&pm8937_l11>;
vqmmc-supply = <&pm8937_l12>;
status = "okay";
};

&usb {
dr_mode = "peripheral";
extcon = <&pmi8950_usb_vbus>;
status = "okay";
};

&usb_hs_phy {
vdd-supply = <&pm8937_l2>;
vdda1p8-supply = <&pm8937_l7>;
vdda3p3-supply = <&pm8937_l13>;
status = "okay";
};

&wcnss {
vddpx-supply = <&pm8937_l5>;
status = "okay";

};

&wcnss_iris {
compatible = "qcom,wcn3620";
vddxo-supply = <&pm8937_l7>;
vddrfa-supply = <&pm8937_l19>;
vddpa-supply = <&pm8937_l9>;
vdddig-supply = <&pm8937_l5>;
};

&wcnss_mem {
status = "okay";
};

0 comments on commit 786844c

Please sign in to comment.