aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy/ar8216.h
Commit message (Collapse)AuthorAgeFilesLines
* ar8216: add swconfig attributes for ARL table flushingFelix Fietkau2015-07-151-0/+8
| | | | | | | | Add swconfig attributes for flushing the ARL table globally or per port. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46382 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add ARL table flushing per portFelix Fietkau2015-07-151-2/+4
| | | | | | | | | | | | | Adds functions for flushing ARL table entries per port. Successfully tested on AR8327. Implementation for AR8216/AR8236/AR8316 is based on the AR8236 datasheet and assumes that the three chips share a common ATU register layout. Compile-tested only for AR8216/AR8236/AR8316. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46380 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add reading ARL table for AR8216/AR8236/AR8316Felix Fietkau2015-07-151-4/+21
| | | | | | | | | | | | | | | | Adds the chip-specific part of reading ARL table for AR8216/AR8236/AR8316. It's based on the AR8236 datasheet and compile-tested only as I couldn't find datasheets for AR8216/AR8316 and don't own devices with these chips. The existing ar8216_atu_flush implementation was used for all three chip types, therefore I guess they share a common ATU register layout. More testing would be appreciated. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46379 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: prefix mii_xxx functions to avoid kernel namespace pollutionFelix Fietkau2015-01-241-2/+2
| | | | | | | | | Prefix the exported mii_xxx32 functions with ar8xxx_ to avoid kernel namespace pollution. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44105 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add swconfig attribute to display ARL table on AR8327/AR8337Felix Fietkau2015-01-241-0/+37
| | | | | | | | | | | | | | Add global read-only swconfig attribute "arl_table" to display the address resolution table. So far the chip-specific part is implemented for AR8327/AR8337 only as I don't have the datasheets for the other AR8XXX chips. Successfully tested on TL-WDR4300 (AR8327rev2) and TL-WDR4900 (AR8327rev4). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44104 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: decrease page switch wait timeFelix Fietkau2015-01-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | Until a few years ago the page switch wait time was set to msleep(1) what was changed to usleep_range(1000, 2000) later. I can not imagine that a low-level operation like switching page on register level takes so much time. Most likely the value of 1ms was initially set to check whether it fixes an issue and then remained w/o further checking whether also a smaller value would be sufficient. Now the wait time is set to 5us and I successfully tested this on AR8327. IMHO 5us should be plenty of time for all supported chips. However I couldn't test this due to missing hardware. If other chips should need a longer wait time we can add the wait time as a parameter to the ar8xxx_chip struct. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44103 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add link change detection for switch portsFelix Fietkau2015-01-241-0/+1
| | | | | | | | | | Check for switch port link changes and - flush ATU in case of a change - report link change via syslog Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44102 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: add 802.3az EEE info to swconfig get_link attributeFelix Fietkau2015-01-181-0/+3
| | | | | | | | | | | | | AR8327/AR8337 allow to read the result of EEE autonegotiation. If EEE is autonegotiated between the link partners, display this as part of the swconfig get_link attribute. eee100: 100MBit EEE supported by both link partners eee1000: 1GBit EEE supported by both link partners Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44022 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: introduce enable_eee swconfig attribute to control 802.3az EEE per portFelix Fietkau2015-01-181-0/+9
| | | | | | | | | | | | | | | | Users reported network issues with AR8327 which turned out to be caused by EEE not working correctly with certain link partners (ticket 14597). The workaround was to disable EEE on all ports (changeset 41577). The issue was with certain link partners only, therefore this patch allows to control usage of EEE per port via swconfig. Still the default is to initially disable EEE on all ports. Successfully tested on a TL-WDR4900 (AR8327 rev.4) Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44021 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: introduce ar8xxx_reg_clear complementing ar8xxx_reg_setJohn Crispin2015-01-171-0/+6
| | | | | | | | Introduce ar8xxx_reg_clear complementing ar8xxx_reg_set. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44004 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out AR8327/AR8337-specific driver code into ar8327.cFelix Fietkau2015-01-051-0/+76
| | | | | | | | | | Move all AR8327/AR8337-specific driver code into a separate source file ar8327.c and adjust patches so that ar8327.c is compiled if CONFIG_AR8216_PHY is set. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43845 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: move definitions from ar8216.c to ar8216.h and introduce ar8327.hFelix Fietkau2015-01-051-168/+140
| | | | | | | | | | Move several structure definitions and #defines from ar8216.c to ar8216.h and move AR8327/AR8337 header stuff into a new header file ar8327.h. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43844 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: enable cpu port to receive arp and broadcast frames for ar8236Felix Fietkau2014-12-121-0/+3
| | | | | | Signed-off-by: Weijie Gao <hackpascal@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43668 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: factor out reg_port_stats_base parameters to ar8xxx_chipJohn Crispin2014-12-011-6/+0
| | | | | | | | | Factor out reg_port_stats_base parameters to ar8xxx_chip. Remove related chip_is_... checks. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43471 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: introduce global constant for number of PHYsFelix Fietkau2014-11-191-1/+0
| | | | | | | | | | All supported switches have 5 PHYs. Currently partially 5 is hardcoded and partially switch-specific constants exist. Replace them with a global constant. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43328 3c298f89-4303-0410-b956-a3cf2f4a3e73
* ar8216: disable EEE by default on AR8327 to fix stability issues (#14597)Felix Fietkau2014-07-101-0/+3
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41577 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add custom LED support for the AR8327 switchGabor Juhos2014-01-201-0/+3
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39338 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add AR8337N switch supportGabor Juhos2013-11-291-0/+2
| | | | | | | | | | | | | | | | | This patch is needed to use the switch inside the Sitecom WLR-8100; it was unusable and detected as Generic-Phy before. since ar8337 is behaving like ar8327 generally do the same thing see: https://forum.openwrt.org/viewtopic.php?pid=214218#p214218 forward-ported to trunk Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> Patchwork: http://patchwork.openwrt.org/patch/4469/ [juhosg: merge chip_is_ar83[23]7 statements in ar8xxx_phy_config_init] Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38952 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: allow to specify SGMII config via platform dataGabor Juhos2013-05-301-0/+6
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36798 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add port mirroringLuka Perkov2013-05-241-0/+8
| | | | | | | | | | | | | | | Tested on Buffalo WZR-600DHP with ar8316 switch. Commands used to mirror both RX and TX traffic from LAN port 1 to LAN port 4: $ swconfig dev switch0 set enable_mirror_rx 1 $ swconfig dev switch0 set enable_mirror_tx 1 $ swconfig dev switch0 set mirror_monitor_port 4 $ swconfig dev switch0 set mirror_source_port 1 Signed-off-by: Colin Leitner <colin.leitner@googlemail.com> Tested-by: Luka Perkov <luka@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36713 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add defines for the AR8316 POSTRIP registerGabor Juhos2013-02-101-0/+30
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35539 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add sgmii_delay_en field to ar8327_platform_dataGabor Juhos2012-12-251-0/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34881 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add MIB counter support for the AR8216 switch as wellGabor Juhos2012-11-181-0/+40
| | | | | | | | Thanks to Jonas Gorski for the reference URL. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34245 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: rename AR8216_*_STATS_* definesGabor Juhos2012-11-181-42/+42
| | | | | | | | | | | The names are misleading, those are only valid from AR8236. The AR8216 chip uses different offsets. Thanks to Jonas Gorski for the report. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34244 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic ar8216: allow to read/reset MIB counters via swconfigGabor Juhos2012-11-181-0/+61
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34243 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: allow to configure AR8327 LEDs via platform dataGabor Juhos2012-06-191-0/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32456 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add revision specific PHY fixups for AR8327Gabor Juhos2012-05-291-0/+2
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@32000 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: replace chip_type field with chip_{ver,rev} in ar8216_privGabor Juhos2012-05-291-9/+0
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31999 3c298f89-4303-0410-b956-a3cf2f4a3e73
* generic: ar8216: add support for the AR8327 chipGabor Juhos2012-03-181-0/+142
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31011 3c298f89-4303-0410-b956-a3cf2f4a3e73
* kernel: ar8216: add support for the AR8236 switchGabor Juhos2011-11-121-1/+18
| | | | git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28993 3c298f89-4303-0410-b956-a3cf2f4a3e73
* rename target/linux/generic-2.6 to genericFelix Fietkau2010-06-261-0/+187
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21952 3c298f89-4303-0410-b956-a3cf2f4a3e73