PTP hardware time stamping

Moderators: Oren.R, Aviad.H

Hugh3226
Posts: 8
Joined: Mon Jan 09, 2017 4:27 pm

PTP hardware time stamping

Postby Hugh3226 » Thu Feb 23, 2017 10:28 am

The hardware development guide gives instructions in Table 2-9 how to set up for PTP hardware time stamping.
I'm trying to implement this in the dtsi file.

I'm going to pinch GPIO_16 from
pinctrl_i2c3_3: i2c3grp {
fsl,pins = <
MX6QDL_PAD_GPIO_5__I2C3_SCL 0x4001b8b1
MX6QDL_PAD_GPIO_16__I2C3_SDA 0x4001b8b1
>;
};
(Why does this register value start 0x4 ???????????)

and define
MX6QDL_PAD_GPIO_16__ENET_REF_CLK 0x1b8b1
however I also need force the SION bit in IOMUXC_SW_MUX_CTL
Do I achieve that by doing the following?
MX6QDL_PAD_GPIO_16__ENET_REF_CLK | 0x10 0x1b8b1

Now for the bits that don't seem to have entries in the dtsi file
IOMUXC_ENET_REF_CLK_SELECT_INPUT ..... Address 20E_0000h +83Ch
GPR (IOMUXC_GPR1) .......... Address 20E_0000h +4h
............... How do I set them?

Thanks
Hugh

Hugh3226
Posts: 8
Joined: Mon Jan 09, 2017 4:27 pm

Re: PTP hardware time stamping

Postby Hugh3226 » Thu Feb 23, 2017 1:12 pm

Aviad,

In mach-imx6q.c (file is attached) the function
static void __init imx6q_1588_init(void)
does:
regmap_update_bits(gpr, IOMUXC_GPR1,
IMX6Q_GPR1_ENET_CLK_SEL_MASK,
IMX6Q_GPR1_ENET_CLK_SEL_ANATOP);

That is probably what I need...........

Does the Variscite Yocto build call that during bootup?

Regards
Hugh
Attachments
mach-imx6q.c
(16.2 KiB) Downloaded 253 times

systemz
Posts: 16
Joined: Sat Jun 04, 2016 4:01 pm

Re: PTP hardware time stamping

Postby systemz » Tue Feb 28, 2017 1:19 pm

I have a similar issue

We have the board running fine, ethernet works fine. ethtools reports that eth0 is HW timestamp aware

we have compiled linuxptp and it does indeed run - but the HW timestamp does not count. We use phc_ctl to initialise the time, but reading it back is always the same. Is there something specific we need to do in order to correctly initialise the Timestamp hardware?

Z

Hugh3226
Posts: 8
Joined: Mon Jan 09, 2017 4:27 pm

Re: PTP hardware time stamping .... GPIO16

Postby Hugh3226 » Sat Mar 04, 2017 4:54 pm

GPIO16 is intimately connected to the ability to hardware timestamp.
in iMX6DQRM.pdf
section 36.4.522 page 2658
and
section 36.4.2 page1945 GPR1[21]

in iMX6DQ6SDLHDG.pdf
table 2-9 page 23.

I t would be very helpful to know what the DART-MX6 has connected to GPIO16

Just a tiny fragment of the circuit diagram or some words would do.

Regards
Hugh


Return to “Hardware”

Who is online

Users browsing this forum: No registered users and 0 guests

cron