Commit Graph

14 Commits (a8ad7b6efa319d1c2b15d239fe16d3eca389b73a)

Author SHA1 Message Date
Chuanhong Guo f593020a28 ath79: ag71xx: assert a switch reset if defined in dts.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo f43e8f9004 ath79: ag71xx: Explicitly register mdio bus after ag71xx_hw_init() for ar7240
mdio bus isn't a standalone device on ar7240. (and maybe older SoCs?)
Use simple-mfd for ar7241 and later SoCs to get mdio1 ready before gmac0
For ar7240 and older chips, manually create platform device after
ag71xx_hw_init() in ag71xx_probe()to get mdio0 ready between
ag71xx_hw_init() and ag71xx_phy_connect().

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 85189e4c00 ath79: ag71xx: Rework mdio clock settings
Allow specifying desired mdio clock frequency in dts.
Use default frequency around 5MHz for builtin switch and 2MHz for other mdio bus.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 7ae9e63719 ath79: ag71xx: Make builtin switch driver a separated module
This patch did several things:
1. Probe the builtin switch as a separated mdio device.
2. Register a separated mdio bus for builtin switch.
3. Use generic mdio read/write function instead of calling ag71xx_mdio_mii_read/write directly.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 83d2dbc599 ath79: ag71xx: Split mdio driver into an independent platform device.
We need to have mdio1 belonging to gmac1 initialized before gmac0.
Split it into a separated mdio device to get both mdios ready before probing gmac.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 24cbe27bb7 ath79: ag71xx: Remove ar7240_set_addr and ag71xx_ar7240_start
The builtin switch has it's initial valid mac address(00:00:01:00:00:00).
Since the builtin switch is an independent device, setting mac address of gmac1 to builtin switch isn't a good idea and this makes it impossilbe to split builtin switch apart as an independent platform device.
Remove these functions and apply default VLAN during initialization as a preparation for further driver splitting.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Chuanhong Guo 2d081addb5 ath79: ag71xx: Split gmac config into separated file and add support for ar934x/qca955x.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
6 years ago
Mathias Kresin 31aa62c5ec ath79: drop mv88e6063 switch driver
Due do a missing KCONFIG isn't selectable nor enabled in the target
kernel config. Drop it for now and enable/add the driver at the time it
is required.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Lucian Cristian c8e76cd4ff ath79: fix rx ring buffer stall qca956x
when ported from ar71xx to ath79 the qca9560-eth was omitted

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years ago
Weijie Gao 52109ce71f ath79: ag71xx: fix pll-data setting for ar7242/ar934x/qca955x/qca956x
ar71xx/ar913x series use the old pll registers and settings.

However started from ar7242, a new pll register is introduced and the
pll setting is much simpler.

This can be observed from dev-eth.c from the ar71xx target.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
6 years ago
John Crispin 5a6a32ad9b ath79: fix adjust_link callback for ar9130
Signed-off-by: John Crispin <john@phrozen.org>
6 years ago
Johann Neuhauser a7e1e919af ath79: preliminary support for TP-Link WDR3600 / WDR4300 (AR9344)
working:
 - leds
 - buttons
 - lan / wan
 - usb (hub port 1 + 2)
 - wifi 5g
 - sysupgrade
 - ...

not working:
 - wifi 2g

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
Johann Neuhauser c15dfbeea0 ath79: fix gmac compatible in ar9330.dtsi and ag71xx_setup_gmac_933x
1. compatible property in node gmac was wrong

2. ag71xx_setup_gmac_933x should use np of gmac-config and
   not the pointer to gmac. gmac is only used for the reg address.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
6 years ago
John Crispin 53c474abbd ath79: add new OF only target for QCA MIPS silicon
This target aims to replace ar71xx mid-term. The big part that is still
missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
subtargets will follow.

Signed-off-by: John Crispin <john@phrozen.org>
6 years ago