Ok, we have set LAN8720AI phy address to 1. But the problem is linux can’t find PHY of eth1.
[ 19.923786] Generic PHY 20b4000.ethernet-1:02: attached PHY driver [Generic PHY] (mii_bus:phy_addr=20b4000.ethernet-1:02, irq=POLL)
[ 20.166711] fec 2188000.ethernet eth1: Unable to connect to phy
But using phytool I can read it correctly:
phytool eth0/0
ieee-phy: id:0x00221513
ieee-phy: reg:BMCR(0x00) val:0x3000
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 100-half
ieee-phy: reg:BMSR(0x01) val:0x786d
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: -ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber +ext-register
phytool eth0/1
ieee-phy: id:0x0007c0f1
ieee-phy: reg:BMCR(0x00) val:0x3100
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 100-full
ieee-phy: reg:BMSR(0x01) val:0x7829
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: -ext-status +aneg-complete -remote-fault +aneg-capable -link -jabber +ext-register
phytool eth0/2
ieee-phy: id:0x00221513
ieee-phy: reg:BMCR(0x00) val:0x3000
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 100-half
ieee-phy: reg:BMSR(0x01) val:0x786d
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: -ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber +ext-register
We have 3.3v line reset logic and when we disconnect 3.3v (it disconnects LAN8720AI PHY). phytool doesn’t find LAN8720AI on address 1. So PHY is address is set correct.
phytool print eth0/0
ieee-phy: id:0x00221513
ieee-phy: reg:BMCR(0x00) val:0x3000
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 100-half
ieee-phy: reg:BMSR(0x01) val:0x786d
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: -ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber +ext-register
phytool print eth0/1
ieee-phy: id:0xffffffff
ieee-phy: reg:BMCR(0x00) val:0xffff
flags: +reset +loopback +aneg-enable +power-down +isolate +aneg-restart +collision-test
speed: 1000-full
ieee-phy: reg:BMSR(0x01) val:0xffff
capabilities: +100-b4 +100-f +100-h +10-f +10-h +100-t2-f +100-t2-h
flags: +ext-status +aneg-complete +remote-fault +aneg-capable +link +jabber +ext-register
phytool print eth0/2
ieee-phy: id:0x00221513
ieee-phy: reg:BMCR(0x00) val:0x3000
flags: -reset -loopback +aneg-enable -power-down -isolate -aneg-restart -collision-test
speed: 100-half
ieee-phy: reg:BMSR(0x01) val:0x786d
capabilities: -100-b4 +100-f +100-h +10-f +10-h -100-t2-f -100-t2-h
flags: -ext-status +aneg-complete -remote-fault +aneg-capable +link -jabber +ext-register
I’ll now dig into kernel drivers to find out how it tries to find phy. But as you can see 0 address is used as broadcast and we can’t use 0 address when we also use KSZ8041TL/FTL/MLL PHY that is integrated in imx6ull SOM. The problem now is linux can’t find LAN8720AI on address 1, but it’s working and readable. That is strange.