Skip to contentSkip to conversation

Add Xiaomi 12 Lite 5G (taoyao) device tree

PATCH Superseded Stanislav Zaikin 3 participants 8 messages Apr 17 – May 13

Subsystems (3)

v5 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v5 cover Add Xiaomi 12 Lite 5G (taoyao) device tree

This series adds device tree support for the Xiaomi 12 Lite 5G (taoyao), based on the Qualcomm SM7325 SoC.

The display panel model is unknown, so bootloader-initialized simple-framebuffer is therefore used to expose the display.

Changes in v5:
- Patch no. 1 - no changes
- Change vccq-supply to vccq2-supply in ufs node as it's ufs2.2 (patch no. 2)
- Val's patch for goodix-berlin didn't have effect on my touchscreen, therefore keep the touchscreen szie (no changes in this regard in patch no. 2)
- Link to v4:
https://lore.kernel.org/all/[email protected]/

Changes in v4:
- Patch no. 1 - no changes
- Removed Konrad's R-b tag, please take a look again (patch no. 2)
- Fixed vreg_s2b_0p7 regulator name to spmb2 (patch no. 2)
- Switched bluetooth to wcn6750-pmu (patch no. 2)
- Dropped qcom,local-bd-address-broken as it has no effect (patch no. 2)
- Added wifi calibration variant "Xiaomi_taoyao" (also sent board-2.bin files to ath11k) (patch no. 2)
- Link to v3:
https://lore.kernel.org/all/[email protected]/

Changes in v3:
- Patch no. 1 - no changes
- Drop unit address for framebuffer node (patch no. 2)
- Add Konrad's R-b tag (patch no. 2)
- Link to v2:
https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Add Rob's A-b tag (patch no. 1)
- Add explicit framebuffer_reserved label (patch no. 2)
- Use memory-region for simple-framebuffer (patch no. 2)
- Fix reserved-memory naming: make node names consistent with labels and intended subsystem (CVP/camera/video) (patch no. 2)
- Convert mem-type value from <0x02> to <2> (patch no. 2)
- Fix s2b regulator comment style (patch no. 2)
- Remove unused gpio-reserved-ranges entry (<32 2>) (patch no. 2)
- Link to v1:
https://lore.kernel.org/all/[email protected]/

Stanislav Zaikin (2):
dt-bindings: arm: qcom: Add SM7325 Xiaomi 12 Lite 5G (taoyao)
arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    | 907 ++++++++++++++++++
 3 files changed, 909 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts
Signature · 1 line
2.51.0
#1 lore raw

PATCH v5 1/2 dt-bindings: arm: qcom: Add SM7325 Xiaomi 12 Lite 5G (taoyao)

Xiaomi 12 Lite 5G (xiaomi,taoyao) is a smartphone based on the SM7325 SoC.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index d84bd3bca201..711cf3bba6e8 100644
@@ -982,6 +982,7 @@ properties:
       - items:
           - enum:
               - nothing,spacewar
+              - xiaomi,taoyao
           - const: qcom,sm7325
 
       - items:
Signature · 1 line
2.51.0
#2 lore raw

PATCH v5 2/2 arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

In reply to Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    | 907 ++++++++++++++++++
 2 files changed, 908 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 6f34d5ed331c..61618da3f68c 100644
@@ -280,6 +280,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-curtana.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-joyeuse.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7325-nothing-spacewar.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm7325-xiaomi-taoyao.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-microsoft-surface-duo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-mtp.dtb
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +907 -0

907 lines not on this page · raw message

Signature · 1 line
2.51.0
#3 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

