Re: [PATCH 6/6] ptp_ocelot: support 4 programmable pins
From: Vladimir Oltean
Date: Fri Mar 20 2020 - 09:20:48 EST
Hi Yangbo,
On Fri, 20 Mar 2020 at 12:42, Yangbo Lu <yangbo.lu@xxxxxxx> wrote:
>
> Support 4 programmable pins for only one function periodic
> signal for now. Since the hardware is not able to support
> absolute start time, driver starts periodic signal immediately.
>
Are you absolutely sure it doesn't support absolute start time?
Because that would mean it's pretty useless if the phase of the PTP
clock signal is out of control.
I tested your patch on the LS1028A-RDB board using the following commands:
# Select PEROUT function and assign a channel to each of pins
SWITCH_1588_DAT0 and SWITCH_1588_DAT1
echo '2 0' > /sys/class/ptp/ptp1/pins/switch_1588_dat0
echo '2 1' > /sys/class/ptp/ptp1/pins/switch_1588_dat1
# Generate pulses with 1 second period on channel 0
echo '0 0 0 1 0' > /sys/class/ptp/ptp1/period
# Generate pulses with 1 second period on channel 1
echo '1 0 0 1 0' > /sys/class/ptp/ptp1/period
And here is what I get:
https://drive.google.com/open?id=1ErWufJL0TWv6hKDQdF1pRL5gn4hn4X-r
So the periodic output really starts 'now' just like the print says,
so the output from DAT0 is not even in sync with DAT1.
> Signed-off-by: Yangbo Lu <yangbo.lu@xxxxxxx>
> ---
Thanks,
-Vladimir