Post Go back to editing

Configuring Adin3310 over SPI and Ethernet

Thread Summary

The user is unable to load firmware over SPI and establish an SGMII link on Port 2 of the ADIN3310 Ethernet switch when using a custom Zynq UltraScale+ MPSoC board. The Timer0/INT pin generates an interrupt every 1.25 seconds, indicating no firmware is running, but no data is seen on the SPI lines. The support engineer suggested checking the SPI parameters, capturing SPI transactions, and ensuring P2_LINK is pulled low for SGMII mode.
AI Generated Content
Category: Hardware
Product Number: Adin3310

We are using the ADIN3310 Ethernet switch with a Zynq Ultra Scale+ MPSoC processor.


The Port 0 and 1 of switch are connected to ADI Ethernet PHYs over RGMII and Port 2 connected to Host Processor over SGMII.
We are able to enable the switch from Port 0 by connecting it to the PC and running the ADIN6310-tsn-evaluation-util.

 

Our project requires the switch firmware to be loaded over SPI and Port 2.

 

When Switch is configured in SPI mode, As per the ADIN3310 software manual, we probed the Timer0/INT pin and confirmed that it is generating an interrupt every 1.25 seconds consistently. But no data is seen on the SPI lines.

 

When Switch is configured in Port 2, the SGMII link at the host processor (Custom board MPSoC) is not getting enabled.

 

We ensured the Host configurations are proper and verified in other evaluation boards.

 

Please help us to enable this switch from our host processor over SPI and Port 2 interface.

Thread Notes

  • Hi JPrakash,

    Thank you for reaching out to us!

    Could you please share more details about your project? Specifically, what is the end application? It would be very helpful if you could provide a block diagram for better understanding.

    Are you using the ADIN3310 evaluation board or a custom board? Have you referred to the SPI example provided in the windows-project-for-adinx310?

    Also, are you trying to load the firmware using the firmware load API? Please note that the firmware is only loaded if the switch has no existing firmware or if there is a firmware mismatch.

    Are you using standard SPI or Quad SPI? Kindly confirm whether the host strapping configuration is correct for the selected SPI mode.

    Could you also share the sequence of API calls you are using? Are you encountering any errors when calling SES_AddDevice()?

    If you have selected P2 as the host port, please ensure that the host strapping pin settings align with the "HOST INTERFACE" section of the datasheet.

    Regards,
    Himanshu

  • Hi  Hseth.

    Thank you for your quick response.

    We are using Linux as our operating system on a custom board (not an evaluation board), and the board is connected via the PS section of Zynq MPSOC.
    Since this is a fresh board, I’m not sure what firmware is currently loaded in Ethernet switch. If you could share how to check the firmware version or contents, that would help with my testing.
    We are using the provided BSP and executing commands as mentioned in the documentation. 

    For example:
    Ex : ./ses-example-app -f ./eval-adin3310_IOM.xml -g /dev/gpiochip0:5 -p /dev/spidev3.0 -m ./modules/ -s 1 -i production

     

    Please refer to the switch connection block diagram and details below:

     

    ADIN3310 is connected to the PS section via SPI-0 (MIO pins 52–57).
    The TIMER0/INT line is connected to PS MIO pin 62 (Bank 2, pin 10).
    Strap pins are set to the default configuration of the switch (SPI Mode).

     

    As mentioned in document we are able to get interrupt every 1.25 seconds consistently in TIMER0/INT pin, but no data is seen on the SPI lines.

  • Hi JPrakash,

    As you mentioned in your initial query, you are observing an interrupt every 1.25 seconds on the Timer0/INT signal. This indicates that no firmware is currently running, and during the switch initialization process, the host is expected to update the firmware. Once the firmware has been successfully updated, the "SES_GetFirmwareInfo" API can be used to retrieve the firmware details.

    While executing the command:
    ./ses-example-app -f ./eval-adin3310_IOM.xml -g /dev/gpiochip0:5 -p /dev/spidev3.0 -m ./modules/ -s 1 -i production
    are you encountering any errors? Additionally, are you able to see the available SPI interfaces as described in the driver user guide?

    Could you please ensure that all parameters (-g, -p, -m) are correctly specified and share the result/output of executing the above command?

    Regards,
    Himanshu 

  • ./ses-example-app -f ./eval-adin3310.xml -g /dev/gpiochip0:5 -p /dev/spidev3.0 -m ./modules/ -s 1 -i production
    Board settings file is located at ./eval-adin3310.xml
    Yang modules folder ./modules/
    libyang[0]: Value "7A" was not found in the dictionary.
    libyang[1]: String "7A" not freed from the dictionary, refcount 1
    Device MAC: 7A:C6:BB:11:11:11
    Init with device on: /dev/spidev3.0 ready_pin:/dev/gpiochip0:5 speed:16000000
    Firmware update not requested or failed (-5)
    SetMacCheckFirmwareVersion API failed with rv -5
    SES AddDevice error -1

  • Hello JPrakash,

    Can you please share your schematic for review? You can send it privately by email to us at adin6310@analog.com 

    For SPI interface, can you capture the SPI transactions from the host? The switch is an SPI slave, so the host needs to provide clock/SS etc. 

    For the SGMII port, are you pulling the P2_LINK input low to enable the port? (drive it low or use external pull resistor to pull low -> this is required to enable the port). When you use SGMII mode as host, what strapping configuration are you using?

    best regards,

    Catherine

  • Hi Catherine,

    I have shared the schematic and the latest testing status to adin6310@analog.com.


    Best regards,
    Jyothi Prakash N