public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO
@ 2026-03-10 17:21 Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader Barnabás Czémán
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán, Krzysztof Kozlowski

Redmi 5A is similar device like Redmi GO and Redmi 4A.

This patch series commonize it to avoid code duplications.

Differences between 4A and 5A:
- Different charger and fg
- Different displays panel but same resolution
- Different speaker codec configuration (awinic-mode)

Differences between GO and 5A:
- Different charger and fg
- Different speaker codec (aw87319)

Additional changes:
- Update Redmi 5A board-id for support nougat and oreo bootloader.
- Add Goodix touch controller support for all variants.
  The necessary touch controller can be enabled by devicetree overlay or lk2nd.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
Changes in v2:
- Rename msm8917-xiaomi-riva-common to msm8917-xiaomi-wingtech.
- Split goodix touch controller addition to a different commit.
- Disable touch controllers by default.
- Split new Redmi 5A devicetree to a different commit.
- Fix Redmi 4A board-id.
- Update riva board-id to make it able to run all bootloader version.
- Squash the devicetree bindings.
- Link to v1: https://lore.kernel.org/r/20260305-riva-common-v1-0-436f1f4b7399@mainlining.org

---
Barnabás Czémán (7):
      arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader
      arm64: dts: qcom: Make a common base from Redmi 5A
      arm64: dts: qcom: msm8917-xiaomi-wingtech: Add goodix touch
      arm64: dts: qcom: Add back Xiaomi Redmi 5A
      dt-bindings: arm: qcom: Add Redmi 4A and Go
      arm64: dts: qcom: Add Redmi 4A
      arm64: dts: qcom: Add Redmi Go

 Documentation/devicetree/bindings/arm/qcom.yaml    |   2 +
 arch/arm64/boot/dts/qcom/Makefile                  |   2 +
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts   | 308 +------------------
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts  |  15 +
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-tiare.dts  |  23 ++
 .../boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi     | 333 +++++++++++++++++++++
 6 files changed, 378 insertions(+), 305 deletions(-)
---
base-commit: fc7b1a72c6cd5cbbd989c6c32a6486e3e4e3594d
change-id: 20260304-riva-common-66e9c94819a4

Best regards,
-- 
Barnabás Czémán <barnabas.czeman@mainlining.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-11  9:14   ` Konrad Dybcio
  2026-03-10 17:21 ` [PATCH v2 2/7] arm64: dts: qcom: Make a common base from Redmi 5A Barnabás Czémán
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

Redmi 5A comes with multiple bootloader versions where the expected
board-id is different.
Change the board-id to unified form what works on both bootloader
version.

Fixes: 26633b582056 ("arm64: dts: qcom: Add Xiaomi Redmi 5A")
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
index 9db503e21888..1bfb16f90ddd 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
@@ -18,7 +18,7 @@ / {
 	chassis-type = "handset";
 
 	qcom,msm-id = <QCOM_ID_MSM8917 0>;
-	qcom,board-id = <0x1000b 2>, <0x2000b 2>;
+	qcom,board-id = <0x1000b 1>, <0x1000b 2>;
 
 	pwm_backlight: backlight {
 		compatible = "pwm-backlight";

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 2/7] arm64: dts: qcom: Make a common base from Redmi 5A
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 3/7] arm64: dts: qcom: msm8917-xiaomi-wingtech: Add goodix touch Barnabás Czémán
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

Redmi 5A was made by wingtech like Redmi 4A (rolex) and Redmi GO (tiare).
They are very similar, make a common base from riva for avoid
unnecessary code duplications.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/Makefile                  |  1 -
 ...iaomi-riva.dts => msm8917-xiaomi-wingtech.dtsi} | 45 +---------------------
 2 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 6d87be639aac..e68e161cfec0 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -81,7 +81,6 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86518.dtb
 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)	+= 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.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
