Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#329 - AR9341 needs analog switch reset #5367

Open
openwrt-bot opened this issue Dec 9, 2016 · 0 comments
Open

FS#329 - AR9341 needs analog switch reset #5367

openwrt-bot opened this issue Dec 9, 2016 · 0 comments
Labels

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Dec 9, 2016

vuhuy:

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.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Dec 9, 2016

vuhuy:

Some additions:

On my device (Sitecom WLR2100 v2), a analog switch reset is automatically performed by the bootloader (U-BOOT) when loading the firmware via TFTP to the SDRAM, or booting via boot command line. However, standard booting does not perform a analog switch reset.

In other words, in order to replicate this problem you will need to flash the firmware on the device. Loading it with TFTP will just work fine without problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant