• ethtool not seeing my PHY

    From Ron Eggler@21:1/5 to All on Tue Dec 27 14:27:37 2022
    Hi,

    I'm working on bringing up a SOM. I can boot it into Linux (Yocto build) and I have network access via a Realtex USB -> Ethernet dongle. The board that the SOM sits on, has two PHY chips of type VSC8531 and i patch the device tree with the following
    patch:
    [dts-patch]
    +&eth0 {
    + phy0: ethernet-phy@7 {
    + compatible = "ethernet-phy-ieee802.3-c45";
    + reg = <7>;
    + vsc8531,vddmac = <1800>;
    + vsc8531,edge-slowdown = <0>;
    + vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
    + vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
    + };
    +};
    +
    +&eth1 {
    + phy1: ethernet-phy@7 {
    + compatible = "ethernet-phy-ieee802.3-c45";
    + reg = <7>;
    + vsc8531,vddmac = <1800>;
    + vsc8531,edge-slowdown = <0>;
    + vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
    + vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
    + };
    +};
    [/dts-patch]
    When I boot the system, devices eth0 & eth1 appear like:
    [ip link]
    4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 7a:fb:90:5e:ff:90 brd ff:ff:ff:ff:ff:ff
    5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 26:4e:be:df:c3:96 brd ff:ff:ff:ff:ff:ff
    /ip link]
    but ethtool says for eth0 & eth1 the following:
    # ethtool eth0
    Settings for eth0:
    Cannot get device settings: No such device
    Supports Wake-on: g
    Wake-on: d
    Current message level: 0x000000cc (204)
    link timer rx_err tx_err
    Link detected: no
    it appears like a MAC has been assigned but when I plug-in a network cable, the link won't come up. I have tried the following (after the RJ-45 was plugged-in):
    # ifconfig eth0 up
    [ 1204.926217] ravb 11c20000.ethernet eth0: failed to connect PHY
    ifconfig: SIOCSIFFLAGS: No such file or directory
    # ifconfig eth1 up
    [ 1208.334088] ravb 11c30000.ethernet eth1: failed to connect PHY
    ifconfig: SIOCSIFFLAGS: No such file or directory

    # networkctl status
    just says: "State: no-carrier"

    kernel:
    I have added to the config:
    CONFIG_MICROSEMI_PHY=y
    before I compiled the kernel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)