Skip to contentSkip to conversation

arm64: dts: qcom: Add initial Motorola Moto G10 support

PATCH Superseded Michael McAllister 3 participants 11 messages Oct 24 – Oct 26

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover arm64: dts: qcom: Add initial Motorola Moto G10 support

Hi Konrad, all,

Thanks for the review. I've updated the Moto G10 (SM4250) series with a separate patch for the shared idle-state fix. I've disabled Bluetooth for now while I work through the remaining driver changes.

Regarding the magic smoke, I checked the 25 voltage ranges against the Android DT pulled from the G10, and they're all within the vendor ranges. The 640 mV L8 setting also matches Android's ICNSS override. These settings are also running on my device.

Changes since v1:
- Correct the cluster idle-state parameters in sm6115.dtsi first.
- Use QCOM_ID_SM4250, delete reserved-memory nodes by label, and tidy the comments and redundant USB defaults.
- Keep GPIOs 14-17 reserved; I haven't established their board-specific use.
- Keep both framebuffer bus clocks enabled, disable DISPCC, and point display0 at MDSS to preserve the bootloader display.
- Leave Bluetooth disabled pending the separate shutdown fixes.

The DT passes schema validation and boots on the phone using separate Android bootloader handoff/alignment code, with USB transfers and read-only eMMC access tested. GPU, Wi-Fi, DSPs and suspend weren't exercised in that minimal test image.

v1: https://lore.kernel.org/linux-arm-msm/[email protected]/

Michael McAllister (3):
arm64: dts: qcom: sm6115: Correct cluster idle state parameters
dt-bindings: arm: qcom: Add Motorola Moto G10
arm64: dts: qcom: Add Motorola Moto G10

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm4250-motorola-capri.dts   | 374 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6115.dtsi          |   8 +-
 4 files changed, 380 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts

base-commit: d053e38e614fb2e383b298ce8fc308a780d7f209

Signature · 1 line
2.39.5
#1 lore raw

PATCH v2 1/3 arm64: dts: qcom: sm6115: Correct cluster idle state parameters

The cluster state IDs encode unsupported CPU modes: the GDHS entries request CPU mode 2 and the power-collapse entries request CPU mode 4. The CPU power-collapse state is mode 3, as already used by the CPU idle-state nodes. The GDHS entries also omit the cluster affinity level, and cluster 1 requests cluster power collapse instead of GDHS.

The downstream Bengal power description [1] defines CPU power collapse as mode 3, cluster GDHS as mode 2 and cluster power collapse as mode 4, with cluster mode shifted by four bits. Its idle driver [2] combines these with bit 30 for CPU reset and bits 25:24 for the affinity level. For either cluster this yields 0x41000023 for GDHS and 0x41000043 for power collapse. The Motorola SM4250 tree uses the same power description, byte-for-byte, as the Xiaomi SM6115 release cited here.

Correct the shared states to match this interface. This replaces the board-specific overrides used by the Motorola Moto G10. Runtime testing is limited to that device; the downstream sources provide the common SM6115/SM4250 encoding evidence.

[1]
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/02ca1a919564a9b176a79cce09c40977f833e9ac/arch/arm64/boot/dts/vendor/qcom/bengal-pm.dtsi
[2]
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/02ca1a919564a9b176a79cce09c40977f833e9ac/drivers/cpuidle/lpm-levels.c

---
 arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +4 -4
