Skip to content
Snippets Groups Projects
Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Priyanka Jain's avatar
    2ee6c52e
    driver/net/fm/memac_phy: Initialize mdio_clock for SoCs wih FMANv3 · 2ee6c52e
    Priyanka Jain authored
    
    MDIO clock needs to be initialized in u-boot code for SoCs
    having FMAN-v3(v3H or v3L) controller due to below reasons
    
    -On SoCs that have FMAN-v3H  like B4860, default value of
    MDIO_CLK_DIV bits in mdio_stat(mdio_cfg) register generates
    mdio clock too high (much higher than 2.5MHz), violating the
    IEEE specs.
    -On SOCs that have FMAN-v3L like T1040, default value of
    MDIO_CLK_DIV bits is zero, so MDIO clock is disabled.
    
    So, for proper functioninig of MDIO, MDIO_CLK_DIV bits needs to
    be properly initialized.
    Also this type of initialization is generally done in
    PBI(pre-bootloader) phase using rcw.But for chips like T1040
    which support deep-sleep, such type of initialization cannot be
    done in PBI phase due to the limitation that during deep-sleep
    resume, FMAN (MDIO) registers are not accessible in PBI phase.
    So, mdio clock initailization must be done as part of u-boot.
    
    This initialization code is implemented in memac_phy.c which
    gets compiled only for SoCs having FMANv3, so no extra compilation
    flag is required.
    
    Signed-off-by: default avatarPriyanka Jain <Priyanka.Jain@freescale.com>
    Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
    2ee6c52e
    History
    driver/net/fm/memac_phy: Initialize mdio_clock for SoCs wih FMANv3
    Priyanka Jain authored
    
    MDIO clock needs to be initialized in u-boot code for SoCs
    having FMAN-v3(v3H or v3L) controller due to below reasons
    
    -On SoCs that have FMAN-v3H  like B4860, default value of
    MDIO_CLK_DIV bits in mdio_stat(mdio_cfg) register generates
    mdio clock too high (much higher than 2.5MHz), violating the
    IEEE specs.
    -On SOCs that have FMAN-v3L like T1040, default value of
    MDIO_CLK_DIV bits is zero, so MDIO clock is disabled.
    
    So, for proper functioninig of MDIO, MDIO_CLK_DIV bits needs to
    be properly initialized.
    Also this type of initialization is generally done in
    PBI(pre-bootloader) phase using rcw.But for chips like T1040
    which support deep-sleep, such type of initialization cannot be
    done in PBI phase due to the limitation that during deep-sleep
    resume, FMAN (MDIO) registers are not accessible in PBI phase.
    So, mdio clock initailization must be done as part of u-boot.
    
    This initialization code is implemented in memac_phy.c which
    gets compiled only for SoCs having FMANv3, so no extra compilation
    flag is required.
    
    Signed-off-by: default avatarPriyanka Jain <Priyanka.Jain@freescale.com>
    Reviewed-by: default avatarYork Sun <yorksun@freescale.com>