PTP Hardware timestamps in MAC

Post Reply
wealas
Posts: 3
Joined: Tue Apr 20, 2021 9:29 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 0
Contact:

PTP Hardware timestamps in MAC

Post by wealas »

Hello,

I am trying to figure out if it's possible to enable hardware timestamps in the ethernet MAC in the N2+.
I know the PHY doesn't support hardware timestamps
However, according to the S922X datasheet, the MAC is Synopsis DesigWare GMAC v3.70 (https://www.synopsys.com/dw/ipdir.php?d ... 1000_unive) which lists PTP hardware timestamp support.
I've tried the suggestion from here: viewtopic.php?t=24805 but it seems that the DMA hardware features register does not list timestamp support so the stmmac driver does not enable it.
I was wondering if someone from hardkernel could reach out to Amlogic and ask if this can be enabled in the MAC? I don't have access to the DesignWare GMAC documentation but maybe there is some register in there that would enable the feature?
Running CoreElec which has the BSP kernel shows this:

Code: Select all

==============================
        DMA HW features
==============================
        10/100 Mbps Y
        1000 Mbps Y
        Half duple Y
        Hash Filter: Y
        Multiple MAC address registers: Y
        PCS (TBI/SGMII/RTBI PHY interfatces): N
        SMA (MDIO) Interface: Y
        PMT Remote wake up: Y
        PMT Magic Frame: Y
        RMON module: Y
        IEEE 1588-2002 Time Stamp: N
        IEEE 1588-2008 Advanced Time Stamp:N
        802.3az - Energy-Efficient Ethernet (EEE) Y
        AV features: N
        Checksum Offload in TX: Y
        IP Checksum Offload (type1) in RX: N
        IP Checksum Offload (type2) in RX: Y
        RXFIFO > 2048bytes: Y
        Number of Additional RX channel: 0
        Number of Additional TX channel: 0
        Enhanced descriptors: N
It would be great if Hardkernel would include an ethernet PHY that supports hardware timestamps in future boards.

Thanks!

User avatar
odroid
Site Admin
Posts: 37566
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1849 times
Been thanked: 1162 times
Contact:

Re: PTP Hardware timestamps in MAC

Post by odroid »

We already asked that question to Amlogic a few years ago but they just told us it was not supported in their licensed GMAC IP.
They probably removed some features when they designed their AP blocks to save cost.
Therefore, I think there is no hope.

BTW, what is the main purpose of the PTP hardware timestamp for your application? I'm just curious.
These users thanked the author odroid for the post:
wealas (Wed Apr 21, 2021 4:15 pm)

wealas
Posts: 3
Joined: Tue Apr 20, 2021 9:29 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: PTP Hardware timestamps in MAC

Post by wealas »

Ah, cost savings...
Thanks for checking!

I need the precision for audio synchronization across speakers. I'm replacing all speakers in my house with IP speakers based on AES67. Each speaker is on the network and can play any source that's available.
NTP works well if you don't split stereo channels, but if you do, you need to have them synchronized to under 1ms or the presentation suffers. That's where PTP steps in. It can work with software timestamps but accuracy is inconsistent and is dependent a lot more on the OS. And if you have something like Kodi playing video as well you get a lot of resource contention.

It looks like the RTL8211FS has support for hardware timestamps and is about the same price as the RTL8211E. I don't know if it's pin compatible but maybe you would consider using that in the future?
Thanks again!

User avatar
odroid
Site Admin
Posts: 37566
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1849 times
Been thanked: 1162 times
Contact:

Re: PTP Hardware timestamps in MAC

Post by odroid »

We've used the RTL8211F for ODROID-C1/C2/C4/N2/HC4 which IC package is 40QFN.
But, the RTL8211FS and the RTL8211E are 48QFN.
There is no simple way to replace it.

wealas
Posts: 3
Joined: Tue Apr 20, 2021 9:29 pm
languages_spoken: english
ODROIDs: N2+
Has thanked: 1 time
Been thanked: 0
Contact:

Re: PTP Hardware timestamps in MAC

Post by wealas »

My mistake, for some reason I read the schematic as RTL8211E and it's F.

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests