Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-07-21 Thread Stefan Roese

On 20.05.22 13:46, Robert Marko wrote:

Methode eDPU is an Armada 3720 power 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 which does not
work under U-boot.

In order to reduce duplication, split the uDPU DTS into a common one.

Signed-off-by: Robert Marko 


Applied to u-boot-marvell/master

Thanks,
Stefan


---
Changes in v4:
* Remove CMD_PCI as PCI is disabled anyway

Changes in v3:
* Use DTS-es pending merge upstream
* Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI device
as one of the bootable ones.
We dont have space constraints, so just re-enable SCSI rather than making
one more config header

Changes in v2:
* Correct the PHY mode to 2500Base-X
* Add the DTB to Makefile
* Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present
---
  arch/arm/dts/Makefile |   1 +
  arch/arm/dts/armada-3720-eDPU-u-boot.dtsi |  45 ++
  arch/arm/dts/armada-3720-eDPU.dts |  14 ++
  arch/arm/dts/armada-3720-uDPU.dts | 150 +---
  arch/arm/dts/armada-3720-uDPU.dtsi| 160 ++
  configs/eDPU_defconfig|  95 +
  6 files changed, 316 insertions(+), 149 deletions(-)
  create mode 100644 arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
  create mode 100644 arch/arm/dts/armada-3720-eDPU.dts
  create mode 100644 arch/arm/dts/armada-3720-uDPU.dtsi
  create mode 100644 configs/eDPU_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 83630af4f6..c484875585 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -236,6 +236,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
armada-3720-db.dtb  \
armada-3720-espressobin.dtb \
armada-3720-turris-mox.dtb  \
+   armada-3720-eDPU.dtb\
armada-3720-uDPU.dtb\
armada-375-db.dtb   \
armada-385-atl-x530.dtb \
diff --git a/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi 
b/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
new file mode 100644
index 00..1b2648f64d
--- /dev/null
+++ b/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+   smbios {
+   compatible = "u-boot,sysinfo-smbios";
+
+   smbios {
+   system {
+   product = "eDPU";
+   };
+
+   baseboard {
+   product = "eDPU";
+   };
+
+   chassis {
+   product = "eDPU";
+   };
+   };
+   };
+};
+
+ {
+   u-boot,dm-pre-reloc;
+
+   spi-flash@0 {
+   u-boot,dm-pre-reloc;
+   };
+};
+
+ {
+   u-boot,dm-pre-reloc;
+};
+
+ {
+   /* G.hn does not work without additional configuration */
+   status = "disabled";
+};
+
+ {
+   fixed-link {
+   speed = <1000>;
+   full-duplex;
+   };
+};
diff --git a/arch/arm/dts/armada-3720-eDPU.dts 
b/arch/arm/dts/armada-3720-eDPU.dts
new file mode 100644
index 00..57fc698e55
--- /dev/null
+++ b/arch/arm/dts/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";
+};
+
+ {
+   phy-mode = "2500base-x";
+};
diff --git a/arch/arm/dts/armada-3720-uDPU.dts 
b/arch/arm/dts/armada-3720-uDPU.dts
index f21a855fc6..a75734d88a 100644
--- a/arch/arm/dts/armada-3720-uDPU.dts
+++ b/arch/arm/dts/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 
- */
  
  /dts-v1/;
  
-#include 

