[FS#329] AR9341 needs analog switch reset

LEDE Bugs lede-bugs at lists.infradead.org
Fri Dec 9 10:23:36 PST 2016


A new Flyspray task has been opened.  Details are below. 

User who did this - vuhuy (vuhuy) 

Attached to Project - LEDE Project
Summary - AR9341 needs analog switch reset
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - This is a bug report for the AR9341 SOC on LEDE trunk reboot-2445-gee5a6c1.

I have builded a custom firmware for a unsupported device based on the Atheros DB120 reference board.

The analog port of the ethernet switch needs to be resetted before it can operate.

Part of bootlog without analog reset:

[    2.179262] ag71xx-mdio.1: unknown phy id 'ffff:ffff'


Br-lan is not intialized due no analog switch reset.

Part of bootlog with analog reset:

[    2.059037] ag71xx-mdio.1: Found an AR934X built-in switch


And br-lan is initialized and networking is working fine.

A reset is performed by the function ath79_register_eth (defined in dev-eth.c):

ath79_device_reset_set(AR934X_RESET_ETH_SWITCH);
ath79_device_reset_clear(AR934X_RESET_ETH_SWITCH);


However, no analog reset is performed, for example:

ath79_device_reset_set(AR934X_RESET_ETH_SWITCH);
ath79_device_reset_clear(AR934X_RESET_ETH_SWITCH);

ath79_device_reset_set(AR934X_RESET_ETH_SWITCH_ANALOG);
ath79_device_reset_clear(AR934X_RESET_ETH_SWITCH_ANALOG);


Omitting the analog reset does not break the DB120 builds because the analog reset is already performed by ar934x_nfc_hw_reset in dev-nfc.c.

An easy fix is to do a analog reset in the device's mach file. However, for the sake of consistency and autism, the reset should be performed by ath79_register_eth in dev_eth.c and not by ar934x_nfc_hw_reset in dev_nfc.c. My AR9341 device doesn't even use a NAND flash.

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=329



More information about the lede-bugs mailing list