[PATCH 3/5] arm64: dts: qcom: Add Redmi 4A

Barnabás Czémán posted 5 patches 1 month ago
There is a newer version of this series
[PATCH 3/5] arm64: dts: qcom: Add Redmi 4A
Posted by Barnabás Czémán 1 month ago
Redmi 4A (rolex) is like Redmi 5A with small differences like charging,
fuel gauge, different speaker codec configuration and display.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/Makefile                     |  1 +
 .../boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi     | 16 ++++++++++++++++
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts     | 19 +++++++++++++++++++
 3 files changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 6d87be639aac..20e161e843ed 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -82,6 +82,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86528.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-yiming-uz801v3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-riva.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-rolex.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8929-wingtech-wt82918hd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8937-xiaomi-land.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-asus-z00t.dtb
diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
index f0a534106e11..50868c679693 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
@@ -104,6 +104,22 @@ edt_ft5306: touchscreen@38 {
 
 		status = "disabled";
 	};
+
+	goodix_gt911: touchscreen@5d {
+		compatible = "goodix,gt911";
+		reg = <0x5d>;
+		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
+		irq-gpios = <&tlmm 65 GPIO_ACTIVE_HIGH>;
+		reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
+		pinctrl-0 = <&tsp_int_rst_default>;
+		pinctrl-names = "default";
+		AVDD28-supply = <&pm8937_l10>;
+		VDDIO-supply = <&pm8937_l5>;
+		touchscreen-size-x = <720>;
+		touchscreen-size-y = <1280>;
+
+		status = "disabled";
+	};
 };
 
 &pm8937_gpios {
diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts
new file mode 100644
index 000000000000..4cfaa7f6ff81
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026, Barnabas Czeman
+ */
+
+/dts-v1/;
+
+#include "msm8917-xiaomi-riva-common.dtsi"
+
+/ {
+	model = "Xiaomi Redmi 4A (rolex)";
+	compatible = "xiaomi,rolex", "qcom,msm8917";
+
+	qcom,board-id = <0x1000b 1>, <0x2000b 1>;
+};
+
+&goodix_gt911 {
+	status = "okay";
+};

-- 
2.53.0

Re: [PATCH 3/5] arm64: dts: qcom: Add Redmi 4A
Posted by Konrad Dybcio 1 month ago
On 3/5/26 6:28 PM, Barnabás Czémán wrote:
> Redmi 4A (rolex) is like Redmi 5A with small differences like charging,
> fuel gauge, different speaker codec configuration and display.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  arch/arm64/boot/dts/qcom/Makefile                     |  1 +
>  .../boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi     | 16 ++++++++++++++++
>  arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts     | 19 +++++++++++++++++++
>  3 files changed, 36 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index 6d87be639aac..20e161e843ed 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -82,6 +82,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86528.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-yiming-uz801v3.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-riva.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-rolex.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8929-wingtech-wt82918hd.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8937-xiaomi-land.dtb
>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-asus-z00t.dtb
> diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
> index f0a534106e11..50868c679693 100644
> --- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
> @@ -104,6 +104,22 @@ edt_ft5306: touchscreen@38 {
>  
>  		status = "disabled";
>  	};
> +
> +	goodix_gt911: touchscreen@5d {
> +		compatible = "goodix,gt911";
> +		reg = <0x5d>;
> +		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
> +		irq-gpios = <&tlmm 65 GPIO_ACTIVE_HIGH>;
> +		reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
> +		pinctrl-0 = <&tsp_int_rst_default>;
> +		pinctrl-names = "default";
> +		AVDD28-supply = <&pm8937_l10>;
> +		VDDIO-supply = <&pm8937_l5>;
> +		touchscreen-size-x = <720>;
> +		touchscreen-size-y = <1280>;
> +
> +		status = "disabled";
> +	};

I think an easier thing would be to just add a 'touchscreen' label
to the original one, /delete-node/ &touchscreen from rolex.dts and
add the new node there (seems like it's the only used) and do nothing
in the other two using EDT_FT5306

Konrad
Re: [PATCH 3/5] arm64: dts: qcom: Add Redmi 4A
Posted by barnabas.czeman@mainlining.org 1 month ago
On 2026-03-09 13:52, Konrad Dybcio wrote:
> On 3/5/26 6:28 PM, Barnabás Czémán wrote:
>> Redmi 4A (rolex) is like Redmi 5A with small differences like 
>> charging,
>> fuel gauge, different speaker codec configuration and display.
>> 
>> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
>> ---
>>  arch/arm64/boot/dts/qcom/Makefile                     |  1 +
>>  .../boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi     | 16 
>> ++++++++++++++++
>>  arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts     | 19 
>> +++++++++++++++++++
>>  3 files changed, 36 insertions(+)
>> 
>> diff --git a/arch/arm64/boot/dts/qcom/Makefile 
>> b/arch/arm64/boot/dts/qcom/Makefile
>> index 6d87be639aac..20e161e843ed 100644
>> --- a/arch/arm64/boot/dts/qcom/Makefile
>> +++ b/arch/arm64/boot/dts/qcom/Makefile
>> @@ -82,6 +82,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= 
>> msm8916-wingtech-wt86528.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt88047.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-yiming-uz801v3.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-riva.dtb
>> +dtb-$(CONFIG_ARCH_QCOM)	+= msm8917-xiaomi-rolex.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8929-wingtech-wt82918hd.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8937-xiaomi-land.dtb
>>  dtb-$(CONFIG_ARCH_QCOM)	+= msm8939-asus-z00t.dtb
>> diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi 
>> b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
>> index f0a534106e11..50868c679693 100644
>> --- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva-common.dtsi
>> @@ -104,6 +104,22 @@ edt_ft5306: touchscreen@38 {
>> 
>>  		status = "disabled";
>>  	};
>> +
>> +	goodix_gt911: touchscreen@5d {
>> +		compatible = "goodix,gt911";
>> +		reg = <0x5d>;
>> +		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
>> +		irq-gpios = <&tlmm 65 GPIO_ACTIVE_HIGH>;
>> +		reset-gpios = <&tlmm 64 GPIO_ACTIVE_HIGH>;
>> +		pinctrl-0 = <&tsp_int_rst_default>;
>> +		pinctrl-names = "default";
>> +		AVDD28-supply = <&pm8937_l10>;
>> +		VDDIO-supply = <&pm8937_l5>;
>> +		touchscreen-size-x = <720>;
>> +		touchscreen-size-y = <1280>;
>> +
>> +		status = "disabled";
>> +	};
> 
> I think an easier thing would be to just add a 'touchscreen' label
> to the original one, /delete-node/ &touchscreen from rolex.dts and
> add the new node there (seems like it's the only used) and do nothing
> in the other two using EDT_FT5306
There is focaltech variant from rolex, and there is goodix variant from 
riva and tiare,
maybe i should disable both node by default.
> 
> Konrad