Skip to contentSkip to conversation

Add Xiaomi 12 Lite 5G (taoyao) device tree

PATCH Superseded Stanislav Zaikin 2 participants 5 messages Jun 1

Subsystems (3)

v8 of 9 Superseded Latest is v9 →

lore
Share & tools
lore
#0 lore raw

v8 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 v8:
- Patch no. 1 - no changes
- Drop dr_mode = "otg" as it is the default value (patch no. 2)
- Drop usb-role-switch as it is already defined in kodiak.dtsi (patch no. 2)
- Fix USB Type-C SBU endpoint port number: port@1 -> port@2 to comply with usb-connector.yaml bindings (patch no. 2)
- Use downstream adsp_rpc_remote_heap_mem memory region to avoid overlapping with cdsp_mem (patch no. 2)
- Link to v7:
https://lore.kernel.org/all/[email protected]/

Changes in v7:
- Patch no. 1 - no changes
- Patch no. 3 removed. Dmitry Baryshkov addressed that in a separate patchset
- Added record-size for ramoops node (reduced pmsg-size by 0x100000) (patch no. 2)
- Fixed unit address for rmtfs_mem (patch no. 2)
- Link to v6:
https://lore.kernel.org/all/[email protected]/

Changes in v6:
- Patch no. 1 - no changes
- Added a comment about reserved gpio ranges (patch no. 2)
- Removed "output-low" property from "hst_bt_en" node (patch no. 2)
- Moved common IPA properties for sm7325 devices to soc's dtsi (patch no. 3)
- Link to v5:
https://lore.kernel.org/all/[email protected]/

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

PATCH v8 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 b4943123d2e4..575ca67c940a 100644
@@ -1041,6 +1041,7 @@ properties:
       - items:
           - enum:
               - nothing,spacewar
+              - xiaomi,taoyao
           - const: qcom,sm7325
 
       - items:
Signature · 1 line
2.53.0
#2 lore raw

PATCH v8 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    | 913 ++++++++++++++++++
 2 files changed, 914 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 4ba8e7306419..f75efc3b53ec 100644
@@ -341,6 +341,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 +913 -0

913 lines not on this page · raw message

Signature · 1 line
2.53.0
#3 lore raw

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

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] The SBU port in the USB-C connector node has a mismatched unit-address and reg property…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The SBU port in the USB-C connector node has a mismatched unit-address and reg property (port@2 with reg = <1>).
- [Low] Invalid 'mem-type' property in the ramoops node.
--

commit 444192d5f33eb93dfce53fe410ae77991af6102e
Author: Stanislav Zaikin <[email protected]>

arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

This commit adds devicetree support for the Xiaomi 12 Lite 5G handset, including display, touchscreen, UFS, buttons, regulators, remote processors, and USB device mode.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +0 -0
new file mode 100644
index 0000000000000..ec795f8adc467

[ ... ]

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +10 -0
+				port@0 {
+					reg = <0>;
+
+					pmic_glink_hs_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_hs>;
+					};
+				};
+
+				port@2 {
+					reg = <1>;

[Severity: Medium]
Is this port index correct for the SBU endpoint? The devicetree specification requires the unit-address (@2) to match the first address in the reg property.

Additionally, the usb-connector binding assigns fixed indices to ports:
reg = <0> for High Speed, reg = <1> for SuperSpeed, and reg = <2> for SBU. Using reg = <1> here for the SBU port violates the schema and might logically miswire the SBU mux to the SuperSpeed data graph port index, breaking alternate mode routing. It will also generate a dtc unit_address_vs_reg mismatch warning.

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +8 -0
+
+					pmic_glink_sbu: endpoint {
+						remote-endpoint = <&fsa4480_sbu_mux>;
+					};
+				};
+			};
+		};
+	};

[ ... ]

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

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +9 -0
+		cdsp_mem: cdsp@9c700000 {
+			reg = <0x0 0x9c700000 0x0 0x1e00000>;
+			no-map;
+		};
+
+		ramoops@a9000000 {
+			compatible = "ramoops";
+			reg = <0x0 0xa9000000 0x0 0x200000>;
+			mem-type = <2>;

[Severity: Low]
Does this mem-type property pass upstream validation? This appears to be a downstream addition historically used to force memory caching attributes, which is not supported by the upstream ramoops bindings.

Leaving this in will trigger a dtbs_check validation failure. Upstream typically handles memory attributes via standard reserved-memory properties like no-map.

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +3 -0
+			pmsg-size = <0x100000>;
+			record-size = <0x100000>;
+		};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

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

Quoted 41 lines · On 6/1/26 5:19 PM, [email protected] wrote:

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] The SBU port in the USB-C connector node has a mismatched unit-address and reg property (port@2 with reg = <1>).
- [Low] Invalid 'mem-type' property in the ramoops node.
--

commit 444192d5f33eb93dfce53fe410ae77991af6102e
Author: Stanislav Zaikin <[email protected]>

arm64: dts: qcom: Add Xiaomi 12 Lite 5G (taoyao) DTS

This commit adds devicetree support for the Xiaomi 12 Lite 5G handset, including display, touchscreen, UFS, buttons, regulators, remote processors, and USB device mode.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +0 -0
new file mode 100644
index 0000000000000..ec795f8adc467

[ ... ]

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +4 -0
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +10 -0
+				port@0 {
+					reg = <0>;
+
+					pmic_glink_hs_in: endpoint {
+						remote-endpoint = <&usb_1_dwc3_hs>;
+					};
+				};
+
+				port@2 {
+					reg = <1>;

[Severity: Medium]
Is this port index correct for the SBU endpoint? The devicetree specification requires the unit-address (@2) to match the first address in the reg property.

Quoted 6 lines

Additionally, the usb-connector binding assigns fixed indices to ports:
reg = <0> for High Speed, reg = <1> for SuperSpeed, and reg = <2> for SBU. Using reg = <1> here for the SBU port violates the schema and might logically miswire the SBU mux to the SuperSpeed data graph port index, breaking alternate mode routing. It will also generate a dtc unit_address_vs_reg mismatch warning.

Right, sorry, forgot to run CHECK_DTBS=1 before sending this time. Will fix in v9.

Quoted 16 lines

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7325-xiaomi-taoyao.dts new file +9 -0
+		cdsp_mem: cdsp@9c700000 {
+			reg = <0x0 0x9c700000 0x0 0x1e00000>;
+			no-map;
+		};
+
+		ramoops@a9000000 {
+			compatible = "ramoops";
+			reg = <0x0 0xa9000000 0x0 0x200000>;
+			mem-type = <2>;

[Severity: Low]
Does this mem-type property pass upstream validation? This appears to be a downstream addition historically used to force memory caching attributes, which is not supported by the upstream ramoops bindings.

Quoted 3 lines

Leaving this in will trigger a dtbs_check validation failure. Upstream typically handles memory attributes via standard reserved-memory properties like no-map.

This one passes dtbs check.

Another thing that it complains about - memory-region for ipa node but this relies on Dmitry's patch [0]

[0] - https://lore.kernel.org/all/[email protected]/

Signature · 2 lines
Best regards,
Stanislav