Skip to contentSkip to conversation

Add SM7250 base dts file

PATCH Superseded Sreeshankar K 2 participants 7 messages Aug 16

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add SM7250 base dts file

Qualcomm SM7250 is known as lito.

This patchset add base devicetree file for SM7250 SoC and SM7250 MTP platform. This file adds the basic nodes like cpu, psci and other required configuration for booting up to the serial console.

Sreeshankar K (5):
arm64: dts: qcom: Add SM7250 base dts file
dt-bindings: arm: cpus: Document Kryo 475 CPUs
dt-bindings: arm: qcom: Document SM7250 SoC and boards
dt-bindings: firmware: qcom,scm: Document SM7250 SCM
dt-bindings: interrupt-controller: qcom,pdc: Document SM7250 PDC

 .../devicetree/bindings/arm/cpus.yaml         |   1 +
 .../devicetree/bindings/arm/qcom.yaml         |   6 +
 .../bindings/firmware/qcom,scm.yaml           |   1 +
 .../interrupt-controller/qcom,pdc.yaml        |   1 +
 arch/arm64/boot/dts/qcom/Makefile             |   1 +
 arch/arm64/boot/dts/qcom/sm7250-mtp.dts       |  30 ++
 arch/arm64/boot/dts/qcom/sm7250.dtsi          | 431 ++++++++++++++++++
 7 files changed, 471 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7250-mtp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm7250.dtsi
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/5 arm64: dts: qcom: Add SM7250 base dts file

Add SM7250 devicetree file for SM7250 SoC and SM7250 MTP platform. This file adds the basic nodes like cpu, psci and other required configuration for booting up to the serial console.

---
 arch/arm64/boot/dts/qcom/Makefile       |   1 +
 arch/arm64/boot/dts/qcom/sm7250-mtp.dts |  30 ++
 arch/arm64/boot/dts/qcom/sm7250.dtsi    | 431 ++++++++++++++++++++++++
 3 files changed, 462 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7250-mtp.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sm7250.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index 6f33c4e2f..4b68ed17f 100644
@@ -347,6 +347,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
 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) += sm7250-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7325-motorola-dubai.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7325-nothing-spacewar.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
arch/arm64/boot/dts/qcom/sm7250-mtp.dts new file +30 -0
new file mode 100644
index 000000000..062b5958e
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2020, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2026, Sreeshankar K <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sm7250.dtsi"
+
+/ {
+	model = "Qualcomm Technologies, Inc. SM7250 MTP";
+	compatible = "qcom,sm7250-mtp", "qcom,sm7250";
+
+	aliases {
+		serial0 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&qupv3_id_1 {
+	status = "okay";
+};
+
+&uart2 {
+	status = "okay";
+};
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +431 -0

431 lines not on this page · raw message

Signature · 1 line
2.43.0
#3 lore raw

PATCH 2/5 dt-bindings: arm: cpus: Document Kryo 475 CPUs

In reply to Sreeshankar K

Document Kryo 475 CPUs found in Qualcomm SM7250 SoC.

---
 Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.yaml +1 -0
index 5be89c584..2a90af67c 100644
@@ -212,6 +212,7 @@ properties:
           - qcom,kryo465
           - qcom,kryo468
           - qcom,kryo470
+          - qcom,kryo475
           - qcom,kryo485
           - qcom,kryo560
           - qcom,kryo570
Signature · 1 line
2.43.0
#4 lore raw

PATCH 3/5 dt-bindings: arm: qcom: Document SM7250 SoC and boards

In reply to Sreeshankar K

Document the Qualcomm SM7250 SoC binding and the MTP board.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +6 -0
index 50cc18a6e..481041700 100644
@@ -1050,6 +1050,11 @@ properties:
               - fairphone,fp4
           - const: qcom,sm7225
 
+      - items:
+          - enum:
+              - qcom,sm7250-mtp
+          - const: qcom,sm7250
+
       - items:
           - enum:
               - motorola,dubai
@@ -1306,6 +1311,7 @@ allOf:
               - qcom,sm6350
               - qcom,sm7125
               - qcom,sm7225
+              - qcom,sm7250
               - qcom,sm8150
               - qcom,sm8250
     then:
Signature · 1 line
2.43.0
#5 lore raw

PATCH 4/5 dt-bindings: firmware: qcom,scm: Document SM7250 SCM

In reply to Sreeshankar K

Document the SCM compatible for Qualcomm SM7250 SoC.

---
 Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/firmware/qcom,scm.yaml +1 -0
index 25f62bacb..7446a54eb 100644
@@ -72,6 +72,7 @@ properties:
           - qcom,scm-sm6350
           - qcom,scm-sm6375
           - qcom,scm-sm7150
+          - qcom,scm-sm7250
           - qcom,scm-sm8150
           - qcom,scm-sm8250
           - qcom,scm-sm8350
Signature · 1 line
2.43.0
#6 lore raw

PATCH 5/5 dt-bindings: interrupt-controller: qcom,pdc: Document SM7250 PDC

In reply to Sreeshankar K

Document the PDC block on the SM7250 SoC.

---
 .../devicetree/bindings/interrupt-controller/qcom,pdc.yaml       | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/interrupt-controller/qcom,pdc.yaml +1 -0
index 8162a49d4..c30b88589 100644
@@ -50,6 +50,7 @@ properties:
           - qcom,sdx75-pdc
           - qcom,sm4450-pdc
           - qcom,sm6350-pdc
+          - qcom,sm7250-pdc
           - qcom,sm8150-pdc
           - qcom,sm8250-pdc
           - qcom,sm8350-pdc
Signature · 1 line
2.43.0
#2 lore raw

Re: [PATCH 1/5] arm64: dts: qcom: Add SM7250 base dts file

In reply to Sreeshankar K
Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider: - [High] The `timer@17c20000` node incorrectly configures `#address-cells` and `#size-cells`, leading to…

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] The timer@17c20000 node incorrectly configures #address-cells and #size-cells, leading to broken memory mappings.
- [High] The spmi@c440000 bus node incorrectly sets #address-cells and #size-cells, breaking SPMI device enumeration.
- [Medium] Missing mandatory properties cache-level and cache-unified in L2 and L3 cache nodes.
- [Medium] The CPU topology cpu-map is entirely missing, breaking cluster-awareness and Energy Aware Scheduling.
- [Low] The SPMI node name qcom,spmi@c440000 violates the standard generic node naming requirements.
- [Low] The memory-mapped tcsr_mutex is placed at the root of the device tree rather than within the soc simple-bus node. --

--- Patch [1]: [PATCH 1/5] arm64: dts: qcom: Add SM7250 base dts file --- commit 0271d54882ba31c5bab214b6f9e5a7997f5a44fd
Author: Sreeshankar K <[email protected]>

arm64: dts: qcom: Add SM7250 base dts file

This patch adds the base devicetree file for the Qualcomm SM7250 SoC and the corresponding SM7250 MTP platform. It configures basic nodes like CPU, PSCI, and serial console required for booting.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +0 -0
new file mode 100644
index 0000000000000..66b3705461f1e

[ ... ]

arch/arm64/boot/dts/qcom/sm7250.dtsi line 35

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +5 -0
+	cpus {
+		#address-cells = <2>;
+		#size-cells = <0>;
+
+		CPU0: cpu@0 {

[Severity: Medium]
Is a cpu-map node missing here?

Without a cpu-map to define the physical and logical clusters, the kernel will treat all cores as a single flat cluster. This degrades scheduling decisions and prevents Energy Aware Scheduling from functioning on this big.LITTLE SoC.

arch/arm64/boot/dts/qcom/sm7250.dtsi line 47

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +12 -0
+			device_type = "cpu";
+			compatible = "qcom,kryo475";
+			reg = <0x0 0x0>;
+			enable-method = "psci";
+			next-level-cache = <&L2_0>;
+			L2_0: l2-cache {
+				compatible = "cache";
+				next-level-cache = <&L3_0>;
+				L3_0: l3-cache {
+					compatible = "cache";
+				};
+			};

[Severity: Medium]
Should these cache nodes include the cache-level and cache-unified properties?

Without these mandatory properties, the kernel cache topology parser cannot accurately identify or expose the cache layout to userspace via sysfs, which prevents userspace applications from optimizing workloads based on cache topology.

[ ... ]

arch/arm64/boot/dts/qcom/sm7250.dtsi line 146

Quoted 12 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +12 -0
+	firmware {
+		scm: scm {
+			compatible = "qcom,scm-sm7250", "qcom,scm";
+			#reset-cells = <1>;
+		};
+	};
+
+	tcsr_mutex: hwlock@1f40000 {
+		compatible = "qcom,tcsr-mutex";
+		reg = <0x0 0x01f40000 0x0 0x40000>;
+		#hwlock-cells = <1>;
+	};

[Severity: Low]
Should this memory-mapped peripheral be instantiated as a child of the soc simple-bus node instead of the root node?

Placing it at the root bypasses the address translation layers (ranges, dma-ranges) established by the soc node and misrepresents the hardware bus hierarchy.

[ ... ]

Quoted 1 line
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +1 -0
+		pdc: interrupt-controller@b220000 {

[ ... ]

arch/arm64/boot/dts/qcom/sm7250.dtsi line 318

Quoted 3 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +3 -0
+		};
+
+		spmi: qcom,spmi@c440000 {

[Severity: Low]
Does this node name violate the standard generic node naming conventions?

The node name should ideally be generic, such as spmi@c440000. Including the vendor prefix (qcom,) in the node name typically results in dtbs_check validation errors against the spmi-pmic-arb schema.

arch/arm64/boot/dts/qcom/sm7250.dtsi line 331

Quoted 13 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +13 -0
+			compatible = "qcom,spmi-pmic-arb";
+			reg = <0x0 0x0c440000 0x0 0x0001100>,
+			      <0x0 0x0c600000 0x0 0x2000000>,
+			      <0x0 0x0e600000 0x0 0x0100000>,
+			      <0x0 0x0e700000 0x0 0x00a0000>,
+			      <0x0 0x0c40a000 0x0 0x0026000>;
+			reg-names = "core", "chnls", "obsrvr", "intr", "cnfg";
+			interrupt-names = "periph_irq";
+			interrupts-extended = <&pdc 1 IRQ_TYPE_LEVEL_HIGH>;
+			qcom,ee = <0>;
+			qcom,channel = <0>;
+			#address-cells = <1>;
+			#size-cells = <1>;

[Severity: High]
Are these address and size cells correct for an SPMI bus?

The SPMI bus bindings require #address-cells = <2> (for the 8-bit slave ID and 16-bit register offset) and #size-cells = <0>. Using <1> and <1> will cause parsing of any child PMIC nodes to fail, breaking PMIC enumeration and disabling dependent power domains.

[ ... ]

Quoted 4 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +4 -0
+		timer@17c20000 {
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;

arch/arm64/boot/dts/qcom/sm7250.dtsi line 372

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm7250.dtsi new file +10 -0
+			compatible = "arm,armv7-timer-mem";
+			reg = <0x0 0x17c20000 0x0 0x1000>;
+			clock-frequency = <19200000>;
+
+			frame@17c21000 {
+				frame-number = <0>;
+				interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
+				reg = <0x0 0x17c21000 0x0 0x1000>,
+				      <0x0 0x17c22000 0x0 0x1000>;

[Severity: High]
Will this configuration correctly parse the 64-bit addresses in the child nodes?

The child frame nodes use 4 cells for their reg properties (e.g., <0x0 0x17c21000 0x0 0x1000>). Because this parent node sets #address-cells and #size-cells to 1, the dt-parser will incorrectly split this single 64-bit region into distinct, erroneous memory regions. Attempting to map a region starting at physical address 0x0 with a size of 0x17c21000 can lead to a kernel panic during boot.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1