This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352 RGMII2 Init register config

Other Parts Discussed in Thread: AM3352

Hi, Guys!!

      We have a AM3352 project used in microwave communication product, In hardware structure we have put a 1000bmps Ethernet switcher to connect with AM3352's RGMII2 port;

      OS: linux

      We have find TI SDK code has set RGMII1 as the default port on driver level, We have copied the RGMII1 setting code to RGMII2 setting section and testing the result, But RGMII2 does not work;

So, we want some guys can help us to find out the RGMII2 register setting flow and setting steps; 

Thanks 

  • Hi,

    Which linux distribution do you use?

    The programming flow is explained in Section 14.4 Software Operation of AM335x TRM (www.ti.com/.../spruh73n.pdf). To be more precise inspect Subsection 14.4.6 Initialization and Configuration of CPSW.

    Also the following guides might be of help:
    processors.wiki.ti.com/.../Processor_SDK_Linux_Ethernet_Interface

    See the CPSW Driver Guide & CPSW Bindings links.

    Best Regards,
    Yordan
  • Hi,Yordan:
    Thanks for your help, I am try to modify below files

    ./drivers/net/ethernet/ti/cpsw.c
    ./arch/arm/mach-omap2/board-am335xevm.c

    to let RGMII1 to connect Marvell 88E6321 RGMII port, I have see the code of cpsw.c and I find below section in line 663:
    there is #define cpsw_add_switch_mode_default_ale_entries(priv)
    but no processing code.


    652 static inline int cpsw_tx_packet_submit(struct net_device *ndev,
    653 struct cpsw_priv *priv, struct sk_buff *skb)
    654 {
    655 if (ndev == cpsw_get_slave_ndev(priv, 0))
    656 return cpdma_chan_submit(priv->txch, skb, skb->data,
    657 skb->len, 1, GFP_KERNEL);
    658 else
    659 return cpdma_chan_submit(priv->txch, skb, skb->data,
    660 skb->len, 2, GFP_KERNEL);
    661 }
    662
    663 #define cpsw_add_switch_mode_default_ale_entries(priv) ////--------This section seems mission switch mode code
    664
    665 #else /* CONFIG_TI_CPSW_DUAL_EMAC */
    666
    667 static void cpsw_ndo_set_rx_mode(struct net_device *ndev)
    668 {
    669 struct cpsw_priv *priv = netdev_priv(ndev);
    670
    671 /* Clear all mcast from ALE */
    672 cpsw_ale_flush_multicast(priv->ale, ALE_ALL_PORTS << priv->host_port);
    673
    674 if (!netdev_mc_empty(ndev)) {
    675 struct netdev_hw_addr *ha;
    676
    677 /* program multicast address list into ALE register */
    678 netdev_for_each_mc_addr(ha, ndev) {

    =====================================================================
    So, Do you know where can I find some reference code for add CPSW_add_switch_mode code;

    My hardware connect shown below:
    AM3352 RGMII1 port--------------------------------------||------------------------------------------88E6321 Port 2

    RGMII1_RXD[3:0] <----------------------(22R resister x 4)------------------------------------P2_OUTD[3:0]
    RGMII1_RX_DV <----------------------(22R resister)-----------------------------------------P2_OUTEN
    RGMII1_RXC <----------------------(22R resister)-----------------------------------------P2_TXC
    RGMII1_TXC ----------------------------------------------------------------------------------->P2_INCLK
    RGMII1_TX_EN ------------------------------------------------------------------------------------>P2_INDV
    RGMII1_TXD[3:] ------------------------------------------------------------------------------------> P2_IND[3:0]
    GPIO0_28 -----------------------------------------------------------------------------------------------> 88E6321_reset
    RGMII1_MDC-------------------------------------------------------------------------------------------> MDC_CPU(pin 55)
    RGMII1_MDIO --------------------------------------------------------------------------------> MDIO_CPU(pin 54)
  • my SDK version is : board-support-sdk06/linux-3.2.0-psp04.06.00.11