Hi,
I try for a few days to use Ethernet to download to my kernel image through tftp.
Unfortunately, I can’t really start the connection.
It seems the MAC configuration is okay, my BeagleV-Fire board uses mac1: ethernet@20112000
However, PHY part doesn’t want to start. I always end up with:
ethernet@20112000: PHY present at 9
Could not get PHY for ethernet@20112000: addr 9
phy_connect failed
ping failed; host 192.168.0.100 is not alive
I’m using BeagleV-Fire / BeagleV-Fire-ubuntu · GitLab
to build u-boot, kernel, etc. The repository points to:
commit 8d3dc5ed9dc96348071e5e2cb370581a24013fa0 (HEAD, tag: 2023-11-21)
The dts looks fine:
mac1: ethernet@20112000 {
compatible = "cdns,macb";
reg = <0x0 0x20112000 0x0 0x2000>;
clocks = <&clkcfg CLK_MAC1>, <&clkcfg CLK_AHB>;
clock-names = "pclk", "hclk";
interrupt-parent = <&plic>;
interrupts = <PLIC_INT_MAC1_INT
PLIC_INT_MAC1_QUEUE1
PLIC_INT_MAC1_QUEUE2
PLIC_INT_MAC1_QUEUE3
PLIC_INT_MAC1_EMAC
PLIC_INT_MAC1_MMSL>;
local-mac-address = [00 00 00 00 00 00];
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
};
The board specific dts comes from patch:
&mac1 {
status = "okay";
phy-mode = "sgmii";
phy-handle = <&phy1>;
phy1: ethernet-phy@9 {
reg = <9>;
};
};
U-Boot is at commit b356a897b11ef19dcbe7870530f23f3a978c1714 (HEAD, tag: linux4microchip+fpga-2023.02).
I have tried newer tags. However, without the luck. U-boot build with tag linux4microchip+fpga-2023.09 just hangs with no messages after HSS.
I went through code, but here I have little experience with mac/phy drivers.
So, it’s hard to judge the code flow.
I have noticed one thing, the Realtek PHY support is not even compiled-in for standard u-boot build.
I have added it to the standard config.
woba@fedora:~/work/beaglev-fire/BeagleV-Fire-ubuntu/u-boot$ cat .config | grep PHY
CONFIG_PHYS_64BIT=y
CONFIG_PHYLIB=y
# CONFIG_PHY_ADDR_ENABLE is not set
# CONFIG_PHYLIB_10G is not set
# CONFIG_PHY_AQUANTIA is not set
# CONFIG_PHY_ATHEROS is not set
# CONFIG_PHY_BROADCOM is not set
# CONFIG_PHY_CORTINA is not set
# CONFIG_PHY_DAVICOM is not set
# CONFIG_PHY_ET1011C is not set
# CONFIG_PHY_LXT is not set
# CONFIG_PHY_MARVELL is not set
# CONFIG_PHY_MESON_GXL is not set
# CONFIG_PHY_MICREL is not set
# CONFIG_PHY_MSCC is not set
# CONFIG_PHY_NATSEMI is not set
# CONFIG_PHY_NXP_C45_TJA11XX is not set
CONFIG_PHY_REALTEK=y
# CONFIG_RTL8211X_PHY_FORCE_MASTER is not set
# CONFIG_RTL8211F_PHY_FORCE_EEE_RXC_ON is not set
# CONFIG_RTL8201F_PHY_S700_RMII_TIMINGS is not set
# CONFIG_PHY_SMSC is not set
# CONFIG_PHY_TERANETICS is not set
# CONFIG_PHY_TI is not set
# CONFIG_PHY_TI_DP83867 is not set
# CONFIG_PHY_TI_GENERIC is not set
CONFIG_PHY_VITESSE=y
# CONFIG_PHY_XILINX is not set
# CONFIG_PHY_XILINX_GMII2RGMII is not set
# CONFIG_PHY_FIXED is not set
# CONFIG_PHY_NCSI is not set
# CONFIG_DM_ETH_PHY is not set
# CONFIG_PHY_GIGE is not set
# PHY Subsystem
# CONFIG_PHY is not set
# CONFIG_MIPI_DPHY_HELPERS is not set
But, this didn’t help.
I have seen a few reports regarding the same message for other platforms.
Usually, they mention to fix reset part in device tree. Would that help?
I haven’t noticed any reset line nor reset controller set in the device tree.
Kind regards,
Wojciech Bartczak.