18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Driver for ICPlus PHYs 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2007 Freescale Semiconductor, Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci#include <linux/kernel.h> 88c2ecf20Sopenharmony_ci#include <linux/string.h> 98c2ecf20Sopenharmony_ci#include <linux/errno.h> 108c2ecf20Sopenharmony_ci#include <linux/unistd.h> 118c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 128c2ecf20Sopenharmony_ci#include <linux/init.h> 138c2ecf20Sopenharmony_ci#include <linux/delay.h> 148c2ecf20Sopenharmony_ci#include <linux/netdevice.h> 158c2ecf20Sopenharmony_ci#include <linux/etherdevice.h> 168c2ecf20Sopenharmony_ci#include <linux/skbuff.h> 178c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 188c2ecf20Sopenharmony_ci#include <linux/mm.h> 198c2ecf20Sopenharmony_ci#include <linux/module.h> 208c2ecf20Sopenharmony_ci#include <linux/mii.h> 218c2ecf20Sopenharmony_ci#include <linux/ethtool.h> 228c2ecf20Sopenharmony_ci#include <linux/phy.h> 238c2ecf20Sopenharmony_ci#include <linux/property.h> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#include <asm/io.h> 268c2ecf20Sopenharmony_ci#include <asm/irq.h> 278c2ecf20Sopenharmony_ci#include <linux/uaccess.h> 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers"); 308c2ecf20Sopenharmony_ciMODULE_AUTHOR("Michael Barkowski"); 318c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL"); 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* IP101A/G - IP1001 */ 348c2ecf20Sopenharmony_ci#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */ 358c2ecf20Sopenharmony_ci#define IP1001_RXPHASE_SEL BIT(0) /* Add delay on RX_CLK */ 368c2ecf20Sopenharmony_ci#define IP1001_TXPHASE_SEL BIT(1) /* Add delay on TX_CLK */ 378c2ecf20Sopenharmony_ci#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */ 388c2ecf20Sopenharmony_ci#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */ 398c2ecf20Sopenharmony_ci#define IP101A_G_APS_ON BIT(1) /* IP101A/G APS Mode bit */ 408c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_CONF_STATUS 0x11 /* Conf Info IRQ & Status Reg */ 418c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_PIN_USED BIT(15) /* INTR pin used */ 428c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_ALL_MASK BIT(11) /* IRQ's inactive */ 438c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_SPEED_CHANGE BIT(2) 448c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_DUPLEX_CHANGE BIT(1) 458c2ecf20Sopenharmony_ci#define IP101A_G_IRQ_LINK_CHANGE BIT(0) 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci#define IP101G_DIGITAL_IO_SPEC_CTRL 0x1d 488c2ecf20Sopenharmony_ci#define IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32 BIT(2) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci/* The 32-pin IP101GR package can re-configure the mode of the RXER/INTR_32 pin 518c2ecf20Sopenharmony_ci * (pin number 21). The hardware default is RXER (receive error) mode. But it 528c2ecf20Sopenharmony_ci * can be configured to interrupt mode manually. 538c2ecf20Sopenharmony_ci */ 548c2ecf20Sopenharmony_cienum ip101gr_sel_intr32 { 558c2ecf20Sopenharmony_ci IP101GR_SEL_INTR32_KEEP, 568c2ecf20Sopenharmony_ci IP101GR_SEL_INTR32_INTR, 578c2ecf20Sopenharmony_ci IP101GR_SEL_INTR32_RXER, 588c2ecf20Sopenharmony_ci}; 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_cistruct ip101a_g_phy_priv { 618c2ecf20Sopenharmony_ci enum ip101gr_sel_intr32 sel_intr32; 628c2ecf20Sopenharmony_ci}; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_cistatic int ip175c_config_init(struct phy_device *phydev) 658c2ecf20Sopenharmony_ci{ 668c2ecf20Sopenharmony_ci int err, i; 678c2ecf20Sopenharmony_ci static int full_reset_performed; 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ci if (full_reset_performed == 0) { 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci /* master reset */ 728c2ecf20Sopenharmony_ci err = mdiobus_write(phydev->mdio.bus, 30, 0, 0x175c); 738c2ecf20Sopenharmony_ci if (err < 0) 748c2ecf20Sopenharmony_ci return err; 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci /* ensure no bus delays overlap reset period */ 778c2ecf20Sopenharmony_ci err = mdiobus_read(phydev->mdio.bus, 30, 0); 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ci /* data sheet specifies reset period is 2 msec */ 808c2ecf20Sopenharmony_ci mdelay(2); 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ci /* enable IP175C mode */ 838c2ecf20Sopenharmony_ci err = mdiobus_write(phydev->mdio.bus, 29, 31, 0x175c); 848c2ecf20Sopenharmony_ci if (err < 0) 858c2ecf20Sopenharmony_ci return err; 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci /* Set MII0 speed and duplex (in PHY mode) */ 888c2ecf20Sopenharmony_ci err = mdiobus_write(phydev->mdio.bus, 29, 22, 0x420); 898c2ecf20Sopenharmony_ci if (err < 0) 908c2ecf20Sopenharmony_ci return err; 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci /* reset switch ports */ 938c2ecf20Sopenharmony_ci for (i = 0; i < 5; i++) { 948c2ecf20Sopenharmony_ci err = mdiobus_write(phydev->mdio.bus, i, 958c2ecf20Sopenharmony_ci MII_BMCR, BMCR_RESET); 968c2ecf20Sopenharmony_ci if (err < 0) 978c2ecf20Sopenharmony_ci return err; 988c2ecf20Sopenharmony_ci } 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci for (i = 0; i < 5; i++) 1018c2ecf20Sopenharmony_ci err = mdiobus_read(phydev->mdio.bus, i, MII_BMCR); 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci mdelay(2); 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci full_reset_performed = 1; 1068c2ecf20Sopenharmony_ci } 1078c2ecf20Sopenharmony_ci 1088c2ecf20Sopenharmony_ci if (phydev->mdio.addr != 4) { 1098c2ecf20Sopenharmony_ci phydev->state = PHY_RUNNING; 1108c2ecf20Sopenharmony_ci phydev->speed = SPEED_100; 1118c2ecf20Sopenharmony_ci phydev->duplex = DUPLEX_FULL; 1128c2ecf20Sopenharmony_ci phydev->link = 1; 1138c2ecf20Sopenharmony_ci netif_carrier_on(phydev->attached_dev); 1148c2ecf20Sopenharmony_ci } 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci return 0; 1178c2ecf20Sopenharmony_ci} 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_cistatic int ip1xx_reset(struct phy_device *phydev) 1208c2ecf20Sopenharmony_ci{ 1218c2ecf20Sopenharmony_ci int bmcr; 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci /* Software Reset PHY */ 1248c2ecf20Sopenharmony_ci bmcr = phy_read(phydev, MII_BMCR); 1258c2ecf20Sopenharmony_ci if (bmcr < 0) 1268c2ecf20Sopenharmony_ci return bmcr; 1278c2ecf20Sopenharmony_ci bmcr |= BMCR_RESET; 1288c2ecf20Sopenharmony_ci bmcr = phy_write(phydev, MII_BMCR, bmcr); 1298c2ecf20Sopenharmony_ci if (bmcr < 0) 1308c2ecf20Sopenharmony_ci return bmcr; 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci do { 1338c2ecf20Sopenharmony_ci bmcr = phy_read(phydev, MII_BMCR); 1348c2ecf20Sopenharmony_ci if (bmcr < 0) 1358c2ecf20Sopenharmony_ci return bmcr; 1368c2ecf20Sopenharmony_ci } while (bmcr & BMCR_RESET); 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_ci return 0; 1398c2ecf20Sopenharmony_ci} 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_cistatic int ip1001_config_init(struct phy_device *phydev) 1428c2ecf20Sopenharmony_ci{ 1438c2ecf20Sopenharmony_ci int c; 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci c = ip1xx_reset(phydev); 1468c2ecf20Sopenharmony_ci if (c < 0) 1478c2ecf20Sopenharmony_ci return c; 1488c2ecf20Sopenharmony_ci 1498c2ecf20Sopenharmony_ci /* Enable Auto Power Saving mode */ 1508c2ecf20Sopenharmony_ci c = phy_read(phydev, IP1001_SPEC_CTRL_STATUS_2); 1518c2ecf20Sopenharmony_ci if (c < 0) 1528c2ecf20Sopenharmony_ci return c; 1538c2ecf20Sopenharmony_ci c |= IP1001_APS_ON; 1548c2ecf20Sopenharmony_ci c = phy_write(phydev, IP1001_SPEC_CTRL_STATUS_2, c); 1558c2ecf20Sopenharmony_ci if (c < 0) 1568c2ecf20Sopenharmony_ci return c; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci if (phy_interface_is_rgmii(phydev)) { 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ci c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); 1618c2ecf20Sopenharmony_ci if (c < 0) 1628c2ecf20Sopenharmony_ci return c; 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci c &= ~(IP1001_RXPHASE_SEL | IP1001_TXPHASE_SEL); 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci if (phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) 1678c2ecf20Sopenharmony_ci c |= (IP1001_RXPHASE_SEL | IP1001_TXPHASE_SEL); 1688c2ecf20Sopenharmony_ci else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID) 1698c2ecf20Sopenharmony_ci c |= IP1001_RXPHASE_SEL; 1708c2ecf20Sopenharmony_ci else if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) 1718c2ecf20Sopenharmony_ci c |= IP1001_TXPHASE_SEL; 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci c = phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); 1748c2ecf20Sopenharmony_ci if (c < 0) 1758c2ecf20Sopenharmony_ci return c; 1768c2ecf20Sopenharmony_ci } 1778c2ecf20Sopenharmony_ci 1788c2ecf20Sopenharmony_ci return 0; 1798c2ecf20Sopenharmony_ci} 1808c2ecf20Sopenharmony_ci 1818c2ecf20Sopenharmony_cistatic int ip175c_read_status(struct phy_device *phydev) 1828c2ecf20Sopenharmony_ci{ 1838c2ecf20Sopenharmony_ci if (phydev->mdio.addr == 4) /* WAN port */ 1848c2ecf20Sopenharmony_ci genphy_read_status(phydev); 1858c2ecf20Sopenharmony_ci else 1868c2ecf20Sopenharmony_ci /* Don't need to read status for switch ports */ 1878c2ecf20Sopenharmony_ci phydev->irq = PHY_IGNORE_INTERRUPT; 1888c2ecf20Sopenharmony_ci 1898c2ecf20Sopenharmony_ci return 0; 1908c2ecf20Sopenharmony_ci} 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_cistatic int ip175c_config_aneg(struct phy_device *phydev) 1938c2ecf20Sopenharmony_ci{ 1948c2ecf20Sopenharmony_ci if (phydev->mdio.addr == 4) /* WAN port */ 1958c2ecf20Sopenharmony_ci genphy_config_aneg(phydev); 1968c2ecf20Sopenharmony_ci 1978c2ecf20Sopenharmony_ci return 0; 1988c2ecf20Sopenharmony_ci} 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_cistatic int ip101a_g_probe(struct phy_device *phydev) 2018c2ecf20Sopenharmony_ci{ 2028c2ecf20Sopenharmony_ci struct device *dev = &phydev->mdio.dev; 2038c2ecf20Sopenharmony_ci struct ip101a_g_phy_priv *priv; 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_ci priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 2068c2ecf20Sopenharmony_ci if (!priv) 2078c2ecf20Sopenharmony_ci return -ENOMEM; 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci /* Both functions (RX error and interrupt status) are sharing the same 2108c2ecf20Sopenharmony_ci * pin on the 32-pin IP101GR, so this is an exclusive choice. 2118c2ecf20Sopenharmony_ci */ 2128c2ecf20Sopenharmony_ci if (device_property_read_bool(dev, "icplus,select-rx-error") && 2138c2ecf20Sopenharmony_ci device_property_read_bool(dev, "icplus,select-interrupt")) { 2148c2ecf20Sopenharmony_ci dev_err(dev, 2158c2ecf20Sopenharmony_ci "RXER and INTR mode cannot be selected together\n"); 2168c2ecf20Sopenharmony_ci return -EINVAL; 2178c2ecf20Sopenharmony_ci } 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci if (device_property_read_bool(dev, "icplus,select-rx-error")) 2208c2ecf20Sopenharmony_ci priv->sel_intr32 = IP101GR_SEL_INTR32_RXER; 2218c2ecf20Sopenharmony_ci else if (device_property_read_bool(dev, "icplus,select-interrupt")) 2228c2ecf20Sopenharmony_ci priv->sel_intr32 = IP101GR_SEL_INTR32_INTR; 2238c2ecf20Sopenharmony_ci else 2248c2ecf20Sopenharmony_ci priv->sel_intr32 = IP101GR_SEL_INTR32_KEEP; 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci phydev->priv = priv; 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ci return 0; 2298c2ecf20Sopenharmony_ci} 2308c2ecf20Sopenharmony_ci 2318c2ecf20Sopenharmony_cistatic int ip101a_g_config_init(struct phy_device *phydev) 2328c2ecf20Sopenharmony_ci{ 2338c2ecf20Sopenharmony_ci struct ip101a_g_phy_priv *priv = phydev->priv; 2348c2ecf20Sopenharmony_ci int err, c; 2358c2ecf20Sopenharmony_ci 2368c2ecf20Sopenharmony_ci c = ip1xx_reset(phydev); 2378c2ecf20Sopenharmony_ci if (c < 0) 2388c2ecf20Sopenharmony_ci return c; 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci /* configure the RXER/INTR_32 pin of the 32-pin IP101GR if needed: */ 2418c2ecf20Sopenharmony_ci switch (priv->sel_intr32) { 2428c2ecf20Sopenharmony_ci case IP101GR_SEL_INTR32_RXER: 2438c2ecf20Sopenharmony_ci err = phy_modify(phydev, IP101G_DIGITAL_IO_SPEC_CTRL, 2448c2ecf20Sopenharmony_ci IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32, 0); 2458c2ecf20Sopenharmony_ci if (err < 0) 2468c2ecf20Sopenharmony_ci return err; 2478c2ecf20Sopenharmony_ci break; 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci case IP101GR_SEL_INTR32_INTR: 2508c2ecf20Sopenharmony_ci err = phy_modify(phydev, IP101G_DIGITAL_IO_SPEC_CTRL, 2518c2ecf20Sopenharmony_ci IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32, 2528c2ecf20Sopenharmony_ci IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32); 2538c2ecf20Sopenharmony_ci if (err < 0) 2548c2ecf20Sopenharmony_ci return err; 2558c2ecf20Sopenharmony_ci break; 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ci default: 2588c2ecf20Sopenharmony_ci /* Don't touch IP101G_DIGITAL_IO_SPEC_CTRL because it's not 2598c2ecf20Sopenharmony_ci * documented on IP101A and it's not clear whether this would 2608c2ecf20Sopenharmony_ci * cause problems. 2618c2ecf20Sopenharmony_ci * For the 32-pin IP101GR we simply keep the SEL_INTR32 2628c2ecf20Sopenharmony_ci * configuration as set by the bootloader when not configured 2638c2ecf20Sopenharmony_ci * to one of the special functions. 2648c2ecf20Sopenharmony_ci */ 2658c2ecf20Sopenharmony_ci break; 2668c2ecf20Sopenharmony_ci } 2678c2ecf20Sopenharmony_ci 2688c2ecf20Sopenharmony_ci /* Enable Auto Power Saving mode */ 2698c2ecf20Sopenharmony_ci c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS); 2708c2ecf20Sopenharmony_ci c |= IP101A_G_APS_ON; 2718c2ecf20Sopenharmony_ci 2728c2ecf20Sopenharmony_ci return phy_write(phydev, IP10XX_SPEC_CTRL_STATUS, c); 2738c2ecf20Sopenharmony_ci} 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_cistatic int ip101a_g_config_intr(struct phy_device *phydev) 2768c2ecf20Sopenharmony_ci{ 2778c2ecf20Sopenharmony_ci u16 val; 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci if (phydev->interrupts == PHY_INTERRUPT_ENABLED) 2808c2ecf20Sopenharmony_ci /* INTR pin used: Speed/link/duplex will cause an interrupt */ 2818c2ecf20Sopenharmony_ci val = IP101A_G_IRQ_PIN_USED; 2828c2ecf20Sopenharmony_ci else 2838c2ecf20Sopenharmony_ci val = IP101A_G_IRQ_ALL_MASK; 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci return phy_write(phydev, IP101A_G_IRQ_CONF_STATUS, val); 2868c2ecf20Sopenharmony_ci} 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_cistatic int ip101a_g_did_interrupt(struct phy_device *phydev) 2898c2ecf20Sopenharmony_ci{ 2908c2ecf20Sopenharmony_ci int val = phy_read(phydev, IP101A_G_IRQ_CONF_STATUS); 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci if (val < 0) 2938c2ecf20Sopenharmony_ci return 0; 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ci return val & (IP101A_G_IRQ_SPEED_CHANGE | 2968c2ecf20Sopenharmony_ci IP101A_G_IRQ_DUPLEX_CHANGE | 2978c2ecf20Sopenharmony_ci IP101A_G_IRQ_LINK_CHANGE); 2988c2ecf20Sopenharmony_ci} 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_cistatic int ip101a_g_ack_interrupt(struct phy_device *phydev) 3018c2ecf20Sopenharmony_ci{ 3028c2ecf20Sopenharmony_ci int err = phy_read(phydev, IP101A_G_IRQ_CONF_STATUS); 3038c2ecf20Sopenharmony_ci if (err < 0) 3048c2ecf20Sopenharmony_ci return err; 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ci return 0; 3078c2ecf20Sopenharmony_ci} 3088c2ecf20Sopenharmony_ci 3098c2ecf20Sopenharmony_cistatic struct phy_driver icplus_driver[] = { 3108c2ecf20Sopenharmony_ci{ 3118c2ecf20Sopenharmony_ci .phy_id = 0x02430d80, 3128c2ecf20Sopenharmony_ci .name = "ICPlus IP175C", 3138c2ecf20Sopenharmony_ci .phy_id_mask = 0x0ffffff0, 3148c2ecf20Sopenharmony_ci /* PHY_BASIC_FEATURES */ 3158c2ecf20Sopenharmony_ci .config_init = &ip175c_config_init, 3168c2ecf20Sopenharmony_ci .config_aneg = &ip175c_config_aneg, 3178c2ecf20Sopenharmony_ci .read_status = &ip175c_read_status, 3188c2ecf20Sopenharmony_ci .suspend = genphy_suspend, 3198c2ecf20Sopenharmony_ci .resume = genphy_resume, 3208c2ecf20Sopenharmony_ci}, { 3218c2ecf20Sopenharmony_ci .phy_id = 0x02430d90, 3228c2ecf20Sopenharmony_ci .name = "ICPlus IP1001", 3238c2ecf20Sopenharmony_ci .phy_id_mask = 0x0ffffff0, 3248c2ecf20Sopenharmony_ci /* PHY_GBIT_FEATURES */ 3258c2ecf20Sopenharmony_ci .config_init = &ip1001_config_init, 3268c2ecf20Sopenharmony_ci .suspend = genphy_suspend, 3278c2ecf20Sopenharmony_ci .resume = genphy_resume, 3288c2ecf20Sopenharmony_ci}, { 3298c2ecf20Sopenharmony_ci .phy_id = 0x02430c54, 3308c2ecf20Sopenharmony_ci .name = "ICPlus IP101A/G", 3318c2ecf20Sopenharmony_ci .phy_id_mask = 0x0ffffff0, 3328c2ecf20Sopenharmony_ci /* PHY_BASIC_FEATURES */ 3338c2ecf20Sopenharmony_ci .probe = ip101a_g_probe, 3348c2ecf20Sopenharmony_ci .config_intr = ip101a_g_config_intr, 3358c2ecf20Sopenharmony_ci .did_interrupt = ip101a_g_did_interrupt, 3368c2ecf20Sopenharmony_ci .ack_interrupt = ip101a_g_ack_interrupt, 3378c2ecf20Sopenharmony_ci .config_init = &ip101a_g_config_init, 3388c2ecf20Sopenharmony_ci .suspend = genphy_suspend, 3398c2ecf20Sopenharmony_ci .resume = genphy_resume, 3408c2ecf20Sopenharmony_ci} }; 3418c2ecf20Sopenharmony_ci 3428c2ecf20Sopenharmony_cimodule_phy_driver(icplus_driver); 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_cistatic struct mdio_device_id __maybe_unused icplus_tbl[] = { 3458c2ecf20Sopenharmony_ci { 0x02430d80, 0x0ffffff0 }, 3468c2ecf20Sopenharmony_ci { 0x02430d90, 0x0ffffff0 }, 3478c2ecf20Sopenharmony_ci { 0x02430c54, 0x0ffffff0 }, 3488c2ecf20Sopenharmony_ci { } 3498c2ecf20Sopenharmony_ci}; 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(mdio, icplus_tbl); 352