Skip to contentSkip to conversation

arm64: dts: cn913x: add device trees for COM Express boards

PATCH Superseded Elad Nachman 4 participants 12 messages Oct 26, 2023 – Oct 27, 2023

Subsystems (2)

v3 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: cn913x: add device trees for COM Express boards

From: Elad Nachman <[email protected]>

Add support for CN9130 and CN9131 COM Express Type 7 CPU module boards by Marvell.
Define these COM Express CPU modules as dtsi, and provide a dts file for a carrier board (Marvell AC5X RD COM Express type 7 carrier board).
This Carrier board only utilizes the PCIe link, hence no special device / driver support is provided by this dts file.

v3:
1) Remove acronym which creates warnings for checkpatch.pl

2) Correct compatibility string for ac5x rd board

3) Add above compatibility string to dt bindings

4) update MAINTAINERS file with ac5 series dts files

5) remove memory property from carrier dts

6) add comment explaining that OOB RGMII ethernet port connector and PHY are both on CPU module

v2:
1) add compatibility string for the board

2) remove unneeded hard-coded PHY LED blinking mode initialization

3) Split the CPU portion of the carrier board to dtsi files, and define a dts file for the AC5X RD carrier board.

Elad Nachman (3):
arm64: dts: cn913x: add device trees for COM Express boards
dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier
MAINTAINERS: add ac5 to list of maintained Marvell dts files

 .../bindings/arm/marvell/armada-7k-8k.yaml    |   8 ++
 MAINTAINERS                                   |   1 +
 arch/arm64/boot/dts/marvell/Makefile          |   1 +
 .../boot/dts/marvell/ac5x_rd_carrier.dts      |  23 ++++
 .../dts/marvell/cn9130-db-comexpress.dtsi     | 101 ++++++++++++++++
 .../dts/marvell/cn9131-db-comexpress.dtsi     | 113 ++++++++++++++++++
 6 files changed, 247 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db-comexpress.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db-comexpress.dtsi
Signature · 1 line
2.25.1
#1 lore raw

PATCH v3 1/3 arm64: dts: cn913x: add device trees for COM Express boards

From: Elad Nachman <[email protected]>

Add support for CN9130 and CN9131 COM Express Type 7 CPU module boards by Marvell.
Define these COM Express CPU modules as dtsi, and provide a dts file for a carrier board (Marvell AC5X RD COM Express type 7 carrier board).
This Carrier board only utilizes the PCIe link, hence no special device / driver support is provided by this dts file.

These boards differ from the existing CN913x DB boards by the type of ethernet connection (RGMII), the type of voltage regulators (not i2c expander based) and the USB phy (not UTMI based). Note - PHY + RGMII connector is OOB on CPU module. CN9131 COM Express board is basically CN9130 COM Express board with an additional CP115 I/O co-processor, which in this case provides an additional USB host controller on the board.

---
 arch/arm64/boot/dts/marvell/Makefile          |   1 +
 .../boot/dts/marvell/ac5x_rd_carrier.dts      |  18 +++
 .../dts/marvell/cn9130-db-comexpress.dtsi     | 101 ++++++++++++++++
 .../dts/marvell/cn9131-db-comexpress.dtsi     | 113 ++++++++++++++++++
 4 files changed, 233 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db-comexpress.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db-comexpress.dtsi
arch/arm64/boot/dts/marvell/Makefile +1 -0
index 79ac09b58a89..b0a2347200ef 100644
@@ -26,4 +26,5 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-A.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-crb-B.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += ac5x_rd_carrier.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += ac5-98dx35xx-rd.dtb
arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts new file +18 -0
new file mode 100644
index 000000000000..d88aed241bfa
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Marvell International Ltd.
+ *
+ * Device tree for the AC5X RD Type 7 Com Express carrier board,
+ * Utilizing the CN913x COM Express CPU module board.
+ * This specific board only maintains a PCIe link with the CPU CPU module
+ * module, which does not require any special DTS definitions.
+ */
+
+#include "cn9131-db-comexpress.dtsi"
+
+/ {
+	model = "Marvell Armada AC5X RD COM EXPRESS type 7 carrier board";
+	compatible = "marvell,ac5x_rd_carrier", "marvell,cn9131", "marvell,cn9130",
+		     "marvell,armada-ap807-quad", "marvell,armada-ap807";
+
+};
arch/arm64/boot/dts/marvell/cn9130-db-comexpress.dtsi new file +101 -0

