Add support for Xiaomi Poco F1 EBBG variant
v5 cover Add support for Xiaomi Poco F1 EBBG variant
Changes in v5:
--------------
- Do not rename the compatible property of the existing variant (Tianma) to avoid any further conflict with other projects/users. (Suggested by Krzysztof Kozlowski)
Changes in v4:
--------------
- Update board's compatible and model property to distinguish between the two variants. (Suggested by Krzysztof Kozlowski and Marijn Suijten)
- Update the dt-bindings as per the new compatible values. (Fix checkpatch.pl script warnings)
Changes in v3:
--------------
- Approach suggested by Marijn Suijten and Krzysztof Kozlowski to make git handle renames more appropriately and to avoid moving large chunks of code. Helps with reviewing the patch.
Changes in v2:
--------------
- Fix issue with builds breaking across multiple commits making git bisect harder to find where the rename has happened.
There are two variants of Xiaomi Poco F1.
- Tianma variant with NOVATEK NT36672A panel + touchscreen manufactured by Tianma
- EBBG variant with Focaltech FT8719 panel + touchscreen manufactured by EBBG
The current sdm845-xiaomi-beryllium.dts represents Tianma panel variant.
To add support for the EBBG variant:
------------------------------------
- Rename sdm845-xiaomi-beryllium.dts to sdm845-xiaomi-beryllium-common.dtsi
- Generalize the display panel node by assigning label, removing compatible property and renaming the panel endpoints to be generic.
- Create a dts for the Tianma variant called sdm845-xiaomi-beryllium-tianma.dts which will inherit the common dtsi and keep the existing compatible property to avoid any conflicts with other projects.
- Adjust the Makefile since the sdm845-xiaomi-beryllium.dts is now called sdm845-xiaomi-beryllium-tianma.dts for the tianma variant.
- Create sdm845-xiaomi-beryllium-ebbg.dts for the EBBG variant which will inherit the common dtsi and set a different compatible property to distinguish between the Tianma and EBBG variant.
Note:
-----
Both the panels are already upstreamed and the split is based on them. There were patches earlier for both the touchscreens, but they are not accepted in upstream yet. Once they are accepted, we will add them to respective variants.
Joel Selvaraj (3):
arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts
dt-bindings: arm: qcom: Add Xiaomi Poco F1 EBBG variant bindings
arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce Xiaomi Poco
F1 EBBG variant
Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
arch/arm64/boot/dts/qcom/Makefile | 3 ++-
...um.dts => sdm845-xiaomi-beryllium-common.dtsi} | 11 +++++------
.../dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts | 15 +++++++++++++++
.../dts/qcom/sdm845-xiaomi-beryllium-tianma.dts | 15 +++++++++++++++
5 files changed, 38 insertions(+), 7 deletions(-)
rename arch/arm64/boot/dts/qcom/{sdm845-xiaomi-beryllium.dts => sdm845-xiaomi-beryllium-common.dtsi} (98%)
create mode 100644 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts
create mode 100644 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dtsSignature · 1 line
2.37.3
PATCH v5 1/3 arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts
There are two panel variants of Xiaomi Poco F1. Tianma and EBBG panel. The previous beryllium dts supported the Tianma variant. In order to add support for EBBG variant, the common nodes from beryllium dts are moved to a new common dtsi and to make the variants distinguishable, sdm845-xiaomi-beryllium.dts is now named as sdm845-xiaomi-beryllium-tianma.dts. The model property is updated to distinguish between the variants. The compatibility property is moved to the tianma variant, but it is not updated to avoid any further conflict with other projects/users that might depend on it.
---
arch/arm64/boot/dts/qcom/Makefile | 2 +-
...um.dts => sdm845-xiaomi-beryllium-common.dtsi} | 11 +++++------
.../dts/qcom/sdm845-xiaomi-beryllium-tianma.dts | 15 +++++++++++++++
3 files changed, 21 insertions(+), 7 deletions(-)
rename arch/arm64/boot/dts/qcom/{sdm845-xiaomi-beryllium.dts => sdm845-xiaomi-beryllium-common.dtsi} (98%)
create mode 100644 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dtsarch/arm64/boot/dts/qcom/Makefile +1 -1
@@ -128,7 +128,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb -dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtb
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +5 -6
@@ -26,8 +26,6 @@ /delete-node/ &rmtfs_mem; / { - model = "Xiaomi Pocophone F1"; - compatible = "xiaomi,beryllium", "qcom,sdm845"; chassis-type = "handset"; /* required for bootloader to select correct board */
@@ -221,8 +219,7 @@ &dsi0 { status = "okay"; vdda-supply = <&vreg_l26a_1p2>; - panel@0 { - compatible = "tianma,fhd-video"; + display_panel: panel@0 { reg = <0>; vddio-supply = <&vreg_l14a_1p8>; vddpos-supply = <&lab>;
@@ -234,8 +231,10 @@ panel@0 { backlight = <&pmi8998_wled>; reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; + status = "disabled"; + port { - tianma_nt36672a_in_0: endpoint { + panel_in_0: endpoint { remote-endpoint = <&dsi0_out>; }; };
@@ -243,7 +242,7 @@ tianma_nt36672a_in_0: endpoint { }; &dsi0_out { - remote-endpoint = <&tianma_nt36672a_in_0>; + remote-endpoint = <&panel_in_0>; data-lanes = <0 1 2 3>; };
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dts new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +#include "sdm845-xiaomi-beryllium-common.dtsi" + +/ { + model = "Xiaomi Pocophone F1 (Tianma)"; + compatible = "xiaomi,beryllium", "qcom,sdm845"; +}; + +&display_panel { + compatible = "tianma,fhd-video"; + status = "okay"; +};
Signature · 1 line
2.37.3
Re: [PATCH v5 1/3] arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts
Quoted 10 lines · Joel Selvaraj
There are two panel variants of Xiaomi Poco F1. Tianma and EBBG panel. The previous beryllium dts supported the Tianma variant. In order to add support for EBBG variant, the common nodes from beryllium dts are moved to a new common dtsi and to make the variants distinguishable,
sdm845-xiaomi-beryllium.dtsis now named assdm845-xiaomi-beryllium-tianma.dts. The model property is updated to distinguish between the variants. The compatibility property is moved to the tianma variant, but it is not updated to avoid any further conflict with other projects/users that might depend on it.
Quoted 2 lines
Signed-off-by Joel Selvaraj <[email protected]>Reviewed-by Marijn Suijten <[email protected]>
Best regards,
Krzysztof
Re: [PATCH v5 1/3] arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts
In reply to Joel SelvarajQuoted 10 lines · Joel Selvaraj
There are two panel variants of Xiaomi Poco F1. Tianma and EBBG panel. The previous beryllium dts supported the Tianma variant. In order to add support for EBBG variant, the common nodes from beryllium dts are moved to a new common dtsi and to make the variants distinguishable,
sdm845-xiaomi-beryllium.dtsis now named assdm845-xiaomi-beryllium-tianma.dts. The model property is updated to distinguish between the variants. The compatibility property is moved to the tianma variant, but it is not updated to avoid any further conflict with other projects/users that might depend on it.
Quoted 2 lines
Signed-off-by Joel Selvaraj <[email protected]>Reviewed-by Marijn Suijten <[email protected]>
Kind regards,
Caleb
Quoted 92 lines
--- arch/arm64/boot/dts/qcom/Makefile | 2 +- ...um.dts => sdm845-xiaomi-beryllium-common.dtsi} | 11 +++++------ .../dts/qcom/sdm845-xiaomi-beryllium-tianma.dts | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-)rename
arch/arm64/boot/dts/qcom/{sdm845-xiaomi-beryllium.dts=>sdm845-xiaomi-beryllium-common.dtsi} (98%) create mode 100644arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dtsarch/arm64/boot/dts/qcom/Makefile +1
-1@@ -128,7 +128,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb -dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm850-lenovo-yoga-c630.dtbarch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium.dts +5
-6@@ -26,8 +26,6 @@ /delete-node/ &rmtfs_mem; / { - model = "Xiaomi Pocophone F1"; - compatible = "xiaomi,beryllium", "qcom,sdm845"; chassis-type = "handset"; /* required for bootloader to select correct board */@@ -221,8 +219,7 @@ &dsi0 { status = "okay"; vdda-supply = <&vreg_l26a_1p2>; - panel@0 { - compatible = "tianma,fhd-video"; + display_panel: panel@0 { reg = <0>; vddio-supply = <&vreg_l14a_1p8>; vddpos-supply = <&lab>;@@ -234,8 +231,10 @@ panel@0 { backlight = <&pmi8998_wled>; reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>; + status = "disabled"; + port { - tianma_nt36672a_in_0: endpoint { + panel_in_0: endpoint { remote-endpoint = <&dsi0_out>; }; };@@ -243,7 +242,7 @@ tianma_nt36672a_in_0: endpoint { }; &dsi0_out { - remote-endpoint = <&tianma_nt36672a_in_0>; + remote-endpoint = <&panel_in_0>; data-lanes = <0 1 2 3>; };arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-tianma.dts new file +15
-1@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +#include "sdm845-xiaomi-beryllium-common.dtsi" + +/ { + model = "Xiaomi Pocophone F1 (Tianma)"; + compatible = "xiaomi,beryllium", "qcom,sdm845"; +}; + +&display_panel { + compatible = "tianma,fhd-video"; + status = "okay"; +}; --2.37.3
PATCH v5 2/3 dt-bindings: arm: qcom: Add Xiaomi Poco F1 EBBG variant bindings
In reply to Joel SelvarajAdd documentation for "xiaomi,beryllium-ebbg" device.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
@@ -667,6 +667,7 @@ properties: - sony,apollo-row - thundercomm,db845c - xiaomi,beryllium + - xiaomi,beryllium-ebbg - xiaomi,polaris - const: qcom,sdm845
Signature · 1 line
2.37.3
PATCH v5 3/3 arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce Xiaomi Poco F1 EBBG variant
In reply to Joel SelvarajIntroduce support for the Xiaomi Poco F1 EBBG variant. The EBBG variant uses EBBG FT8719 panel manufactured by EBBG.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -128,6 +128,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-ebbg.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtb
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts new file +15 -0
@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +#include "sdm845-xiaomi-beryllium-common.dtsi" + +/ { + model = "Xiaomi Pocophone F1 (EBBG)"; + compatible = "xiaomi,beryllium-ebbg", "qcom,sdm845"; +}; + +&display_panel { + compatible = "ebbg,ft8719"; + status = "okay"; +};
Signature · 1 line
2.37.3
Re: [PATCH v5 3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce Xiaomi Poco F1 EBBG variant
Quoted 6 lines · Joel Selvaraj
Introduce support for the Xiaomi Poco F1 EBBG variant. The EBBG variant uses EBBG FT8719 panel manufactured by EBBG.
Signed-off-by Joel Selvaraj <[email protected]>Reviewed-by Marijn Suijten <[email protected]>Reviewed-by Krzysztof Kozlowski <[email protected]>
Kind Regards,
Caleb
Quoted 42 lines
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts | 15 +++++++++++++++ 2 files changed, 16 insertions(+)create mode 100644
arch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dtsarch/arm64/boot/dts/qcom/Makefile +1
-0@@ -128,6 +128,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-oneplus-fajita.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akari.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-akatsuki.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-sony-xperia-tama-apollo.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-ebbg.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-beryllium-tianma.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-xiaomi-polaris.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-shift-axolotl.dtbarch/arm64/boot/dts/qcom/sdm845-xiaomi-beryllium-ebbg.dts new file +15
-1@@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +#include "sdm845-xiaomi-beryllium-common.dtsi" + +/ { + model = "Xiaomi Pocophone F1 (EBBG)"; + compatible = "xiaomi,beryllium-ebbg", "qcom,sdm845"; +}; + +&display_panel { + compatible = "ebbg,ft8719"; + status = "okay"; +}; --2.37.3
Quoted 6 lines · Joel Selvaraj
Changes in v5:
--------------
- Do not rename the compatible property of the existing variant (Tianma) to avoid any further conflict with other projects/users. (Suggested by Krzysztof Kozlowski)
Quoted 8 lines
Changes in v4:
--------------
- Update board's compatible and model property to distinguish between the two variants. (Suggested by Krzysztof Kozlowski and Marijn Suijten)
- Update the dt-bindings as per the new compatible values. (Fix checkpatch.pl script warnings)[...]
Applied, thanks!
[1/3] arm64: dts: qcom: split beryllium dts into common dtsi and tianma dts
commit: dd6459a0890a17e136c539abda07f8b671615c29
[2/3] dt-bindings: arm: qcom: Add Xiaomi Poco F1 EBBG variant bindings
commit: 341fdef8ea49448a0c44a17ab442a1d25e4481fa
[3/3] arm64: dts: qcom: sdm845-xiaomi-beryllium-ebbg: introduce Xiaomi Poco F1 EBBG variant
commit: bcf429831ecb4810caf1454f6692352401616ad4Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>