Lines Matching +full:two +full:- +full:lane
6 * SPDX-License-Identifier: GPL-2.0+
135 struct t208xqds_mdio *priv = bus->priv; in t208xqds_mdio_read()
137 t208xqds_mux_mdio(priv->muxval); in t208xqds_mdio_read()
139 return priv->realbus->read(priv->realbus, addr, devad, regnum); in t208xqds_mdio_read()
145 struct t208xqds_mdio *priv = bus->priv; in t208xqds_mdio_write()
147 t208xqds_mux_mdio(priv->muxval); in t208xqds_mdio_write()
149 return priv->realbus->write(priv->realbus, addr, devad, regnum, value); in t208xqds_mdio_write()
154 struct t208xqds_mdio *priv = bus->priv; in t208xqds_mdio_reset()
156 return priv->realbus->reset(priv->realbus); in t208xqds_mdio_reset()
166 return -1; in t208xqds_mdio_init()
173 return -1; in t208xqds_mdio_init()
176 bus->read = t208xqds_mdio_read; in t208xqds_mdio_init()
177 bus->write = t208xqds_mdio_write; in t208xqds_mdio_init()
178 bus->reset = t208xqds_mdio_reset; in t208xqds_mdio_init()
179 strcpy(bus->name, t208xqds_mdio_name_for_muxval(muxval)); in t208xqds_mdio_init()
181 pmdio->realbus = miiphy_get_dev_by_name(realbusname); in t208xqds_mdio_init()
183 if (!pmdio->realbus) { in t208xqds_mdio_init()
187 return -1; in t208xqds_mdio_init()
190 pmdio->muxval = muxval; in t208xqds_mdio_init()
191 bus->priv = pmdio; in t208xqds_mdio_init()
200 char lane_mode[2][20] = {"1000BASE-KX", "10GBASE-KR"}; in board_ft_fman_fixup_port()
201 char buf[32] = "serdes-1,"; in board_ft_fman_fixup_port()
210 u32 srds1_pccr1 = in_be32(&srds_regs->srdspccr1); in board_ft_fman_fixup_port()
212 u32 srds_s1 = in_be32(&gur->rcwsr[4]) & in board_ft_fman_fixup_port()
227 sprintf(buf, "%s%s%s", buf, "lane-c,", in board_ft_fman_fixup_port()
229 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
239 sprintf(buf, "%s%s%s", buf, "lane-d,", in board_ft_fman_fixup_port()
241 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
251 sprintf(buf, "%s%s%s", buf, "lane-a,", in board_ft_fman_fixup_port()
253 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
264 sprintf(buf, "%s%s%s", buf, "lane-b,", in board_ft_fman_fixup_port()
266 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
286 sprintf(buf, "%s%s%s", buf, "lane-g,", in board_ft_fman_fixup_port()
288 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
298 sprintf(buf, "%s%s%s", buf, "lane-h,", in board_ft_fman_fixup_port()
300 out_be32(&srds_regs->srdspccr1, srds1_pccr1 | in board_ft_fman_fixup_port()
348 /* set property for 1000BASE-KX in dtb */ in board_ft_fman_fixup_port()
350 "fsl,fman-memac-mdio", addr + 0x1000); in board_ft_fman_fixup_port()
351 fdt_setprop_string(fdt, off, "lane-instance", buf); in board_ft_fman_fixup_port()
363 * media type, there are two types, fiber or copper, in board_ft_fman_fixup_port()
374 sprintf(buf, "%s%s%s", buf, "lane-a,", in board_ft_fman_fixup_port()
385 sprintf(buf, "%s%s%s", buf, "lane-b,", in board_ft_fman_fixup_port()
396 sprintf(buf, "%s%s%s", buf, "lane-c,", in board_ft_fman_fixup_port()
407 sprintf(buf, "%s%s%s", buf, "lane-d,", in board_ft_fman_fixup_port()
416 /* fixed-link is used for XFI fiber cable */ in board_ft_fman_fixup_port()
422 fdt_delprop(fdt, offset, "phy-handle"); in board_ft_fman_fixup_port()
423 fdt_setprop(fdt, offset, "fixed-link", &f_link, in board_ft_fman_fixup_port()
428 "fsl,fman-memac-mdio", addr + 0x1000); in board_ft_fman_fixup_port()
430 "lane-instance", buf); in board_ft_fman_fixup_port()
451 u32 srds_s1 = in_be32(&gur->rcwsr[4]) & in initialize_lane_to_slot()
517 int i, idx, lane, slot, interface; in board_eth_init() local
521 u32 rcwsr13 = in_be32(&gur->rcwsr[13]); in board_eth_init()
524 srds_s1 = in_be32(&gur->rcwsr[4]) & in board_eth_init()
549 /* Register the muxing front-ends to the MDIO buses */ in board_eth_init()
565 /* Set the two on-board RGMII PHY address */ in board_eth_init()
603 * XFI does not need a PHY to work, but to avoid U-Boot use in board_eth_init()
704 idx = i - FM1_DTSEC1; in board_eth_init()
708 lane = serdes_get_first_lane(FSL_SRDS_1, in board_eth_init()
710 if (lane < 0) in board_eth_init()
712 slot = lane_to_slot[lane]; in board_eth_init()
715 if (QIXIS_READ(present2) & (1 << (slot - 1))) in board_eth_init()
766 idx = i - FM1_10GEC1; in board_eth_init()
770 lane = serdes_get_first_lane(FSL_SRDS_1, in board_eth_init()
773 lane = serdes_get_first_lane(FSL_SRDS_1, in board_eth_init()
777 lane = serdes_get_first_lane(FSL_SRDS_1, in board_eth_init()
780 lane = serdes_get_first_lane(FSL_SRDS_1, in board_eth_init()
784 if (lane < 0) in board_eth_init()
799 slot = lane_to_slot[lane]; in board_eth_init()
800 if (QIXIS_READ(present2) & (1 << (slot - 1))) in board_eth_init()