101 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9131-db-comexpress.dtsi new file +113 -0

113 lines not on this page · raw message

Signature · 1 line
2.25.1
maintainer
#2 lore raw

arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts line 16

Quoted 6 lines
arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts new file +6 -0
+#include "cn9131-db-comexpress.dtsi"
+
+/ {
+	model = "Marvell Armada AC5X RD COM EXPRESS type 7 carrier board";
+	compatible = "marvell,ac5x_rd_carrier", "marvell,cn9131", "marvell,cn9130",
+		     "marvell,armada-ap807-quad", "marvell,armada-ap807";

This is really a question to the DT Maintainers. This is a carrier board for a standardised Com express type 7 board. In theory, you should be able to plug any Com Express module into it, not just Marvells. So should the compatible list just have a compatible for the carrier itself? Not the module which would normally be mounted in it?

Should the carrier have a .dtsi file describing it? And then we have a .dts file which combines the module .dtsi and the carrier .dtsi?

Sorry i did not ask this earlier, i was thinking more about SolidRuns systems, which tend to have custom SOMs and customs carriers, so you can only really mount one particular SOM into one particular carrier. But that is not true here.

Andrew

#3 lore raw
Quoted 5 lines · Andrew Lunn

arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts line 15

Quoted 5 lines
arch/arm64/boot/dts/marvell/ac5x_rd_carrier.dts new file +5 -0
+#include "cn9131-db-comexpress.dtsi"
+
+/ {
+	model = "Marvell Armada AC5X RD COM EXPRESS type 7 carrier board";
+	compatible = "marvell,ac5x_rd_carrier", "marvell,cn9131", "marvell,cn9130",

Except wrong naming for compatible, I really do not understand what you want to add here. If AC5X is the carrier, what is the model name of entire product? If AC5X is not the carrier, where it the carrier?

Quoted 7 lines

Review

Quoted 1 line
(quoted diff) +1 -0
+		     "marvell,armada-ap807-quad", "marvell,armada-ap807";

This is really a question to the DT Maintainers. This is a carrier board for a standardised Com express type 7 board. In theory, you should be able to plug any Com Express module into it, not just Marvells. So should the compatible list just have a compatible for the carrier itself? Not the module which would normally be mounted in it?

Yes, because there are some common parts of the carrier board.

Quoted 3 lines

Should the carrier have a .dtsi file describing it? And then we have a .dts file which combines the module .dtsi and the carrier .dtsi?

Depends, how this is organized depends on possible re-usage etc. Usually answer is: yes, carrier board should have DTSI.

Quoted 5 lines

Sorry i did not ask this earlier, i was thinking more about SolidRuns systems, which tend to have custom SOMs and customs carriers, so you can only really mount one particular SOM into one particular carrier. But that is not true here.

Best regards,
Krzysztof

#4 lore raw

PATCH v3 2/3 dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

In reply to Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +8 -0
index 52d78521e412..71bc94047d1b 100644
@@ -60,4 +60,12 @@ properties:
           - const: marvell,armada-ap807-quad
           - const: marvell,armada-ap807
 
+      - description: AC5X RD COM Express Carrier for Armada CN9131 SoC with one external CP
+        items:
+          - const: marvell,ac5x_rd_carrier
+          - const: marvell,cn9131
+          - const: marvell,cn9130
+          - const: marvell,armada-ap807-quad
+          - const: marvell,armada-ap807
+
 additionalProperties: true
Signature · 1 line
2.25.1
Acked-by on v3 2/3
#5 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

Quoted 6 lines · Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

Thanks,
Conor.

Quoted 24 lines
---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +8 -0
index 52d78521e412..71bc94047d1b 100644
@@ -60,4 +60,12 @@ properties:
           - const: marvell,armada-ap807-quad
           - const: marvell,armada-ap807
 
+      - description: AC5X RD COM Express Carrier for Armada CN9131 SoC with one external CP
+        items:
+          - const: marvell,ac5x_rd_carrier
+          - const: marvell,cn9131
+          - const: marvell,cn9130
+          - const: marvell,armada-ap807-quad
+          - const: marvell,armada-ap807
+
 additionalProperties: true
Signature · 1 line
2.25.1
maintainer
#6 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

In reply to Elad Nachman
Quoted 15 lines · Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +0 -0
index 52d78521e412..71bc94047d1b 100644

Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml properties: · line 63

Quoted 4 lines
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +1 -0
@@ -60,4 +60,12 @@ properties:
           - const: marvell,armada-ap807-quad
           - const: marvell,armada-ap807
 
+      - description: AC5X RD COM Express Carrier for Armada CN9131 SoC with one external CP

This description is i think technically wrong. You have the combination of the carrier and the module.

Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml properties: · line 69

Quoted 6 lines
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +6 -0
+        items:
+          - const: marvell,ac5x_rd_carrier
+          - const: marvell,cn9131
+          - const: marvell,cn9130
+          - const: marvell,armada-ap807-quad
+          - const: marvell,armada-ap807

Andrew

#7 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

In reply to Elad Nachman
Quoted 15 lines · Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +0 -0
index 52d78521e412..71bc94047d1b 100644

Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml properties: · line 65

Quoted 6 lines
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +3 -0
@@ -60,4 +60,12 @@ properties:
           - const: marvell,armada-ap807-quad
           - const: marvell,armada-ap807
 
+      - description: AC5X RD COM Express Carrier for Armada CN9131 SoC with one external CP
+        items:
+          - const: marvell,ac5x_rd_carrier

No underscores in compatibles. Do you see them anywhere? Please use existing, recent code as start of your contributions, not something buggy 5 years old.

Best regards,
Krzysztof

#8 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

Quoted 19 lines · Krzysztof Kozlowski
Quoted 18 lines · Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +0 -0
index 52d78521e412..71bc94047d1b 100644
@@ -60,4 +60,12 @@ properties:
           - const: marvell,armada-ap807-quad
           - const: marvell,armada-ap807
 
Quoted 5 lines

Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml properties: · line 65

Quoted 3 lines
Documentation/devicetree/bindings/arm/marvell/armada-7k-8k.yaml +3 -0
+      - description: AC5X RD COM Express Carrier for Armada CN9131 SoC with one external CP
+        items:
+          - const: marvell,ac5x_rd_carrier

No underscores in compatibles.

Oh shit, I didn't notice that somehow. Un-acked until that's removed.

Quoted 7 lines

Do you see them anywhere? Please use
existing, recent code as start of your contributions, not something buggy 5 years old.

Best regards,
Krzysztof

maintainer
#9 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

Quoted 3 lines
Quoted 1 line

No underscores in compatibles.

Oh shit, I didn't notice that somehow. Un-acked until that's removed.

Not a problem. Its way too late for this merge window. The pull request for Marvell stuff has already been sent to arm-soc. There is plenty of time to fix this, and there are other problems to address as well.

Andrew

#10 lore raw

Re: [PATCH v3 2/3] dt-bindings: arm64: dts: add dt-bindings for ac5x rd carrier

In reply to Elad Nachman
Quoted 6 lines · Elad Nachman

From: Elad Nachman <[email protected]>

Add dt bindings for AC5X RD COM Express Type 7 carrier board. This board will Accept a CN9131 COM Express Type 7 CPU module.

Please order your patches correctly, so bindings come before their users. You cannot have other way.

Quoted 3 lines
---
 .../devicetree/bindings/arm/marvell/armada-7k-8k.yaml     | 8 ++++++++
 1 file changed, 8 insertions(+)

Best regards,
Krzysztof

#11 lore raw

PATCH v3 3/3 MAINTAINERS: add ac5 to list of maintained Marvell dts files

In reply to Elad Nachman

From: Elad Nachman <[email protected]>

Add ac5 dts files to the list of maintained Marvell Armada dts files

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 2d13bbd69adb..0d9b8cace1de 100644
@@ -2323,6 +2323,7 @@ F:	arch/arm/boot/dts/marvell/armada*
 F:	arch/arm/boot/dts/marvell/kirkwood*
 F:	arch/arm/configs/mvebu_*_defconfig
 F:	arch/arm/mach-mvebu/
+F:	arch/arm64/boot/dts/marvell/ac5*
 F:	arch/arm64/boot/dts/marvell/armada*
 F:	arch/arm64/boot/dts/marvell/cn913*
 F:	drivers/clk/mvebu/
Signature · 1 line
2.25.1