Dan Murphy | 8b8d73a | 2020-05-04 16:14:39 -0500 | [diff] [blame] | 1 | // 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 Murphy | 3434cd7 | 2020-05-04 16:14:40 -0500 | [diff] [blame] | 10 | #include <phy.h> |
Dan Murphy | 8b8d73a | 2020-05-04 16:14:39 -0500 | [diff] [blame] | 11 | #include "ti_phy_init.h" |
| 12 | |
Dan Murphy | 3434cd7 | 2020-05-04 16:14:40 -0500 | [diff] [blame] | 13 | #ifdef CONFIG_PHY_TI_GENERIC |
| 14 | static 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 | |
| 24 | static 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 | |
| 34 | static 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 | |
| 44 | static 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 | |
| 54 | static 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 | |
| 64 | static 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 | |
| 74 | static 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 Murphy | 8b8d73a | 2020-05-04 16:14:39 -0500 | [diff] [blame] | 85 | int phy_ti_init(void) |
| 86 | { |
| 87 | #ifdef CONFIG_PHY_TI_DP83867 |
| 88 | phy_dp83867_init(); |
| 89 | #endif |
Dan Murphy | 3434cd7 | 2020-05-04 16:14:40 -0500 | [diff] [blame] | 90 | |
| 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 Murphy | 8b8d73a | 2020-05-04 16:14:39 -0500 | [diff] [blame] | 100 | return 0; |
| 101 | } |