Hi Robert,
So I was able to get the file compiled. Basically, I pulled down your bb.org-overlays project from github, then added my custom dbs file to the /src/arm directory and finally ran ./install.sh This seemed to compile and install the new dtbo in the /lib/firmware directory.
Next, I made sure the new dtbo was added in my uEnv.txt file and rebooted. Success, now I have a pps0. However, when I check it with ppstest, it just times out.
I have checked my pin 9-12 with an oscilliscope, and I do see a squarewave once per second on that pin. So I am assuming there is a problem with my overlay file. Do you happen to have or know where to find an overlay that is just the PPS? Or perhaps just the PPS and the UART pins for gps/nmea strings?
This has been quite the learning curve so I am sure I have something wrong in my file. Below is the dts file that I edited and am testing with: I know it has a lot of extra stuff in it, but I was just trying to get something to work before I started removing stuff from the file.
/dts-v1/;
/plugin/;
#include <dt-bindings/board/am335x-bbw-bbb-base.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/am33xx.h>
/ {
compatible = “ti,beaglebone”, “ti,beaglebone-black”, “ti,beaglebone-green”;
/* identification */
part-number = “CLOCK”;
version = “00A0”;
exclusive-use =
“P9.24”, “P9.26”, “P9.15”, “uart1”, // gps and pps
“P9.17”, “P9.18”, “P9.21”, “P9.22”, “spi0”, // spi display
“P9.19”, “P9.20”, “i2c2”, “P9.12”, “P9.14”; // rtc
fragment@0 {
target = <&ocp>;
overlay {
P9_24_pinmux { status = “disabled”; };
P9_26_pinmux { status = “disabled”; };
P9_15_pinmux { status = “disabled”; };
P9_17_pinmux { status = “disabled”; };
P9_18_pinmux { status = “disabled”; };
P9_21_pinmux { status = “disabled”; };
P9_22_pinmux { status = “disabled”; };
P9_19_pinmux { status = “disabled”; };
P9_20_pinmux { status = “disabled”; };
P9_12_pinmux { status = “disabled”; };
P9_14_pinmux { status = “disabled”; };
};
};
fragment@1 {
target = <&am33xx_pinmux>;
overlay {
bb_uart1_pins: pinmux_bb_uart1_pins {
pinctrl-single,pins = <
BONE_P9_24 (PIN_OUTPUT | MUX_MODE6)
BONE_P9_26 (PIN_INPUT | MUX_MODE6)
;
};
bb_gps_pps_pins: pinmux_bb_gps_pps_pins {
pinctrl-single,pins = <
BONE_P9_12 (PIN_INPUT_PULLDOWN | MUX_MODE7)
;
};
bb_spi0_pins: pinmux_bb_spi0_pins {
pinctrl-single,pins = <
BONE_P9_22 (PIN_INPUT_PULLUP | MUX_MODE0)
BONE_P9_21 (PIN_INPUT_PULLUP | MUX_MODE0)
BONE_P9_18 (PIN_OUTPUT_PULLUP | MUX_MODE0)
BONE_P9_17 (PIN_OUTPUT_PULLUP | MUX_MODE0)
;
};
bb_i2c2_pins: pinmux_bb_i2c2_pins {
pinctrl-single,pins = <
BONE_P9_20 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3)
BONE_P9_19 (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3)
;
};
bb_rtc_pps_pins: pinmux_bb_rtc_pps_pins {
pinctrl-single,pins = <
BONE_P9_14 (PIN_INPUT_PULLUP | MUX_MODE7)
;
};
bb_rtc_32k_pins: pinmux_bb_rtc_32k_pins {
pinctrl-single,pins = <
BONE_P9_15 (PIN_INPUT_PULLUP | MUX_MODE7)
;
};
};
};
fragment@2 {
target = <&uart1>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_uart1_pins>;
};
};
fragment@3 {
target = <&ocp>;
overlay {
gps_pps {
status = “okay”;
compatible = “pps-gpio”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_gps_pps_pins>;
gpios = <&gpio1 16 0>;
};
rtc_pps {
status = “okay”;
compatible = “pps-gpio”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_rtc_pps_pins>;
gpios = <&gpio1 18 0>;
};
};
};
fragment@4 {
target = <&spi0>;
overlay {
#address-cells = <1>;
#size-cells = <0>;
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_spi0_pins>;
display@0 {
status = “okay”;
compatible = “spidev”;
spi-max-frequency = <10000000>;
reg = <0>;
};
};
};
fragment@5 {
target = <&i2c2>;
overlay {
status = “okay”;
pinctrl-names = “default”;
pinctrl-0 = <&bb_i2c2_pins>;
clock-frequency = <400000>;
#address-cells = <1>;
#size-cells = <0>;
ds3231: ds3231@51 {
status = “okay”;
compatible = “maxim,ds3231”;
reg = <0x68>;
#clock-cells = <1>;
};
};
};
fragment@6 {
target-path=“/”;
overlay {
aliases {
rtc0 = “/ocp/i2c@4819c000/ds3231@51”;
rtc1 = “/ocp/rtc@44e3e000”;
};
};
};
};