Skip to contentSkip to conversation

Add Xiaomi 12 Lite 5G (taoyao) device tree

PATCH Superseded Stanislav Zaikin 2 participants 4 messages Feb 24

Subsystems (3)

v3 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v3 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 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    | 865 ++++++++++++++++++
 3 files changed, 867 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts
Signature · 1 line
2.51.0
#1 lore raw

PATCH v3 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 v3 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    | 865 ++++++++++++++++++
 2 files changed, 866 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 +865 -0

865 lines not on this page · raw message

Signature · 1 line
2.51.0
#3 lore raw

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

Quoted 20 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    | 865 ++++++++++++++++++
 2 files changed, 866 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts

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

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +3 -0
+
+	/* S2B is really ebi.lvl but it's there for supply map completeness sake. */
+	vreg_s2b_0p7: regulator-smpa3 {

I think this should be regulator-smpb2

Quoted 15 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +15 -0
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_s2b_0p7";
+
+		regulator-min-microvolt = <700000>;
+		regulator-max-microvolt = <700000>;
+		regulator-always-on;
+		vin-supply = <&vph_pwr>;
+	};
+
+
+&uart7 {
+	/delete-property/interrupts;
+	interrupts-extended = <&intc GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH>,
+			      <&tlmm 31 IRQ_TYPE_EDGE_FALLING>;
+

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +10 -0
+	pinctrl-1 = <&bt_uart_sleep_cts>,
+		    <&bt_uart_sleep_rts>,
+		    <&bt_uart_sleep_txd>,
+		    <&bt_uart_sleep_rxd>;
+	pinctrl-names = "default", "sleep";
+
+	status = "okay";
+
+	bluetooth: bluetooth {
+		compatible = "qcom,wcn6750-bt";

Please use PMU for describing this BT (see qcs6490-rb3gen2.dts)

Quoted 16 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +16 -0
+
+		pinctrl-0 = <&hst_bt_en>,
+			    <&hst_sw_ctrl>;
+		pinctrl-names = "default";
+
+		enable-gpios = <&tlmm 85 GPIO_ACTIVE_HIGH>;
+		swctrl-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
+
+		vddio-supply = <&vreg_l19b_1p8>;
+		vddaon-supply = <&vreg_s7b_0p952>;
+		vddbtcxmx-supply = <&vreg_s7b_0p952>;
+		vddrfacmn-supply = <&vreg_s7b_0p952>;
+		vddrfa0p8-supply = <&vreg_s7b_0p952>;
+		vddrfa1p7-supply = <&vreg_s1b_1p856>;
+		vddrfa1p2-supply = <&vreg_s8b_1p256>;
+		vddrfa2p2-supply = <&vreg_s1c_2p2>;

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +10 -0
+		vddasd-supply = <&vreg_l11c_2p8>;
+		max-speed = <3200000>;
+
+		qcom,local-bd-address-broken;
+	};
+};
+
+
+&wifi {
+	status = "okay";

No calibration variant? Please set one here and send the BDF to ath11k:

https://wireless.docs.kernel.org/en/latest/en/users/drivers/ath10k/boardfiles.html

Quoted 4 lines

+};

Signature · 1 line
2.51.0
Signature · 2 lines
With best wishes
Dmitry