]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: phy: Add DP8382x phy registration to TI PHY init
authorDan Murphy <dmurphy@ti.com>
Mon, 4 May 2020 21:14:40 +0000 (16:14 -0500)
committerTom Rini <trini@konsulko.com>
Fri, 12 Jun 2020 17:17:23 +0000 (13:17 -0400)
Add the DP8382X generic PHY registration to the TI PHY init file.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Dan Murphy <dmurphy@ti.com>
drivers/net/phy/Kconfig
drivers/net/phy/ti_phy_init.c

index a5a1ff257f9fb58cd5ce0eed4bb63c973e997d5f..b0bd762ac397557f476070fc46e04928e93e4f15 100644 (file)
@@ -252,6 +252,13 @@ config PHY_TI_DP83867
        ---help---
          Adds support for the TI DP83867 1Gbit PHY.
 
+config PHY_TI_GENERIC
+       select PHY_TI
+       bool "Texas Instruments Generic Ethernet PHYs support"
+       ---help---
+         Adds support for Generic TI PHYs that don't need special handling but
+         the PHY name is associated with a PHY ID.
+
 config PHY_VITESSE
        bool "Vitesse Ethernet PHYs support"
 
index 277b29a26342bba645aa78a051a168a1b422750a..50eff77692f1573a6b3fad125874f0828ca730d0 100644 (file)
@@ -7,12 +7,95 @@
  * Copyright (C) 2019-20 Texas Instruments Inc.
  */
 
+#include <phy.h>
 #include "ti_phy_init.h"
 
+#ifdef CONFIG_PHY_TI_GENERIC
+static struct phy_driver dp83822_driver = {
+       .name = "TI DP83822",
+       .uid = 0x2000a240,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83826nc_driver = {
+       .name = "TI DP83826NC",
+       .uid = 0x2000a110,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83826c_driver = {
+       .name = "TI DP83826C",
+       .uid = 0x2000a130,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83825s_driver = {
+       .name = "TI DP83825S",
+       .uid = 0x2000a140,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83825i_driver = {
+       .name = "TI DP83825I",
+       .uid = 0x2000a150,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83825m_driver = {
+       .name = "TI DP83825M",
+       .uid = 0x2000a160,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+
+static struct phy_driver dp83825cs_driver = {
+       .name = "TI DP83825CS",
+       .uid = 0x2000a170,
+       .mask = 0xfffffff0,
+       .features = PHY_BASIC_FEATURES,
+       .config = &genphy_config_aneg,
+       .startup = &genphy_startup,
+       .shutdown = &genphy_shutdown,
+};
+#endif /* CONFIG_PHY_TI_GENERIC */
+
 int phy_ti_init(void)
 {
 #ifdef CONFIG_PHY_TI_DP83867
        phy_dp83867_init();
 #endif
+
+#ifdef CONFIG_PHY_TI_GENERIC
+       phy_register(&dp83822_driver);
+       phy_register(&dp83825s_driver);
+       phy_register(&dp83825i_driver);
+       phy_register(&dp83825m_driver);
+       phy_register(&dp83825cs_driver);
+       phy_register(&dp83826c_driver);
+       phy_register(&dp83826nc_driver);
+#endif
        return 0;
 }