19082eeacSAndy Fleming /* 29082eeacSAndy Fleming * Atheros PHY drivers 39082eeacSAndy Fleming * 49082eeacSAndy Fleming * This program is free software; you can redistribute it and/or 59082eeacSAndy Fleming * modify it under the terms of the GNU General Public License as 69082eeacSAndy Fleming * published by the Free Software Foundation; either version 2 of 79082eeacSAndy Fleming * the License, or (at your option) any later version. 89082eeacSAndy Fleming * 99082eeacSAndy Fleming * This program is distributed in the hope that it will be useful, 109082eeacSAndy Fleming * but WITHOUT ANY WARRANTY; without even the implied warranty of 119082eeacSAndy Fleming * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 129082eeacSAndy Fleming * GNU General Public License for more details. 139082eeacSAndy Fleming * 149082eeacSAndy Fleming * You should have received a copy of the GNU General Public License 159082eeacSAndy Fleming * along with this program; if not, write to the Free Software 169082eeacSAndy Fleming * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 179082eeacSAndy Fleming * MA 02111-1307 USA 189082eeacSAndy Fleming * 199082eeacSAndy Fleming * Copyright 2011 Freescale Semiconductor, Inc. 209082eeacSAndy Fleming * author Andy Fleming 219082eeacSAndy Fleming * 229082eeacSAndy Fleming */ 239082eeacSAndy Fleming #include <phy.h> 249082eeacSAndy Fleming 259082eeacSAndy Fleming static int ar8021_config(struct phy_device *phydev) 269082eeacSAndy Fleming { 279082eeacSAndy Fleming phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05); 289082eeacSAndy Fleming phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x3D47); 299082eeacSAndy Fleming 309082eeacSAndy Fleming return 0; 319082eeacSAndy Fleming } 329082eeacSAndy Fleming 33*06370590SKim Phillips static struct phy_driver AR8021_driver = { 349082eeacSAndy Fleming .name = "AR8021", 359082eeacSAndy Fleming .uid = 0x4dd040, 369082eeacSAndy Fleming .mask = 0xfffff0, 379082eeacSAndy Fleming .features = PHY_GBIT_FEATURES, 389082eeacSAndy Fleming .config = ar8021_config, 399082eeacSAndy Fleming .startup = genphy_startup, 409082eeacSAndy Fleming .shutdown = genphy_shutdown, 419082eeacSAndy Fleming }; 429082eeacSAndy Fleming 439082eeacSAndy Fleming int phy_atheros_init(void) 449082eeacSAndy Fleming { 459082eeacSAndy Fleming phy_register(&AR8021_driver); 469082eeacSAndy Fleming 479082eeacSAndy Fleming return 0; 489082eeacSAndy Fleming } 49