diff options
author | Robert Marko <robert.marko@sartura.hr> | 2023-08-03 13:16:05 +0200 |
---|---|---|
committer | Robert Marko <robert.marko@sartura.hr> | 2023-09-19 12:12:17 +0200 |
commit | d6ac365e42ea2ad76e73b1d9fb42681063d143a0 (patch) | |
tree | 0f2b7dc5812494c34a85411a546b420e0b4e232e /target/linux/mvebu | |
parent | 2bb418299d165e8959911580ebd85b3ef773ed70 (diff) | |
download | openwrt-d6ac365e42ea2ad76e73b1d9fb42681063d143a0.tar.gz openwrt-d6ac365e42ea2ad76e73b1d9fb42681063d143a0.tar.bz2 openwrt-d6ac365e42ea2ad76e73b1d9fb42681063d143a0.zip |
mvebu: eDPU: add support for version with external switch
New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
cage and G.hn IC instead of connecting them directly to the ethernet
controllers.
The same image can be used on both versions as U-Boot will enable the
switch node and disable the unused ethernet controller.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Diffstat (limited to 'target/linux/mvebu')
-rw-r--r-- | target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network | 9 | ||||
-rw-r--r-- | target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts | 47 |
2 files changed, 55 insertions, 1 deletions
diff --git a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network index 489090d77c..6789edb861 100644 --- a/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/cortexa53/base-files/etc/board.d/02_network @@ -21,9 +21,16 @@ globalscale,espressobin-ultra) ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" "wan" ;; marvell,armada-3720-db|\ -methode,udpu|\ +methode,udpu) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; methode,edpu) + # eDPU+ has a 88E6361 switch, so we check for it + if ip link | grep -q uplink; then + ucidef_set_interfaces_lan_wan "downlink" "uplink" + else ucidef_set_interfaces_lan_wan "eth1" "eth0" + fi ;; *) ucidef_set_interface_lan "eth0" diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts index 4db8b946df..35f107b63b 100644 --- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts +++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts @@ -17,3 +17,50 @@ ð0 { phy-mode = "1000base-x"; }; + +/* + * External MV88E6361 switch is only available on v2 of the board. + * U-Boot will enable the MDIO bus and switch nodes. + */ +&mdio { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&smi_pins>; + + /* Actual device is MV88E6361 */ + switch: switch@0 { + compatible = "marvell,mv88e6190"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "cpu"; + phy-mode = "2500base-x"; + managed = "in-band-status"; + ethernet = <ð0>; + }; + + port@9 { + reg = <9>; + label = "downlink"; + phy-mode = "2500base-x"; + managed = "in-band-status"; + }; + + port@a { + reg = <10>; + label = "uplink"; + phy-mode = "2500base-x"; + managed = "in-band-status"; + sfp = <&sfp_eth1>; + }; + }; + }; +}; |