2022-05-10 14:52:15

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 01/11] dt-bindings: vendor-prefixes: add Methode Electronics

Add vendor prefix for Methode Electronics, Inc. (https://www.methode.com)

Signed-off-by: Robert Marko <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 01430973ecec..e5ec476f54cd 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -764,6 +764,8 @@ patternProperties:
description: Cisco Meraki, LLC
"^merrii,.*":
description: Merrii Technology Co., Ltd.
+ "^methode,.*":
+ description: Methode Electronics, Inc.
"^micrel,.*":
description: Micrel Inc.
"^microchip,.*":
--
2.36.1



2022-05-10 14:54:11

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 09/11] arm64: dts: marvell: split Methode uDPU DTS

Split the Methode uDPU DTS into a common DTSI as preparation for adding
support for Methode eDPU which is based on the uDPU to avoid duplication.

Signed-off-by: Robert Marko <[email protected]>
---
.../boot/dts/marvell/armada-3720-uDPU.dts | 150 +---------------
.../boot/dts/marvell/armada-3720-uDPU.dtsi | 160 ++++++++++++++++++
2 files changed, 161 insertions(+), 149 deletions(-)
create mode 100644 arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
index f21a855fc608..a75734d88a4f 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
@@ -1,66 +1,13 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-/*
- * Device tree for the uDPU board.
- * Based on Marvell Armada 3720 development board (DB-88F3720-DDR3)
- * Copyright (C) 2016 Marvell
- * Copyright (C) 2019 Methode Electronics
- * Copyright (C) 2019 Telus
- *
- * Vladimir Vid <[email protected]>
- */

/dts-v1/;

-#include <dt-bindings/gpio/gpio.h>
-#include "armada-372x.dtsi"
+#include "armada-3720-uDPU.dtsi"

/ {
model = "Methode uDPU Board";
compatible = "methode,udpu", "marvell,armada3720", "marvell,armada3710";

- chosen {
- stdout-path = "serial0:115200n8";
- };
-
- memory@0 {
- device_type = "memory";
- reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
- };
-
- leds {
- compatible = "gpio-leds";
-
- led-power1 {
- label = "udpu:green:power";
- gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
- };
-
- led-power2 {
- label = "udpu:red:power";
- gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
- };
-
- led-network1 {
- label = "udpu:green:network";
- gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
- };
-
- led-network2 {
- label = "udpu:red:network";
- gpios = <&gpionb 14 GPIO_ACTIVE_LOW>;
- };
-
- led-alarm1 {
- label = "udpu:green:alarm";
- gpios = <&gpionb 15 GPIO_ACTIVE_LOW>;
- };
-
- led-alarm2 {
- label = "udpu:red:alarm";
- gpios = <&gpionb 16 GPIO_ACTIVE_LOW>;
- };
- };
-
sfp_eth0: sfp-eth0 {
compatible = "sff,sfp";
i2c-bus = <&i2c0>;
@@ -70,55 +17,6 @@ sfp_eth0: sfp-eth0 {
tx-fault-gpio = <&gpiosb 5 GPIO_ACTIVE_HIGH>;
maximum-power-milliwatt = <3000>;
};
-
- sfp_eth1: sfp-eth1 {
- compatible = "sff,sfp";
- i2c-bus = <&i2c1>;
- los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
- mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
- tx-disable-gpio = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
- tx-fault-gpio = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
- maximum-power-milliwatt = <3000>;
- };
-};
-
-&sdhci0 {
- status = "okay";
- bus-width = <8>;
- mmc-ddr-1_8v;
- mmc-hs400-1_8v;
- marvell,pad-type = "fixed-1-8v";
- non-removable;
- no-sd;
- no-sdio;
-};
-
-&spi0 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&spi_quad_pins>;
-
- flash@0 {
- compatible = "jedec,spi-nor";
- reg = <0>;
- spi-max-frequency = <54000000>;
-
- partitions {
- compatible = "fixed-partitions";
- #address-cells = <1>;
- #size-cells = <1>;
-
- partition@0 {
- label = "firmware";
- reg = <0x0 0x180000>;
- };
-
- partition@180000 {
- label = "u-boot-env";
- reg = <0x180000 0x10000>;
- };
- };
- };
};