Quoted 19 lines · Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    | 907 ++++++++++++++++++
 2 files changed, 908 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 642

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+
+&ipa {
+	qcom,gsi-loader = "self";
+	memory-region = <&ipa_fw_mem>;

Could you please move these properties to SoC dtsi (as a separate commit).

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 744

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +8 -0
+	firmware-name = "qcom/sm7325/xiaomi/taoyao/ipa_fws.mbn";
+
+	status = "okay";
+};
+
+
+&tlmm {
+	gpio-reserved-ranges = <48 4>, <56 4>;

Could you please add a comment why they are reserved? I _assume_ that 48 is NFC SE and 56 is fingerprint reader

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +7 -0
+
+
+&wifi {
+	qcom,calibration-variant = "Xiaomi_taoyao";
+
+	status = "okay";
+};
Signature · 1 line
2.51.0
Signature · 2 lines
With best wishes
Dmitry
#4 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

Quoted 20 lines · Dmitry Baryshkov
Quoted 19 lines · Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---
  arch/arm64/boot/dts/qcom/Makefile             |   1 +
  .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    | 907 ++++++++++++++++++
  2 files changed, 908 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts

Quoted 8 lines

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 642

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+
+&ipa {
+	qcom,gsi-loader = "self";
+	memory-region = <&ipa_fw_mem>;

Could you please move these properties to SoC dtsi (as a separate commit).

Sure will do in v6.

Quoted 11 lines

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 744

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +8 -0
+	firmware-name = "qcom/sm7325/xiaomi/taoyao/ipa_fws.mbn";
+
+	status = "okay";
+};
+
+
+&tlmm {
+	gpio-reserved-ranges = <48 4>, <56 4>;

Could you please add a comment why they are reserved? I _assume_ that 48 is NFC SE and 56 is fingerprint reader

I can add a comment like this (or you can suggest different wording):

/*
* 48-51: presumably NFC SE
* 56-59: presumably fingerprint reader
*/

If that works, I will add in v6.

Thanks for the review,

Best regards,
Stanislav

#5 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

Quoted 35 lines · Stanislav Zaikin
Quoted 21 lines · Dmitry Baryshkov
Quoted 19 lines · Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---
  arch/arm64/boot/dts/qcom/Makefile             |   1 +
  .../boot/dts/qcom/sm7325-xiaomi-taoyao.dts    | 907 ++++++++++++++++++
  2 files changed, 908 insertions(+)

create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts

Quoted 11 lines

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 744

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +8 -0
+	firmware-name = "qcom/sm7325/xiaomi/taoyao/ipa_fws.mbn";
+
+	status = "okay";
+};
+
+
+&tlmm {
+	gpio-reserved-ranges = <48 4>, <56 4>;

Could you please add a comment why they are reserved? I _assume_ that 48 is NFC SE and 56 is fingerprint reader

Quoted 8 lines

I can add a comment like this (or you can suggest different wording):

/*
* 48-51: presumably NFC SE
* 56-59: presumably fingerprint reader
*/

If that works, I will add in v6.

Yes, thanks

Quoted 5 lines

Thanks for the review,

Best regards,
Stanislav

Signature · 2 lines
With best wishes
Dmitry
#6 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

In reply to Stanislav Zaikin
Quoted 14 lines · Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---

[...]

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 801

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+	hst_bt_en: hst-bt-en-state {
+		pins = "gpio85";
+		function = "gpio";
+		output-low;

You shouldn't need this property, since the driver will control the pin

Konrad

#7 lore raw

Re: [PATCH v5 2/2] arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

Quoted 18 lines · Konrad Dybcio
Quoted 14 lines · Stanislav Zaikin

Xiaomi 12 Lite 5G is a handset released in 2022

This commit has the following features working:
- Display (with simple fb)
- Touchscreen
- UFS
- Power and volume buttons
- Pinctrl
- RPM Regulators
- Remoteprocs - wifi, bluetooth
- USB (Device Mode)

---

[...]

Quoted 7 lines

arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts line 801

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+	hst_bt_en: hst-bt-en-state {
+		pins = "gpio85";
+		function = "gpio";
+		output-low;

You shouldn't need this property, since the driver will control the pin

Thanks, will fix in v6.

Best regards,
Stanislav