RGMII doesn't work with ksz9031

Hi,
I used micrel,ksz9031 for RGMII.and set the pinmux and GPIOs dtsi.
And set the dts file tegra234-ethernet-3737-0000.dtsi as follow.
tegra234-mb1-bct-pinmux-p3701-0000-a04.dtsi (64.6 KB)
tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi (3.9 KB)
tegra234-ethernet-3737-0000.dtsi (1.4 KB)

After flashed the custom board,there were some error:

[ 11.752779] nvethernet 2310000.ethernet: Adding to iommu group 51
[ 11.759175] nvethernet 2310000.ethernet: failed to read skip mac reset flag, default 0
[ 11.767366] nvethernet 2310000.ethernet: failed to read MDIO address
[ 11.773911] nvethernet 2310000.ethernet: Failed to read nvida,pause_frames, so setting to defaulte
[ 11.784756] nvethernet 2310000.ethernet: setting to default DMA bit mask
[ 11.791681] nvethernet 2310000.ethernet: max-platform-mtu DT entry missing, setting default 1500
[ 11.811213] nvethernet 2310000.ethernet: Ethernet MAC address: 48:b0:2d:94:96:ab
[ 11.819231] nvethernet 2310000.ethernet: Macsec not enabled
[ 11.824970] nvethernet 2310000.ethernet: Macsec: Reduced MTU: 1466 Max: 1500
[ 11.833442] nvethernet 2310000.ethernet: eth0 (HW ver: 53) created with 8 DMA channels
ā€¦
[ 104.494257] nvethernet 2310000.ethernet: failed to connect PHY
[ 104.500401] net eth0: ether_open: Cannot attach to PHY (error: -19)
ā€¦

I can see the eth0 use cmd ā€œip addrā€:

host@1:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 4a:99:1a:53:61:be brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST> mtu 1466 qdisc noop state DOWN group default qlen 1000
link/ether 48:b0:2d:94:96:ab brd ff:ff:ff:ff:ff:ff

But when I link it up,there were some errors:

host@1:~$ sudo ip link set eth0 up
[sudo] password for host:
[ 456.207357] nvethernet 2310000.ethernet: failed to connect PHY
[ 456.213407] net eth0: ether_open: Cannot attach to PHY (error: -19)
RTNETLINK answers: No such device

So,whatā€™s the problem ? I really donā€™t known how to fixed it now,could you help me?
Thanks!

please refer to

Thanksļ¼
I tried it. And it can work now.
I refer to

and

and

There are two ways can make it works.
way #1:
add ā€œfixed-linkā€ to file ā€œplatform/t23x/concord/kernel-dts/cvb/tegra234-ethernet-3737-0000.dtsiā€.
fixed-link{
speed = <1000>;
full-duplex;
}
then comment phy-handle.
//phy-handle = <&rgmii_phy>;
then it can work, But only fixed speed to 1000Mbps.If I want to use 100Mbps,I should change speed = <100>.

way #2:
I Changed the tegra_defconfig . Let ā€œCONFIG_MICREL_PHY=yā€, Because I use ksz9031.
Then I changed tegra234-ethernet-3737-0000.dtsi almost like this:
tegra234-ethernet-3737-0000.dtsi (1.7 KB)

Then it can word with both 100Mbps and 1000Mbps.

Thanks!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.