-#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 = <0x 0x 0x 0x2000>;
-   };
-
-   leds {
-   compatible = "gpio-leds";
-
-   led-power1 {
-   label = "udpu:green:power";
-   gpios = < 11 GPIO_ACTIVE_LOW>;
-   };
-
-   led-power2 {
-   label = "udpu:red:power";
-   gpios = < 12 GPIO_ACTIVE_LOW>;
-  

Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-06-03 Thread Robert Marko
On Fri, Jun 3, 2022 at 11:42 AM Stefan Roese  wrote:
>
> On 02.06.22 23:58, Pali Rohár wrote:
> > On Monday 23 May 2022 11:20:27 Pali Rohár wrote:
> >> On Monday 23 May 2022 11:18:23 Robert Marko wrote:
> >>> On Mon, May 23, 2022 at 10:20 AM Pali Rohár  wrote:
> 
>  On Friday 20 May 2022 13:46:32 Robert Marko wrote:
> > Changes in v4:
> > * Remove CMD_PCI as PCI is disabled anyway
> >
> > Changes in v3:
> > * Use DTS-es pending merge upstream
> > * Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI 
> > device
> > as one of the bootable ones.
> > We dont have space constraints, so just re-enable SCSI rather than 
> > making
> > one more config header
> 
>  Hello! Is this SCSI error related to distroboot as for NVMe here?
>  https://patchwork.ozlabs.org/comment/2896154/
> >>>
> >>> Hi Pali, its the same type of error, just for SCSI.
> >>> I see that you posted a possible solution for cases where boards dont have
> >>> one of the listed media enabled.
> >>
> >> Ok! I added guard in new patch for all boot targets, including SCSI, so
> >> it should fix also issue for *DPU boards.
> >
> > Hello! Patch "Set BOOT_TARGET_DEVICES list to enabled peripherals" is
> > now in u-boot-marvell tree, so you could send a patch which disables
> > those unused peripherals in eDPU defconfig file.
> > https://source.denx.de/u-boot/custodians/u-boot-marvell/-/commits/master/
>
> Just to clarify: I originally wanted to push those changes in "master"
> upstream beginning of this week. But decided to defer this until the
> next merge window open, as most of them are not bug fixes.
>
> Still Pali's comment is correct. You could already work on a patch using
> these groundwork patches as basis.

No issues, I was waiting for them to be picked into your tree.
I will whip up a patch to disable SCSI now that it's not required anymore.

Regards,
Robert
>
> Thanks,
> Stefan
>
> >>> Regards,
> >>> Robert
> 
> > Changes in v2:
> > * Correct the PHY mode to 2500Base-X
> > * Add the DTB to Makefile
> > * Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present
> >>>
> >>>
> >>>
> >>> --
> >>> Robert Marko
> >>> Staff Embedded Linux Engineer
> >>> Sartura Ltd.
> >>> Lendavska ulica 16a
> >>> 1 Zagreb, Croatia
> >>> Email: robert.ma...@sartura.hr
> >>> Web: www.sartura.hr
>
> Viele Grüße,
> Stefan Roese
>
> --
> DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
1 Zagreb, Croatia
Email: robert.ma...@sartura.hr
Web: www.sartura.hr


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-06-03 Thread Stefan Roese

On 02.06.22 23:58, Pali Rohár wrote:

On Monday 23 May 2022 11:20:27 Pali Rohár wrote:

On Monday 23 May 2022 11:18:23 Robert Marko wrote:

On Mon, May 23, 2022 at 10:20 AM Pali Rohár  wrote:


On Friday 20 May 2022 13:46:32 Robert Marko wrote:

Changes in v4:
* Remove CMD_PCI as PCI is disabled anyway

Changes in v3:
* Use DTS-es pending merge upstream
* Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI device
as one of the bootable ones.
We dont have space constraints, so just re-enable SCSI rather than making
one more config header


Hello! Is this SCSI error related to distroboot as for NVMe here?
https://patchwork.ozlabs.org/comment/2896154/


Hi Pali, its the same type of error, just for SCSI.
I see that you posted a possible solution for cases where boards dont have
one of the listed media enabled.


Ok! I added guard in new patch for all boot targets, including SCSI, so
it should fix also issue for *DPU boards.


Hello! Patch "Set BOOT_TARGET_DEVICES list to enabled peripherals" is
now in u-boot-marvell tree, so you could send a patch which disables
those unused peripherals in eDPU defconfig file.
https://source.denx.de/u-boot/custodians/u-boot-marvell/-/commits/master/


Just to clarify: I originally wanted to push those changes in "master"
upstream beginning of this week. But decided to defer this until the
next merge window open, as most of them are not bug fixes.

Still Pali's comment is correct. You could already work on a patch using
these groundwork patches as basis.

Thanks,
Stefan


Regards,
Robert



Changes in v2:
* Correct the PHY mode to 2500Base-X
* Add the DTB to Makefile
* Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present




--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
1 Zagreb, Croatia
Email: robert.ma...@sartura.hr
Web: www.sartura.hr


Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-06-02 Thread Pali Rohár
On Monday 23 May 2022 11:20:27 Pali Rohár wrote:
> On Monday 23 May 2022 11:18:23 Robert Marko wrote:
> > On Mon, May 23, 2022 at 10:20 AM Pali Rohár  wrote:
> > >
> > > On Friday 20 May 2022 13:46:32 Robert Marko wrote:
> > > > Changes in v4:
> > > > * Remove CMD_PCI as PCI is disabled anyway
> > > >
> > > > Changes in v3:
> > > > * Use DTS-es pending merge upstream
> > > > * Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI 
> > > > device
> > > > as one of the bootable ones.
> > > > We dont have space constraints, so just re-enable SCSI rather than 
> > > > making
> > > > one more config header
> > >
> > > Hello! Is this SCSI error related to distroboot as for NVMe here?
> > > https://patchwork.ozlabs.org/comment/2896154/
> > 
> > Hi Pali, its the same type of error, just for SCSI.
> > I see that you posted a possible solution for cases where boards dont have
> > one of the listed media enabled.
> 
> Ok! I added guard in new patch for all boot targets, including SCSI, so
> it should fix also issue for *DPU boards.

Hello! Patch "Set BOOT_TARGET_DEVICES list to enabled peripherals" is
now in u-boot-marvell tree, so you could send a patch which disables
those unused peripherals in eDPU defconfig file.
https://source.denx.de/u-boot/custodians/u-boot-marvell/-/commits/master/

> > Regards,
> > Robert
> > >
> > > > Changes in v2:
> > > > * Correct the PHY mode to 2500Base-X
> > > > * Add the DTB to Makefile
> > > > * Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present
> > 
> > 
> > 
> > -- 
> > Robert Marko
> > Staff Embedded Linux Engineer
> > Sartura Ltd.
> > Lendavska ulica 16a
> > 1 Zagreb, Croatia
> > Email: robert.ma...@sartura.hr
> > Web: www.sartura.hr


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-05-23 Thread Pali Rohár
On Monday 23 May 2022 11:18:23 Robert Marko wrote:
> On Mon, May 23, 2022 at 10:20 AM Pali Rohár  wrote:
> >
> > On Friday 20 May 2022 13:46:32 Robert Marko wrote:
> > > Changes in v4:
> > > * Remove CMD_PCI as PCI is disabled anyway
> > >
> > > Changes in v3:
> > > * Use DTS-es pending merge upstream
> > > * Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI 
> > > device
> > > as one of the bootable ones.
> > > We dont have space constraints, so just re-enable SCSI rather than making
> > > one more config header
> >
> > Hello! Is this SCSI error related to distroboot as for NVMe here?
> > https://patchwork.ozlabs.org/comment/2896154/
> 
> Hi Pali, its the same type of error, just for SCSI.
> I see that you posted a possible solution for cases where boards dont have
> one of the listed media enabled.

Ok! I added guard in new patch for all boot targets, including SCSI, so
it should fix also issue for *DPU boards.

> Regards,
> Robert
> >
> > > Changes in v2:
> > > * Correct the PHY mode to 2500Base-X
> > > * Add the DTB to Makefile
> > > * Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present
> 
> 
> 
> -- 
> Robert Marko
> Staff Embedded Linux Engineer
> Sartura Ltd.
> Lendavska ulica 16a
> 1 Zagreb, Croatia
> Email: robert.ma...@sartura.hr
> Web: www.sartura.hr


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-05-23 Thread Robert Marko
On Mon, May 23, 2022 at 10:20 AM Pali Rohár  wrote:
>
> On Friday 20 May 2022 13:46:32 Robert Marko wrote:
> > Changes in v4:
> > * Remove CMD_PCI as PCI is disabled anyway
> >
> > Changes in v3:
> > * Use DTS-es pending merge upstream
> > * Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI device
> > as one of the bootable ones.
> > We dont have space constraints, so just re-enable SCSI rather than making
> > one more config header
>
> Hello! Is this SCSI error related to distroboot as for NVMe here?
> https://patchwork.ozlabs.org/comment/2896154/

Hi Pali, its the same type of error, just for SCSI.
I see that you posted a possible solution for cases where boards dont have
one of the listed media enabled.

Regards,
Robert
>
> > Changes in v2:
> > * Correct the PHY mode to 2500Base-X
> > * Add the DTB to Makefile
> > * Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
1 Zagreb, Croatia
Email: robert.ma...@sartura.hr
Web: www.sartura.hr


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-05-23 Thread Pali Rohár
On Friday 20 May 2022 13:46:32 Robert Marko wrote:
> Changes in v4:
> * Remove CMD_PCI as PCI is disabled anyway
> 
> Changes in v3:
> * Use DTS-es pending merge upstream
> * Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI device
> as one of the bootable ones.
> We dont have space constraints, so just re-enable SCSI rather than making
> one more config header

Hello! Is this SCSI error related to distroboot as for NVMe here?
https://patchwork.ozlabs.org/comment/2896154/

> Changes in v2:
> * Correct the PHY mode to 2500Base-X
> * Add the DTB to Makefile
> * Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present


Re: [PATCH v5 2/3] arm: mvebu: add support for Methode eDPU

2022-05-20 Thread Stefan Roese

On 20.05.22 13:46, Robert Marko wrote:

Methode eDPU is an Armada 3720 power 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 which does not
work under U-boot.

In order to reduce duplication, split the uDPU DTS into a common one.

Signed-off-by: Robert Marko 


Reviewed-by: Stefan Roese 

Thanks,
Stefan


---
Changes in v4:
* Remove CMD_PCI as PCI is disabled anyway

Changes in v3:
* Use DTS-es pending merge upstream
* Re-enable SCSI as the Armada 37xx BOOT_TARGET_DEVICES defines SCSI device
as one of the bootable ones.
We dont have space constraints, so just re-enable SCSI rather than making
one more config header

Changes in v2:
* Correct the PHY mode to 2500Base-X
* Add the DTB to Makefile
* Remove SCSI/SATA, PCI and E1000 from defconfig as they are not present
---
  arch/arm/dts/Makefile |   1 +
  arch/arm/dts/armada-3720-eDPU-u-boot.dtsi |  45 ++
  arch/arm/dts/armada-3720-eDPU.dts |  14 ++
  arch/arm/dts/armada-3720-uDPU.dts | 150 +---
  arch/arm/dts/armada-3720-uDPU.dtsi| 160 ++
  configs/eDPU_defconfig|  95 +
  6 files changed, 316 insertions(+), 149 deletions(-)
  create mode 100644 arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
  create mode 100644 arch/arm/dts/armada-3720-eDPU.dts
  create mode 100644 arch/arm/dts/armada-3720-uDPU.dtsi
  create mode 100644 configs/eDPU_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 83630af4f6..c484875585 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -236,6 +236,7 @@ dtb-$(CONFIG_ARCH_MVEBU) += \
armada-3720-db.dtb  \
armada-3720-espressobin.dtb \
armada-3720-turris-mox.dtb  \
+   armada-3720-eDPU.dtb\
armada-3720-uDPU.dtb\
armada-375-db.dtb   \
armada-385-atl-x530.dtb \
diff --git a/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi 
b/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
new file mode 100644
index 00..1b2648f64d
--- /dev/null
+++ b/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/ {
+   smbios {
+   compatible = "u-boot,sysinfo-smbios";
+
+   smbios {
+   system {
+   product = "eDPU";
+   };
+
+   baseboard {
+   product = "eDPU";
+   };
+
+   chassis {
+   product = "eDPU";
+   };
+   };
+   };
+};
+
+ {
+   u-boot,dm-pre-reloc;
+
+   spi-flash@0 {
+   u-boot,dm-pre-reloc;
+   };
+};
+
+ {
+   u-boot,dm-pre-reloc;
+};
+
+ {
+   /* G.hn does not work without additional configuration */
+   status = "disabled";
+};
+
+ {
+   fixed-link {
+   speed = <1000>;
+   full-duplex;
+   };
+};
diff --git a/arch/arm/dts/armada-3720-eDPU.dts 
b/arch/arm/dts/armada-3720-eDPU.dts
new file mode 100644
index 00..57fc698e55
--- /dev/null
+++ b/arch/arm/dts/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";
+};
+
+ {
+   phy-mode = "2500base-x";
+};
diff --git a/arch/arm/dts/armada-3720-uDPU.dts 
b/arch/arm/dts/armada-3720-uDPU.dts
index f21a855fc6..a75734d88a 100644
--- a/arch/arm/dts/armada-3720-uDPU.dts
+++ b/arch/arm/dts/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 
- */
  
  /dts-v1/;
  
-#include 

-#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 = <0x 0x 0x 0x2000>;
-   };
-
-   leds {
-   compatible = "gpio-leds";
-
-   led-power1 {
-   label = "udpu:green:power";
-   gpios = < 11 GPIO_ACTIVE_LOW>;
-   };
-
-   led-power2 {
-   label = "udpu:red:power";
-   gpios = < 12 GPIO_ACTIVE_LOW>;
-