Hi Jonathan,

<..>
> Here's the relevant lines from dmesg:
> ag71xx_mdio: probed
> eth0: Atheros AG71xx at 0xb9000000, irq 4
> eth0: connected to PHY at ag71xx-mdio:0c [uid=00008201, driver=Generic PHY]

The PHY is at address 0x0c. So the phy mask should be 0x00001000 (1 << 12).

> 
> I don't really understand the mask. I know it determines what phy is
> selected, but I'm in the dark about the correct value.
> I've tried using both b9000000 and 00008201.
> both result in a 'no PHY found with phy_mask' message.

The b9000000 is the address of the ethernet registers, and the 00008201 is the
ID of the PHY.

> 
> 
>>>  set_preinit_iface() {
>>>       ifname=eth0
>>> +     [ $(ar71xx_board_name) = "tl-wa901nd-v2" ] && mii-tool -R
>>> +     /* The TP-link WA901ND V2 requires a hardware reset of
>>> +      * its ethernet port before it will connect.
>>> +      */
>>> +
>>
>> This looks strange. The phy core should reset the PHY automatically. Please 
>> try
>> to add this line into the machine setup code, somewhere before the
>> 'ar71xx_add_device_eth(0)' call:
>>
>> ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC | RESET_MODULE_GE0_PHY;
> 
> That works perfectly. Thank you! Using mii-tool was really bugging me, as 
> well.
> 
> 
> Once the correct phy_mask value is determined, I'll resubmit the patch.

Ok.

Regards,
Gabor
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to