]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mvebu: turris_omnia: Enable networking via ethernet switch
authorMarek Mojík <marek.mojik@nic.cz>
Tue, 19 Dec 2023 09:55:55 +0000 (10:55 +0100)
committerStefan Roese <sr@denx.de>
Tue, 5 Mar 2024 07:27:59 +0000 (08:27 +0100)
The Turris Omnia contains the Marvell 88E6176 ethernet switch. Add
config options and device tree to enable the support.

Signed-off-by: Marek Mojík <marek.mojik@nic.cz>
Signed-off-by: Marek Behún <kabel@kernel.org>
arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi
configs/turris_omnia_defconfig

index 509d6ca69cdd83a059efa7c29d997c6f7e66f70e..c63a331d69b7b0411c0e4ac3907ab97a92a6f947 100644 (file)
        };
 };
 
+&mdio {
+       switch@10 {
+               mdio {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       sw_phy0: ethernet-phy@0 {
+                               reg = <0x0>;
+                       };
+
+                       sw_phy1: ethernet-phy@1 {
+                               reg = <0x1>;
+                       };
+
+                       sw_phy2: ethernet-phy@2 {
+                               reg = <0x2>;
+                       };
+
+                       sw_phy3: ethernet-phy@3 {
+                               reg = <0x3>;
+                       };
+
+                       sw_phy4: ethernet-phy@4 {
+                               reg = <0x4>;
+                       };
+               };
+               ports {
+                       ports@0 {
+                               phy-handle = <&sw_phy0>;
+                               phy-mode = "internal";
+                       };
+                       ports@1 {
+                               phy-handle = <&sw_phy1>;
+                               phy-mode = "internal";
+                       };
+                       ports@2 {
+                               phy-handle = <&sw_phy2>;
+                               phy-mode = "internal";
+                       };
+                       ports@3 {
+                               phy-handle = <&sw_phy3>;
+                               phy-mode = "internal";
+                       };
+                       ports@4 {
+                               phy-handle = <&sw_phy4>;
+                               phy-mode = "internal";
+                       };
+               };
+       };
+};
+
 #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
 &spi0 {
        flash@0 {
index f045dd743097f088ac6de47706e76aab8ab68e92..29148402a1ae72ae67fdca2fca051128db5592f9 100644 (file)
@@ -95,7 +95,9 @@ CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_MTD=y
 CONFIG_PHY_MARVELL=y
 CONFIG_PHY_FIXED=y
+CONFIG_DM_DSA=y
 CONFIG_PHY_GIGE=y
+CONFIG_MV88E6XXX=y
 CONFIG_MVNETA=y
 CONFIG_MII=y
 CONFIG_MVMDIO=y