Home
last modified time | relevance | path

Searched refs:phy_reg (Results 1 – 25 of 26) sorted by relevance

12

/linux-6.6.21/drivers/net/ethernet/dec/tulip/
Dpnic.c23 u32 phy_reg = ioread32(ioaddr + 0xB8); in pnic_do_nway() local
26 if (phy_reg & 0x78000000) { /* Ignore baseT4 */ in pnic_do_nway()
27 if (phy_reg & 0x20000000) dev->if_port = 5; in pnic_do_nway()
28 else if (phy_reg & 0x40000000) dev->if_port = 3; in pnic_do_nway()
29 else if (phy_reg & 0x10000000) dev->if_port = 4; in pnic_do_nway()
30 else if (phy_reg & 0x08000000) dev->if_port = 0; in pnic_do_nway()
36 if (phy_reg & 0x30000000) { in pnic_do_nway()
42 phy_reg, medianame[dev->if_port]); in pnic_do_nway()
56 int phy_reg = ioread32(ioaddr + 0xB8); in pnic_lnk_change() local
60 phy_reg, csr5); in pnic_lnk_change()
[all …]
Ddmfe.c1669 u16 phy_reg; in dmfe_set_phyxcer() local
1677 phy_reg = dmfe_phy_read(db->ioaddr, in dmfe_set_phyxcer()
1681 db->phy_addr, 18, phy_reg, db->chip_id); in dmfe_set_phyxcer()
1685 phy_reg = dmfe_phy_read(db->ioaddr, db->phy_addr, 4, db->chip_id) & ~0x01e0; in dmfe_set_phyxcer()
1689 phy_reg |= db->PHY_reg4; in dmfe_set_phyxcer()
1693 case DMFE_10MHF: phy_reg |= 0x20; break; in dmfe_set_phyxcer()
1694 case DMFE_10MFD: phy_reg |= 0x40; break; in dmfe_set_phyxcer()
1695 case DMFE_100MHF: phy_reg |= 0x80; break; in dmfe_set_phyxcer()
1696 case DMFE_100MFD: phy_reg |= 0x100; break; in dmfe_set_phyxcer()
1698 if (db->chip_id == PCI_DM9009_ID) phy_reg &= 0x61; in dmfe_set_phyxcer()
[all …]
Duli526x.c1522 u16 phy_reg; in uli526x_set_phyxcer() local
1525 phy_reg = phy->read(db, db->phy_addr, 4) & ~0x01e0; in uli526x_set_phyxcer()
1529 phy_reg |= db->PHY_reg4; in uli526x_set_phyxcer()
1533 case ULI526X_10MHF: phy_reg |= 0x20; break; in uli526x_set_phyxcer()
1534 case ULI526X_10MFD: phy_reg |= 0x40; break; in uli526x_set_phyxcer()
1535 case ULI526X_100MHF: phy_reg |= 0x80; break; in uli526x_set_phyxcer()
1536 case ULI526X_100MFD: phy_reg |= 0x100; break; in uli526x_set_phyxcer()
1542 if ( !(phy_reg & 0x01e0)) { in uli526x_set_phyxcer()
1543 phy_reg|=db->PHY_reg4; in uli526x_set_phyxcer()
1546 phy->write(db, db->phy_addr, 4, phy_reg); in uli526x_set_phyxcer()
[all …]
/linux-6.6.21/drivers/clk/hisilicon/
Dclk-hix5hd2.c139 u32 phy_reg; member
151 void __iomem *phy_reg; member
180 val = readl_relaxed(clk->phy_reg); in clk_ether_prepare()
183 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
188 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
193 writel_relaxed(val, clk->phy_reg); in clk_ether_prepare()
223 val = readl_relaxed(clk->phy_reg); in clk_complex_enable()
226 writel_relaxed(val, clk->phy_reg); in clk_complex_enable()
241 val = readl_relaxed(clk->phy_reg); in clk_complex_disable()
244 writel_relaxed(val, clk->phy_reg); in clk_complex_disable()
[all …]
/linux-6.6.21/drivers/usb/phy/
Dphy-am335x-control.c13 void __iomem *phy_reg; member
84 val = readl(usb_ctrl->phy_reg + reg); in am335x_phy_power()
98 writel(val, usb_ctrl->phy_reg + reg); in am335x_phy_power()
168 ctrl_usb->phy_reg = devm_platform_ioremap_resource_byname(pdev, "phy_ctrl"); in am335x_control_usb_probe()
169 if (IS_ERR(ctrl_usb->phy_reg)) in am335x_control_usb_probe()
170 return PTR_ERR(ctrl_usb->phy_reg); in am335x_control_usb_probe()
/linux-6.6.21/drivers/net/ethernet/intel/e1000e/
Dich8lan.c178 u16 phy_reg = 0; in e1000_phy_is_accessible_pchlan() local
185 ret_val = e1e_rphy_locked(hw, MII_PHYSID1, &phy_reg); in e1000_phy_is_accessible_pchlan()
186 if (ret_val || (phy_reg == 0xFFFF)) in e1000_phy_is_accessible_pchlan()
188 phy_id = (u32)(phy_reg << 16); in e1000_phy_is_accessible_pchlan()
190 ret_val = e1e_rphy_locked(hw, MII_PHYSID2, &phy_reg); in e1000_phy_is_accessible_pchlan()
191 if (ret_val || (phy_reg == 0xFFFF)) { in e1000_phy_is_accessible_pchlan()
195 phy_id |= (u32)(phy_reg & PHY_REVISION_MASK); in e1000_phy_is_accessible_pchlan()
204 hw->phy.revision = (u32)(phy_reg & ~PHY_REVISION_MASK); in e1000_phy_is_accessible_pchlan()
226 e1e_rphy_locked(hw, CV_SMB_CTRL, &phy_reg); in e1000_phy_is_accessible_pchlan()
227 phy_reg &= ~CV_SMB_CTRL_FORCE_SMBUS; in e1000_phy_is_accessible_pchlan()
[all …]
Dethtool.c1337 u16 phy_reg = 0; in e1000_integrated_phy_loopback() local
1376 e1e_rphy(hw, PHY_REG(2, 21), &phy_reg); in e1000_integrated_phy_loopback()
1377 phy_reg &= ~0x0007; in e1000_integrated_phy_loopback()
1378 phy_reg |= 0x006; in e1000_integrated_phy_loopback()
1379 e1e_wphy(hw, PHY_REG(2, 21), phy_reg); in e1000_integrated_phy_loopback()
1384 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback()
1385 e1e_wphy(hw, PHY_REG(769, 16), phy_reg | 0x000C); in e1000_integrated_phy_loopback()
1387 e1e_rphy(hw, PHY_REG(776, 16), &phy_reg); in e1000_integrated_phy_loopback()
1388 e1e_wphy(hw, PHY_REG(776, 16), phy_reg | 0x0040); in e1000_integrated_phy_loopback()
1390 e1e_rphy(hw, PHY_REG(769, 16), &phy_reg); in e1000_integrated_phy_loopback()
[all …]
Dphy.h48 s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
49 s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg);
Dphy.c2547 s32 e1000_enable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg) in e1000_enable_phy_wakeup_reg_access_bm() argument
2562 ret_val = e1000e_read_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, phy_reg); in e1000_enable_phy_wakeup_reg_access_bm()
2572 temp = *phy_reg; in e1000_enable_phy_wakeup_reg_access_bm()
2600 s32 e1000_disable_phy_wakeup_reg_access_bm(struct e1000_hw *hw, u16 *phy_reg) in e1000_disable_phy_wakeup_reg_access_bm() argument
2612 ret_val = e1000e_write_phy_reg_mdic(hw, BM_WUC_ENABLE_REG, *phy_reg); in e1000_disable_phy_wakeup_reg_access_bm()
2651 u16 phy_reg = 0; in e1000_access_phy_wakeup_reg_bm() local
2661 ret_val = e1000_enable_phy_wakeup_reg_access_bm(hw, &phy_reg); in e1000_access_phy_wakeup_reg_bm()
2693 ret_val = e1000_disable_phy_wakeup_reg_access_bm(hw, &phy_reg); in e1000_access_phy_wakeup_reg_bm()
Dnetdev.c6217 u16 phy_reg, wuc_enable; in e1000_init_phy_wakeup() local
6244 hw->phy.ops.read_reg_page(&adapter->hw, BM_RCTL, &phy_reg); in e1000_init_phy_wakeup()
6247 phy_reg |= BM_RCTL_UPE; in e1000_init_phy_wakeup()
6249 phy_reg |= BM_RCTL_MPE; in e1000_init_phy_wakeup()
6250 phy_reg &= ~(BM_RCTL_MO_MASK); in e1000_init_phy_wakeup()
6252 phy_reg |= (((mac_reg & E1000_RCTL_MO_3) >> E1000_RCTL_MO_SHIFT) in e1000_init_phy_wakeup()
6255 phy_reg |= BM_RCTL_BAM; in e1000_init_phy_wakeup()
6257 phy_reg |= BM_RCTL_PMCF; in e1000_init_phy_wakeup()
6260 phy_reg |= BM_RCTL_RFCE; in e1000_init_phy_wakeup()
6261 hw->phy.ops.write_reg_page(&adapter->hw, BM_RCTL, phy_reg); in e1000_init_phy_wakeup()
/linux-6.6.21/drivers/net/
Dsungem_phy.c597 u32 phy_reg; in bcm5421_poll_link() local
602 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link()
604 mode = (phy_reg & BCM5421_MODE_MASK) >> 5; in bcm5421_poll_link()
611 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_poll_link()
613 if (phy_reg & 0x0020) in bcm5421_poll_link()
621 u32 phy_reg; in bcm5421_read_link() local
626 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link()
628 mode = (phy_reg & BCM5421_MODE_MASK ) >> 5; in bcm5421_read_link()
637 phy_reg = sungem_phy_read(phy, MII_NCONFIG); in bcm5421_read_link()
639 if ( (phy_reg & 0x0080) >> 7) in bcm5421_read_link()
[all …]
/linux-6.6.21/drivers/net/ethernet/intel/e1000/
De1000_ethtool.c1118 u16 phy_reg; in e1000_phy_reset_clk_and_crs() local
1124 e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs()
1125 phy_reg |= M88E1000_EPSCR_TX_CLK_25; in e1000_phy_reset_clk_and_crs()
1126 e1000_write_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs()
1132 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_phy_reset_clk_and_crs()
1133 phy_reg |= M88E1000_PSCR_ASSERT_CRS_ON_TX; in e1000_phy_reset_clk_and_crs()
1134 e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, phy_reg); in e1000_phy_reset_clk_and_crs()
1141 u16 phy_reg; in e1000_nonintegrated_phy_loopback() local
1155 e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, &phy_reg); in e1000_nonintegrated_phy_loopback()
1160 phy_reg &= ~M88E1000_PSCR_AUTO_X_MODE; in e1000_nonintegrated_phy_loopback()
[all …]
/linux-6.6.21/drivers/net/ethernet/realtek/
Dr8169_phy_config.c53 struct phy_reg { struct
59 const struct phy_reg *regs, int len) in __rtl_writephy_batch() argument
111 static const struct phy_reg phy_reg_init[] = { in rtl8169s_hw_phy_config()
185 static const struct phy_reg phy_reg_init[] = { in rtl8169scd_hw_phy_config()
231 static const struct phy_reg phy_reg_init[] = { in rtl8169sce_hw_phy_config()
315 static const struct phy_reg phy_reg_init[] = { in rtl8168c_1_hw_phy_config()
344 static const struct phy_reg phy_reg_init[] = { in rtl8168c_2_hw_phy_config()
372 static const struct phy_reg phy_reg_init[] = { in rtl8168c_3_hw_phy_config()
391 static const struct phy_reg rtl8168d_1_phy_reg_init_0[] = {
541 static const struct phy_reg phy_reg_init[] = { in rtl8168e_1_hw_phy_config()
[all …]
/linux-6.6.21/drivers/net/ethernet/mellanox/mlxbf_gige/
Dmlxbf_gige_mdio.c189 int phy_reg, u32 opcode) in mlxbf_gige_mdio_create_cmd() argument
195 gw_reg |= ((phy_reg << mdio_gw->devad.shift) & in mlxbf_gige_mdio_create_cmd()
209 static int mlxbf_gige_mdio_read(struct mii_bus *bus, int phy_add, int phy_reg) in mlxbf_gige_mdio_read() argument
217 cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, 0, phy_add, phy_reg, in mlxbf_gige_mdio_read()
242 int phy_reg, u16 val) in mlxbf_gige_mdio_write() argument
250 cmd = mlxbf_gige_mdio_create_cmd(priv->mdio_gw, val, phy_add, phy_reg, in mlxbf_gige_mdio_write()
/linux-6.6.21/drivers/net/phy/
Dphy_device.c756 int phy_reg; in get_phy_c45_devs_in_pkg() local
758 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS2); in get_phy_c45_devs_in_pkg()
759 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
761 *devices_in_package = phy_reg << 16; in get_phy_c45_devs_in_pkg()
763 phy_reg = mdiobus_c45_read(bus, addr, dev_addr, MDIO_DEVS1); in get_phy_c45_devs_in_pkg()
764 if (phy_reg < 0) in get_phy_c45_devs_in_pkg()
766 *devices_in_package |= phy_reg; in get_phy_c45_devs_in_pkg()
789 int i, ret, phy_reg; in get_phy_c45_ids() local
810 phy_reg = get_phy_c45_devs_in_pkg(bus, addr, i, &devs_in_pkg); in get_phy_c45_ids()
811 if (phy_reg < 0) in get_phy_c45_ids()
[all …]
/linux-6.6.21/drivers/net/usb/
Dsr9800.c372 int phy_reg; in sr_get_phyid() local
378 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in sr_get_phyid()
379 if (phy_reg != 0 && phy_reg != 0xFFFF) in sr_get_phyid()
384 if (phy_reg <= 0 || phy_reg == 0xFFFF) in sr_get_phyid()
387 phy_id = (phy_reg & 0xffff) << 16; in sr_get_phyid()
389 phy_reg = sr_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in sr_get_phyid()
390 if (phy_reg < 0) in sr_get_phyid()
393 phy_id |= (phy_reg & 0xffff); in sr_get_phyid()
Dasix_devices.c72 int phy_reg; in asix_get_phyid() local
78 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID1); in asix_get_phyid()
79 if (phy_reg < 0) in asix_get_phyid()
81 if (phy_reg != 0 && phy_reg != 0xFFFF) in asix_get_phyid()
86 if (phy_reg <= 0 || phy_reg == 0xFFFF) in asix_get_phyid()
89 phy_id = (phy_reg & 0xffff) << 16; in asix_get_phyid()
91 phy_reg = asix_mdio_read(dev->net, dev->mii.phy_id, MII_PHYSID2); in asix_get_phyid()
92 if (phy_reg < 0) in asix_get_phyid()
95 phy_id |= (phy_reg & 0xffff); in asix_get_phyid()
/linux-6.6.21/drivers/net/ethernet/ti/
Ddavinci_mdio.c408 static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in davinci_mdio_read() argument
414 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_read()
421 reg = (USERACCESS_GO | USERACCESS_READ | (phy_reg << 21) | in davinci_mdio_read()
450 int phy_reg, u16 phy_data) in davinci_mdio_write() argument
456 if (phy_reg & ~PHY_REG_MASK || phy_id & ~PHY_ID_MASK) in davinci_mdio_write()
463 reg = (USERACCESS_GO | USERACCESS_WRITE | (phy_reg << 21) | in davinci_mdio_write()
/linux-6.6.21/drivers/net/ieee802154/
Dmcr20a.c1083 unsigned int phy_reg = 0; in mcr20a_phy_init() local
1165 phy_reg = (u8)(((index & DAR_SRC_CTRL_INDEX) << in mcr20a_phy_init()
1169 ret = regmap_write(lp->regmap_dar, DAR_SRC_CTRL, phy_reg); in mcr20a_phy_init()
1172 phy_reg = 0; in mcr20a_phy_init()
1176 ret = regmap_read(lp->regmap_iar, IAR_DUAL_PAN_CTRL, &phy_reg); in mcr20a_phy_init()
1181 phy_reg &= ~IAR_DUAL_PAN_CTRL_DUAL_PAN_SAM_LVL_MSK; in mcr20a_phy_init()
1184 phy_reg |= MCR20A_PHY_INDIRECT_QUEUE_SIZE << in mcr20a_phy_init()
1186 ret = regmap_write(lp->regmap_iar, IAR_DUAL_PAN_CTRL, phy_reg); in mcr20a_phy_init()
/linux-6.6.21/drivers/net/ethernet/
Dlantiq_etop.c323 ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data) in ltq_etop_mdio_wr() argument
327 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) | in ltq_etop_mdio_wr()
337 ltq_etop_mdio_rd(struct mii_bus *bus, int phy_addr, int phy_reg) in ltq_etop_mdio_rd() argument
341 ((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET); in ltq_etop_mdio_rd()
/linux-6.6.21/drivers/pinctrl/ti/
Dpinctrl-ti-iodelay.c749 u32 phy_reg; in ti_iodelay_alloc_pins() local
762 phy_reg = r->reg_start_offset + base_phy; in ti_iodelay_alloc_pins()
764 for (i = 0; i < nr_pins; i++, phy_reg += 4) { in ti_iodelay_alloc_pins()
/linux-6.6.21/drivers/net/dsa/
Drzn1_a5psw.c1041 static int a5psw_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg) in a5psw_mdio_read() argument
1048 cmd |= FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); in a5psw_mdio_read()
1066 static int a5psw_mdio_write(struct mii_bus *bus, int phy_id, int phy_reg, in a5psw_mdio_write() argument
1072 cmd = FIELD_PREP(A5PSW_MDIO_COMMAND_REG_ADDR, phy_reg); in a5psw_mdio_write()
/linux-6.6.21/drivers/net/ethernet/mediatek/
Dmtk_eth_soc.c319 static int _mtk_mdio_write_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg, in _mtk_mdio_write_c22() argument
331 PHY_IAC_REG(phy_reg) | in _mtk_mdio_write_c22()
344 u32 devad, u32 phy_reg, u32 write_data) in _mtk_mdio_write_c45() argument
357 PHY_IAC_DATA(phy_reg), in _mtk_mdio_write_c45()
379 static int _mtk_mdio_read_c22(struct mtk_eth *eth, u32 phy_addr, u32 phy_reg) in _mtk_mdio_read_c22() argument
390 PHY_IAC_REG(phy_reg) | in _mtk_mdio_read_c22()
402 u32 devad, u32 phy_reg) in _mtk_mdio_read_c45() argument
415 PHY_IAC_DATA(phy_reg), in _mtk_mdio_read_c45()
437 int phy_reg, u16 val) in mtk_mdio_write_c22() argument
441 return _mtk_mdio_write_c22(eth, phy_addr, phy_reg, val); in mtk_mdio_write_c22()
[all …]
/linux-6.6.21/drivers/phy/rockchip/
Dphy-rockchip-typec.c389 struct phy_reg { struct
394 static struct phy_reg usb3_pll_cfg[] = { argument
411 static struct phy_reg dp_pll_cfg[] = {
/linux-6.6.21/Documentation/devicetree/bindings/pci/
Dsnps,dw-pcie-common.yaml112 const: phy_reg
127 - description: See nativs 'phy_reg' clock for details

12