Hi Lee and selsinork, I have gotten PPS working on a BBW A3 with 3.8.13 kernel following your guidance.
I am using the Adafruit Ultimate GPS breakout. I had used UART4 for serial connection to GPS and gpio1_31 (P8#20) for PPS. This pin is actually not a good choice now (I think it conflicts with emmc on BBB), but I had made the PCB this before BBB was released. Lee’s choice of 1_29 should be better.
The gpio1_31 should be coded as gpio2_31 in the overlay as selsinork pointed out. Very confusing indeed.
I had removed assert-rising-edge after seeing here that the default is already for rising edge. Below is my BB-PPSGPIO overlay source:
/dts-v1/;
/plugin/;
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”;
part-number = “BB-PPSGPIO”;
version = “00A0”;
/* state the resources this cape uses /
exclusive-use =
/ the pin header uses /
“P8.20”, / gpio1_31 /
/ the hardware ip uses */
“gpio2_31”;
fragment@0 {
target = <&am33xx_pinmux>;
overlay {
gps_pps_pins: pinmux_gps_pps_pins {
pinctrl-single,pins = <
0x84 0x27 /* P8.20 gpio1_31 (63) */
;
};
};
};
fragment@2 {
target = <&ocp>;
overlay {
pps {
compatible = “pps-gpio”;
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&gps_pps_pins>;
gpios = <&gpio2 31 0 >;
};
};
};
};
root@beaglebone:/home/debian# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
4: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4
6: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-proto
root@beaglebone:/home/debian# echo BB-PPSGPIO > /sys/devices/bone_capemgr.8/slots
root@beaglebone:/home/debian# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF—
1: 55:PF—
2: 56:PF—
3: 57:PF—
4: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART4
6: ff:P-O-L Override Board Name,00A0,Override Manuf,cape-bone-proto
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-PPSGPIO
dmsg shows:
[ 1270.098465] bone-capemgr bone_capemgr.8: part_number ‘BB-PPSGPIO’, version ‘N/A’
[ 1270.098571] bone-capemgr bone_capemgr.8: slot #7: generic override
[ 1270.098596] bone-capemgr bone_capemgr.8: bone: Using override eeprom data at slot 7
[ 1270.098619] bone-capemgr bone_capemgr.8: slot #7: ‘Override Board Name,00A0,Override Manuf,BB-PPSGPIO’
[ 1270.098760] bone-capemgr bone_capemgr.8: slot #7: Requesting part number/version based 'BB-PPSGPIO-00A0.dtbo
[ 1270.098784] bone-capemgr bone_capemgr.8: slot #7: Requesting firmware ‘BB-PPSGPIO-00A0.dtbo’ for board-name ‘Override Board Name’, version ‘00A0’
[ 1270.113904] bone-capemgr bone_capemgr.8: slot #7: dtbo ‘BB-PPSGPIO-00A0.dtbo’ loaded; converting to live tree
[ 1270.114270] bone-capemgr bone_capemgr.8: slot #7: #2 overlays
[ 1270.115369] of_get_named_gpio_flags exited with status 63
[ 1270.118823] pps pps0: new PPS source pps.14.-1
[ 1270.118993] pps pps0: Registered IRQ 207 as PPS source
[ 1270.119105] bone-capemgr bone_capemgr.8: slot #7: Applied #2 overlays.
And now we have the captured PPS assert events, showing the count changes by one every second:
debian@beaglebone:~$ date; cat /sys/class/pps/pps0/assert
Fri Jan 31 18:31:40 UTC 2014
1391193100.002460136#133
debian@beaglebone:~$ date; cat /sys/class/pps/pps0/assert
Fri Jan 31 18:31:41 UTC 2014
1391193101.002453270#134
debian@beaglebone:~$ date; cat /sys/class/pps/pps0/assert
Fri Jan 31 18:31:42 UTC 2014
1391193102.002467910#135
Robert Nelson’s 3.8.13 kernels in the recent test images already have pps-gpio client enabled. It works just fine with this overlay. I could not read the NMEA sentences on UART4 using BB-UART4 overlay though. I will try Lee’s overlay for UART4.
Thanks!
George