[OpenWrt-Devel] AR8334 switch support

Heiner Kallweit hkallweit1 at gmail.com
Tue Apr 28 14:37:46 EDT 2015


Am 28.04.2015 um 14:15 schrieb Christian Mehlis:
> Am 27.04.2015 um 20:56 schrieb Heiner Kallweit:
>> The only other difference I found is the initial setting of LED_CTRL3 register.
>> Could you please test the following patch (first remove the initial patch attempt)?
> 
> [    0.850000] switch0: Atheros AR833X rev. 2 switch registered on ag71xx-mdio.0
> [    0.860000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: led_val = 3f
> [    0.860000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected AR8337
> 
> It seems that we have no luck here...
> In case you have any new idea I'll test the patch.
> 
> Here is a picture of the switch chip:
> http://c33.imgup.net/2015-04-166a5b.jpg
> 
> Best
> Christian
> .
> 
I found a datasheet for QCA8334 and according to it these bits in LED_CTRl3 are supposed to
be 0 for this chip. But this doesn't seem to be true ..
Meanwhile I'm running out of ideas how to tell between the two chips.

However I have another hypothesis:
The drivers sets bit MAC06_EXCHANGE_EN for AR8337. According to the datasheet this means
"Exchange MAC0 and MAC6". My assumption is that MAC6 is used as CPU port if this bit is set.
Having said this whether to set this bit or not might not be chip-specific but board-specific
(CPU connected to MAC0 vs. MAC6 pins of the switch chip).
AR8334 has no MAC6 (R)GMII pins therefore this bit must not be set.
Not sure how many supported devices actually use an AR8337. Maybe they share some
reference design and use MAC6 in general?
Conclusion would be that the driver can not know whether to set the bit or not. It would
have to be defined in platform configuration or device tree.

I'm not an expert and refactored few parts of the driver only.
Therefore I can not promise any quick results, however I'll have a look at it.

Rgds, Heiner
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list