BBB uarts & pps dts definitions

Ian Lepore ian at freebsd.org
Thu Jan 26 15:49:36 UTC 2017


On Thu, 2017-01-26 at 00:30 -0800, Tony Hain wrote:
> > 
> > -----Original Message-----
> > From: owner-freebsd-arm at freebsd.org [mailto:owner-freebsd-
> > arm at freebsd.org] On Behalf Of Tony Hain
> > Sent: Wednesday, January 25, 2017 10:28 PM
> > To: 'Ian Lepore'; freebsd-arm at freebsd.org
> > Subject: RE: BBB uarts & pps dts definitions
> > 
> FOLLOWUP ...........
> 
> > 
> > > 
> > > If you have full source code on the BB, do:
> > Didn't really want to put full source on the BBB.
> > 
> > > 
> > > 
> > >   cd /usr/src/tools/test/ppsapi
> > >   make ppsapitest
> > I had full source on a 10.1 system, so I copied the files in that
> directory and
> > 
> > tried to make, but it is complaining about the last line needing an
> operator.
> > 
> > 
> > make: "src/ppsapitest/Makefile" line 13: Need an operator
> > make: Fatal errors encountered -- cannot continue
> > make: stopped in src/ppsapitest
> > 
> > 
> > # $FreeBSD: releng/10.1/tools/test/ppsapi/Makefile 264485 2014-04-
> > 15
> > 02:17:46Z gnn $
> > 
> > PROG=   ppsapitest
> > MK_MAN=no
> > 
> > WARNS?= 5
> > 
> > .include <bsd.prog.mk>
> > 
> > CFLAGS+=-Wno-format-security
> > 
> > test:   ${PROG}
> >         ./${PROG} /dev/cuau0
> > 
> Removed the Makefile and it built fine. As I suspected it didn't show
> anything due to the pulse being squashed when connected to that pin.
> # ./ppsapitest -v /dev/dmtpps
> Supported modebits: CAPTUREASSERT OFFSETASSERT CANWAIT TSPEC
> ^C
> 
> > 
> > 
> > 
> > Even when it gets built though, the scope shows that the signal is
> > being
> > pulled to ground as soon as the wire is connected to P8-7, so I
> > don't
> expect it
> > 
> > to work. Is there a way to check the state of the gpio? I would
> > expect
> > something like # gpioctl -N gpio_66 Can't find pin named "gpio_66"
> > 
> > # gpioctl -l
> > pin 00: 0       gpio_0<>
> > pin 01: 0       gpio_1<>
> > ...
> > pin 30: 1       gpio_30<IN,PU>
> > pin 31: 1       gpio_31<IN,PU>
> > #
> > 
> > How do the 3 additional pinmux controllers get enabled?
> > 
> > 
> > > 
> > >   ./ppsapitest /dev/dmtpps
> > > 
> > > You should get something like:
> > > 
> > >   1485400775 .009578536 204 0 .000000000 0
> > >   1485400776 .009621995 205 0 .000000000 0
> > >   1485400777 .009665453 206 0 .000000000 0
> > >   1485400778 .009708869 207 0 .000000000 0
> > > 
> > > -- Ian
> > 

Everything I'm doing is with 12-current, but things shouldn't be very
different in 11-stable.

Pin P8-7 is pin 2 on controller 2, so

  gpioctl -f /dev/gpcio2 -l

when it's configured correctly it should look like:

  pin 02: 0       gpio_2<>

If you do a verbose boot (in loader, at the prompt do boot -v) do you
see these two lines right before the am335x_dmtimer0: line?

  ti_pinmux0: setting internal 2a for timer4
  am335x_dmtpps: configured pin P8-7 as input for timer4

-- Ian


More information about the freebsd-arm mailing list