index 0f2af8aba..79ca73bfc 100644
@@ -232,7 +232,7 @@ domain-idle-states {
 			cluster_0_sleep_0: cluster-sleep-0-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000022>;
+				arm,psci-suspend-param = <0x41000023>;
 				entry-latency-us = <360>;
 				exit-latency-us = <421>;
 				min-residency-us = <782>;
@@ -241,7 +241,7 @@ cluster_0_sleep_0: cluster-sleep-0-0 {
 			cluster_0_sleep_1: cluster-sleep-0-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <800>;
 				exit-latency-us = <2118>;
 				min-residency-us = <7376>;
@@ -250,7 +250,7 @@ cluster_0_sleep_1: cluster-sleep-0-1 {
 			cluster_1_sleep_0: cluster-sleep-1-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000042>;
+				arm,psci-suspend-param = <0x41000023>;
 				entry-latency-us = <314>;
 				exit-latency-us = <345>;
 				min-residency-us = <660>;
@@ -259,7 +259,7 @@ cluster_1_sleep_0: cluster-sleep-1-0 {
 			cluster_1_sleep_1: cluster-sleep-1-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <640>;
 				exit-latency-us = <1654>;
 				min-residency-us = <8094>;
Reviewed-by on v2 1/3
#2 lore raw

Re: [PATCH v2 1/3] arm64: dts: qcom: sm6115: Correct cluster idle state parameters

Quoted 14 lines · Michael McAllister

The cluster state IDs encode unsupported CPU modes: the GDHS entries request CPU mode 2 and the power-collapse entries request CPU mode 4. The CPU power-collapse state is mode 3, as already used by the CPU idle-state nodes. The GDHS entries also omit the cluster affinity level, and cluster 1 requests cluster power collapse instead of GDHS.

The downstream Bengal power description [1] defines CPU power collapse as mode 3, cluster GDHS as mode 2 and cluster power collapse as mode 4, with cluster mode shifted by four bits. Its idle driver [2] combines these with bit 30 for CPU reset and bits 25:24 for the affinity level. For either cluster this yields 0x41000023 for GDHS and 0x41000043 for power collapse. The Motorola SM4250 tree uses the same power description, byte-for-byte, as the Xiaomi SM6115 release cited here.

Quoted 4 lines

Correct the shared states to match this interface. This replaces the board-specific overrides used by the Motorola Moto G10. Runtime testing is limited to that device; the downstream sources provide the common SM6115/SM4250 encoding evidence.

This paragraph needs to go. It's a conclusion of your LLM's local work and doesn't make sense in the upstream git history

otherwise:

Konrad

#3 lore raw

PATCH v2 2/3 dt-bindings: arm: qcom: Add Motorola Moto G10

In reply to Michael McAllister

Document the Motorola Moto G10 (capri), a smartphone based on the Qualcomm Snapdragon 460 (SM4250).

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 121ca557c..963fd482b 100644
@@ -1051,6 +1051,7 @@ properties:
 
       - items:
           - enum:
+              - motorola,capri
               - oneplus,billie2
           - const: qcom,sm4250
 
Acked-by on v2 2/3
#4 lore raw

Re: [PATCH v2 2/3] dt-bindings: arm: qcom: Add Motorola Moto G10

Quoted 7 lines · Michael McAllister

Document the Motorola Moto G10 (capri), a smartphone based on the Qualcomm Snapdragon 460 (SM4250).

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

<form letter>
This is an automated instruction, just in case, because many review tags are being ignored. If you know the process, just skip it entirely (please do not feel offended by me posting it here - no bad intentions intended, no patronizing, I just want to avoid wasted efforts). If you do not know the process, here is a short explanation:

Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions of patchset, under or above your Signed-off-by tag, unless patch changed significantly (e.g. new properties added to the DT bindings). Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here ('b4 trailers -u ...'). However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.

https://elixir.bootlin.com/linux/v6.15/source/Documentation/process/submitting-patches.rst#L591
</form letter>

Best regards,
Krzysztof

#5 lore raw

PATCH v2 3/3 arm64: dts: qcom: Add Motorola Moto G10

In reply to Michael McAllister

Add an initial board description for the SM4250-based Motorola Moto G10 (codenamed capri), including eMMC, USB-C, buttons, GPU, Wi-Fi and remote processors. Describe the board-specific firmware carveouts and use the shared PM6125 and PMI632 definitions. Put the modem, ADSP and GPU firmware paths under qcom/motorola/capri/.

Use the firmware framebuffer until native panel support is available. Retain the GCC display AHB and AXI clocks and leave DISPCC disabled to preserve the bootloader display configuration.

Leave Bluetooth disabled until the WCN3950 shutdown fixes are merged. Panel, touchscreen, amplifier, sound-card and battery-monitor support depend on separate driver and binding submissions.

---
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm4250-motorola-capri.dts   | 374 ++++++++++++++++++
 2 files changed, 375 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 88230c4e0..6f2dd88a1 100644
@@ -383,6 +383,7 @@ shikra-iqs-evk-imx577-camera-dtbs	:= shikra-iqs-evk.dtb shikra-iqs-evk-imx577-ca
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-cqm-evk-imx577-camera.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-cqs-evk-imx577-camera.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-iqs-evk-imx577-camera.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-motorola-capri.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm4450-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6115-fxtec-pro1x.dtb
arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts new file +374 -0

374 lines not on this page · raw message

Reviewed-by on v2 3/3
#6 lore raw

Re: [PATCH v2 3/3] arm64: dts: qcom: Add Motorola Moto G10

Quoted 10 lines · Michael McAllister

Add an initial board description for the SM4250-based Motorola Moto G10 (codenamed capri), including eMMC, USB-C, buttons, GPU, Wi-Fi and remote processors. Describe the board-specific firmware carveouts and use the shared PM6125 and PMI632 definitions. Put the modem, ADSP and GPU firmware paths under qcom/motorola/capri/.

Use the firmware framebuffer until native panel support is available. Retain the GCC display AHB and AXI clocks and leave DISPCC disabled to preserve the bootloader display configuration.

Quoted 6 lines

Leave Bluetooth disabled until the WCN3950 shutdown fixes are merged. Panel, touchscreen, amplifier, sound-card and battery-monitor support depend on separate driver and binding submissions.

---

Konrad

#7 lore raw

v3 cover arm64: dts: qcom: Add initial Motorola Moto G10 support

In reply to Michael McAllister

Hi Konrad, all,

I've removed the final paragraph from the idle-state commit message and added the review tags. The code is unchanged from v2.

v2: https://lore.kernel.org/linux-arm-msm/[email protected]/
v1: https://lore.kernel.org/linux-arm-msm/[email protected]/

Michael McAllister (3):
arm64: dts: qcom: sm6115: Correct cluster idle state parameters
dt-bindings: arm: qcom: Add Motorola Moto G10
arm64: dts: qcom: Add Motorola Moto G10

 .../devicetree/bindings/arm/qcom.yaml         |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm4250-motorola-capri.dts   | 374 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6115.dtsi          |   8 +-
 4 files changed, 380 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts

base-commit: d053e38e614fb2e383b298ce8fc308a780d7f209

Signature · 1 line
2.39.5
#8 lore raw

PATCH v3 1/3 arm64: dts: qcom: sm6115: Correct cluster idle state parameters

The cluster state IDs encode unsupported CPU modes: the GDHS entries request CPU mode 2 and the power-collapse entries request CPU mode 4. The CPU power-collapse state is mode 3, as already used by the CPU idle-state nodes. The GDHS entries also omit the cluster affinity level, and cluster 1 requests cluster power collapse instead of GDHS.

The downstream Bengal power description [1] defines CPU power collapse as mode 3, cluster GDHS as mode 2 and cluster power collapse as mode 4, with cluster mode shifted by four bits. Its idle driver [2] combines these with bit 30 for CPU reset and bits 25:24 for the affinity level. For either cluster this yields 0x41000023 for GDHS and 0x41000043 for power collapse. The Motorola SM4250 tree uses the same power description, byte-for-byte, as the Xiaomi SM6115 release cited here.

[1]
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/02ca1a919564a9b176a79cce09c40977f833e9ac/arch/arm64/boot/dts/vendor/qcom/bengal-pm.dtsi
[2]
https://github.com/MiCode/Xiaomi_Kernel_OpenSource/blob/02ca1a919564a9b176a79cce09c40977f833e9ac/drivers/cpuidle/lpm-levels.c

---
Changes in v3:
- Remove the final commit-message paragraph.
- Add the received Reviewed-by tag.

 arch/arm64/boot/dts/qcom/sm6115.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/qcom/sm6115.dtsi +4 -4
index 0f2af8aba..79ca73bfc 100644
@@ -232,7 +232,7 @@ domain-idle-states {
 			cluster_0_sleep_0: cluster-sleep-0-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000022>;
+				arm,psci-suspend-param = <0x41000023>;
 				entry-latency-us = <360>;
 				exit-latency-us = <421>;
 				min-residency-us = <782>;
@@ -241,7 +241,7 @@ cluster_0_sleep_0: cluster-sleep-0-0 {
 			cluster_0_sleep_1: cluster-sleep-0-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <800>;
 				exit-latency-us = <2118>;
 				min-residency-us = <7376>;
@@ -250,7 +250,7 @@ cluster_0_sleep_1: cluster-sleep-0-1 {
 			cluster_1_sleep_0: cluster-sleep-1-0 {
 				/* GDHS */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x40000042>;
+				arm,psci-suspend-param = <0x41000023>;
 				entry-latency-us = <314>;
 				exit-latency-us = <345>;
 				min-residency-us = <660>;
@@ -259,7 +259,7 @@ cluster_1_sleep_0: cluster-sleep-1-0 {
 			cluster_1_sleep_1: cluster-sleep-1-1 {
 				/* Power Collapse */
 				compatible = "domain-idle-state";
-				arm,psci-suspend-param = <0x41000044>;
+				arm,psci-suspend-param = <0x41000043>;
 				entry-latency-us = <640>;
 				exit-latency-us = <1654>;
 				min-residency-us = <8094>;
#9 lore raw

PATCH v3 2/3 dt-bindings: arm: qcom: Add Motorola Moto G10

In reply to Michael McAllister

Document the Motorola Moto G10 (capri), a smartphone based on the Qualcomm Snapdragon 460 (SM4250).

---
Changes in v3:
- Add the received Acked-by tag.

 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 121ca557c..963fd482b 100644
@@ -1051,6 +1051,7 @@ properties:
 
       - items:
           - enum:
+              - motorola,capri
               - oneplus,billie2
           - const: qcom,sm4250
 
#10 lore raw

PATCH v3 3/3 arm64: dts: qcom: Add Motorola Moto G10

In reply to Michael McAllister

Add an initial board description for the SM4250-based Motorola Moto G10 (codenamed capri), including eMMC, USB-C, buttons, GPU, Wi-Fi and remote processors. Describe the board-specific firmware carveouts and use the shared PM6125 and PMI632 definitions. Put the modem, ADSP and GPU firmware paths under qcom/motorola/capri/.

Use the firmware framebuffer until native panel support is available. Retain the GCC display AHB and AXI clocks and leave DISPCC disabled to preserve the bootloader display configuration.

Leave Bluetooth disabled until the WCN3950 shutdown fixes are merged. Panel, touchscreen, amplifier, sound-card and battery-monitor support depend on separate driver and binding submissions.

---
Changes in v3:
- Add the received Reviewed-by tag.

 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 .../boot/dts/qcom/sm4250-motorola-capri.dts   | 374 ++++++++++++++++++
 2 files changed, 375 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 88230c4e0..6f2dd88a1 100644
@@ -383,6 +383,7 @@ shikra-iqs-evk-imx577-camera-dtbs	:= shikra-iqs-evk.dtb shikra-iqs-evk-imx577-ca
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-cqm-evk-imx577-camera.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-cqs-evk-imx577-camera.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= shikra-iqs-evk-imx577-camera.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-motorola-capri.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm4250-oneplus-billie2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm4450-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6115-fxtec-pro1x.dtb
arch/arm64/boot/dts/qcom/sm4250-motorola-capri.dts new file +374 -0

374 lines not on this page · raw message