Other Parts Discussed in Thread: DP83869, AM5728
Hello,
I'm Michal and I contine work from related question ("+ Ask related question" did not work, high resistance page was shown) so I ask this question there.
I continue on original question autrhor's work. The objective is to get LAN7801+DP83869HM network card to work under GNU/Linux. We are using fiber optic cable with SFP module.
Software environment:
Linux:
Linux con-rpi 5.6.19-v7+ #10 SMP Thu Jul 23 09:40:03 CEST 2020 armv7l GNU/Linux, commit 8b69e4465cafcc9fee715ed4f877e12b696fdd9c, repository github.com/.../linux.git
Device tree:
compatible = "raspberrypi,3-compute-module\0brcm,bcm2837";
serial-number = "000000002ace7356";
model = "Raspberry Pi Compute Module 3 Plus Rev 1.0";
DP83869HM driver:
./drivers/net/phy/dp83869.c
LAN7801 driver:
./drivers/net/usb/lan78xx.c
I modified the drivers to add:
* logging to kernel ring buffer
* LAN7801 register dump
* DP83869HM register dump
* MDIO communication dump
I attach all dumps and driver modifications:
/cfs-file/__key/communityserver-discussions-components-files/138/2248.dp83869.c.diff
/cfs-file/__key/communityserver-discussions-components-files/138/4774.lan78xx.c.diff
/cfs-file/__key/communityserver-discussions-components-files/138/mac_5F00_regs_5F00_mdio.txt
/cfs-file/__key/communityserver-discussions-components-files/138/phy_5F00_regs.txt
Note the MDIO traffic changes several PHY registers.
Symptoms:
Under Linux, no IP is being assigned to the network interface with LAN7801+DP83869HM network card. The MAC and PHY drivers are loaded, registers of both ICs are visible.
$ dmesg
[ 1371.983533] libphy: lan78xx-mdiobus: probed
[ 1371.983548] lan78xx 1-1.4:1.0 (unnamed net_device) (uninitialized): int urb period 64
[ 1371.983554] lan78xx_phy_init
[ 1371.983559] lan7801_phy_init
[ 1371.983567] lan7801_phy_init EXTERNAL PHY detected
[ 1371.983572] lan78xx_phy_init dt node 00000000
[ 1371.983582] dp83869_phy_reset
[ 1371.984074] dp83869_config_init
[ 1371.984079] dp83869_configure_mode
[ 1371.986966] dp83869_config_port_mirroring
[ 1372.115212] dp83869_config_init
[ 1372.115217] dp83869_configure_mode
[ 1372.118055] dp83869_config_port_mirroring
[ 1372.245358] dp83869_ack_interrupt
[ 1372.245774] lan78xx_mdiobus_read: *(0x0013, INTERRUPT_STATUS ) = 0x0000
[ 1372.245781] dp83869_ack_interrupt: INTERRUPT_STATUS (0x0013) = 0x0000
[ 1372.249429] lan78xx_print_regs
[ 1372.286096] lan78xx_probe: dt node 43826fd4
[ 1372.286104] lan78xx_probe: dt node name: usb-port@10
[ 1372.286286] usbcore: registered new interface driver lan78xx
[ 1372.380716] 8021q: adding VLAN 0 to HW filter on device eth1
$ ip a
...
8: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 00:80:0f:78:03:cd brd ff:ff:ff:ff:ff:ff
...
Work progress:
1) Modified drivers
2) Analyzed registers and PHY setup under Linux (MDIO bus connected among MAC and PHY)
3) Analyzed MAC registers from Windows with working network card (MDIO bus disconnected)
4) Replicated MAC register settings from Windows to Linux
Conclusions:
1) It seems the MAC does not receive IRQ from the PHY.
2) It seems the PHY does not meed conditions to generate an IRQ.
Questions:
1) What do you suggest to do next to achieve the objective?
Best regards,
Michal Risa