dt-bindings: arm: qcom: Add Xiaomi Redmi K20 Pro (Raphael)
PATCH 1/2 dt-bindings: arm: qcom: Add Xiaomi Redmi K20 Pro (Raphael)
Document Xiaomi Redmi K20 Pro / Xiaomi Mi 9T Pro.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
@@ -983,6 +983,7 @@ properties: - qcom,sm8150-mtp - sony,bahamut-generic - sony,griffin-generic + - xiaomi,raphael - const: qcom,sm8150 - items:
Signature · 1 line
2.51.1
PATCH 2/2 arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
Add initial device tree support for the Xiaomi Redmi K20 Pro/ Xiaomi Mi 9T Pro (codename raphael), based on the Qualcomm SM8150 (Snapdragon 855) platform.
The supported features include:
- Display (Samsung AMS639RQ08 AMOLED panel)
- UFS storage
- USB Type-C (with role switching, High-Speed only)
- PMIC regulators (PM8150, PM8150L, PM8150B)
- GPIO keys (volume up, volume down, power)
- Remoteprocs (ADSP, CDSP, MPSS)
- Adreno 640 GPU with GMU
- WCN3990 WiFi
- Camera flash LEDs
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm8150-xiaomi-raphael.dts | 995 ++++++++++++++++++ 2 files changed, 996 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -279,6 +279,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8150-microsoft-surface-duo.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-bahamut.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-griffin.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8150-xiaomi-raphael.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-samsung-r8q.dtb
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +995 -0
995 lines not on this page · raw message
Signature · 1 line
2.51.1
Re: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
Hello Piyush,
few things to improve:
Quoted 196 lines · Piyush Raj Chouhan
Add initial device tree support for the Xiaomi Redmi K20 Pro/ Xiaomi Mi 9T Pro (codename raphael), based on the Qualcomm SM8150 (Snapdragon 855) platform.
The supported features include:
- Display (Samsung AMS639RQ08 AMOLED panel)
- UFS storage
- USB Type-C (with role switching, High-Speed only)
- PMIC regulators (PM8150, PM8150L, PM8150B)
- GPIO keys (volume up, volume down, power)
- Remoteprocs (ADSP, CDSP, MPSS)
- Adreno 640 GPU with GMU
- WCN3990 WiFi
- Camera flash LEDsSigned-off-by Piyush Raj Chouhan <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sm8150-xiaomi-raphael.dts | 995 ++++++++++++++++++ 2 files changed, 996 insertions(+)create mode 100644
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dtsarch/arm64/boot/dts/qcom/Makefile +1
-0@@ -279,6 +279,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sm8150-microsoft-surface-duo.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-bahamut.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8150-sony-xperia-kumano-griffin.dtb +dtb-$(CONFIG_ARCH_QCOM) += sm8150-xiaomi-raphael.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-hdk.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-mtp.dtb dtb-$(CONFIG_ARCH_QCOM) += sm8250-samsung-r8q.dtbarch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +156
-0@@ -0,0 +1,995 @@ +// SPDX-License-Identifier: BSD-3-Clause + +/* + * Copyright (c) 2025, Piyush Raj Chouhan <[email protected]>. + */ + +/dts-v1/; + +#include <dt-bindings/arm/qcom,ids.h> +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/leds/common.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> +#include <dt-bindings/regulator/qcom,rpmh-regulator.h> +#include <dt-bindings/usb/pd.h> +#include "sm8150.dtsi" +#include "pm8150.dtsi" +#include "pm8150b.dtsi" +#include "pm8150l.dtsi" + +/* + * Rewrite reserved memory maps inherited from sm8150.dtsi to match the ones + * used on xiaomi-raphael. + * Note: this list is ordered by its memory address in sm8150.dtsi. + */ +/delete-node/ &tz_mem; /* same address but larger, no place for rmtfs_mem! */ +/delete-node/ &rmtfs_mem; /* moved to completely different address */ +/delete-node/ &adsp_mem; /* same start address, but larger size */ +/delete-node/ &mpss_mem; /* same size, shifted higher, due to larger adsp_mem */ +/delete-node/ &venus_mem; /* same size, shifted higher */ +/delete-node/ &slpi_mem; /* same size, shifted higher */ +/delete-node/ &ipa_fw_mem; /* same size, shifted higher */ +/delete-node/ &ipa_gsi_mem; /* same size, shifted higher */ +/delete-node/ &gpu_mem; /* same size, shifted higher */ +/delete-node/ &spss_mem; /* same size, shifted higher */ +/delete-node/ &cdsp_mem; /* same size, shifted higher */ + +/ { + model = "Xiaomi Redmi K20 Pro"; + compatible = "xiaomi,raphael", "qcom,sm8150"; + qcom,msm-id = <QCOM_ID_SM8150 0x20000>; /* SM8150 v2 */ + qcom,board-id = <0x28008 0>; + chassis-type = "handset"; + + aliases { + serial0 = &uart2; + wifi0 = &wifi; + }; + + chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + stdout-path = "serial0:115200n8"; + + framebuffer: framebuffer@9c000000 { + compatible = "simple-framebuffer"; + reg = <0 0x9c000000 0 (1080 * 2340 * 4)>; + width = <1080>; + height = <2340>; + stride = <(1080 * 4)>; + format = "a8r8g8b8"; + display = <&panel>; + clocks = <&gcc GCC_DISP_HF_AXI_CLK>; + }; + }; + + disp_vci_vreg: disp-vci-vreg { + compatible = "regulator-fixed"; + regulator-name = "disp_vci_vreg"; + regulator-boot-on; + enable-active-high; + gpio = <&tlmm 99 GPIO_ACTIVE_HIGH>; + }; + + vreg_ibb: regulator-ibb { + compatible = "regulator-fixed"; + regulator-name = "ibb"; + regulator-min-microvolt = <6000000>; + regulator-max-microvolt = <6000000>; + }; + + vreg_lab: regulator-lab { + compatible = "regulator-fixed"; + regulator-name = "lab"; + regulator-min-microvolt = <6000000>; + regulator-max-microvolt = <6000000>; + }; + + reserved-memory { + tz_mem: memory@86200000 { + reg = <0x0 0x86200000 0x0 0x5500000>; + no-map; + }; + + adsp_mem: memory@8be00000 { + reg = <0x0 0x8be00000 0x0 0x2200000>; + no-map; + }; + + mpss_mem: memory@8e000000 { + reg = <0x0 0x8e000000 0x0 0x9600000>; + no-map; + }; + + venus_mem: memory@97600000 { + reg = <0x0 0x97600000 0x0 0x500000>; + no-map; + }; + + slpi_mem: memory@97b00000 { + reg = <0x0 0x97b00000 0x0 0x1400000>; + no-map; + }; + + ipa_fw_mem: memory@98f00000 { + reg = <0x0 0x98f00000 0x0 0x10000>; + no-map; + }; + + ipa_gsi_mem: memory@98f10000 { + reg = <0x0 0x98f10000 0x0 0x5000>; + no-map; + }; + + gpu_mem: memory@98f15000 { + reg = <0x0 0x98f15000 0x0 0x2000>; + no-map; + }; + + spss_mem: memory@99000000 { + reg = <0x0 0x99000000 0x0 0x100000>; + no-map; + }; + + cdsp_mem: memory@99100000 { + reg = <0x0 0x99100000 0x0 0x1400000>; + no-map; + }; + + cont_splash_mem: memory@9c000000 { + reg = <0x0 0x9c000000 0x0 0x2400000>; + no-map; + }; + + cdsp_sec_mem: memory@a4c00000 { + reg = <0x0 0xa4c00000 0x0 0x3c00000>; + no-map; + }; + + ramoops@a1600000 { + compatible = "ramoops"; + reg = <0x0 0xa1600000 0x0 0x800000>; + console-size = <0x400000>; + pmsg-size = <0x200000>; + record-size = <0>;
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 166
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ ftrace-size = <0>; + ecc-size = <0>; + no-map; + }; + + rmtfs_mem: memory@fe101000 { + compatible = "qcom,rmtfs-mem"; + reg = <0 0xfe101000 0 0x300000>; + qcom,client-id = <1>; + qcom,vmid = <15>;
s/15/QCOM_SCM_VMID_MSS_MSA/
Quoted 335 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +335
-0+ no-map; + }; + }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&vol_up_n>; + + key-vol-up { + label = "Volume Up"; + linux,code = <KEY_VOLUMEUP>; + gpios = <&pm8150_gpios 6 GPIO_ACTIVE_LOW>; + }; + }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "vph_pwr"; + regulator-min-microvolt = <3700000>; + regulator-max-microvolt = <3700000>; + }; + + /* + * Apparently RPMh does not provide support for PM8150 S4 because it + * is always-on; model it as a fixed regulator. + */ + vreg_s4a_1p8: pm8150-s4 { + compatible = "regulator-fixed"; + regulator-name = "vreg_s4a_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vph_pwr>; + }; +}; + +&apps_rsc { + regulators-0 { + compatible = "qcom,pm8150-rpmh-regulators"; + qcom,pmic-id = "a"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + vdd-s9-supply = <&vph_pwr>; + vdd-s10-supply = <&vph_pwr>; + + vdd-l1-l8-l11-supply = <&vreg_s6a_0p9>; + vdd-l2-l10-supply = <&vreg_bob>; + vdd-l3-l4-l5-l18-supply = <&vreg_s6a_0p9>; + vdd-l6-l9-supply = <&vreg_s8c_1p3>; + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p0>; + vdd-l13-l16-l17-supply = <&vreg_bob>; + + vreg_s5a_2p0: smps5 { + regulator-min-microvolt = <1904000>; + regulator-max-microvolt = <2000000>; + }; + + vreg_s6a_0p9: smps6 { + regulator-min-microvolt = <920000>; + regulator-max-microvolt = <1128000>; + }; + + vdda_wcss_pll: + vreg_l1a_0p75: ldo1 { + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <752000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vdd_pdphy: + vdda_usb_hs_3p1: + vreg_l2a_3p1: ldo2 { + regulator-min-microvolt = <3072000>; + regulator-max-microvolt = <3072000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l3a_0p8: ldo3 { + regulator-min-microvolt = <480000>; + regulator-max-microvolt = <932000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + /* + * L4A supplies VDD_LPI_MX_* (VDD_LPI_MX_A_1). Board label: vreg_l4a_0p75. + * PM8150 device spec: L4A nominal = 0.816 V, active min = 0.752 V, active max = 0.904 V, + * IRATED = 300 mA. If the board programs L4A to ~0.752 V, keep min=752000 and max=816000. + */ + vreg_l4a_0p75: ldo4 { + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <816000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vdd_usb_hs_core: + vdda_mipi_csi_0_0p9: + vdda_mipi_csi_1_0p9: + vdda_mipi_csi_2_0p9: + vdda_mipi_csi_3_0p9: + vdda_mipi_dsi_0_0p9: + vdda_mipi_dsi_1_0p9: + vdda_mipi_dsi_0_pll_0p9: + vdda_mipi_dsi_1_pll_0p9: + vdda_pcie_1ln_core: + vdda_pcie_2ln_core: + vdda_pll_hv_cc_ebi01: + vdda_pll_hv_cc_ebi23: + vdda_qrefs_0p875_5: + vdda_sp_sensor: + vdda_ufs_2ln_core_1: + vdda_ufs_2ln_core_2: + vdda_qlink_lv: + vdda_qlink_lv_ck: + vreg_l5a_0p875: ldo5 { + regulator-min-microvolt = <880000>; + regulator-max-microvolt = <880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l6a_1p2: ldo6 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7a_1p8: ldo7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + /* + * PM8150 LDO8 (L8A) — supplies vreg_l8a_0p75 + * Device spec: nominal 0.752 V, active min 0.752 V, active max 0.904 V, IRATED = 300 mA + */ + vreg_l8a_0p75: ldo8 { + regulator-min-microvolt = <752000>; + regulator-max-microvolt = <816000>; + }; + + vddpx_10: + vreg_l9a_1p2: ldo9 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l10a_2p95: ldo10 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l11a_0p8: ldo11 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vdd_qfprom: + vdd_qfprom_sp: + vdda_apc_cs_1p8: + vdda_gfx_cs_1p8: + vdda_usb_hs_1p8: + vdda_qrefs_vref_1p8: + vddpx_10_a: + vreg_l12a_1p8: ldo12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l13a_2p7: ldo13 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2704000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l14a_1p8: ldo14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1880000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l15a_1p7: ldo15 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <1704000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l16a_2p7: ldo16 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l17a_3p0: ldo17 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3008000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l18a_1p05: ldo18 { + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + }; + + regulators-1 { + compatible = "qcom,pm8150l-rpmh-regulators"; + qcom,pmic-id = "c"; + + vdd-s1-supply = <&vph_pwr>; + vdd-s2-supply = <&vph_pwr>; + vdd-s3-supply = <&vph_pwr>; + vdd-s4-supply = <&vph_pwr>; + vdd-s5-supply = <&vph_pwr>; + vdd-s6-supply = <&vph_pwr>; + vdd-s7-supply = <&vph_pwr>; + vdd-s8-supply = <&vph_pwr>; + + vdd-l1-l8-supply = <&vreg_s4a_1p8>; + vdd-l2-l3-supply = <&vreg_s8c_1p3>; + vdd-l4-l5-l6-supply = <&vreg_bob>; + vdd-l7-l11-supply = <&vreg_bob>; + vdd-l9-l10-supply = <&vreg_bob>; + + vdd-bob-supply = <&vph_pwr>; + vdd-flash-supply = <&vreg_bob>; + vdd-rgb-supply = <&vreg_bob>; + + vreg_bob: bob { + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <4000000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; + regulator-allow-bypass; + }; + + vreg_s8c_1p3: smps8 { + regulator-min-microvolt = <1352000>; + regulator-max-microvolt = <1352000>; + }; + + vreg_l1c_1p8: ldo1 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vdda_wcss_adcdac_1: + vdda_wcss_adcdac_22: + vreg_l2c_1p3: ldo2 { + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vdda_hv_ebi0: + vdda_hv_ebi1: + vdda_hv_ebi2: + vdda_hv_ebi3: + vdda_hv_refgen0: + vdda_mipi_dsi0_1p2: + vdda_qlink_hv_ck: + vreg_l3c_1p2: ldo3 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vddpx_5: + vreg_l4c_1p8: ldo4 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vddpx_6: + vreg_l5c_1p8: ldo5 { + regulator-min-microvolt = <1704000>; + regulator-max-microvolt = <2928000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vddpx_2: + vreg_l6c_2p9: ldo6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l7c_3p0: ldo7 { + regulator-min-microvolt = <2856000>; + regulator-max-microvolt = <3104000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l8c_1p8: ldo8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l9c_2p9: ldo9 { + regulator-min-microvolt = <2704000>; + regulator-max-microvolt = <2960000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l10c_3p3: ldo10 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + + vreg_l11c_3p3: ldo11 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; + }; +}; + +&gmu { + status = "okay";
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 511
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+}; + +&gpi_dma2 { + status = "okay"; +}; + +&gpu { + zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sm8150/xiaomi/raphael/a640_zap.mbn";
The vendor should start with upper case, so Xiaomi here (and everywhere else)
Quoted 19 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +19
-0+ }; + + status = "okay"; +}; + +&i2c19 { + /* goodix,gt9886 @5d */ +}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vdda_mipi_dsi0_1p2>; + + status = "okay"; + panel: panel@0 { + compatible = "samsung,ams639rq08";
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 540
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ reg = <0>; + + vddio-supply = <&vreg_l14a_1p8>; + vdd3p3-supply = <&disp_vci_vreg>; + vsn-supply = <&vreg_ibb>; + vsp-supply = <&vreg_lab>; + + reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; + + pinctrl-names = "default", "sleep";
pinctrl-names should come after pinctrl-N
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 541
Quoted 1 line
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +1
-0+ pinctrl-0 = <&panel_reset_pin &panel_te_pin>;
you're missing the pinctrl-1 for the "sleep"
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 543
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +2
-0+ + status = "okay";
missing newline
Quoted 23 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +23
-0+ 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 { + vdds-supply = <&vreg_l5a_0p875>; + + status = "okay"; +}; + +&pm8150_gpios { + vol_up_n: vol-up-n-state { + pins = "gpio6"; + function = PMIC_GPIO_FUNC_NORMAL;
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 576
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ input-enable; + bias-pull-up; + }; +}; + +&pm8150b_typec { + vdd-vbus-supply = <&pm8150b_vbus>; + vdd-pdphy-supply = <&vdda_usb_hs_3p1>; + + status = "okay";
newline
Quoted 24 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +24
-0+ connector { + compatible = "usb-c-connector"; + power-role = "source"; + data-role = "dual"; + self-powered; + + source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | + PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pm8150b_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + }; + }; +}; +
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 610
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+&pm8150b_vbus { + regulator-min-microamp = <500000>; + regulator-max-microamp = <3000000>; + + status = "okay"; +}; + +&pm8150l_flash { + + status = "okay";
newline
Quoted 12 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +12
-0+ led-1 { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_WHITE>; + led-sources = <1>; + led-max-microamp = <150000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; + + led-2 { + function = LED_FUNCTION_FLASH; + color = <LED_COLOR_ID_YELLOW>;
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 632
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ led-sources = <2>; + led-max-microamp = <150000>; + flash-max-microamp = <1000000>; + flash-max-timeout-us = <1280000>; + }; +}; + +&pm8150l_lpg { + + status = "okay";
newline
Quoted 75 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +75
-0+ led@1 { + reg = <1>; + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_STATUS; + + status = "disabled"; + }; + + led@2 { + reg = <2>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + }; + + led@3 { + reg = <3>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + }; +}; + +&pm8150l_wled { + qcom,num-strings = <3>; + qcom,cabc; + qcom,cabc-sel = <1>; +}; + +&pon { + mode-bootloader = <0x2>; + mode-recovery = <0x1>; +}; + +&pon_pwrkey { + status = "okay"; +}; + +&pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + + status = "okay"; +}; + +&qupv3_id_1 { + status = "okay"; +}; + +&qupv3_id_2 { + status = "okay"; +}; + +&remoteproc_adsp { + firmware-name = "qcom/sm8150/xiaomi/raphael/adsp.mbn"; + + status = "okay"; +}; + +&remoteproc_cdsp { + firmware-name = "qcom/sm8150/xiaomi/raphael/cdsp.mbn"; + + status = "okay"; +}; + +&remoteproc_mpss { + firmware-name = "qcom/sm8150/xiaomi/raphael/modem.mbn"; + + status = "okay"; +}; + +&remoteproc_slpi { + firmware-name = "qcom/sm8150/xiaomi/raphael/slpi.mbn"; + + status = "disabled"; +};
Re: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
In reply to Piyush Raj ChouhanQuoted 3 lines · Piyush Raj Chouhan
Add initial device tree support for the Xiaomi Redmi K20 Pro/ Xiaomi Mi 9T Pro (codename raphael), based on the Qualcomm SM8150 (Snapdragon 855) platform.
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 159
Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +9
-0+ ramoops@a1600000 { + compatible = "ramoops"; + reg = <0x0 0xa1600000 0x0 0x800000>; + console-size = <0x400000>; + pmsg-size = <0x200000>; + record-size = <0>; + ftrace-size = <0>; + ecc-size = <0>; + no-map;
You can probably remove the = 0 entries (although ECC is very useful to set to e.g. 8)
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 174
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +4
-0+ gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&vol_up_n>;
property-n
property-names
in this order, please, file-wide
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 309
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +3
-0+ /* + * PM8150 LDO8 (L8A) — supplies vreg_l8a_0p75 + * Device spec: nominal 0.752 V, active min 0.752 V, active max 0.904 V, IRATED = 300 mA
Hm?
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 514
Quoted 7 lines
+&gpu {
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +6
-0+ zap-shader { + memory-region = <&gpu_mem>; + firmware-name = "qcom/sm8150/xiaomi/raphael/a640_zap.mbn"; + }; + + status = "okay";
This shouldn't compile
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 518
Quoted 4 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +4
-0+}; + +&i2c19 { + /* goodix,gt9886 @5d */
I see there's driver support for the GT98*97* - is there a chance you can reuse some of it?
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 528
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+}; + +&mdss { + status = "okay"; +}; + +&mdss_dsi0 { + vdda-supply = <&vdda_mipi_dsi0_1p2>; + + status = "okay";
Please add a newline between this property an the following subnode
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 576
Quoted 5 lines
+&pm8150b_typec {
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +4
-0+ vdd-vbus-supply = <&pm8150b_vbus>; + vdd-pdphy-supply = <&vdda_usb_hs_3p1>; + + status = "okay";
ditto
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 584
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +8
-0+ connector { + compatible = "usb-c-connector"; + power-role = "source"; + data-role = "dual"; + self-powered; + + source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | + PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;
Have you verified this is in line with your specific device's downstream kernel?
[...]
Review
Quoted 3 lines
+&pm8150l_flash {
(quoted diff) +2
-0+ + status = "okay";
ditto
[...]
Review
Quoted 3 lines
+&pm8150l_lpg {
(quoted diff) +2
-0+ + status = "okay";
ditto> + led@1 {
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 638
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +5
-0+ reg = <1>; + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_STATUS; + + status = "disabled";
?
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +5
-0+ }; + + led@2 { + reg = <2>; + color = <LED_COLOR_ID_RED>;
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 653
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + }; + + led@3 { + reg = <3>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + };
Are there really two separate red LEDs?
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 896
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ /* GPIO 0..3 are NFC spi, gpios 126..129 are FP spi */ + gpio-reserved-ranges = <0 4>, <126 4>; + + /* Display panel pins */ + panel_reset_pin: panel-reset-state { + pins = "gpio6"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-low;
Please drop output- properites from TLMM subnodes, these are controlled by the kernel's GPIO framework instead
[...]
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 970
Quoted 7 lines
+&usb_1_dwc3 {
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +6
-0+ dr_mode = "otg"; + maximum-speed = "high-speed"; + + /* Remove USB3 phy */ + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy";
Is this a physical limitation, i.e. missing wires?
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 972
Quoted 2 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +2
-0+ + usb-role-switch;
This property should be moved to the SoC DTSI
Konrad
Re: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
Hi, konrad
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 518
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +3
-0+ +&i2c19 { + /* goodix,gt9886 @5d */I see there's driver support for the GT98*97* - is there a chance you can reuse some of it?
I am currently testing touch on gtx8 driver which currently is in lkml, once its merged we could add support for it.
https://lore.kernel.org/linux-input/[email protected]
[...]
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 584
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +8
-0+ connector { + compatible = "usb-c-connector"; + power-role = "source"; + data-role = "dual"; + self-powered; + + source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE | + PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;Have you verified this is in line with your specific device's downstream kernel?
Yes i have verified it.
[...]
Quoted 5 lines
Review
Quoted 3 lines
+&pm8150l_lpg {
(quoted diff) +2
-0+ + status = "okay";ditto> + led@1 {
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 638
Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +5
-0+ reg = <1>; + color = <LED_COLOR_ID_WHITE>; + function = LED_FUNCTION_STATUS; + + status = "disabled";?
Raphael doesn’t have a white LED. I missed cleaning that. I’ll remove it in the next revision.
Quoted 11 lines
Quoted 11 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +10
-0+ }; + + + led@2 { + reg = <2>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + }; +
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 653
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +6
-0+ led@3 { + reg = <3>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + };Are there really two separate red LEDs?
Yes, it has popup camera with an LED on both side, i have verified functionality of both LEDs.
[...]
Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 970
Quoted 8 lines
+&usb_1_dwc3 {
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +6
-0+ dr_mode = "otg"; + maximum-speed = "high-speed"; + + /* Remove USB3 phy */ + phys = <&usb_1_hsphy>; + phy-names = "usb2-phy";Is this a physical limitation, i.e. missing wires?
Yes it is a physical limitation and downstream configured it similarly,
[...]
Thanks for all the rest of improvement suggestions.
Best regards
Piyush Raj Chouhan
Re: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
Quoted 11 lines · Piyush Raj Chouhan
Hi, konrad
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 518
Quoted 3 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +3
-0+ +&i2c19 { + /* goodix,gt9886 @5d */I see there's driver support for the GT98*97* - is there a chance you can reuse some of it?
Quoted 3 lines
I am currently testing touch on gtx8 driver which currently is in lkml, once its merged we could add support for it.
That's great!
[...]
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +7
-0+ led@2 { + reg = <2>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <0>; + }; +Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts line 653
Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts new file +6
-0+ led@3 { + reg = <3>; + color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; + function-enumerator = <1>; + };Are there really two separate red LEDs?
Quoted 1 line
Yes, it has popup camera with an LED on both side, i have verified functionality of both LEDs.
OK, would you mind adding a label= entry with perhaps "Pop-up camera front/back"?
Konrad
kernel test robot
build botRe: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro
In reply to Piyush Raj Chouhankernel test robot noticed the following build errors:
Hi Piyush,
kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linus/master v6.18-rc3 next-20251029] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Piyush-Raj-Chouhan/arm64-dts-qcom-sm8150-Add-support-for-Xiaomi-Redmi-K20-Pro/20251022-134317 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next patch link: https://lore.kernel.org/r/20251022054026.22816-2-pc1598%40mainlining.org patch subject: [PATCH 2/2] arm64: dts: qcom: sm8150: Add support for Xiaomi Redmi K20 Pro config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251030/[email protected]/config) compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251030/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
Error: arch/arm64/boot/dts/qcom/sm8150-xiaomi-raphael.dts:514.2-18 Properties must precede subnodes
>> FATAL ERROR: Unable to parse input tree
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 7 lines · Piyush Raj Chouhan
Document Xiaomi Redmi K20 Pro / Xiaomi Mi 9T Pro.
Signed-off-by Piyush Raj Chouhan <[email protected]>--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)