X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Fphy.h;h=d117fc1634b071a6da4bd90206619840618c0dcf;hb=0347960b8732b8d8506c9123c217b503666a4ad8;hp=f0f522a9c2f33350e923d6b4fb9081d56e99a929;hpb=3be2bdf5dc69b3142c1162a59bc67191c9077567;p=karo-tx-uboot.git diff --git a/include/phy.h b/include/phy.h index f0f522a9c2..d117fc1634 100644 --- a/include/phy.h +++ b/include/phy.h @@ -1,6 +1,6 @@ /* * Copyright 2011 Freescale Semiconductor, Inc. - * Andy Fleming + * Andy Fleming * * SPDX-License-Identifier: GPL-2.0+ * @@ -32,13 +32,16 @@ #define PHY_10G_FEATURES (PHY_GBIT_FEATURES | \ SUPPORTED_10000baseT_Full) +#ifndef PHY_ANEG_TIMEOUT #define PHY_ANEG_TIMEOUT 4000 +#endif typedef enum { PHY_INTERFACE_MODE_MII, PHY_INTERFACE_MODE_GMII, PHY_INTERFACE_MODE_SGMII, + PHY_INTERFACE_MODE_SGMII_2500, PHY_INTERFACE_MODE_QSGMII, PHY_INTERFACE_MODE_TBI, PHY_INTERFACE_MODE_RMII, @@ -55,6 +58,7 @@ static const char *phy_interface_strings[] = { [PHY_INTERFACE_MODE_MII] = "mii", [PHY_INTERFACE_MODE_GMII] = "gmii", [PHY_INTERFACE_MODE_SGMII] = "sgmii", + [PHY_INTERFACE_MODE_SGMII_2500] = "sgmii-2500", [PHY_INTERFACE_MODE_QSGMII] = "qsgmii", [PHY_INTERFACE_MODE_TBI] = "tbi", [PHY_INTERFACE_MODE_RMII] = "rmii", @@ -125,6 +129,9 @@ struct phy_driver { /* Called when bringing down the controller */ int (*shutdown)(struct phy_device *phydev); + int (*readext)(struct phy_device *phydev, int addr, int devad, int reg); + int (*writeext)(struct phy_device *phydev, int addr, int devad, int reg, + u16 val); struct list_head list; }; @@ -160,6 +167,14 @@ struct phy_device { u32 flags; }; +struct fixed_link { + int phy_id; + int duplex; + int link_speed; + int pause; + int asym_pause; +}; + static inline int phy_read(struct phy_device *phydev, int devad, int regnum) { struct mii_dev *bus = phydev->bus; @@ -210,8 +225,10 @@ int gen10g_startup(struct phy_device *phydev); int gen10g_shutdown(struct phy_device *phydev); int gen10g_discover_mmds(struct phy_device *phydev); +int phy_aquantia_init(void); int phy_atheros_init(void); int phy_broadcom_init(void); +int phy_cortina_init(void); int phy_davicom_init(void); int phy_et1011c_init(void); int phy_lxt_init(void); @@ -223,7 +240,10 @@ int phy_smsc_init(void); int phy_teranetics_init(void); int phy_vitesse_init(void); +int board_phy_config(struct phy_device *phydev); + /* PHY UIDs for various PHYs that are referenced in external code */ +#define PHY_UID_CS4340 0x13e51002 #define PHY_UID_TN2020 0x00a19410 #endif