blob: 50eff77692f1573a6b3fad125874f0828ca730d0 [file] [log] [blame]
Dan Murphy8b8d73a2020-05-04 16:14:39 -05001// SPDX-License-Identifier: GPL-2.0
2/*
3 * TI Generic PHY Init to register any TI Ethernet PHYs
4 *
5 * Author: Dan Murphy <dmurphy@ti.com>
6 *
7 * Copyright (C) 2019-20 Texas Instruments Inc.
8 */
9
Dan Murphy3434cd72020-05-04 16:14:40 -050010#include <phy.h>
Dan Murphy8b8d73a2020-05-04 16:14:39 -050011#include "ti_phy_init.h"
12
Dan Murphy3434cd72020-05-04 16:14:40 -050013#ifdef CONFIG_PHY_TI_GENERIC
14static struct phy_driver dp83822_driver = {
15 .name = "TI DP83822",
16 .uid = 0x2000a240,
17 .mask = 0xfffffff0,
18 .features = PHY_BASIC_FEATURES,
19 .config = &genphy_config_aneg,
20 .startup = &genphy_startup,
21 .shutdown = &genphy_shutdown,
22};
23
24static struct phy_driver dp83826nc_driver = {
25 .name = "TI DP83826NC",
26 .uid = 0x2000a110,
27 .mask = 0xfffffff0,
28 .features = PHY_BASIC_FEATURES,
29 .config = &genphy_config_aneg,
30 .startup = &genphy_startup,
31 .shutdown = &genphy_shutdown,
32};
33
34static struct phy_driver dp83826c_driver = {
35 .name = "TI DP83826C",
36 .uid = 0x2000a130,
37 .mask = 0xfffffff0,
38 .features = PHY_BASIC_FEATURES,
39 .config = &genphy_config_aneg,
40 .startup = &genphy_startup,
41 .shutdown = &genphy_shutdown,
42};
43
44static struct phy_driver dp83825s_driver = {
45 .name = "TI DP83825S",
46 .uid = 0x2000a140,
47 .mask = 0xfffffff0,
48 .features = PHY_BASIC_FEATURES,
49 .config = &genphy_config_aneg,
50 .startup = &genphy_startup,
51 .shutdown = &genphy_shutdown,
52};
53
54static struct phy_driver dp83825i_driver = {
55 .name = "TI DP83825I",
56 .uid = 0x2000a150,
57 .mask = 0xfffffff0,
58 .features = PHY_BASIC_FEATURES,
59 .config = &genphy_config_aneg,
60 .startup = &genphy_startup,
61 .shutdown = &genphy_shutdown,
62};
63
64static struct phy_driver dp83825m_driver = {
65 .name = "TI DP83825M",
66 .uid = 0x2000a160,
67 .mask = 0xfffffff0,
68 .features = PHY_BASIC_FEATURES,
69 .config = &genphy_config_aneg,
70 .startup = &genphy_startup,
71 .shutdown = &genphy_shutdown,
72};
73
74static struct phy_driver dp83825cs_driver = {
75 .name = "TI DP83825CS",
76 .uid = 0x2000a170,
77 .mask = 0xfffffff0,
78 .features = PHY_BASIC_FEATURES,
79 .config = &genphy_config_aneg,
80 .startup = &genphy_startup,
81 .shutdown = &genphy_shutdown,
82};
83#endif /* CONFIG_PHY_TI_GENERIC */
84
Dan Murphy8b8d73a2020-05-04 16:14:39 -050085int phy_ti_init(void)
86{
87#ifdef CONFIG_PHY_TI_DP83867
88 phy_dp83867_init();
89#endif
Dan Murphy3434cd72020-05-04 16:14:40 -050090
91#ifdef CONFIG_PHY_TI_GENERIC
92 phy_register(&dp83822_driver);
93 phy_register(&dp83825s_driver);
94 phy_register(&dp83825i_driver);
95 phy_register(&dp83825m_driver);
96 phy_register(&dp83825cs_driver);
97 phy_register(&dp83826c_driver);
98 phy_register(&dp83826nc_driver);
99#endif
Dan Murphy8b8d73a2020-05-04 16:14:39 -0500100 return 0;
101}