In last (I hope) revision of OpenWrt driven SoM module we added second ethernet PHY IC to increase functionality of module. Here described IMX6 Ethernet support development process. Support for second ethernet PHY IC to be more precise.
Changes made in hardware:
- shared MDIO interface between two PHY IC (KSZ8081RNAIA);
- RESET pin routed from each IC to Microprocessor.
- CRS_DV pin of each IC pulled up/down to make PHY address for one IC – 0x00, for another IC – 0x03;
Surprisingly non of IC started to work. After powering the module non of PHY IC takes IP address via DHCP. We removed second PHY from PCB to be sure that second IC doesn’t affect first one, removed CRS_DV pull up resistor, cut RST trace from PHY to MCU. Unfortunately PHY IC didn’t start to work. Looks like IC schematic/routing became similar to previous (working) PCB revision but still no link (no IP address taking via DHCP). Magic?
Here we describe steps we passed through troubleshooting process trying to get two working ethernet interfaces.
Step 1. Logs.
Here logs of previous revision of device:
seems that MAC controller detected PHY IC on MDIO bus but unable to recognize it as KSZ8081. Probably some issue with MDIO bus.
Step 2. U-boot.
If something broken under OS check if it works in bootloader:
Problematic device able to link under U-boot!
Let’s try to find any difference between working and problematic devices using mii command.
Dumping of each register on working devices shows that:
- 0h – Basic Control – selected speed is 100 Mbps and Auto-negotiation process enabled
- 1h – Basic Status – PHY IC 100Base full/half, 10Base full/half capable, Auto-negotiation completed and link is Up.
- 2h, 3h – PHY Identifier 1 and PHY Identifier 2 – Manufacturer part number is 0x16 and silicon revision number is A3
while problematic device shows:
What is an issue? Counterfeit IC? After hours spent in thought, googling and reading datasheet discovered:
“…This pin (MDIO) has a weak pull-up, is opendrain, and requires an external 1.0 kΩ pull-up resistor….” . Might it be an issue? Don’t know. Let’s check it.
After soldering pull up resistor:
to our great relief found that PHY IC taken IP address!
Time to solder second PHY IC (left top corner on the photo). Done. Holding my breath I supply power and see that non of them takes IP address. Again.
To be continued.