On Tue, Apr 18, 2017 at 12:54:23PM -0700, Wolfgang Hennig wrote: > I'm working on a project where a Xilinx Zynq uses a DP83640 (eval board) as > the Ethernet PHY. I'm running Ubuntu/Linaro 15 on the Zynq's ARM processor > and successfully modified kernel options and compiled/installed LinuxPTP to > synchronize time over the network. Now I would like to use the DP83640's > configurable reference clock (output on a GPIO pin) to clock logic in the > FPGA section of the Zynq. To do that I would need to read/write the > DP83640's internal registers, but I don't know how. > > It seems that there is some functionality in setting the registers in > dp83640.c. In an earlier post in this list:
We don't have any support for enabling the clock output. You can hack this in using something like this: ext_write(0, phydev, PAGE6, PTP_COC, coc); > I should add that I did not (yet) find where/how to modify the xemacps > driver per https://lwn.net/Articles/392150/ > > 1. Before mdio_register, add > > bus->locktype = MDIOBUS_ATOMIC_RW; > > 2. In the .ndo_start_xmit function, add > > skb_tx_timestamp() > > 3. In the NAPI poll function, add > > skb_rx_timestamp() That info is obsolete. All you need is a MAC driver that uses phylib and calls skb_tx_timestamp(). > and so the HW timestamping might have been provided by the Zynq's build in > TSU instead of the DP83640. How would you tell? If your Zynq driver implements time stamping or PHC, then you should disable or remove that code. BTW you can check sysfs to see the PHC device names: What: /sys/class/ptp/ptpN/clock_name Description: This file contains the name of the PTP hardware clock as a human readable string. The purpose of this attribute is to provide the user with a "friendly name" and to help distinguish PHY based devices from MAC based ones. The string does not necessarily have to be any kind of unique id. > Does it matter where in the > function one adds skb_tx_timestamp()? See the comment in include/linux/skbuff.h. Thanks, Richard ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users