&pinctrl_nb {
@@ -126,11 +24,6 @@ i2c1_recovery_pins: i2c1-recovery-pins {
groups = "i2c1";
function = "gpio";
};
-
- i2c2_recovery_pins: i2c2-recovery-pins {
- groups = "i2c2";
- function = "gpio";
- };
};

&i2c0 {
@@ -143,48 +36,7 @@ &i2c0 {
sda-gpios = <&gpionb 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
};

-&i2c1 {
- status = "okay";
- pinctrl-names = "default", "recovery";
- pinctrl-0 = <&i2c2_pins>;
- pinctrl-1 = <&i2c2_recovery_pins>;
- /delete-property/mrvl,i2c-fast-mode;
- scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
- sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-
- temp-sensor@48 {
- compatible = "ti,tmp75c";
- reg = <0x48>;
- };
-
- temp-sensor@49 {
- compatible = "ti,tmp75c";
- reg = <0x49>;
- };
-};
-
&eth0 {
phy-mode = "sgmii";
- status = "okay";
- managed = "in-band-status";
- phys = <&comphy1 0>;
sfp = <&sfp_eth0>;
};
-
-&eth1 {
- phy-mode = "sgmii";
- status = "okay";
- managed = "in-band-status";
- phys = <&comphy0 1>;
- sfp = <&sfp_eth1>;
-};
-
-&usb3 {
- status = "okay";
- phys = <&usb2_utmi_otg_phy>;
- phy-names = "usb2-utmi-otg-phy";
-};
-
-&uart0 {
- status = "okay";
-};
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
new file mode 100644
index 000000000000..3f79923376fb
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
@@ -0,0 +1,160 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device tree for the uDPU board.
+ * Based on Marvell Armada 3720 development board (DB-88F3720-DDR3)
+ * Copyright (C) 2016 Marvell
+ * Copyright (C) 2019 Methode Electronics
+ * Copyright (C) 2019 Telus
+ *
+ * Vladimir Vid <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "armada-372x.dtsi"
+
+/ {
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ memory@0 {
+ device_type = "memory";
+ reg = <0x00000000 0x00000000 0x00000000 0x20000000>;
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-power1 {
+ label = "udpu:green:power";
+ gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
+ };
+
+ led-power2 {
+ label = "udpu:red:power";
+ gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
+ };
+
+ led-network1 {
+ label = "udpu:green:network";
+ gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
+ };
+
+ led-network2 {
+ label = "udpu:red:network";
+ gpios = <&gpionb 14 GPIO_ACTIVE_LOW>;
+ };
+
+ led-alarm1 {
+ label = "udpu:green:alarm";
+ gpios = <&gpionb 15 GPIO_ACTIVE_LOW>;
+ };
+
+ led-alarm2 {
+ label = "udpu:red:alarm";
+ gpios = <&gpionb 16 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ sfp_eth1: sfp-eth1 {
+ compatible = "sff,sfp";
+ i2c-bus = <&i2c1>;
+ los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
+ mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
+ tx-disable-gpio = <&gpiosb 9 GPIO_ACTIVE_HIGH>;
+ tx-fault-gpio = <&gpiosb 10 GPIO_ACTIVE_HIGH>;
+ maximum-power-milliwatt = <3000>;
+ };
+};
+
+&sdhci0 {
+ status = "okay";
+ bus-width = <8>;
+ mmc-ddr-1_8v;
+ mmc-hs400-1_8v;
+ marvell,pad-type = "fixed-1-8v";
+ non-removable;
+ no-sd;
+ no-sdio;
+};
+
+&spi0 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_quad_pins>;
+
+ flash@0 {
+ compatible = "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <54000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "firmware";
+ reg = <0x0 0x180000>;
+ };
+
+ partition@180000 {
+ label = "u-boot-env";
+ reg = <0x180000 0x10000>;
+ };
+ };
+ };
+};
+
+&pinctrl_nb {
+ i2c2_recovery_pins: i2c2-recovery-pins {
+ groups = "i2c2";
+ function = "gpio";
+ };
+};
+
+&i2c1 {
+ status = "okay";
+ pinctrl-names = "default", "recovery";
+ pinctrl-0 = <&i2c2_pins>;
+ pinctrl-1 = <&i2c2_recovery_pins>;
+ /delete-property/mrvl,i2c-fast-mode;
+ scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+ sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+
+ temp-sensor@48 {
+ compatible = "ti,tmp75c";
+ reg = <0x48>;
+ };
+
+ temp-sensor@49 {
+ compatible = "ti,tmp75c";
+ reg = <0x49>;
+ };
+};
+
+&eth0 {
+ status = "okay";
+ managed = "in-band-status";
+ phys = <&comphy1 0>;
+};
+
+&eth1 {
+ phy-mode = "sgmii";
+ status = "okay";
+ managed = "in-band-status";
+ phys = <&comphy0 1>;
+ sfp = <&sfp_eth1>;
+};
+
+&usb3 {
+ status = "okay";
+ phys = <&usb2_utmi_otg_phy>;
+ phy-names = "usb2-utmi-otg-phy";
+};
+
+&uart0 {
+ status = "okay";
+};
--
2.36.1


