Re: [U-Boot] [PATCH] arm64: mvebu: Add basic support for uDPU board

2019-01-13 Thread Stefan Roese

On 11.01.19 18:21, Vladimir Vid wrote:

This adds initial support for micro-DPU (uDPU) board which is based on 
Armada-3720 SoC.
micro-DPU is the single-port FTTdp "distribution point unit" made by Methode 
Electronics
which offers complete modularity with replaceable SFP modules both for uplink 
and downlink
(G.hn over twisted-pair, G.hn over coax, 1G and 2.5G Ethernet over Cat-5e 
cable).

On-board features:
- 512 MiB DDR3
- 2 x 2.5G SFP via HSGMII SERDES interface to the A3720 SoC
- USB 2.0 Type-C connector
- 4GB eMMC
- ETSI TS 101548 reverse powering via twisted pair (RJ45) or coax (F Type)

Cc: Luka Perkov 
Cc: Luis Torres 
Cc: Scott Roberts 
Cc: Paul Arola 
Signed-off-by: Vladimir Vid 
---
  arch/arm/dts/Makefile   |1 +
  arch/arm/dts/armada-3720-uDPU.dts   |  197 +++
  board/Marvell/mvebu_armada-37xx/MAINTAINERS |5 +
  configs/uDPU_defconfig  | 1242 +++
  4 files changed, 1445 insertions(+)
  create mode 100644 arch/arm/dts/armada-3720-uDPU.dts
  create mode 100644 configs/uDPU_defconfig

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index dda4e59491..534dde5484 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -95,6 +95,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=   \
armada-3720-db.dtb  \
armada-3720-espressobin.dtb \
armada-3720-turris-mox.dtb  \
+   armada-3720-uDPU.dts\
armada-375-db.dtb   \
armada-388-clearfog.dtb \
armada-388-gp.dtb   \
diff --git a/arch/arm/dts/armada-3720-uDPU.dts 
b/arch/arm/dts/armada-3720-uDPU.dts
new file mode 100644
index 00..edbc7837a7
--- /dev/null
+++ b/arch/arm/dts/armada-3720-uDPU.dts
@@ -0,0 +1,197 @@
+// 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) 2018 Methode
+ * Copyright (C) 2018 Telus
+ *
+ * Vladimir Vid 
+ */
+
+/dts-v1/;
+
+#include "armada-37xx.dtsi"
+
+/ {
+   model = "Methode uDPU Board";
+   compatible = "marvell,armada-3720-db-v2", "marvell,armada3720", 
"marvell,armada3710";
+
+   chosen {
+   stdout-path = "serial0:115200n8";
+   bootargs = "console=ttyMV0,115200 
earlycon=ar3700_uart,0xd0012000";
+   };
+
+   aliases {
+   i2c0 = &i2c0;
+   i2c1 = &i2c1;
+   spi0 = &spi0;
+   };
+
+   memory@0 {
+   device_type = "memory";
+   reg = <0x 0x 0x 0x2000>;
+   };
+
+   mdio: mdio@32004 {
+   #address-cells = <1>;
+   #size-cells = <0>;
+   ethphy0: ethernet-phy@0 {
+reg = <0>;
+   };
+   ethphy1: ethernet-phy@1 {
+   reg = <1>;
+   };
+   };
+
+   scsi: scsi {
+   compatible = "marvell,mvebu-scsi";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   max-id = <1>;
+   max-lun = <1>;
+   status = "okay";
+   };
+
+   i2c1: i2c@11080 {
+   compatible = "marvell,armada-3700-i2c", "simple-bus";
+   pinctrl-names = "default";
+   pinctrl-0 = <&i2c2_pins>;
+   #address-cells = <1>;
+   #size-cells = <0>;
+   reg = <0x11080 0x80>;
+   status = "okay";
+   };
+
+   uart1: serial@12200 {
+   compatible = "marvell,armada-3700-uart-ext";
+   pinctrl-names = "default";
+   pinctrl-0 = <&uart2_pins>;
+   reg = <0x12200 0x30>;
+   interrupts = ;
+   status = "okay";
+   };
+
+   vcc_sd_reg0: regulator@0 {
+   compatible = "regulator-gpio";
+   regulator-name = "vcc_sd0";
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <330>;
+   regulator-type = "voltage";
+   states = <180 0x1
+   330 0x0>;
+   gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
+   };
+
+   sfp_eth0: sfp-eth0 {
+   compatible = "sff,sfp";
+   i2c-bus = <&i2c0>;
+   los-gpio = <&gpiosb 2 GPIO_ACTIVE_HIGH>;
+   mod-def0-gpio = <&gpiosb 3 GPIO_ACTIVE_LOW>;
+   tx-disable-gpio = <&gpiosb 4 GPIO_ACTIVE_HIGH>;
+   tx-fault-gpio = <&gpiosb 5 GPIO_ACTIVE_HIGH>;
+   };
+
+   sfp_eth1: sfp-eth1 {
+   compatible = "sff,sfp";
+   i2c-bus = <&i2c1>;
+   sfp,ethernet = <ð1>;
+   los-gpio = <&gpiosb 7 GPIO_ACTIVE_HIGH>;
+   mod-def0-gpio = <&gpiosb 8 GPIO_ACTIVE_LOW>;
+   tx-disable-

Re: [U-Boot] [PATCH] arm64: mvebu: Add basic support for uDPU board

2019-01-11 Thread Chris Packham
Hi Vladimir,

A few comments below.

On Sat, 12 Jan 2019, 6:18 AM Vladimir Vid  This adds initial support for micro-DPU (uDPU) board which is based on
> Armada-3720 SoC.
> micro-DPU is the single-port FTTdp "distribution point unit" made by
> Methode Electronics
> which offers complete modularity with replaceable SFP modules both for
> uplink and downlink
> (G.hn over twisted-pair, G.hn over coax, 1G and 2.5G Ethernet over Cat-5e
> cable).
>
> On-board features:
> - 512 MiB DDR3
> - 2 x 2.5G SFP via HSGMII SERDES interface to the A3720 SoC
> - USB 2.0 Type-C connector
> - 4GB eMMC
> - ETSI TS 101548 reverse powering via twisted pair (RJ45) or coax (F Type)
>
> Cc: Luka Perkov 
> Cc: Luis Torres 
> Cc: Scott Roberts 
> Cc: Paul Arola 
> Signed-off-by: Vladimir Vid 
> ---
>  arch/arm/dts/Makefile   |1 +
>  arch/arm/dts/armada-3720-uDPU.dts   |  197 +++
>  board/Marvell/mvebu_armada-37xx/MAINTAINERS |5 +
>  configs/uDPU_defconfig  | 1242 +++
>  4 files changed, 1445 insertions(+)
>  create mode 100644 arch/arm/dts/armada-3720-uDPU.dts
>  create mode 100644 configs/uDPU_defconfig
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index dda4e59491..534dde5484 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -95,6 +95,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=   \
> armada-3720-db.dtb  \
> armada-3720-espressobin.dtb \
> armada-3720-turris-mox.dtb  \
> +   armada-3720-uDPU.dts\
> armada-375-db.dtb   \
> armada-388-clearfog.dtb \
> armada-388-gp.dtb   \
> diff --git a/arch/arm/dts/armada-3720-uDPU.dts
> b/arch/arm/dts/armada-3720-uDPU.dts
> new file mode 100644
> index 00..edbc7837a7
> --- /dev/null
> +++ b/arch/arm/dts/armada-3720-uDPU.dts
> @@ -0,0 +1,197 @@
> +// 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) 2018 Methode
> + * Copyright (C) 2018 Telus
> + *
> + * Vladimir Vid 
> + */
> +
> +/dts-v1/;
> +
> +#include "armada-37xx.dtsi"
> +
> +/ {
> +   model = "Methode uDPU Board";
> +   compatible = "marvell,armada-3720-db-v2", "marvell,armada3720",
> "marvell,armada3710";
>

There should probably be a more specific compatible string (e.g.
"methode,udpu" prepened here.

+
> +   chosen {
> +   stdout-path = "serial0:115200n8";
> +   bootargs = "console=ttyMV0,115200
> earlycon=ar3700_uart,0xd0012000";
> +   };
> +
> +   aliases {
> +   i2c0 = &i2c0;
> +   i2c1 = &i2c1;
> +   spi0 = &spi0;
> +   };
> +
> +   memory@0 {
> +   device_type = "memory";
> +   reg = <0x 0x 0x 0x2000>;
> +   };
> +
> +   mdio: mdio@32004 {
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   ethphy0: ethernet-phy@0 {
> +reg = <0>;
> +   };
> +   ethphy1: ethernet-phy@1 {
> +   reg = <1>;
> +   };
> +   };
> +
> +   scsi: scsi {
> +   compatible = "marvell,mvebu-scsi";
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   max-id = <1>;
> +   max-lun = <1>;
> +   status = "okay";
> +   };
> +
> +   i2c1: i2c@11080 {
> +   compatible = "marvell,armada-3700-i2c", "simple-bus";
> +   pinctrl-names = "default";
> +   pinctrl-0 = <&i2c2_pins>;
> +   #address-cells = <1>;
> +   #size-cells = <0>;
> +   reg = <0x11080 0x80>;
> +   status = "okay";
> +   };
> +
> +   uart1: serial@12200 {
> +   compatible = "marvell,armada-3700-uart-ext";
> +   pinctrl-names = "default";
> +   pinctrl-0 = <&uart2_pins>;
> +   reg = <0x12200 0x30>;
> +   interrupts = ;
> +   status = "okay";
> +   };
> +
> +   vcc_sd_reg0: regulator@0 {
> +   compatible = "regulator-gpio";
> +   regulator-name = "vcc_sd0";
> +   regulator-min-microvolt = <180>;
> +   regulator-max-microvolt = <330>;
> +   regulator-type = "voltage";
> +   states = <180 0x1
> +   330 0x0>;
> +   gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>;
> +   };
> +
> +   sfp_eth0: sfp-eth0 {
> +   compatible = "sff,sfp";
> +   i2c-bus = <&i2c0>;
> +   los-gpio = <&gpiosb 2 GPIO_ACTIVE_HIGH>;
> +   mod-def0-gpio = <&gpiosb 3 GPIO_ACTIVE_LOW>;
> +   tx-disab