Lines Matching +full:eee +full:- +full:broken +full:- +full:1000 +full:t
1 /*-
55 * and to avoid problems if the enum gains new types that aren't in the FDT
69 {MII_CONTYPE_REVMII, "rev-mii"},
72 {MII_CONTYPE_RGMII_ID, "rgmii-id"},
73 {MII_CONTYPE_RGMII_RXID, "rgmii-rxid"},
74 {MII_CONTYPE_RGMII_TXID, "rgmii-txid"},
79 {MII_CONTYPE_2000BX, "2000base-x"},
80 {MII_CONTYPE_2500BX, "2500base-x"},
88 "phy-handle", "phy", "phy-device" in mii_fdt_get_phynode()
97 return (-1); in mii_fdt_get_phynode()
108 if (phynode != -1) in mii_fdt_lookup_phy()
119 ports = ofw_bus_find_child(node, "ethernet-ports"); in mii_fdt_lookup_phy()
121 return (-1); in mii_fdt_lookup_phy()
137 return (-1); in mii_fdt_lookup_phy()
169 if (OF_getprop(macnode, "phy-mode", val, sizeof(val)) <= 0 && in mii_fdt_get_contype()
170 OF_getprop(macnode, "phy-connection-type", val, sizeof(val)) <= 0) { in mii_fdt_get_contype()
198 * If we can't find our parent MAC's node, there's nothing more we can in mii_fdt_get_config()
201 if ((cfg->macnode = ofw_bus_get_node(macdev)) == -1) in mii_fdt_get_config()
204 cfg->con_type = mii_fdt_get_contype(cfg->macnode); in mii_fdt_get_config()
207 * If we can't find our own PHY node, there's nothing more we can fill in mii_fdt_get_config()
210 cfg->phynode = mii_fdt_lookup_phy(cfg->macnode, ma->mii_phyno); in mii_fdt_get_config()
211 if (cfg->phynode == -1) in mii_fdt_get_config()
214 if (OF_getencprop(cfg->phynode, "max-speed", &val, sizeof(val)) > 0) in mii_fdt_get_config()
215 cfg->max_speed = val; in mii_fdt_get_config()
217 if (ofw_bus_node_is_compatible(cfg->phynode, in mii_fdt_get_config()
218 "ethernet-phy-ieee802.3-c45")) in mii_fdt_get_config()
219 cfg->flags |= MIIF_FDT_COMPAT_CLAUSE45; in mii_fdt_get_config()
221 if (OF_hasprop(cfg->phynode, "broken-turn-around")) in mii_fdt_get_config()
222 cfg->flags |= MIIF_FDT_BROKEN_TURNAROUND; in mii_fdt_get_config()
223 if (OF_hasprop(cfg->phynode, "enet-phy-lane-swap")) in mii_fdt_get_config()
224 cfg->flags |= MIIF_FDT_LANE_SWAP; in mii_fdt_get_config()
225 if (OF_hasprop(cfg->phynode, "enet-phy-lane-no-swap")) in mii_fdt_get_config()
226 cfg->flags |= MIIF_FDT_NO_LANE_SWAP; in mii_fdt_get_config()
227 if (OF_hasprop(cfg->phynode, "eee-broken-100tx")) in mii_fdt_get_config()
228 cfg->flags |= MIIF_FDT_EEE_BROKEN_100TX; in mii_fdt_get_config()
229 if (OF_hasprop(cfg->phynode, "eee-broken-1000t")) in mii_fdt_get_config()
230 cfg->flags |= MIIF_FDT_EEE_BROKEN_1000T; in mii_fdt_get_config()
231 if (OF_hasprop(cfg->phynode, "eee-broken-10gt")) in mii_fdt_get_config()
232 cfg->flags |= MIIF_FDT_EEE_BROKEN_10GT; in mii_fdt_get_config()
233 if (OF_hasprop(cfg->phynode, "eee-broken-1000kx")) in mii_fdt_get_config()
234 cfg->flags |= MIIF_FDT_EEE_BROKEN_1000KX; in mii_fdt_get_config()
235 if (OF_hasprop(cfg->phynode, "eee-broken-10gkx4")) in mii_fdt_get_config()
236 cfg->flags |= MIIF_FDT_EEE_BROKEN_10GKX4; in mii_fdt_get_config()
237 if (OF_hasprop(cfg->phynode, "eee-broken-10gkr")) in mii_fdt_get_config()
238 cfg->flags |= MIIF_FDT_EEE_BROKEN_10GKR; in mii_fdt_get_config()
249 if (ofw_bus_get_node(parent) == -1) in miibus_fdt_probe()
272 bzero(&ma->obd, sizeof(ma->obd)); in miibus_fdt_attach()
274 ma->mii_phyno); in miibus_fdt_attach()
275 if (phy_node == -1) { in miibus_fdt_attach()
278 ma->mii_phyno); in miibus_fdt_attach()
281 error = ofw_bus_gen_setup_devinfo(&ma->obd, phy_node); in miibus_fdt_attach()
285 ma->mii_phyno); in miibus_fdt_attach()
293 resource_list_init(&ma->rl); in miibus_fdt_attach()
294 (void)ofw_bus_intr_to_rl(children[i], phy_node, &ma->rl, NULL); in miibus_fdt_attach()
308 if (ma->obd.obd_node == 0) in miibus_fdt_get_resource_list()
311 return (&ma->rl); in miibus_fdt_get_resource_list()
321 if (ma->obd.obd_node == 0) in miibus_fdt_get_devinfo()
324 return (&ma->obd); in miibus_fdt_get_devinfo()