2019-01-28 20:02:20

by Remi Pommarel

[permalink] [raw]
Subject: [PATCH 0/2] Fix espressobin ethernet support on mainline u-boot

This patchset fixes ethernet and mv88e6341 switch support on espressobin
board when bootloader does not initialize needed registers.

This patchset should be applied along with pinctrl fixes from [1] which
have been merged in next branch of linux-pinctrl tree.

[1] https://lkml.org/lkml/2018/12/21/507

Remi Pommarel (2):
arm64: dts: armada-3720-espressobin: Configure RGMII and SMI pins
arm64: dts: armada-3720-espressobin: Set mv88e6341 cpu port as
RGMII-ID

arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 7 +++++++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 +++++
2 files changed, 12 insertions(+)

--
2.20.1



2019-01-28 20:01:19

by Remi Pommarel

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: armada-3720-espressobin: Configure RGMII and SMI pins

In order to be able to communicate with the 88e6341 switch some pins
have to be repurposed as RGMII and SMI pins.

This fixes ethernet support on system booted via a bootloader that
has not already configured those pins (e.g. mainline u-boot, or vendor
u-boot compiled without ethernet support).

Signed-off-by: Remi Pommarel <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 2 ++
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 +++++
2 files changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index 846003bb480c..b60897edc885 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -196,6 +196,8 @@
};

&eth0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&rgmii_pins>, <&smi_pins>;
phy-mode = "rgmii-id";
status = "okay";

diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index e05594ea15fb..f61538910901 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -271,6 +271,11 @@
function = "mii";
};

+ smi_pins: smi-pins {
+ groups = "smi";
+ function = "smi";
+ };
+
sdio_pins: sdio-pins {
groups = "sdio_sb";
function = "sdio";
--
2.20.1


2019-01-28 20:02:19

by Remi Pommarel

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: armada-3720-espressobin: Set mv88e6341 cpu port as RGMII-ID

The mv88e6341 ethernet switch needs the cpu port control register to be
set with TX and RX internal delay in order to work.

This fixes ethernet support on system booted via a bootloader that
has not already configured this register (e.g. mainline u-boot, or
vendor u-boot compiled without ethernet support).

Signed-off-by: Remi Pommarel <[email protected]>
---
arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index b60897edc885..86e8a1e3207f 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -156,6 +156,11 @@
reg = <0>;
label = "cpu";
ethernet = <&eth0>;
+ phy-mode = "rgmii-id";
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
};

port@1 {
--
2.20.1


2019-01-28 20:23:20

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH 2/2] arm64: dts: armada-3720-espressobin: Set mv88e6341 cpu port as RGMII-ID

On Mon, Jan 28, 2019 at 09:07:28PM +0100, Remi Pommarel wrote:
> The mv88e6341 ethernet switch needs the cpu port control register to be
> set with TX and RX internal delay in order to work.
>
> This fixes ethernet support on system booted via a bootloader that
> has not already configured this register (e.g. mainline u-boot, or
> vendor u-boot compiled without ethernet support).
>
> Signed-off-by: Remi Pommarel <[email protected]>

Looks sensible

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2019-02-05 23:50:12

by Gregory CLEMENT

[permalink] [raw]
Subject: Re: [PATCH 0/2] Fix espressobin ethernet support on mainline u-boot

Hi Remi,

On lun., janv. 28 2019, Remi Pommarel <[email protected]> wrote:

> This patchset fixes ethernet and mv88e6341 switch support on espressobin
> board when bootloader does not initialize needed registers.
>
> This patchset should be applied along with pinctrl fixes from [1] which
> have been merged in next branch of linux-pinctrl tree.
>
> [1] https://lkml.org/lkml/2018/12/21/507
>
> Remi Pommarel (2):
> arm64: dts: armada-3720-espressobin: Configure RGMII and SMI pins
> arm64: dts: armada-3720-espressobin: Set mv88e6341 cpu port as
> RGMII-ID
>

Both patches applied to mvebu/dt64

Thanks,

Gregory

> arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 7 +++++++
> arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 5 +++++
> 2 files changed, 12 insertions(+)
>
> --
> 2.20.1
>

--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com