In last (I hope) revision of OpenWrt driven SoM module we added second ethernet PHY IC to increase functionality of module.
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.
UPD. NetSoM released!
NetSoM related Articles
- OpenWrt driven industrial SoM released!
- OpenWrt NetSoM developers guide. How to compile image.
- OpenWrt NetSom users manual. How to configure network.
- OpenWrt NetSoM users manual. How to configure WI-FI in STA+AP mode.
- OpenWrt NetSoM developers guide. Linux CAN bus. Part 1.
- OpenWrt NetSoM developers guide. Linux CAN bus. Part 2.
- OpenWrt NetSoM users guide. Recording audio to file and playing from.
- OpenWrt NetSoM users guide. Video streaming solution.
- OpenWrt NetSoM users guide. VOIP solution using SIP protocol.
- OpenWrt NetSom developers guide. MicroSD card support.