aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/dsa/ocelot/felix.h
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2020-05-06 20:48:13 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-06 15:03:14 -0700
commit0ba83aa037da456bb73868e5cc20558c5a644414 (patch)
treecb40fdf38cb7eb8d87f2bba4686946a83a7ef4f3 /drivers/net/dsa/ocelot/felix.h
parentselftests: net: tcp_mmap: fix SO_RCVLOWAT setting (diff)
downloadwireguard-linux-0ba83aa037da456bb73868e5cc20558c5a644414.tar.xz
wireguard-linux-0ba83aa037da456bb73868e5cc20558c5a644414.zip
net: dsa: sja1105: the PTP_CLK extts input reacts on both edges
It looks like the sja1105 external timestamping input is not as generic as we thought. When fed a signal with 50% duty cycle, it will timestamp both the rising and the falling edge. When fed a short pulse signal, only the timestamp of the falling edge will be seen in the PTPSYNCTS register, because that of the rising edge had been overwritten. So the moral is: don't feed it short pulse inputs. Luckily this is not a complete deal breaker, as we can still work with 1 Hz square waves. But the problem is that the extts polling period was not dimensioned enough for this input signal. If we leave the period at half a second, we risk losing timestamps due to jitter in the measuring process. So we need to increase it to 4 times per second. Also, the very least we can do to inform the user is to deny any other flags combination than with PTP_RISING_EDGE and PTP_FALLING_EDGE both set. Fixes: 747e5eb31d59 ("net: dsa: sja1105: configure the PTP_CLK pin as EXT_TS or PER_OUT") Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/ocelot/felix.h')
0 files changed, 0 insertions, 0 deletions