Skip to contentSkip to conversation

DTS updates for Marvell Armada CN913x platforms

PATCH Superseded [email protected] 3 participants 8 messages Feb 10, 2021

Subsystems (3)

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 cover DTS updates for Marvell Armada CN913x platforms

From: Konstantin Porotchkin <[email protected]>

This patch series contains the following changes/fixes:
1. Add support for Armada CN913x Development Board topology "B"
2. Add support for Armada CN913x Reference Design boards (CRB)
3. Fixes the CP11X references in PHY binding document
4. Fixes the NAND paritioninig scheme in DTS eliminating gap between consecutive partitions
All above changes are already intergated into Marvell official SDK sources

v2:
- extract common nodes from DB boards to separate DTSI files
- disable eth2 on CRB boards until the required phy mode support is added
- mention the switch part ID in CRB board description

v3:
- do not rename setup A DTS files for DB variants
- fix a couple of wrong include names

v4:
- Rebase on top of Linus master branch (v5.11-rc7)
- Remove HS400 timing from CRB AP SDHCI (not supported by connected eMMC)
- Add cd-gpio entry to CP0 SDHCI for SD card support
- Add a comment to CN9130-CRB patch about the required defconfig changes for supporting the onboard i2c expander
- Add Stefan's patch to enable 10G port on CN9130-DB platforms

v5:
- Extend enablement of 10G port to CN9131-DB platform

Grzegorz Jaszczyk (1):
Documentation/bindings: phy: update references to cp11x

Konstantin Porotchkin (3):
arch/arm64/boot/dts/marvell: fix NAND partitioning scheme
arm64: dts: cn913x: add device trees for topology B boards
arm64: dts: add support for Marvell cn9130-crb platform

Stefan Chulski (1):
dts: marvell: Enable 10G interfaces on 9130-DB and 9131-DB boards

 .../bindings/phy/phy-mvebu-comphy.txt         |  12 +-
 arch/arm64/boot/dts/marvell/Makefile          |   5 +
 arch/arm64/boot/dts/marvell/cn9130-crb-A.dts  |  38 ++
 arch/arm64/boot/dts/marvell/cn9130-crb-B.dts  |  46 ++
 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi   | 222 ++++++++++
 arch/arm64/boot/dts/marvell/cn9130-db-B.dts   |  22 +
 arch/arm64/boot/dts/marvell/cn9130-db.dts     | 393 +----------------
 arch/arm64/boot/dts/marvell/cn9130-db.dtsi    | 402 ++++++++++++++++++
 arch/arm64/boot/dts/marvell/cn9131-db-B.dts   |  22 +
 arch/arm64/boot/dts/marvell/cn9131-db.dts     | 192 +--------
 arch/arm64/boot/dts/marvell/cn9131-db.dtsi    | 201 +++++++++
 arch/arm64/boot/dts/marvell/cn9132-db-B.dts   |  22 +
 arch/arm64/boot/dts/marvell/cn9132-db.dts     | 211 +--------
 arch/arm64/boot/dts/marvell/cn9132-db.dtsi    | 220 ++++++++++
 14 files changed, 1224 insertions(+), 784 deletions(-)
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb-A.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9132-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9132-db.dtsi
Signature · 1 line
2.17.1
#1 lore raw

PATCH v5 1/5 Documentation/bindings: phy: update references to cp11x

From: Grzegorz Jaszczyk <[email protected]>

The cp11x references in dts has changed, reflect it in comphy documentation.

---
 Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt +6 -6
index 8c60e6985950..5ffd0f55d010 100644
@@ -42,22 +42,22 @@ Required properties (child nodes):
 
 Examples:
 
-	cpm_comphy: phy@120000 {
+	CP11X_LABEL(comphy): phy@120000 {
 		compatible = "marvell,comphy-cp110";
 		reg = <0x120000 0x6000>;
-		marvell,system-controller = <&cpm_syscon0>;
-		clocks = <&CP110_LABEL(clk) 1 5>, <&CP110_LABEL(clk) 1 6>,
-			 <&CP110_LABEL(clk) 1 18>;
+		marvell,system-controller = <&CP11X_LABEL(syscon0)>;
+		clocks = <&CP11X_LABEL(clk) 1 5>, <&CP11X_LABEL(clk) 1 6>,
+			 <&CP11X_LABEL(clk) 1 18>;
 		clock-names = "mg_clk", "mg_core_clk", "axi_clk";
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpm_comphy0: phy@0 {
+		CP11X_LABEL(comphy0): phy@0 {
 			reg = <0>;
 			#phy-cells = <1>;
 		};
 
-		cpm_comphy1: phy@1 {
+		CP11X_LABEL(comphy1): phy@1 {
 			reg = <1>;
 			#phy-cells = <1>;
 		};
Signature · 1 line
2.17.1
maintainer
#2 lore raw

Re: [PATCH v5 1/5] Documentation/bindings: phy: update references to cp11x

Quoted 4 lines · On Wed, Feb 10, 2021 at 03:16:00PM +0200, [email protected] wrote:

From: Grzegorz Jaszczyk <[email protected]>

The cp11x references in dts has changed, reflect it in comphy documentation.

Who cares. Examples are just examples.

If you really want to improve the binding, convert it to schema.

Quoted 42 lines
---
 Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/phy/phy-mvebu-comphy.txt +6 -6
index 8c60e6985950..5ffd0f55d010 100644
@@ -42,22 +42,22 @@ Required properties (child nodes):
 
 Examples:
 
-	cpm_comphy: phy@120000 {
+	CP11X_LABEL(comphy): phy@120000 {
 		compatible = "marvell,comphy-cp110";
 		reg = <0x120000 0x6000>;
-		marvell,system-controller = <&cpm_syscon0>;
-		clocks = <&CP110_LABEL(clk) 1 5>, <&CP110_LABEL(clk) 1 6>,
-			 <&CP110_LABEL(clk) 1 18>;
+		marvell,system-controller = <&CP11X_LABEL(syscon0)>;
+		clocks = <&CP11X_LABEL(clk) 1 5>, <&CP11X_LABEL(clk) 1 6>,
+			 <&CP11X_LABEL(clk) 1 18>;
 		clock-names = "mg_clk", "mg_core_clk", "axi_clk";
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		cpm_comphy0: phy@0 {
+		CP11X_LABEL(comphy0): phy@0 {
 			reg = <0>;
 			#phy-cells = <1>;
 		};
 
-		cpm_comphy1: phy@1 {
+		CP11X_LABEL(comphy1): phy@1 {
 			reg = <1>;
 			#phy-cells = <1>;
 		};
Signature · 1 line
2.17.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH v5 2/5 arch/arm64/boot/dts/marvell: fix NAND partitioning scheme

In reply to [email protected]

From: Konstantin Porotchkin <[email protected]>

Eliminate 1MB gap between Linux and filesystem partitions.

---
 arch/arm64/boot/dts/marvell/cn9130-db.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/marvell/cn9130-db.dts +1 -1
index ce49a70d88a0..d24294888400 100644
@@ -258,7 +258,7 @@
 			};
 			partition@200000 {
 				label = "Linux";
-				reg = <0x200000 0xd00000>;
+				reg = <0x200000 0xe00000>;
 			};
 			partition@1000000 {
 				label = "Filesystem";
Signature · 1 line
2.17.1
#4 lore raw

PATCH v5 3/5 arm64: dts: cn913x: add device trees for topology B boards

In reply to [email protected]

From: Konstantin Porotchkin <[email protected]>

The CN913x DB with topology B is similar to a regular setup (A) boards, but uses NAND flash as a boot device, while topology A boards are booting from SPI flash.
Since NAND and SPI on CN913x DB boards share some wires, they cannot be activated simultaneously.
The DTS files for setup "B" are based on setup "A", in which the CP0 NAND controller enabled and CP0 SPI1 disabled.

---
 arch/arm64/boot/dts/marvell/Makefile        |   3 +
 arch/arm64/boot/dts/marvell/cn9130-db-B.dts |  22 ++
 arch/arm64/boot/dts/marvell/cn9130-db.dts   | 393 +------------------
 arch/arm64/boot/dts/marvell/cn9130-db.dtsi  | 402 ++++++++++++++++++++
 arch/arm64/boot/dts/marvell/cn9131-db-B.dts |  22 ++
 arch/arm64/boot/dts/marvell/cn9131-db.dts   | 192 +---------
 arch/arm64/boot/dts/marvell/cn9131-db.dtsi  | 201 ++++++++++
 arch/arm64/boot/dts/marvell/cn9132-db-B.dts |  22 ++
 arch/arm64/boot/dts/marvell/cn9132-db.dts   | 211 +---------
 arch/arm64/boot/dts/marvell/cn9132-db.dtsi  | 220 +++++++++++
 10 files changed, 910 insertions(+), 778 deletions(-)
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-db.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9131-db.dtsi
 create mode 100644 arch/arm64/boot/dts/marvell/cn9132-db-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9132-db.dtsi
arch/arm64/boot/dts/marvell/Makefile +3 -0
index 34efe0fb6f37..5e39f9774e68 100644
@@ -16,5 +16,8 @@ dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-mcbin-singleshot.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-8040-puzzle-m801.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += armada-8080-db.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9130-db.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += cn9130-db-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9131-db.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += cn9131-db-B.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += cn9132-db-B.dtb
arch/arm64/boot/dts/marvell/cn9130-db-B.dts new file +22 -0
new file mode 100644
index 000000000000..57e41cacd483
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Marvell International Ltd.
+ *
+ * Device tree for the CN9130-DB board (setup "B").
+ */
+
+#include "cn9130-db.dtsi"
+
+/ {
+	model = "Marvell Armada CN9130-DB setup B";
+};
+
+/* Setup B has NAND flash as a boot device, while regular setup uses SPI flash.
+ * Since CP0 SPI1 and CP0 NAND are sharing some pins, they cannot be activated
+ * simultaneously. When NAND controller is enabled, SPI1 should be disabled.
+ */
+
+&cp0_nand_controller {
+	status = "okay";
+};
+
arch/arm64/boot/dts/marvell/cn9130-db.dts +6 -387

405 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9130-db.dtsi new file +402 -0

402 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9131-db-B.dts new file +22 -0
new file mode 100644
index 000000000000..183b1ec8b1f0
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2020 Marvell International Ltd.
+ *
+ * Device tree for the CN9131-DB board (setup "B").
+ */
+
+#include "cn9131-db.dtsi"
+
+/ {
+	model = "Marvell Armada CN9131-DB setup B";
+};
+
+/* Setup B has NAND flash as a boot device, while regular setup uses SPI flash.
+ * Since CP0 SPI1 and CP0 NAND are sharing some pins, they cannot be activated
+ * simultaneously. When NAND controller is enabled, SPI1 should be disabled.
+ */
+
+&cp0_nand_controller {
+	status = "okay";
+};
+
arch/arm64/boot/dts/marvell/cn9131-db.dts +6 -186

204 lines not on this page · raw message

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

201 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9132-db-B.dts new file +22 -0
new file mode 100644
index 000000000000..7137a6f22d0f
@@ -0,0 +1,22 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2019 Marvell International Ltd.
+ *
+ * Device tree for the CN9132-DB board.
+ */
+
+#include "cn9132-db.dtsi"
+
+/ {
+	model = "Marvell Armada CN9132-DB setup B";
+};
+
+/* Setup B has NAND flash as a boot device, while regular setup uses SPI flash.
+ * Since CP0 SPI1 and CP0 NAND are sharing some pins, they cannot be activated
+ * simultaneously. When NAND controller is enabled, SPI1 should be disabled.
+ */
+
+&cp0_nand_controller {
+	status = "okay";
+};
+
arch/arm64/boot/dts/marvell/cn9132-db.dts +6 -205

223 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9132-db.dtsi new file +220 -0

220 lines not on this page · raw message

Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#5 lore raw

PATCH v5 4/5 dts: marvell: Enable 10G interfaces on 9130-DB and 9131-DB boards

In reply to [email protected]

From: Stefan Chulski <[email protected]>

This patch enables eth0 10G interface on CN9130-DB paltforms and eth0 10G and eth3 10G interfaces on CN9131-DB.

---
 arch/arm64/boot/dts/marvell/cn9130-db.dtsi | 2 +-
 arch/arm64/boot/dts/marvell/cn9131-db.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/marvell/cn9130-db.dtsi +1 -1
index 8de3a552b806..97c74b81fd78 100644
@@ -125,7 +125,7 @@
 
 /* SLM-1521-V2, CON9 */
 &cp0_eth0 {
-	status = "disabled";
+	status = "okay";
 	phy-mode = "10gbase-kr";
 	/* Generic PHY, providing serdes lanes */
 	phys = <&cp0_comphy4 0>;
arch/arm64/boot/dts/marvell/cn9131-db.dtsi +1 -1
index 82471a83ad6d..f2e4d3a6a4f8 100644
@@ -84,7 +84,7 @@
 
 /* CON50 */
 &cp1_eth0 {
-	status = "disabled";
+	status = "okay";
 	phy-mode = "10gbase-kr";
 	/* Generic PHY, providing serdes lanes */
 	phys = <&cp1_comphy4 0>;
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v5 4/5
#6 lore raw

Re: [PATCH v5 4/5] dts: marvell: Enable 10G interfaces on 9130-DB and 9131-DB boards

śr., 10 lut 2021 o 14:16 <[email protected]> napisał(a):

Quoted 5 lines

From: Stefan Chulski <[email protected]>

This patch enables eth0 10G interface on CN9130-DB paltforms and eth0 10G and eth3 10G interfaces on CN9131-DB.

Thank you.

Quoted 37 lines
---
 arch/arm64/boot/dts/marvell/cn9130-db.dtsi | 2 +-
 arch/arm64/boot/dts/marvell/cn9131-db.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/marvell/cn9130-db.dtsi +1 -1
index 8de3a552b806..97c74b81fd78 100644
@@ -125,7 +125,7 @@
 
 /* SLM-1521-V2, CON9 */
 &cp0_eth0 {
-       status = "disabled";
+       status = "okay";
        phy-mode = "10gbase-kr";
        /* Generic PHY, providing serdes lanes */
        phys = <&cp0_comphy4 0>;
arch/arm64/boot/dts/marvell/cn9131-db.dtsi +1 -2
index 82471a83ad6d..f2e4d3a6a4f8 100644
@@ -84,7 +84,7 @@
 
 /* CON50 */
 &cp1_eth0 {
-       status = "disabled";
+       status = "okay";
        phy-mode = "10gbase-kr";
        /* Generic PHY, providing serdes lanes */
        phys = <&cp1_comphy4 0>;
--

2.17.1

#7 lore raw

PATCH v5 5/5 arm64: dts: add support for Marvell cn9130-crb platform

In reply to [email protected]

From: Konstantin Porotchkin <[email protected]>

The Marvell reference platform CN9130-CRB is a small form factor board in a metal case. The platform is based on CN9130 SoC with addition of 8 Gigabit ports SOHO Ethernet switch.
The reference platform features the following:
* Up to 4 CPU cores ARMv8 Cortex-A72 CPU
* CPU core operating speed of up to 2.2GHz
* DDR4 DIMM – 8GB 64bit+ECC @ 2400Mhz.
* 1x eMMC 8GB device
* 1x uSD card 4 bits port on CP
* 1x 128MB SPI NOR flash memory
* 1x USB 3.0 Host port (Type A)
* 1x SATA Gen3 via M.2
* 1x USB 3.0 via M.2
* 1x SIM card slot
* 1x 1G Ethernet port via RGMII
* 1x 10G switch port over SFP+ connector
* 8x 1G ports through 88E6393X switch via XFI
* 1x 2.5G/1G/100M/10M port via HS_SGMII
* 1x PCI Express (PCIe)x1 Gen 3.0
* 1x PCI Express (PCIe)x4 Gen 3.0 via NVMe M.2
* JTAG port

The CRB board uses MCP23017 i2c pin controller that drives the onboard eMMC abd USB 3,0 port power lines.
The following configuration should be enabled for this controller support:
CONFIG_PINCTRL_MCP23S08=y

The plaform supports two HW configurations - "A" and "B" CN9130-CRB-A
* AP-MPP configuration: SDIO, UART
* CP0 Serdes configuration:
* Lane0-3: NVMe (PCIe x4)
* Lane4: XFI
* Lane5: HS_SGMII

2. CN9130-CRB-B
* AP-MPP configuration: SDIO, UART
* CP0-MPP configuration: RGMII, SDIO, I2C0, I2C1, SMI, XSMI
* CP0 Serdes configuration:
* Lane0: PCIe x1
* Lane1: USB3_0 x1
* Lane2: SATA x1
* Lane3: USB3_1 x1
* Lane4: XFI
* Lane5: HS_SGMII

---
 arch/arm64/boot/dts/marvell/Makefile         |   2 +
 arch/arm64/boot/dts/marvell/cn9130-crb-A.dts |  38 ++++
 arch/arm64/boot/dts/marvell/cn9130-crb-B.dts |  46 ++++
 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi  | 222 ++++++++++++++++++++
 4 files changed, 308 insertions(+)
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb-A.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb-B.dts
 create mode 100644 arch/arm64/boot/dts/marvell/cn9130-crb.dtsi
arch/arm64/boot/dts/marvell/Makefile +2 -0
index 5e39f9774e68..c686a8dd3ca5 100644
@@ -21,3 +21,5 @@ dtb-$(CONFIG_ARCH_MVEBU) += cn9131-db.dtb
 dtb-$(CONFIG_ARCH_MVEBU) += cn9131-db-B.dtb
 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
arch/arm64/boot/dts/marvell/cn9130-crb-A.dts new file +38 -0
new file mode 100644
index 000000000000..a7b6dfba8af5
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2020 Marvell International Ltd.
+ */
+
+#include "cn9130-crb.dtsi"
+
+/ {
+	model = "Marvell Armada CN9130-CRB-A";
+};
+
+&cp0_pcie0 {
+	status = "okay";
+	num-lanes = <4>;
+	num-viewport = <8>;
+	/* Generic PHY, providing serdes lanes */
+	phys = <&cp0_comphy0 0
+		&cp0_comphy1 0
+		&cp0_comphy2 0
+		&cp0_comphy3 0>;
+	iommu-map =
+		<0x0   &smmu 0x480 0x20>,
+		<0x100 &smmu 0x4a0 0x20>,
+		<0x200 &smmu 0x4c0 0x20>;
+	iommu-map-mask = <0x031f>;
+};
+
+&cp0_usb3_0 {
+	status = "okay";
+	usb-phy = <&cp0_usb3_0_phy0>;
+	phy-names = "usb";
+};
+
+&cp0_usb3_1 {
+	status = "okay";
+	usb-phy = <&cp0_usb3_0_phy1>;
+	phy-names = "usb";
+};
arch/arm64/boot/dts/marvell/cn9130-crb-B.dts new file +46 -0

46 lines not on this page · raw message

arch/arm64/boot/dts/marvell/cn9130-crb.dtsi new file +222 -0

222 lines not on this page · raw message

Signature · 1 line
2.17.1