• Home
  • Raw
  • Download

Lines Matching full:dp83867

2 /* Driver for the Texas Instruments DP83867 PHY
18 #include <dt-bindings/net/ti-dp83867.h>
437 struct dp83867_private *dp83867 = in dp83867_config_port_mirroring() local
440 if (dp83867->port_mirroring == DP83867_PORT_MIRROING_EN) in dp83867_config_port_mirroring()
451 struct dp83867_private *dp83867 = phydev->priv; in dp83867_verify_rgmii_cfg() local
475 dp83867->rx_id_delay == DP83867_RGMII_RX_CLK_DELAY_INV) { in dp83867_verify_rgmii_cfg()
483 dp83867->tx_id_delay == DP83867_RGMII_TX_CLK_DELAY_INV) { in dp83867_verify_rgmii_cfg()
494 struct dp83867_private *dp83867 = phydev->priv; in dp83867_of_init() local
504 &dp83867->clk_output_sel); in dp83867_of_init()
507 dp83867->set_clk_output = true; in dp83867_of_init()
511 if (dp83867->clk_output_sel > DP83867_CLK_O_SEL_REF_CLK && in dp83867_of_init()
512 dp83867->clk_output_sel != DP83867_CLK_O_SEL_OFF) { in dp83867_of_init()
514 dp83867->clk_output_sel); in dp83867_of_init()
520 dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX; in dp83867_of_init()
522 dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN; in dp83867_of_init()
524 dp83867->io_impedance = -1; /* leave at default */ in dp83867_of_init()
526 dp83867->rxctrl_strap_quirk = of_property_read_bool(of_node, in dp83867_of_init()
527 "ti,dp83867-rxctrl-strap-quirk"); in dp83867_of_init()
529 dp83867->sgmii_ref_clk_en = of_property_read_bool(of_node, in dp83867_of_init()
532 dp83867->rx_id_delay = DP83867_RGMII_RX_CLK_DELAY_INV; in dp83867_of_init()
534 &dp83867->rx_id_delay); in dp83867_of_init()
535 if (!ret && dp83867->rx_id_delay > DP83867_RGMII_RX_CLK_DELAY_MAX) { in dp83867_of_init()
538 dp83867->rx_id_delay); in dp83867_of_init()
542 dp83867->tx_id_delay = DP83867_RGMII_TX_CLK_DELAY_INV; in dp83867_of_init()
544 &dp83867->tx_id_delay); in dp83867_of_init()
545 if (!ret && dp83867->tx_id_delay > DP83867_RGMII_TX_CLK_DELAY_MAX) { in dp83867_of_init()
548 dp83867->tx_id_delay); in dp83867_of_init()
553 dp83867->port_mirroring = DP83867_PORT_MIRROING_EN; in dp83867_of_init()
556 dp83867->port_mirroring = DP83867_PORT_MIRROING_DIS; in dp83867_of_init()
559 &dp83867->tx_fifo_depth); in dp83867_of_init()
562 &dp83867->tx_fifo_depth); in dp83867_of_init()
564 dp83867->tx_fifo_depth = in dp83867_of_init()
568 if (dp83867->tx_fifo_depth > DP83867_PHYCR_FIFO_DEPTH_MAX) { in dp83867_of_init()
570 dp83867->tx_fifo_depth); in dp83867_of_init()
575 &dp83867->rx_fifo_depth); in dp83867_of_init()
577 dp83867->rx_fifo_depth = DP83867_PHYCR_FIFO_DEPTH_4_B_NIB; in dp83867_of_init()
579 if (dp83867->rx_fifo_depth > DP83867_PHYCR_FIFO_DEPTH_MAX) { in dp83867_of_init()
581 dp83867->rx_fifo_depth); in dp83867_of_init()
596 struct dp83867_private *dp83867; in dp83867_probe() local
598 dp83867 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83867), in dp83867_probe()
600 if (!dp83867) in dp83867_probe()
603 phydev->priv = dp83867; in dp83867_probe()
610 struct dp83867_private *dp83867 = phydev->priv; in dp83867_config_init() local
625 if (dp83867->rxctrl_strap_quirk) in dp83867_config_init()
650 val |= (dp83867->tx_fifo_depth << in dp83867_config_init()
655 val |= (dp83867->rx_fifo_depth << in dp83867_config_init()
709 if (dp83867->rx_id_delay != DP83867_RGMII_RX_CLK_DELAY_INV) in dp83867_config_init()
710 delay |= dp83867->rx_id_delay; in dp83867_config_init()
711 if (dp83867->tx_id_delay != DP83867_RGMII_TX_CLK_DELAY_INV) in dp83867_config_init()
712 delay |= dp83867->tx_id_delay << in dp83867_config_init()
720 if (dp83867->io_impedance >= 0) in dp83867_config_init()
723 dp83867->io_impedance); in dp83867_config_init()
756 if (dp83867->sgmii_ref_clk_en) in dp83867_config_init()
766 if (dp83867->rxctrl_strap_quirk) in dp83867_config_init()
779 if (dp83867->port_mirroring != DP83867_PORT_MIRROING_KEEP) in dp83867_config_init()
783 if (dp83867->set_clk_output) { in dp83867_config_init()
786 if (dp83867->clk_output_sel == DP83867_CLK_O_SEL_OFF) { in dp83867_config_init()
790 val = dp83867->clk_output_sel << in dp83867_config_init()
836 /* There is a limitation in DP83867 PHY device where SGMII AN is in dp83867_link_change_notify()
864 .name = "TI DP83867",
897 MODULE_DESCRIPTION("Texas Instruments DP83867 PHY driver");