AnsweredAssumed Answered

configure the serdes of ls1012a to base1000-KX mode.

Question asked by 李 李 on Nov 11, 2019
Latest reply on Nov 24, 2019 by ufedor

Hi team,
    The processor we are using is ls1012a, and the code used is open source flexbuild_lsdk1812_update_010719. I read the document "Document Number: LS1012ARM Rev. 2, 02/2019" and learned that the serdes of this processor can be configured in either SGMII or base1000-KX mode. The default configuration of open source software is SGMII mode. Now I want to configure serdes to base1000-KX mode. The 28.7.1.3 1000Base-KX chapter of LS1012ARM document has detailed configuration steps. But I don't know how to read and write the following registers(The following steps are taken from the configuration of the base1000-KX mode in the LS1012ARM documentation.):

       4. Initialize 1000Base-KX (Clause 45) AN Advertisement Register 1:
               TX_NONCE=unique value per device
       5. Read 1000Base-KX (Clause 45) AN Status Register to clear any previous status
       6. Initialize 1000Base-KX (Clause 45) AN Control Register to 0x1200:
                  AN_ENAB=1
                  RST_AN=1

My question is as follows:

1.Can I use the pfe_phy_read and pfe_phy_write functions in uboot in open source code to do this?The path of these two functions in uboot is drivers\net\pfe_eth\pfe_mdio.c

2.If I can use these two functions to do this, what parameters do I need to pass to these two functions (I have tried several, but did not succeed)?

3.If I can't use these two functions to do the above, what do I need to do?

 

Thanks!

 

      

Outcomes