]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco
authorRomain Gantois <romain.gantois@bootlin.com>
Thu, 26 Jun 2025 16:20:25 +0000 (18:20 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 9 Jul 2025 14:45:27 +0000 (08:45 -0600)
Currently, the Ethernet interface of the BBGE board isn't properly
supported.

To support this interface, describe the MAC<->PHY RGMII link and the
DP83867 PHY in the BBGE device tree. Enable the DP83867 PHY driver in
U-Boot Proper and mux the relevant RGMII lines.

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
Tested-by: Judith Mendez <jm@ti.com>
arch/arm/dts/am335x-bonegreen-eco.dts
board/ti/am335x/mux.c
configs/am335x_evm_defconfig

index f3363d1ebccccead39b82ce40f1f80022b399201..1e9d7fed3fd46f35cd4f92783ffeb81bd878d055 100644 (file)
@@ -7,6 +7,7 @@
 #include "am33xx.dtsi"
 #include "am335x-bone-common.dtsi"
 #include "am335x-bonegreen-common.dtsi"
+#include <dt-bindings/net/ti-dp83867.h>
 
 / {
        model = "TI AM335x BeagleBone Green Eco";
        interrupt-names = "mc";
 };
 
+&cpsw_emac0 {
+       phy-mode = "rgmii-id";
+       phy-handle = <&dp83867_0>;
+};
+
+&davinci_mdio {
+       /delete-node/ ethernet-phy@0;
+
+       dp83867_0: ethernet-phy@0 {
+               reg = <0>;
+               ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+               ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_50_NS>;
+               ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
+               ti,min-output-impedance;
+               ti,dp83867-rxctrl-strap-quirk;
+       };
+};
+
 &baseboard_eeprom {
        /delete-property/ vcc-supply;
 };
index 960de15398f8173bf8a5d55beb3536f97465c38d..4daa59697b17e230ac21ce4c38633b2545ac7788 100644 (file)
@@ -408,6 +408,9 @@ void enable_board_pin_mux(void)
 
                        if (subtype_id == 'L')
                                configure_module_pin_mux(spi0_pin_mux);
+               } else if (board_is_bbge()) {
+                       /* Beaglebone Green Eco pinmux */
+                       configure_module_pin_mux(rgmii1_pin_mux);
                } else {
                        /* Beaglebone LT pinmux */
                        configure_module_pin_mux(mii1_pin_mux);
index 674ad6c06ee75ba3def2397602891c84adee876f..7cd0ffa4dfa8322b78f4a148ed98dd6240f9a8c0 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PHY_ATHEROS=y
 CONFIG_PHY_SMSC=y
+CONFIG_PHY_TI_DP83867=y
 CONFIG_PHY_GIGE=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_CPSW=y