2022-05-10 15:23:51

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 04/11] arm64: dts: marvell: uDPU: add missing SoC compatible

According to the bindings, all boards using Armada 37xx SoC-s must have
"marvell,armada3710" compatible while 3720 based ones should also have
"marvell,armada3720" before it.

Signed-off-by: Robert Marko <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
index 1f534c0c65f7..62fce6f2a3a7 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
@@ -16,7 +16,7 @@

/ {
model = "Methode uDPU Board";
- compatible = "methode,udpu", "marvell,armada3720";
+ compatible = "methode,udpu", "marvell,armada3720", "marvell,armada3710";

chosen {
stdout-path = "serial0:115200n8";
--
2.36.1


2022-05-10 16:00:04

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 02/11] dt-bindings: marvell: convert Armada 37xx compatibles to YAML

Convert the Armada 37xx SoC compatibles to YAML.

Signed-off-by: Robert Marko <[email protected]>
---
.../bindings/arm/marvell/armada-37xx.txt | 26 ----------
.../bindings/arm/marvell/armada-37xx.yaml | 50 +++++++++++++++++++
2 files changed, 50 insertions(+), 26 deletions(-)
create mode 100644 Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml

diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
index f6d6642d81c0..29fa93dad52b 100644
--- a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.txt
@@ -1,21 +1,3 @@
-Marvell Armada 37xx Platforms Device Tree Bindings
---------------------------------------------------
-
-Boards using a SoC of the Marvell Armada 37xx family must carry the
-following root node property:
-
- - compatible: must contain "marvell,armada3710"
-
-In addition, boards using the Marvell Armada 3720 SoC shall have the
-following property before the previous one:
-
- - compatible: must contain "marvell,armada3720"
-
-Example:
-
-compatible = "marvell,armada-3720-db", "marvell,armada3720", "marvell,armada3710";
-
-
Power management
----------------

@@ -48,11 +30,3 @@ avs: avs@11500 {
compatible = "marvell,armada-3700-avs", "syscon";
reg = <0x11500 0x40>;
}
-
-
-CZ.NIC's Turris Mox SOHO router Device Tree Bindings
-----------------------------------------------------
-
-Required root node property:
-
- - compatible: must contain "cznic,turris-mox"
diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
new file mode 100644
index 000000000000..3f41ef2c6f3e
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/marvell/armada-37xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Marvell Armada 37xx Platforms Device Tree Bindings
+
+maintainers:
+ - Robert Marko <[email protected]>
+
+properties:
+ $nodename:
+ const: '/'
+ compatible:
+ oneOf:
+ - description: Armada 3710 SoC
+ items:
+ - const: marvell,armada3710
+
+ - description: Armada 3720 SoC
+ items:
+ - enum:
+ - marvell,armada-3720-db
+ - globalscale,espressobin
+ - cznic,turris-mox
+ - methode,udpu
+ - const: marvell,armada3720
+ - const: marvell,armada3710
+
+ - description: Globalscale Espressobin boards
+ items:
+ - enum:
+ - globalscale,espressobin-emmc
+ - globalscale,espressobin-ultra
+ - globalscale,espressobin-v7
+ - const: globalscale,espressobin
+ - const: marvell,armada3720
+ - const: marvell,armada3710
+
+ - description: Globalscale Espressobin V7 boards
+ items:
+ - enum:
+ - globalscale,espressobin-v7-emmc
+ - const: globalscale,espressobin-v7
+ - const: globalscale,espressobin
+ - const: marvell,armada3720
+ - const: marvell,armada3710
+
+additionalProperties: true
--
2.36.1


2022-05-10 16:42:03

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 05/11] arm64: dts: marvell: uDPU: align SPI-NOR node with bindings

SPI-NOR node should be "flash@0" according to the bindings, so fix it.

Signed-off-by: Robert Marko <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
index 62fce6f2a3a7..4ae1688e6627 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
@@ -99,7 +99,7 @@ &spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi_quad_pins>;

- spi-flash@0 {
+ flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <54000000>;
--
2.36.1


2022-05-10 17:43:47

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 06/11] arm64: dts: marvell: uDPU: align LED-s with bindings

According to bindings they LED-s should be prefixed with "led" in this
use case, so fix accordingly.

Signed-off-by: Robert Marko <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
index 4ae1688e6627..f216777acacc 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
@@ -31,32 +31,32 @@ leds {
pinctrl-names = "default";
compatible = "gpio-leds";

- power1 {
+ led-power1 {
label = "udpu:green:power";
gpios = <&gpionb 11 GPIO_ACTIVE_LOW>;
};

- power2 {
+ led-power2 {
label = "udpu:red:power";
gpios = <&gpionb 12 GPIO_ACTIVE_LOW>;
};

- network1 {
+ led-network1 {
label = "udpu:green:network";
gpios = <&gpionb 13 GPIO_ACTIVE_LOW>;
};

- network2 {
+ led-network2 {
label = "udpu:red:network";
gpios = <&gpionb 14 GPIO_ACTIVE_LOW>;
};

- alarm1 {
+ led-alarm1 {
label = "udpu:green:alarm";
gpios = <&gpionb 15 GPIO_ACTIVE_LOW>;
};

- alarm2 {
+ led-alarm2 {
label = "udpu:red:alarm";
gpios = <&gpionb 16 GPIO_ACTIVE_LOW>;
};
--
2.36.1


2022-05-10 19:42:32

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 08/11] arm64: dts: marvell: rename temp sensor nodes

Rename the temperature sensor nodes to use "temp-sensor" which matches
their device class instead of IC specific naming.

Remove the status = "okay" which is not required as its default anyway.

Signed-off-by: Robert Marko <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
index b89c7455612d..f21a855fc608 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
@@ -152,14 +152,12 @@ &i2c1 {
scl-gpios = <&gpionb 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
sda-gpios = <&gpionb 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;

- nct375@48 {
- status = "okay";
+ temp-sensor@48 {
compatible = "ti,tmp75c";
reg = <0x48>;
};

- nct375@49 {
- status = "okay";
+ temp-sensor@49 {
compatible = "ti,tmp75c";
reg = <0x49>;
};
--
2.36.1


2022-05-10 20:15:31

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 10/11] dt-bindings: marvell: armada-37xx: add Methode eDPU compatible

Document compatible for the Methode eDPU Armada 3720 based board.

Signed-off-by: Robert Marko <[email protected]>
---
Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
index 3f41ef2c6f3e..db0307241e39 100644
--- a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
+++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
@@ -25,6 +25,7 @@ properties:
- globalscale,espressobin
- cznic,turris-mox
- methode,udpu
+ - methode,edpu
- const: marvell,armada3720
- const: marvell,armada3710

--
2.36.1


2022-05-10 22:00:10

by Robert Marko

[permalink] [raw]
Subject: [PATCH v2 11/11] arm64: dts: marvell: add support for Methode eDPU

Methode eDPU is an Armada 3720 powered board based on the Methode uDPU.

They feature the same CPU, RAM, and storage as well as the form factor.

However, eDPU only has one SFP slot plus a copper G.hn port.

Signed-off-by: Robert Marko <[email protected]>
Changes in v2:
* Make the DTS split a separate commit
---
arch/arm64/boot/dts/marvell/Makefile | 1 +
arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts | 14 ++++++++++++++
2 files changed, 15 insertions(+)
create mode 100644 arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts

diff --git a/arch/arm64/boot/dts/marvell/Makefile b/arch/arm64/boot/dts/marvell/Makefile
index 1c794cdcb8e6..104d7d7e8215 100644
--- a/arch/arm64/boot/dts/marvell/Makefile
+++ b/arch/arm64/boot/dts/marvell/Makefile
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Mvebu SoC Family
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-db.dtb
+dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-eDPU.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobin.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobin-emmc.dtb
dtb-$(CONFIG_ARCH_MVEBU) += armada-3720-espressobin-ultra.dtb
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
new file mode 100644
index 000000000000..57fc698e55d0
--- /dev/null
+++ b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+/dts-v1/;
+
+#include "armada-3720-uDPU.dtsi"
+
+/ {
+ model = "Methode eDPU Board";
+ compatible = "methode,edpu", "marvell,armada3720", "marvell,armada3710";
+};
+
+&eth0 {
+ phy-mode = "2500base-x";
+};
--
2.36.1


2022-05-12 09:25:37

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 10/11] dt-bindings: marvell: armada-37xx: add Methode eDPU compatible

On 10/05/2022 14:49, Robert Marko wrote:
> Document compatible for the Methode eDPU Armada 3720 based board.
>
> Signed-off-by: Robert Marko <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> index 3f41ef2c6f3e..db0307241e39 100644
> --- a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> @@ -25,6 +25,7 @@ properties:
> - globalscale,espressobin
> - cznic,turris-mox
> - methode,udpu
> + - methode,edpu

Alphabetical order, by entire compatible.


Best regards,
Krzysztof

2022-05-12 17:13:28

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH v2 02/11] dt-bindings: marvell: convert Armada 37xx compatibles to YAML

On Wed, May 11, 2022 at 6:52 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 10/05/2022 14:49, Robert Marko wrote:
>
> Thank you for your patch. There is something to discuss/improve.
>
> > -
> > - - compatible: must contain "cznic,turris-mox"
> > diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> > new file mode 100644
> > index 000000000000..3f41ef2c6f3e
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> > @@ -0,0 +1,50 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/marvell/armada-37xx.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Marvell Armada 37xx Platforms Device Tree Bindings
> > +
> > +maintainers:
> > + - Robert Marko <[email protected]>
> > +
> > +properties:
> > + $nodename:
> > + const: '/'
> > + compatible:
> > + oneOf:
> > + - description: Armada 3710 SoC
> > + items:
> > + - const: marvell,armada3710
>
> This does not look correct. The SoC usually cannot be used by itself,
> it's always a part of some product, SoM, board.

Hi Krzysztof,
Currently, there are no Armada 3710 boards present in Linux, so I just
put the SoC compatible.
If that is not appropriate, I can drop it.

>
> > +
> > + - description: Armada 3720 SoC
> > + items:
> > + - enum:
> > + - marvell,armada-3720-db
> > + - globalscale,espressobin
> > + - cznic,turris-mox
> > + - methode,udpu
>
> Order by name.
Will fixup in v3.

>
> > + - const: marvell,armada3720
> > + - const: marvell,armada3710
> > +
> > + - description: Globalscale Espressobin boards
> > + items:
> > + - enum:
> > + - globalscale,espressobin-emmc
> > + - globalscale,espressobin-ultra
> > + - globalscale,espressobin-v7
> > + - const: globalscale,espressobin
> > + - const: marvell,armada3720
> > + - const: marvell,armada3710
Do these const compatibles also need to be in alphabetical ordering,
cause I ported them as they are meant to be used with the board and
then 3720 compatibles being in front of 3710 one as required by the current
text bindings.

Regards,
Robert
> > +
> > + - description: Globalscale Espressobin V7 boards
> > + items:
> > + - enum:
> > + - globalscale,espressobin-v7-emmc
> > + - const: globalscale,espressobin-v7
> > + - const: globalscale,espressobin
> > + - const: marvell,armada3720
> > + - const: marvell,armada3710
> > +
> > +additionalProperties: true
>
>
> Best regards,
> Krzysztof



--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: http://www.sartura.hr

2022-05-13 02:57:12

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 02/11] dt-bindings: marvell: convert Armada 37xx compatibles to YAML

On 12/05/2022 14:26, Robert Marko wrote:
> On Wed, May 11, 2022 at 6:52 PM Krzysztof Kozlowski
> <[email protected]> wrote:
>>
>> On 10/05/2022 14:49, Robert Marko wrote:
>>
>> Thank you for your patch. There is something to discuss/improve.
>>
>>> -
>>> - - compatible: must contain "cznic,turris-mox"
>>> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
>>> new file mode 100644
>>> index 000000000000..3f41ef2c6f3e
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
>>> @@ -0,0 +1,50 @@
>>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>>> +%YAML 1.2
>>> +---
>>> +$id: http://devicetree.org/schemas/arm/marvell/armada-37xx.yaml#
>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>> +
>>> +title: Marvell Armada 37xx Platforms Device Tree Bindings
>>> +
>>> +maintainers:
>>> + - Robert Marko <[email protected]>
>>> +
>>> +properties:
>>> + $nodename:
>>> + const: '/'
>>> + compatible:
>>> + oneOf:
>>> + - description: Armada 3710 SoC
>>> + items:
>>> + - const: marvell,armada3710
>>
>> This does not look correct. The SoC usually cannot be used by itself,
>> it's always a part of some product, SoM, board.
>
> Hi Krzysztof,
> Currently, there are no Armada 3710 boards present in Linux, so I just
> put the SoC compatible.
> If that is not appropriate, I can drop it.

Yes, please drop it.

It seems several Marvel boards and bindings use wrong convention for
compatibles. We discussed it here:
https://lore.kernel.org/all/[email protected]/
AC5 and CN9130 have the same wrong patterns.

>
>>
>>> +
>>> + - description: Armada 3720 SoC
>>> + items:
>>> + - enum:
>>> + - marvell,armada-3720-db
>>> + - globalscale,espressobin
>>> + - cznic,turris-mox
>>> + - methode,udpu
>>
>> Order by name.
> Will fixup in v3.
>
>>
>>> + - const: marvell,armada3720
>>> + - const: marvell,armada3710
>>> +
>>> + - description: Globalscale Espressobin boards
>>> + items:
>>> + - enum:
>>> + - globalscale,espressobin-emmc
>>> + - globalscale,espressobin-ultra
>>> + - globalscale,espressobin-v7
>>> + - const: globalscale,espressobin
>>> + - const: marvell,armada3720
>>> + - const: marvell,armada3710
> Do these const compatibles also need to be in alphabetical ordering,
> cause I ported them as they are meant to be used with the board and
> then 3720 compatibles being in front of 3710 one as required by the current
> text bindings.

Entries in enum should be ordered alphabetically. Then the entire set "-
description: Globalscale Espressobin boards" should have some logical
order, not necessarily by name.

Anyway this is not a requirement but rather suggestion because having
things ordered reduces amount of conflicts when two people add new
boards (because they add it not at the end, but somewhere in the middle
following some order).


Best regards,
Krzysztof

2022-05-13 06:27:26

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 02/11] dt-bindings: marvell: convert Armada 37xx compatibles to YAML

On 10/05/2022 14:49, Robert Marko wrote:

Thank you for your patch. There is something to discuss/improve.

> -
> - - compatible: must contain "cznic,turris-mox"
> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> new file mode 100644
> index 000000000000..3f41ef2c6f3e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> @@ -0,0 +1,50 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/marvell/armada-37xx.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Marvell Armada 37xx Platforms Device Tree Bindings
> +
> +maintainers:
> + - Robert Marko <[email protected]>
> +
> +properties:
> + $nodename:
> + const: '/'
> + compatible:
> + oneOf:
> + - description: Armada 3710 SoC
> + items:
> + - const: marvell,armada3710

This does not look correct. The SoC usually cannot be used by itself,
it's always a part of some product, SoM, board.

> +
> + - description: Armada 3720 SoC
> + items:
> + - enum:
> + - marvell,armada-3720-db
> + - globalscale,espressobin
> + - cznic,turris-mox
> + - methode,udpu

Order by name.

> + - const: marvell,armada3720
> + - const: marvell,armada3710
> +
> + - description: Globalscale Espressobin boards
> + items:
> + - enum:
> + - globalscale,espressobin-emmc
> + - globalscale,espressobin-ultra
> + - globalscale,espressobin-v7
> + - const: globalscale,espressobin
> + - const: marvell,armada3720
> + - const: marvell,armada3710
> +
> + - description: Globalscale Espressobin V7 boards
> + items:
> + - enum:
> + - globalscale,espressobin-v7-emmc
> + - const: globalscale,espressobin-v7
> + - const: globalscale,espressobin
> + - const: marvell,armada3720
> + - const: marvell,armada3710
> +
> +additionalProperties: true


Best regards,
Krzysztof

2022-05-13 09:08:04

by Robert Marko

[permalink] [raw]
Subject: Re: [PATCH v2 02/11] dt-bindings: marvell: convert Armada 37xx compatibles to YAML

On Thu, May 12, 2022 at 2:36 PM Krzysztof Kozlowski
<[email protected]> wrote:
>
> On 12/05/2022 14:26, Robert Marko wrote:
> > On Wed, May 11, 2022 at 6:52 PM Krzysztof Kozlowski
> > <[email protected]> wrote:
> >>
> >> On 10/05/2022 14:49, Robert Marko wrote:
> >>
> >> Thank you for your patch. There is something to discuss/improve.
> >>
> >>> -
> >>> - - compatible: must contain "cznic,turris-mox"
> >>> diff --git a/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> >>> new file mode 100644
> >>> index 000000000000..3f41ef2c6f3e
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/arm/marvell/armada-37xx.yaml
> >>> @@ -0,0 +1,50 @@
> >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >>> +%YAML 1.2
> >>> +---
> >>> +$id: http://devicetree.org/schemas/arm/marvell/armada-37xx.yaml#
> >>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >>> +
> >>> +title: Marvell Armada 37xx Platforms Device Tree Bindings
> >>> +
> >>> +maintainers:
> >>> + - Robert Marko <[email protected]>
> >>> +
> >>> +properties:
> >>> + $nodename:
> >>> + const: '/'
> >>> + compatible:
> >>> + oneOf:
> >>> + - description: Armada 3710 SoC
> >>> + items:
> >>> + - const: marvell,armada3710
> >>
> >> This does not look correct. The SoC usually cannot be used by itself,
> >> it's always a part of some product, SoM, board.
> >
> > Hi Krzysztof,
> > Currently, there are no Armada 3710 boards present in Linux, so I just
> > put the SoC compatible.
> > If that is not appropriate, I can drop it.
>
> Yes, please drop it.
>
> It seems several Marvel boards and bindings use wrong convention for
> compatibles. We discussed it here:
> https://lore.kernel.org/all/[email protected]/
> AC5 and CN9130 have the same wrong patterns.
>
> >
> >>
> >>> +
> >>> + - description: Armada 3720 SoC
> >>> + items:
> >>> + - enum:
> >>> + - marvell,armada-3720-db
> >>> + - globalscale,espressobin
> >>> + - cznic,turris-mox
> >>> + - methode,udpu
> >>
> >> Order by name.
> > Will fixup in v3.
> >
> >>
> >>> + - const: marvell,armada3720
> >>> + - const: marvell,armada3710
> >>> +
> >>> + - description: Globalscale Espressobin boards
> >>> + items:
> >>> + - enum:
> >>> + - globalscale,espressobin-emmc
> >>> + - globalscale,espressobin-ultra
> >>> + - globalscale,espressobin-v7
> >>> + - const: globalscale,espressobin
> >>> + - const: marvell,armada3720
> >>> + - const: marvell,armada3710
> > Do these const compatibles also need to be in alphabetical ordering,
> > cause I ported them as they are meant to be used with the board and
> > then 3720 compatibles being in front of 3710 one as required by the current
> > text bindings.
>
> Entries in enum should be ordered alphabetically. Then the entire set "-
> description: Globalscale Espressobin boards" should have some logical
> order, not necessarily by name.
>
> Anyway this is not a requirement but rather suggestion because having
> things ordered reduces amount of conflicts when two people add new
> boards (because they add it not at the end, but somewhere in the middle
> following some order).

Hi,
understood, will send a v3 soon.

Regards,
Robert
>
>
> Best regards,
> Krzysztof



--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: [email protected]
Web: http://www.sartura.hr