cancel
Showing results for 
Search instead for 
Did you mean: 

ptpd support for Linux on STM32MP133A

qua
Associate III

The STM32MP133A supports Linux, and has PTP support in its ethernet peripheral. However, there doesn't seem to be a driver, or port of ptpd for that specific hardware.

The peripheral seems similar to other STM32 parts for which there are community ports of ptpd, but

a) not officially supported

and

b) for FreeRTOS, not Linux.

 

Has anyone used ptpd with a STM32MP133A and Linux? Does ST support it at all?

2 REPLIES 2
Olivier GALLIEN
ST Employee

Hi @qua ,

I'm not expert and not sure what you mean by PTPd, but PTP looks to be supported in stmmac driver.  

* On gmac4 specifically:
 * Enable SYNC, Pdelay_Req, Pdelay_Resp when TSEVNTENA is enabled.
 * or
 * Enable  SYNC, Follow_Up, Delay_Req, Delay_Resp, Pdelay_Req, Pdelay_Resp,
 * Pdelay_Resp_Follow_Up if TSEVNTENA is disabled

SNAPTYPSEL TSMSTRENA TSEVNTENA -> 01 0 1

in /driver/net/ethernet/stmicro/stmmac_main.c
*  stmmac_hwtstamp_set - control hardware timestamping.

static int stmmac_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
...
                case HWTSTAMP_FILTER_PTP_V2_EVENT:
                        /* PTP v2/802.AS1 any layer, any kind of event packet */
                        config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
                        ptp_v2 = PTP_TCR_TSVER2ENA;
                        snap_type_sel = PTP_TCR_SNAPTYPSEL_1;
                        if (priv->synopsys_id < DWMAC_CORE_4_10)
                                ts_event_en = PTP_TCR_TSEVNTENA;
...

root@stm32mp1:~# ethtool -T eth0
Time stamping parameters for eth0:
Capabilities:
        hardware-transmit
        software-transmit
        hardware-receive
        software-receive
        software-system-clock
        hardware-raw-clock
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
        off
        on



 

Let me know if this help 

Olivier  

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
qua
Associate III

Thank you Oliver, that is very helpful. I will get hold of a dev board and try it.