summaryrefslogtreecommitdiffstats
path: root/target/linux/generic/files/drivers/net/phy
Commit message (Collapse)AuthorAgeFilesLines
* kernel: adm6996: add support for ADM6996L and GPIO interfaceHauke Mehrtens2013-11-092-127/+467
| | | | | | | | | | | | | | | | | This patch makes it possible to use adm6996.c on first generation BCM47XX devices with ADM switches. The GPIO bit banging protocol implementation was copied from the old switch driver and adapted to this driver and changed to the mainline kernel GPIO interface. The ADM6996L is different from the ADM6996M which is supported, for both specs are available in the Internet. This was tested on a WRT54GS version 1.0, thank you Dirk Neukirchen for the device. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 38698
* kernel: make swconfig checkpath compliantFlorian Fainelli2013-10-241-35/+40
| | | | | | | | Fix the warnings and errors reported by checkpatch on swconfig.c Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 38523
* kernel: b53: add switch name into printk when it fails.Hauke Mehrtens2013-10-061-1/+1
| | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 38307
* kernel: b53: add Register Access Bridge Registers (SRAB) interfaceHauke Mehrtens2013-09-253-0/+388
| | | | | | | | The SRAB interface is used on BCM4707 and BCM5301X SoCs. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 38198
* kernel: b53: detect revision of BCM5325Hauke Mehrtens2013-09-152-1/+9
| | | | | | | | | The revision is stored in a different register than it is in other Broadcom switches. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37995
* kernel: b53: fix vlan write for BCM5325 revison 3+Hauke Mehrtens2013-09-151-2/+7
| | | | | | | | | These switches are integrated in some recent BCM53XX and BCM47XX SoCs like the BCM53572. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37994
* kernel: b53: use hard coded switch reset gpio on some boards.Hauke Mehrtens2013-09-141-2/+10
| | | | | | | | | | | | The Linksys wrt310n v1 does not have a robo_reset config variable in nvram, but GPIO Pin 8 is the pin needed for resetting the external switch, Linksys hard coded it into their source code. Thank you Devastator for testing. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37988
* kernel: b53: add soft reset for BCM539x switchesHauke Mehrtens2013-09-142-0/+12
| | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37987
* kernel: b53: support phy ids for BCM5365Jonas Gorski2013-09-052-2/+28
| | | | | | | | | | | | BCM5365 (and probably other older variants) use a different phy id, so the phy driver never attached for them. Fix this by adding the appropriate phy id to the fixup and the phy driver. Reported-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 37906
* kernel: b53: allow access the MIB counters on BCM5365Hauke Mehrtens2013-09-041-1/+1
| | | | | | | | | | b53_no_ops has no elements and b53_port_ops has one element, this makes the code access some random memory when trying to access the mib counter functions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37895
* rtl8367: add support for configuring the VLAN FIDFelix Fietkau2013-08-121-0/+7
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37760
* kernel: b53: use devm_gpio_request_one() to request gpioHauke Mehrtens2013-08-011-3/+4
| | | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37648
* kernel: b53: add support for GPIO resetHauke Mehrtens2013-08-012-0/+43
| | | | | | | | This is needed for some switches used on bcm47xx SoCs like the one on the Asus RT-N66U. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> SVN-Revision: 37645
* strict_strtoul is obsolete, use kstrtoul insteadJohn Crispin2013-07-271-1/+1
| | | | | | | | based on http://patchwork.openwrt.org/patch/3827/ Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 37562
* brcm47xx: use b53 phy driver for the switch in kernel 3.10Hauke Mehrtens2013-07-141-0/+5
| | | | | | | | | | This makes it possible to use swconfig to controll the switch. This was tested with devices using b43 and bgmac. This was not tested on devices using tg3. This does not support the adm switch used in some very old devices. SVN-Revision: 37304
* generic: add port mirroring/monitoring capability to rtl8366rb switchGabor Juhos2013-06-041-1/+230
| | | | | | | | | | This patch adds swlib attributes to the RTL8366RB switch/PHY found in the TL-WR1043ND router that allow to mirror ethernet packets to a monitor port. Signed-off-by: Colin Leitner <colin.leitner@googlemail.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36847
* generic: ar8216: allow to specify SGMII config via platform dataGabor Juhos2013-05-302-3/+28
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36798
* generic: ar8216: add get_port_link callbackGabor Juhos2013-05-301-2/+17
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36797
* generic: ar8216: show chip revision in the kernel logGabor Juhos2013-05-301-2/+3
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36791
* generic: ar8216: add port mirroringLuka Perkov2013-05-242-0/+318
| | | | | | | | | | | | | | | 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> SVN-Revision: 36713
* kernel: add missing PHY ID for an AR8327 switch variantFelix Fietkau2013-05-131-0/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 36630
* kernel: b53: use correct oops for bcm5365 switchHauke Mehrtens2013-05-091-1/+1
| | | | SVN-Revision: 36589
* generic: fix rtl8366_smi compile warningJohn Crispin2013-04-251-1/+1
| | | | | | | | | drivers/net/phy/rtl8366_smi.c: In function 'rtl8366_sw_set_vlan_ports': drivers/net/phy/rtl8366_smi.c:1125:6: warning: 'pvid' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36442
* fix rtl8366s OF bindingJohn Crispin2013-04-121-2/+2
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36323
* unbreak portmapping - typo fixJohn Crispin2013-04-091-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36293
* allow loading port maps from OFJohn Crispin2013-04-091-0/+73
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36283
* generic: rtl8367: add compatible string with vendor prefixGabor Juhos2013-04-061-0/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36230
* generic: rtl8367b: fix rtl8367b_extif_init_ofGabor Juhos2013-04-061-7/+18
| | | | | | | | | | | | * disable external interface if its property is not present * show an error message if the extif property is not valid * use proper error values intead of -1 * fix memory leak * wrap long lines Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36229
* generic: rtl8367: allow to load extif config from OFGabor Juhos2013-04-061-6/+61
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36220
* generic: rtl8367: fix a typo in MODULE_DEVICE_TABLE macroGabor Juhos2013-04-061-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36219
* generic: rtl8367: add vendor prefix to the compatible stringGabor Juhos2013-04-061-1/+1
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36218
* add OF support to rtl8367b driverJohn Crispin2013-04-031-6/+50
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 36159
* generic: ar8216: start AR8327 switch from the probe routineGabor Juhos2013-03-151-1/+19
| | | | | | | | | | | | The AR8327 switch gets its configuration from platform data or from the device-tree. This allows to start it from the probe routine. Doing so makes it usable with ethernet drivers which only connects to the PHY device when the ethernet interface is opened. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36050
* generic: ar8216: add ar8xxx_start helperGabor Juhos2013-03-151-11/+23
| | | | | | | | | Move switch starting code into a separate function. This makes it usable from other places. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36049
* generic: ar8216: add OF configuration support for AR8327Gabor Juhos2013-03-151-1/+52
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36047
* generic: ar8216: separate platform_data based AR8327 codeGabor Juhos2013-03-151-5/+16
| | | | | | | | | | Move platform_data specific configuration code into a separate routine. Do it in preparation for the upcoming OF support. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36046
* generic: ar8216: don't use platform_data in ar8327_init_portGabor Juhos2013-03-151-5/+16
| | | | | | | | | Fetch the PORT_STATUS values in ar8327_hw_init and store those in a private data stucture for later use. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36045
* generic: ar8216: move the ar8327_get_port_init_status functionGabor Juhos2013-03-151-28/+28
| | | | | | | | It will be used in ar8327_probe routine. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36044
* generic: ar8216: simplify and rename ar8327_config_portGabor Juhos2013-03-151-15/+9
| | | | | | | | | | Return with the PORT_STATUS register value instead of writing that directly into the corresponding register. Also rename the function to ar8327_get_port_init_status. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36043
* generic: ar8216: remove superfluous pdata checksGabor Juhos2013-03-151-2/+2
| | | | | | | | | | The presence of the platform data is already verified in ar8327_hw_init, and the driver does not start without that anyway. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 36042
* generic: b53: clear SM_SW_FWD_MODE unconditionally when enabling VLANJonas Gorski2013-02-211-4/+2
| | | | | | | | | | Setting this bit stops BCM53125 (bgmac actually) from receiving any packets. This bit is cleared conditionally in b53_switch_reset and it seems the same is done in bcmrobo.c which never sets that bit again. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 35723
* generic: b53: remove empty spacesJonas Gorski2013-02-211-2/+2
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 35722
* generic: ar8216: cleanup function/variable namesGabor Juhos2013-02-171-110/+110
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35642
* generic: ar8216: rename struct ar8216_priv to ar8xxx_privGabor Juhos2013-02-171-94/+94
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35641
* generic: ar8216: move PHY4 RGMII workaround code out of the loopGabor Juhos2013-02-141-11/+11
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35603
* generic: ar8216: register the switch from the probe routineGabor Juhos2013-02-141-17/+12
| | | | | | | | | | | | | | | | | Currently the switch gets registered when an ethernet driver connects to a PHY of the switch. This method does not work with the ethernet drivers which are connecting to the PHY from their ndo_open callback. With those ethernet drivers, the driver tries to register the switch each time when the etherned device is opened and this causes a deadlock. Move the switch registration into the probe routine to fix this problem. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35602
* ar8216: remove superfluous code from ar8216_config_initGabor Juhos2013-02-111-12/+0
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35562
* generic: ar8216: don't use ethernet device name in register_switchGabor Juhos2013-02-111-3/+4
| | | | | | | | | | The switches are accessed via an MDIO bus. Set the alias to the name of the MDIO bus, and show that in the message along with the name of the switch switch device. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35560
* generic: ar8216: reuse the private data from ar8216_probeGabor Juhos2013-02-111-33/+40
| | | | | | | | | | | The private data of the switch is already allocated in ar8216_priv, assign that to each PHY on the same MDIO bus. Also remove the redundant code from ar8216_config_init. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35559
* generic: ar8216: use phydev instead of pdev everywhereGabor Juhos2013-02-111-33/+33
| | | | | | Signed-off-by: Gabor Juhos <juhosg@openwrt.org> SVN-Revision: 35555