• Oleksij Rempel's avatar
    ARM: imx6q: remove PHY fixup for KSZ9031 · 66e69d88
    Oleksij Rempel authored
    Starting with:
    
        bcf3440c ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
    
    the micrel phy driver started respecting phy-mode for the KSZ9031 PHY.
    At least with kernel v5.8 configuration provided by this fixup was
    overwritten by the micrel driver.
    
    This fixup was providing following configuration:
    
    RX path: 2.58ns delay
        rx -0.42 (left shift) + rx_clk  +0.96ns (right shift) =
            1,38 + 1,2 internal RX delay = 2.58ns
    TX path: 0.96ns delay
        tx (no delay) + tx_clk 0.96ns (right shift) = 0.96ns
    
    This configuration is outside of the recommended RGMII clock skew delays
    and about in the middle of: rgmii-idrx and rgmii-id
    
    Since most embedded systems do not have enough place to introduce
    significant clock skew, rgmii-id is the way to go.
    
    In case this patch breaks network functionality on your system, build
    kernel with enabled MICREL_PHY. If it is still not working then try
    following device tree options:
    1. Set (or change) phy-mode in DT to:
       phy-mode = "rgmii-id";
       This actives internal delay for both RX and TX.
    1. Set (or change) phy-mode in DT to:
       phy-mode = "rgmii-idrx";
       This actives internal delay for RX only.
    3. Use following DT properties:
       phy-mode = "rgmii";
       txen-skew-psec = <0>;
       rxdv-skew-psec = <0>;
       rxd0-skew-psec = <0>;
       rxd1-skew-psec = <0>;
       rxd2-skew-psec = <0>;
       rxd3-skew-psec = <0>;
       rxc-skew-psec = <1860>;
       txc-skew-psec = <1860>;
       This activates the internal delays for RX and TX, with the value as
       the fixup that is removed in this patch.
    Signed-off-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
    Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
    Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
    66e69d88
mach-imx6q.c 7.35 KB