similarity index 84%
rename from arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
rename to arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
index 1bfb16f90ddd..f0a534106e11 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
@@ -13,12 +13,9 @@
 /delete-node/ &qseecom_mem;
 
 / {
-	model = "Xiaomi Redmi 5A (riva)";
-	compatible = "xiaomi,riva", "qcom,msm8917";
 	chassis-type = "handset";
 
 	qcom,msm-id = <QCOM_ID_MSM8917 0>;
-	qcom,board-id = <0x1000b 1>, <0x1000b 2>;
 
 	pwm_backlight: backlight {
 		compatible = "pwm-backlight";
@@ -28,17 +25,6 @@ pwm_backlight: backlight {
 		default-brightness-level = <128>;
 	};
 
-	battery: battery {
-		compatible = "simple-battery";
-		charge-full-design-microamp-hours = <3000000>;
-		energy-full-design-microwatt-hours = <11500000>;
-		constant-charge-current-max-microamp = <1000000>;
-		constant-charge-voltage-max-microvolt = <4400000>;
-		precharge-current-microamp = <256000>;
-		charge-term-current-microamp = <60000>;
-		voltage-min-design-microvolt = <3400000>;
-	};
-
 	chosen {
 		#address-cells = <2>;
 		#size-cells = <2>;
@@ -104,7 +90,7 @@ framebuffer_mem: memory@90001000 {
 &blsp1_i2c3 {
 	status = "okay";
 
-	touchscreen@38 {
+	edt_ft5306: touchscreen@38 {
 		compatible = "edt,edt-ft5306";
 		reg = <0x38>;
 		interrupts-extended = <&tlmm 65 IRQ_TYPE_LEVEL_LOW>;
@@ -115,27 +101,8 @@ touchscreen@38 {
 		iovcc-supply = <&pm8937_l5>;
 		touchscreen-size-x = <720>;
 		touchscreen-size-y = <1280>;
-	};
-};
 
-&blsp2_i2c1 {
-	status = "okay";
-
-	bq27426@55 {
-		compatible = "ti,bq27426";
-		reg = <0x55>;
-		monitored-battery = <&battery>;
-	};
-
-	bq25601@6b {
-		compatible = "ti,bq25601";
-		reg = <0x6b>;
-		interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
-		pinctrl-0 = <&bq25601_int_default>;
-		pinctrl-names = "default";
-		input-voltage-limit-microvolt = <4400000>;
-		input-current-limit-microamp = <1000000>;
-		monitored-battery = <&battery>;
+		status = "disabled";
 	};
 };
 
@@ -280,7 +247,6 @@ pm8937_l23: l23 {
 			regulator-max-microvolt = <1200000>;
 		};
 	};
-
 };
 
 &sdhc_1 {
@@ -306,13 +272,6 @@ &sleep_clk {
 };
 
 &tlmm {
-	bq25601_int_default: bq25601-int-default-state {
-		pins = "gpio61";
-		function = "gpio";
-		drive-strength = <2>;
-		bias-pull-up;
-	};
-
 	gpio_keys_default: gpio-keys-default-state {
 		pins = "gpio91";
 		function = "gpio";

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 3/7] arm64: dts: qcom: msm8917-xiaomi-wingtech: Add goodix touch
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 2/7] arm64: dts: qcom: Make a common base from Redmi 5A Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A Barnabás Czémán
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

There are variants from MSM8917 wingtech xiaomis what
are using goodix touch controller instead of focaltech.
Add goodix node for make it able to use touch on all
variants.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
index f0a534106e11..50868c679693 100644
--- a/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-wingtech.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 {

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
                   ` (2 preceding siblings ...)
  2026-03-10 17:21 ` [PATCH v2 3/7] arm64: dts: qcom: msm8917-xiaomi-wingtech: Add goodix touch Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-11  1:47   ` Dmitry Baryshkov
  2026-03-11  9:01   ` Krzysztof Kozlowski
  2026-03-10 17:21 ` [PATCH v2 5/7] dt-bindings: arm: qcom: Add Redmi 4A and Go Barnabás Czémán
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

Add devicetree for Redmi 5A based on msm8917-xiaomi-wingtech.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/Makefile                |  1 +
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 56 ++++++++++++++++++++++++
 2 files changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index e68e161cfec0..6d87be639aac 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86518.dtb
 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)	+= 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.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
new file mode 100644
index 000000000000..02d9d4fd1b45
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026, Barnabas Czeman
+ */
+
+/dts-v1/;
+
+#include "msm8917-xiaomi-wingtech.dtsi"
+
+/ {
+	model = "Xiaomi Redmi 5A (riva)";
+	compatible = "xiaomi,riva", "qcom,msm8917";
+
+	qcom,board-id = <0x1000b 1>, <0x1000b 2>;
+
+	battery: battery {
+		compatible = "simple-battery";
+		charge-full-design-microamp-hours = <3000000>;
+		energy-full-design-microwatt-hours = <11500000>;
+		constant-charge-current-max-microamp = <1000000>;
+		constant-charge-voltage-max-microvolt = <4400000>;
+		precharge-current-microamp = <256000>;
+		charge-term-current-microamp = <60000>;
+		voltage-min-design-microvolt = <3400000>;
+	};
+};
+
+&blsp2_i2c1 {
+	status = "okay";
+
+	bq27426@55 {
+		compatible = "ti,bq27426";
+		reg = <0x55>;
+		monitored-battery = <&battery>;
+	};
+
+	bq25601@6b {
+		compatible = "ti,bq25601";
+		reg = <0x6b>;
+		interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>;
+		pinctrl-0 = <&bq25601_int_default>;
+		pinctrl-names = "default";
+		input-voltage-limit-microvolt = <4400000>;
+		input-current-limit-microamp = <1000000>;
+		monitored-battery = <&battery>;
+	};
+};
+
+&tlmm {
+	bq25601_int_default: bq25601-int-default-state {
+		pins = "gpio61";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 5/7] dt-bindings: arm: qcom: Add Redmi 4A and Go
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
                   ` (3 preceding siblings ...)
  2026-03-10 17:21 ` [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A Barnabás Czémán
  2026-03-10 17:21 ` [PATCH v2 7/7] arm64: dts: qcom: Add Redmi Go Barnabás Czémán
  6 siblings, 0 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán, Krzysztof Kozlowski

Add Redmi 4A (rolex) and Redmi Go (tiare).

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 153664da91d9..1bdf2d8c9b47 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -200,6 +200,8 @@ properties:
       - items:
           - enum:
               - xiaomi,riva
+              - xiaomi,rolex
+              - xiaomi,tiare
           - const: qcom,msm8917
 
       - items:

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
                   ` (4 preceding siblings ...)
  2026-03-10 17:21 ` [PATCH v2 5/7] dt-bindings: arm: qcom: Add Redmi 4A and Go Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  2026-03-11  9:16   ` Konrad Dybcio
  2026-03-10 17:21 ` [PATCH v2 7/7] arm64: dts: qcom: Add Redmi Go Barnabás Czémán
  6 siblings, 1 reply; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

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 +
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts | 15 +++++++++++++++
 2 files changed, 16 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-rolex.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts
new file mode 100644
index 000000000000..f0b72d9878c4
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-rolex.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026, Barnabas Czeman
+ */
+
+/dts-v1/;
+
+#include "msm8917-xiaomi-wingtech.dtsi"
+
+/ {
+	model = "Xiaomi Redmi 4A (rolex)";
+	compatible = "xiaomi,rolex", "qcom,msm8917";
+
+	qcom,board-id = <0x1000b 1>;
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 7/7] arm64: dts: qcom: Add Redmi Go
  2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
                   ` (5 preceding siblings ...)
  2026-03-10 17:21 ` [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A Barnabás Czémán
@ 2026-03-10 17:21 ` Barnabás Czémán
  6 siblings, 0 replies; 14+ messages in thread
From: Barnabás Czémán @ 2026-03-10 17:21 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio,
	Barnabás Czémán

Redmi Go (tiare) is like Redmi 5A with small differences like charging,
fuel gauge and different speaker codec.

Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
---
 arch/arm64/boot/dts/qcom/Makefile                 |  1 +
 arch/arm64/boot/dts/qcom/msm8917-xiaomi-tiare.dts | 23 +++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 20e161e843ed..a74598cf0b47 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -83,6 +83,7 @@ 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)	+= msm8917-xiaomi-tiare.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-tiare.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-tiare.dts
new file mode 100644
index 000000000000..64a564d97dd0
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-tiare.dts
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2026, Barnabas Czeman
+ */
+
+/dts-v1/;
+
+#include "msm8917-xiaomi-wingtech.dtsi"
+
+/ {
+	model = "Xiaomi Redmi Go (tiare)";
+	compatible = "xiaomi,tiare", "qcom,msm8917";
+
+	qcom,board-id = <0x1000b 1>;
+};
+
+&pm8937_l22 {
+	regulator-max-microvolt = <2850000>;
+};
+
+&pm8937_l23 {
+	regulator-max-microvolt = <1250000>;
+};

-- 
2.53.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A
  2026-03-10 17:21 ` [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A Barnabás Czémán
@ 2026-03-11  1:47   ` Dmitry Baryshkov
  2026-03-11  9:01   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2026-03-11  1:47 UTC (permalink / raw)
  To: Barnabás Czémán
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio

On Tue, Mar 10, 2026 at 06:21:34PM +0100, Barnabás Czémán wrote:
> Add devicetree for Redmi 5A based on msm8917-xiaomi-wingtech.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  arch/arm64/boot/dts/qcom/Makefile                |  1 +
>  arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 56 ++++++++++++++++++++++++
>  2 files changed, 57 insertions(+)

Please squash this into the second patch.

> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A
  2026-03-10 17:21 ` [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A Barnabás Czémán
  2026-03-11  1:47   ` Dmitry Baryshkov
@ 2026-03-11  9:01   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-11  9:01 UTC (permalink / raw)
  To: Barnabás Czémán
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel, Konrad Dybcio

On Tue, Mar 10, 2026 at 06:21:34PM +0100, Barnabás Czémán wrote:
> Add devicetree for Redmi 5A based on msm8917-xiaomi-wingtech.
> 
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---
>  arch/arm64/boot/dts/qcom/Makefile                |  1 +
>  arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts | 56 ++++++++++++++++++++++++
>  2 files changed, 57 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index e68e161cfec0..6d87be639aac 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -81,6 +81,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= msm8916-wingtech-wt86518.dtb
>  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)	+= 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.dts b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
> new file mode 100644
> index 000000000000..02d9d4fd1b45
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/msm8917-xiaomi-riva.dts
> @@ -0,0 +1,56 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2026, Barnabas Czeman
> + */
> +
> +/dts-v1/;
> +
> +#include "msm8917-xiaomi-wingtech.dtsi"
> +
> +/ {
> +	model = "Xiaomi Redmi 5A (riva)";
> +	compatible = "xiaomi,riva", "qcom,msm8917";
> +
> +	qcom,board-id = <0x1000b 1>, <0x1000b 2>;
> +
> +	battery: battery {
> +		compatible = "simple-battery";
> +		charge-full-design-microamp-hours = <3000000>;
> +		energy-full-design-microwatt-hours = <11500000>;
> +		constant-charge-current-max-microamp = <1000000>;
> +		constant-charge-voltage-max-microvolt = <4400000>;
> +		precharge-current-microamp = <256000>;
> +		charge-term-current-microamp = <60000>;
> +		voltage-min-design-microvolt = <3400000>;
> +	};
> +};
> +
> +&blsp2_i2c1 {
> +	status = "okay";
> +
> +	bq27426@55 {

Node names should be generic. See also an explanation and list of
examples (not exhaustive) in DT specification:
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
If you cannot find a name matching your device, please check in kernel
sources for similar cases or you can grow the spec (via pull request to
DT spec repo).

> +		compatible = "ti,bq27426";
> +		reg = <0x55>;
> +		monitored-battery = <&battery>;
> +	};
> +
> +	bq25601@6b {

Same here.


Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader
  2026-03-10 17:21 ` [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader Barnabás Czémán
@ 2026-03-11  9:14   ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-03-11  9:14 UTC (permalink / raw)
  To: Barnabás Czémán, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel

On 3/10/26 6:21 PM, Barnabás Czémán wrote:
> Redmi 5A comes with multiple bootloader versions where the expected
> board-id is different.
> Change the board-id to unified form what works on both bootloader
> version.
> 
> Fixes: 26633b582056 ("arm64: dts: qcom: Add Xiaomi Redmi 5A")
> Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A
  2026-03-10 17:21 ` [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A Barnabás Czémán
@ 2026-03-11  9:16   ` Konrad Dybcio
  2026-03-11 14:38     ` barnabas.czeman
  0 siblings, 1 reply; 14+ messages in thread
From: Konrad Dybcio @ 2026-03-11  9:16 UTC (permalink / raw)
  To: Barnabás Czémán, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel

On 3/10/26 6:21 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>
> ---

I see the Go has some differences in regulator configuration.

Does the 4A's one match the existing 5A?

Konrad

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A
  2026-03-11  9:16   ` Konrad Dybcio
@ 2026-03-11 14:38     ` barnabas.czeman
  2026-03-13 12:52       ` Konrad Dybcio
  0 siblings, 1 reply; 14+ messages in thread
From: barnabas.czeman @ 2026-03-11 14:38 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel

On 2026-03-11 10:16, Konrad Dybcio wrote:
> On 3/10/26 6:21 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>
>> ---
> 
> I see the Go has some differences in regulator configuration.
> 
> Does the 4A's one match the existing 5A?
Yes they are same, l22 is vana l23 is vdig for camera sensor.
riva and rolex is using 2.8v for vana and 1.2v for vdig.
tiare is using 2.85v for vana and 1.2 v for vdig so l22 min-voltage also 
should be increased
but l23 max-voltage increase is unnecessary, there is no reason to keep 
downstream value there.

Here is some proof 
https://github.com/Mi-Thorium/kernel_devicetree_xiaomi-msm8937/blob/dts/mi8937/4.9/master/wingtech/msm8917/tiare/camera.dtsi#L16C1-L23C65
> 
> Konrad

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A
  2026-03-11 14:38     ` barnabas.czeman
@ 2026-03-13 12:52       ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-03-13 12:52 UTC (permalink / raw)
  To: barnabas.czeman
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm, devicetree, linux-kernel,
	~postmarketos/upstreaming, phone-devel

On 3/11/26 3:38 PM, barnabas.czeman@mainlining.org wrote:
> On 2026-03-11 10:16, Konrad Dybcio wrote:
>> On 3/10/26 6:21 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>
>>> ---
>>
>> I see the Go has some differences in regulator configuration.
>>
>> Does the 4A's one match the existing 5A?
> Yes they are same, l22 is vana l23 is vdig for camera sensor.
> riva and rolex is using 2.8v for vana and 1.2v for vdig.
> tiare is using 2.85v for vana and 1.2 v for vdig so l22 min-voltage also should be increased
> but l23 max-voltage increase is unnecessary, there is no reason to keep downstream value there.
> 
> Here is some proof https://github.com/Mi-Thorium/kernel_devicetree_xiaomi-msm8937/blob/dts/mi8937/4.9/master/wingtech/msm8917/tiare/camera.dtsi#L16C1-L23C65

FWIW it's easiest to work with decompiled DTs, as the include chains are
often very complex. You can then throw them into ./scripts/dtx_diff or
similar

Konrad

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-03-13 12:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 17:21 [PATCH v2 0/7] Commonize Redmi 5A for 4A and GO Barnabás Czémán
2026-03-10 17:21 ` [PATCH v2 1/7] arm64: dts: qcom: msm8917-xiaomi-riva: Fix board-id for all bootloader Barnabás Czémán
2026-03-11  9:14   ` Konrad Dybcio
2026-03-10 17:21 ` [PATCH v2 2/7] arm64: dts: qcom: Make a common base from Redmi 5A Barnabás Czémán
2026-03-10 17:21 ` [PATCH v2 3/7] arm64: dts: qcom: msm8917-xiaomi-wingtech: Add goodix touch Barnabás Czémán
2026-03-10 17:21 ` [PATCH v2 4/7] arm64: dts: qcom: Add back Xiaomi Redmi 5A Barnabás Czémán
2026-03-11  1:47   ` Dmitry Baryshkov
2026-03-11  9:01   ` Krzysztof Kozlowski
2026-03-10 17:21 ` [PATCH v2 5/7] dt-bindings: arm: qcom: Add Redmi 4A and Go Barnabás Czémán
2026-03-10 17:21 ` [PATCH v2 6/7] arm64: dts: qcom: Add Redmi 4A Barnabás Czémán
2026-03-11  9:16   ` Konrad Dybcio
2026-03-11 14:38     ` barnabas.czeman
2026-03-13 12:52       ` Konrad Dybcio
2026-03-10 17:21 ` [PATCH v2 7/7] arm64: dts: qcom: Add Redmi Go Barnabás Czémán

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox