1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2015 Freescale Semiconductor
6 #ifndef __LDPAA_WRIOP_H
7 #define __LDPAA_WRIOP_H
39 struct wriop_dpmac_info {
45 phy_interface_t enet_if;
46 struct phy_device *phydev;
50 extern struct wriop_dpmac_info dpmac_info[NUM_WRIOP_PORTS];
52 #define DEFAULT_WRIOP_MDIO1_NAME "FSL_MDIO0"
53 #define DEFAULT_WRIOP_MDIO2_NAME "FSL_MDIO1"
55 void wriop_init_dpmac(int, int, int);
56 void wriop_disable_dpmac(int);
57 void wriop_enable_dpmac(int);
58 u8 wriop_is_enabled_dpmac(int dpmac_id);
59 void wriop_set_mdio(int, struct mii_dev *);
60 struct mii_dev *wriop_get_mdio(int);
61 void wriop_set_phy_address(int, int);
62 int wriop_get_phy_address(int);
63 void wriop_set_phy_dev(int, struct phy_device *);
64 struct phy_device *wriop_get_phy_dev(int);
65 phy_interface_t wriop_get_enet_if(int);
67 void wriop_dpmac_disable(int);
68 void wriop_dpmac_enable(int);
69 phy_interface_t wriop_dpmac_enet_if(int, int);
70 void wriop_init_dpmac_qsgmii(int, int);
71 void wriop_init_rgmii(void);
72 void wriop_init_dpmac_enet_if(int , phy_interface_t);
73 #endif /* __LDPAA_WRIOP_H */