From 7eaa8aaa9a5930f75cc32a914b706869ad679f5c Mon Sep 17 00:00:00 2001 From: Romain Gantois Date: Thu, 26 Jun 2025 18:20:24 +0200 Subject: net: phy: dp83867: Allow excluding driver from SPL The DP83867 PHY driver is used by the BeagleBoneGreen Eco board, but adding it to the am335x-evm defconfig causes SPL to overflow its size limits. Add a separate option to enable this driver in SPL, so that it can be enabled in U-Boot without adding unnecessary volume to SPL. Signed-off-by: Romain Gantois Tested-by: Judith Mendez --- drivers/net/phy/Kconfig | 4 ++++ drivers/net/phy/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 3132718e4f8..8d88c142900 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -314,6 +314,10 @@ config PHY_TI_DP83867 ---help--- Adds support for the TI DP83867 1Gbit PHY. +config SPL_PHY_TI_DP83867 + select PHY_TI + bool "Texas Instruments Ethernet DP83867 PHY support (SPL)" + config PHY_TI_DP83869 select PHY_TI bool "Texas Instruments Ethernet DP83869 PHY support" diff --git a/drivers/net/phy/Makefile b/drivers/net/phy/Makefile index 2487f366e1c..a119eb5e177 100644 --- a/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile @@ -32,7 +32,7 @@ obj-$(CONFIG_PHY_REALTEK) += realtek.o obj-$(CONFIG_PHY_SMSC) += smsc.o obj-$(CONFIG_PHY_TERANETICS) += teranetics.o obj-$(CONFIG_PHY_TI_GENERIC) += ti_phy_init.o -obj-$(CONFIG_PHY_TI_DP83867) += dp83867.o +obj-$(CONFIG_$(PHASE_)PHY_TI_DP83867) += dp83867.o obj-$(CONFIG_PHY_TI_DP83869) += dp83869.o obj-$(CONFIG_PHY_XILINX) += xilinx_phy.o obj-$(CONFIG_PHY_XILINX_GMII2RGMII) += xilinx_gmii2rgmii.o -- cgit v1.2.3 From 48b1f8a396bfe1b29d2033f3d23861a3f470de58 Mon Sep 17 00:00:00 2001 From: Romain Gantois Date: Thu, 26 Jun 2025 18:20:25 +0200 Subject: board: ti: am33xx: Add Ethernet support for Beaglebone Green Eco 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 Tested-by: Judith Mendez --- arch/arm/dts/am335x-bonegreen-eco.dts | 19 +++++++++++++++++++ board/ti/am335x/mux.c | 3 +++ configs/am335x_evm_defconfig | 1 + 3 files changed, 23 insertions(+) diff --git a/arch/arm/dts/am335x-bonegreen-eco.dts b/arch/arm/dts/am335x-bonegreen-eco.dts index f3363d1ebcc..1e9d7fed3fd 100644 --- a/arch/arm/dts/am335x-bonegreen-eco.dts +++ b/arch/arm/dts/am335x-bonegreen-eco.dts @@ -7,6 +7,7 @@ #include "am33xx.dtsi" #include "am335x-bone-common.dtsi" #include "am335x-bonegreen-common.dtsi" +#include / { model = "TI AM335x BeagleBone Green Eco"; @@ -25,6 +26,24 @@ 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 = ; + ti,tx-internal-delay = ; + ti,fifo-depth = ; + ti,min-output-impedance; + ti,dp83867-rxctrl-strap-quirk; + }; +}; + &baseboard_eeprom { /delete-property/ vcc-supply; }; diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c index 960de15398f..4daa59697b1 100644 --- a/board/ti/am335x/mux.c +++ b/board/ti/am335x/mux.c @@ -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); diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index 674ad6c06ee..7cd0ffa4dfa 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -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 -- cgit v1.2.3