Re: [PATCH v2 net-next] net: stmmac: Add PPS and Flexible PPS support

2018-05-25 Thread Richard Cochran
On Fri, May 25, 2018 at 04:32:52PM +0100, Jose Abreu wrote: > +int dwmac5_pps_config(void __iomem *ioaddr, bool enable) > +{ > + u32 val = readl(ioaddr + MAC_PPS_CONTROL); > + > + /* There is no way to disable fixed PPS output so we just reset > + * the values to make sure its in fixed

[PATCH v2 net-next] net: stmmac: Add PPS and Flexible PPS support

2018-05-25 Thread Jose Abreu
This adds support for PPS output and Flexible PPS (which is equivalent to per_out output of PTP subsystem). Tested using an oscilloscope and the following commands: 1) Start PTP4L: # ptp4l -A -4 -H -m -i eth0 & 2) Set Flexible PPS frequency: # echo > /sys/class/ptp/ptpX/perio