Skip to contentSkip to conversation

Initial SDM670 and Pixel 3a support

PATCH Superseded Richard Acayan 2 participants 6 messages Nov 8, 2022

Subsystems (3)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover Initial SDM670 and Pixel 3a support

Changes since v2:
- remove intc address and size cells (4/4)
- move apps_rsc label property down (4/4)
- move properties in intc (4/4)
- remove leading zeroes in iommus (4/4)
- change 0x0 to 0 in regs except cpu (4/4)
- change 0 to 0x0 in memory regs (4/4)
- convert hex to decimal in rmi4 #cells properties (4/4)

Changes since v1:
- remove i2c interconnects (4/4)
- change regulator phandle names (4/4)
- change regulators node names (4/4)
- remove clock-output-names from xo-board (4/4)
- remove vdd-supply from touchscreen (4/4)
- move clocks to device dts (4/4)
- reorder pmic nodes, root nodes, and phandle references in dts (4/4)
- move status properties to bottom of nodes (4/4)
- accumulate commit message tags (1-3/4)

Do not apply this series yet. It is only for review comments. It can be applied once the "qcom,sdm670-smmu-500" compatible string gets added (or now if you don't care about handling an unnecessary quirk).

This adds the device trees and bindings to support the Qualcomm Snapdragon 670 and Google Pixel 3a. This patch series, specifically the last patch, depends on:

[PATCH v4 0/3] SDM670 Global Clocks
https://lore.kernel.org/all/[email protected]/T/
[PATCH v2 0/2] RPMh Support for PM660 and PM660L
https://lore.kernel.org/all/[email protected]/T/
[PATCH v2 0/2] SDM670 RPMh Clocks
https://lore.kernel.org/all/[email protected]/T/
[PATCH v2 0/2] SDM670 USB 2.0 support
https://lore.kernel.org/all/[email protected]/T/
[PATCH 0/2] SDM670 SDHCI support
https://lore.kernel.org/all/[email protected]/T/
[PATCH v2 0/2] SDM670 Power Domains
https://lore.kernel.org/all/[email protected]/T/
[PATCH v10 0/3] SDM670 Pin Control Driver
https://lore.kernel.org/all/[email protected]/T/
[PATCH v6 0/4] SDM670 GPI DMA support
https://lore.kernel.org/all/[email protected]/T/
[RFC PATCH v2 0/11] iommu/arm-smmu-qcom: Rework Qualcomm SMMU bindings and implementation
https://lore.kernel.org/linux-arm-msm/[email protected]/T/
[PATCH v4 0/1] iommu: SMMU for SDM670
https://lore.kernel.org/linux-arm-msm/[email protected]/T/

P.S.: Thank you to all the maintainers and reviewers who went through everything and made helpful comments!

Richard Acayan (4):
dt-bindings: arm: cpus: add qcom kryo 360 compatible
dt-bindings: arm: qcom: add sdm670 and pixel 3a compatible
dt-bindings: firmware: scm: add sdm670 compatible
arm64: dts: qcom: add sdm670 and pixel 3a device trees

 .../devicetree/bindings/arm/cpus.yaml         |    1 +
 .../devicetree/bindings/arm/qcom.yaml         |    6 +
 .../bindings/firmware/qcom,scm.yaml           |    1 +
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sdm670-google-sargo.dts     |  533 ++++++++
 arch/arm64/boot/dts/qcom/sdm670.dtsi          | 1160 +++++++++++++++++
 6 files changed, 1702 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670.dtsi
Signature · 1 line
2.38.1
#1 lore raw

PATCH v3 1/4 dt-bindings: arm: cpus: add qcom kryo 360 compatible

The Snapdragon 670 uses CPUs named Kryo 360 silver and Kryo 360 gold. Add the compatible string in the documentation.

---
 Documentation/devicetree/bindings/arm/cpus.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/cpus.yaml +1 -0
index 5c13b73e4d57..1247e9a975c9 100644
@@ -178,6 +178,7 @@ properties:
       - qcom,kryo250
       - qcom,kryo260
       - qcom,kryo280
+      - qcom,kryo360
       - qcom,kryo385
       - qcom,kryo468
       - qcom,kryo485
Signature · 1 line
2.38.1
#2 lore raw

PATCH v3 2/4 dt-bindings: arm: qcom: add sdm670 and pixel 3a compatible

In reply to Richard Acayan

The Snapdragon 670 and Pixel 3a initial device trees are about to be added. Add the compatible strings for the board.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +6 -0
index 207e28260206..f9eddc22d4a4 100644
@@ -51,6 +51,7 @@ description: |
         sdm632
         sdm636
         sdm660
+        sdm670
         sdm845
         sdx55
         sdx65
@@ -654,6 +655,11 @@ properties:
               - xiaomi,lavender
           - const: qcom,sdm660
 
+      - items:
+          - enum:
+              - google,sargo
+          - const: qcom,sdm670
+
       - items:
           - enum:
               - qcom,sdx55-mtp
Signature · 1 line
2.38.1
#3 lore raw

PATCH v3 3/4 dt-bindings: firmware: scm: add sdm670 compatible

In reply to Richard Acayan

The Snapdragon 670 uses SCM as for PSCI power management. Document the appropriate compatible string for it.

---
 Documentation/devicetree/bindings/firmware/qcom,scm.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/firmware/qcom,scm.yaml +1 -0
index be1b5746eddb..25688571ee7c 100644
@@ -41,6 +41,7 @@ properties:
           - qcom,scm-sc7180
           - qcom,scm-sc7280
           - qcom,scm-sc8280xp
+          - qcom,scm-sdm670
           - qcom,scm-sdm845
           - qcom,scm-sdx55
           - qcom,scm-sdx65
Signature · 1 line
2.38.1
#4 lore raw

PATCH v3 4/4 arm64: dts: qcom: add sdm670 and pixel 3a device trees

In reply to Richard Acayan

The Qualcomm Snapdragon 670 has been out for a while. Add a device tree for it and the Google Pixel 3a as the first device.

The Pixel 3a has the same bootloader issue as the Pixel 3 and will not work on Android 10 bootloaders or later until it gets fixed for the Pixel 3.

SoC Initial Features:
- power management
- clocks
- pinctrl
- eMMC
- USB 2.0
- GENI I2C
- IOMMU
- RPMh
- interrupts

Device-Specific Initial Features:
- side buttons (keys)
- regulators
- touchscreen

---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sdm670-google-sargo.dts     |  533 ++++++++
 arch/arm64/boot/dts/qcom/sdm670.dtsi          | 1160 +++++++++++++++++
 3 files changed, 1694 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index b0558d3389e5..4eb5d8829efb 100644
@@ -124,6 +124,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-voyager.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-fairphone-fp3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm636-sony-xperia-ganges-mermaid.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-sargo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts new file +533 -0

533 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sdm670.dtsi new file +1160 -0

1,160 lines not on this page · raw message

Signature · 1 line
2.38.1
#5 lore raw

Re: [PATCH v3 4/4] arm64: dts: qcom: add sdm670 and pixel 3a device trees

Quoted 72 lines · Richard Acayan

The Qualcomm Snapdragon 670 has been out for a while. Add a device tree for it and the Google Pixel 3a as the first device.

The Pixel 3a has the same bootloader issue as the Pixel 3 and will not work on Android 10 bootloaders or later until it gets fixed for the Pixel 3.

SoC Initial Features:
- power management
- clocks
- pinctrl
- eMMC
- USB 2.0
- GENI I2C
- IOMMU
- RPMh
- interrupts

Device-Specific Initial Features:
- side buttons (keys)
- regulators
- touchscreen

---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sdm670-google-sargo.dts     |  533 ++++++++
 arch/arm64/boot/dts/qcom/sdm670.dtsi          | 1160 +++++++++++++++++
 3 files changed, 1694 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts
 create mode 100644 arch/arm64/boot/dts/qcom/sdm670.dtsi
arch/arm64/boot/dts/qcom/Makefile +1 -0
index b0558d3389e5..4eb5d8829efb 100644
@@ -124,6 +124,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm630-sony-xperia-nile-voyager.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm632-fairphone-fp3.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm636-sony-xperia-ganges-mermaid.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm660-xiaomi-lavender.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm670-google-sargo.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r1.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-cheza-r3.dtb
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts new file +23 -0
new file mode 100644
index 000000000000..fe3f61f8a348
@@ -0,0 +1,533 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device tree for Google Pixel 3a, adapted from google-blueline device tree,
+ * xiaomi-lavender device tree, and oneplus-common device tree.
+ *
+ * Copyright (c) 2022, Richard Acayan. All rights reserved.
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
+#include <dt-bindings/power/qcom-rpmpd.h>
+#include "sdm670.dtsi"
+#include "pm660.dtsi"
+#include "pm660l.dtsi"
+
+/delete-node/ &mpss_region;
+/delete-node/ &venus_mem;
+/delete-node/ &wlan_msa_mem;
+/delete-node/ &cdsp_mem;
+/delete-node/ &mba_region;

arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts line 33

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts new file +10 -0
+/delete-node/ &adsp_mem;
+/delete-node/ &ipa_fw_mem;
+/delete-node/ &ipa_gsi_mem;
+/delete-node/ &gpu_mem;
+
+/ {
+	model = "Google Pixel 3a";
+	compatible = "google,sargo", "qcom,sdm670";
+	qcom,board-id = <0x00041e05 0>;
+	qcom,msm-id = <321 0x20001>;

These two are not allowed for your platform. If you tested your DTS, you would see:

/: qcom,board-id: False schema does not allow [[269829, 0]] /: qcom,msm-id: False schema does not allow [[321, 131073]]

This must be fixed.

Best regards,
Krzysztof