Hi,
Please see my previous post: Missing files in the ADIN6310 driver software
With reference to the post above, I can run the ses-example-app built into my imx8 linux image and configure the ADIN6310 eval board OK and ethernet traffic passes between ports.
I now have the linux running on our custom hardware which connects the imx8 processor to ADIN6310 Port 0. Ports 1 and 2 both connect to separate PHY devices (DP83867ISR), Ports 3 and 4 are routed off board( effectively unconnected for now) and Port 5 is not connected.
The interface to the on board PHYs is SGMII which can be seen reflected in my config xml below .
<!-- 6310 HARDWARE SETUP -->
<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"
xmlns:sched="urn:ieee:std:802.1Q:yang:ieee802-dot1q-sched"
xmlns:ses="urn:adi:ses">
<interface>
<name>P0</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">rgmii</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">10</phy-address>
<link-polarity xmlns="urn:adi:ses">active-low</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
<interface>
<name>P1</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">sgmii</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">0</phy-address>
<link-polarity xmlns="urn:adi:ses">active-high</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
<interface>
<name>P2</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">sgmii</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">1</phy-address>
<link-polarity xmlns="urn:adi:ses">active-high</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
<interface>
<name>P3</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">sgmii-1000base-kx</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">2</phy-address>
<link-polarity xmlns="urn:adi:ses">active-high</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
<interface>
<name>P4</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">sgmii-1000base-kx</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">3</phy-address>
<link-polarity xmlns="urn:adi:ses">active-high</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
<!-- Unused, but it needs them defined, so leave as rgmii-->
<interface>
<name>P5</name>
<type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type>
<ethernet xmlns="urn:ieee:std:802.3:yang:ieee802-ethernet-interface">
<if-type xmlns="urn:adi:ses">rgmii</if-type>
<phy-rx-delay-supported xmlns="urn:adi:ses">false</phy-rx-delay-supported>
<phy-tx-delay-supported xmlns="urn:adi:ses">false</phy-tx-delay-supported>
<phy-type xmlns="urn:adi:ses">unmanaged</phy-type>
<clock-selection xmlns="urn:adi:ses">internal</clock-selection>
<phy-address xmlns="urn:adi:ses">4</phy-address>
<link-polarity xmlns="urn:adi:ses">active-high</link-polarity>
<phy-pull-up-control xmlns="urn:adi:ses">internal</phy-pull-up-control>
<duplex>full</duplex>
<speed>1</speed>
</ethernet>
</interface>
</interfaces>
<!-- HOST MAC ADDRESS SETUP -->
<ses xmlns="urn:adi:ses">
<host-setup>
<smp-mac-address>7A-C6-BB-11-11-11</smp-mac-address>
</host-setup>
</ses>
The ADIN6310 configures successfully using the example app but currently the interface is not working. I have good indication that the imx8 to ADIN6310 interface is happy and also the electrical side of the PHY to connected PC which has a positive link state. So I am investigating the SGMII link from ADIN6310 Port 1 to the first PHY device. To get some information about this link I added a status option to the example app which reads some of the PHY registers over the MDIO interface. Here is a snippet of the code I added:
if (printLinkStatus)
{
int p;
int reg;
uint16_t val;
SES_phyConfig_t phyConfig;
for (p = 1; p <= portCount; p++) {
rv = SES_GetLinkState((SES_mac_t)p);
if (rv < 0)
printf("Port %d : ERROR (%d)\n", p, rv);
else
printf("Port %d : %s\n",
p,
rv ? "UP" : "DOWN");
memset(&phyConfig, 0, sizeof(phyConfig));
rv = SES_GetPhyConfig((SES_mac_t)p, &phyConfig, sizeof(phyConfig));
//printf(" rv=%d\n", rv);
//printf(" type=%d\n", phyConfig.type);
//printf(" speed=%d\n", phyConfig.speed);
//printf(" duplex=%d\n", phyConfig.duplexMode);
//printf(" autoneg=%d\n", phyConfig.autoNegEnable);
for (reg = 0; reg < 8; reg++) {
rv = SES_ReadPhyReg((SES_mac_t)p, reg, &val);
if (rv == SES_OK)
printf("PHY reg %d = 0x%04x\n", reg, val);
else
printf("PHY reg %d read failed (%d)\n", reg, rv);
}
}
SES_RemoveHwInterface(interfaceId);
return 0;
}
This printed the following (port numbering offset because I believe port 0 is defined as SES_macPrimary):
Init with device on: /dev/spidev3.2 ready_pin:/dev/gpiochip1:12 speed:5000000
Port 1 : UP
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0xffff
PHY reg 1 = 0xffff
PHY reg 2 = 0xffff
PHY reg 3 = 0xffff
PHY reg 4 = 0xffff
PHY reg 5 = 0xffff
PHY reg 6 = 0xffff
PHY reg 7 = 0xffff
Port 2 : UP
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0xffff
PHY reg 1 = 0xffff
PHY reg 2 = 0xffff
PHY reg 3 = 0xffff
PHY reg 4 = 0xffff
PHY reg 5 = 0xffff
PHY reg 6 = 0xffff
PHY reg 7 = 0xffff
Port 3 : DOWN
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0xffff
PHY reg 1 = 0xffff
PHY reg 2 = 0xffff
PHY reg 3 = 0xffff
PHY reg 4 = 0xffff
PHY reg 5 = 0xffff
PHY reg 6 = 0xffff
PHY reg 7 = 0xffff
Port 4 : DOWN
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0xffff
PHY reg 1 = 0xffff
PHY reg 2 = 0xffff
PHY reg 3 = 0xffff
PHY reg 4 = 0xffff
PHY reg 5 = 0xffff
PHY reg 6 = 0xffff
PHY reg 7 = 0xffff
Port 5 : DOWN
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0xffff
PHY reg 1 = 0xffff
PHY reg 2 = 0xffff
PHY reg 3 = 0xffff
PHY reg 4 = 0xffff
PHY reg 5 = 0xffff
PHY reg 6 = 0xffff
PHY reg 7 = 0xffff
Port 6 : UP
rv=0
type=3
speed=2
duplex=1
autoneg=1
PHY reg 0 = 0x1140
PHY reg 1 = 0x7949
PHY reg 2 = 0x2000
PHY reg 3 = 0xa231
PHY reg 4 = 0x01e1
PHY reg 5 = 0x0000
PHY reg 6 = 0x0066
PHY reg 7 = 0x2001
The register reads on Port 5(shown as port 6) match the expected values of the PHY connected to Port1 - I confirmed this by controlling the power down signal and see the relevant bit changed state in these register reads.
I do not understand why this is not reported on the right port and where my second PHY is. I believed my 2 phy devices are boot strapped to set the PHY address to 0x0 and 0x1, but currently seeing on Port 5 where address is 0x4. I have experimented with phy address in config xml but I can not get the PHY to change to any other port. But any other value on Port 5 does revert the register reads to all 0xffff.
I wondered about trying new example code and firmware as I see there is a 6.0.1 release, but I can not find the library source code or even details of what the changes are. In fact, I now can't find the download for the 5.1.0 source code I previously obtained!
Any input/advice you have would be gratefully received.
Many Thanks
Steve
Edit Notes
[locked by: CatherineR at 1:20 PM (GMT -4) on 29 Sep 2026]
