PPS or /dev/ppsN on Raspberry Pi 3

Ian Lepore ian at freebsd.org
Mon Mar 12 14:45:39 UTC 2018


On Mon, 2018-03-12 at 07:38 +0000, Shamim Shahriar wrote:
> On 12/03/2018 01:12, Oleksandr Tymoshenko wrote:
> > 
> > sysctl -b hw.fdt.dtb | dtc -I dtb -O dts | grep pps
> Hello Gonzo
> 
> I made a little change (pps numbers) on your example and put that in 
> place. After reboot, if I run the command above, I can see the two
> pps 
> devices
> # sysctl -b hw.fdt.dtb | dtc -I dtb -O dts | grep pps
>          pps at 1 {
>                  compatible = "pps-gpio";
>          pps at 0 {
>                  compatible = "pps-gpio";
> 
> However, there is no /dev/pps yet on the system. Is there something
>> need to do in addition to get the pps drivers in place?
> 
> Regards

The pps-gpio driver creates devices named /dev/gpioppsN.  You need to
create links to the /dev/ppsN numbers you want them assigned to (using
devfs.conf entries).  The reason for this is that there may be many
different pps-generating devices on the system and the admin needs to
decide which ones link up to the pps devices specified in server
configuration lines in ntp.conf.

For example, on my beaglebone that I use for pps testing, my devfs.conf
has these entries:

    link    	    cuaU0    	    	    pps0
    link    	    cuau1    	    	    pps1
    link    	    dmtpps    		    pps2
    link    	    gpiopps0    	    pps3

and my ntp.conf on that board has:

    server 127.127.22.0              minpoll 4 maxpoll 4
    fudge  127.127.22.0 stratum 0 refid ucom
    server 127.127.22.1              minpoll 4 maxpoll 4
    fudge  127.127.22.1 stratum 0 refid uart
    server 127.127.22.2              minpoll 4 maxpoll 4
    fudge 127.127.22.2 stratum 0 refid timr
    server 127.127.22.3              minpoll 4 maxpoll 4
    fudge 127.127.22.3 stratum 0 refid gpio

-- Ian


More information about the freebsd-arm mailing list