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";
};
};
};
};
On Monday, August 27, 2018 at 10:53:44 AM UTC-5, Thomas wrote:
>
> Robert,
> Thank you again for your assistance. I am stuck trying to get the overlay
> to compile and am assuming that I have something incorrect. Below is the
> overlay that I created:
>
> /*
> * Copyright (C) 2013 CircuitCo
> *
> * Virtual cape for UART1 on connector pins P9.24 P9.26
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License version 2 as
> * published by the Free Software Foundation.
> */
>
> /dts-v1/;
> /plugin/;
>
> #include <dt-bindings/board/am335x-bbw-bbb-base.h>
> #include <dt-bindings/pinctrl/am33xx.h>
>
> / {
> compatible = "ti,beaglebone", "ti,beaglebone-black",
> "ti,beaglebone-green";
>
> // identification
> part-number = "BB-UART1";
> version = "00A0";
>
> // resources this cape uses
> exclusive-use =
> "P9.24", // uart1_txd
> "P9.26", // uart1_rxd
> "P9.12", // rtc: gpio1_29
> // "P9.19", // uart1_rtsn conflict
> with uart1_rtsn.i2c2_scl, i.e. the cape EEPROMS
> // "P9.20", // uart1_ctsn conflict
> with uart1_ctsn.i2c2_sda, i.e. the cape EEPROMS
>
> "uart1"; // hardware ip used
>
> /*
> * Free up the pins used by the cape from the pinmux helpers.
> */
> fragment@0 {
> target = <&ocp>;
> __overlay__ {
> P9_12_pinmux { status = "disabled"; }; /* P8_26:
> gpmc_csn0.gpio1_29 */
> P9_24_pinmux { status = "disabled"; }; /*
> uart1_txd */
> P9_26_pinmux { status = "disabled"; }; /*
> uart1_rxd */
> };
> };
>
> fragment@1 {
> target = <&am33xx_pinmux>;
> __overlay__ {
> bb_uart1_pins: pinmux_bb_uart1_pins {
> pinctrl-single,pins = <
> BONE_P9_24 (PIN_OUTPUT |
> MUX_MODE0) // uart1_txd.uart1_txd
> BONE_P9_26 (PIN_INPUT |
> MUX_MODE0) // uart1_rxd.uart1_rxd
> // BONE_P9_19 (PIN_OUTPUT |
> MUX_MODE0) // uart1_rtsn.uart1_rtsn
> // BONE_P9_20 (PIN_INPUT |
> MUX_MODE0) // uart1_ctsn.uart1_ctsn
> >;
> };
> };
> };
>
> fragment@2 {
> target = <&uart1>;
> __overlay__ {
>
> bb_gpio1_29_pins: pinmux_bb_gpio1_29_pins {
> pinctrl-single,pins = <
> BONE_P9_12 (PIN_INPUT |
> MUX_MODE7) /* P9_12: gpmc_csn0.gpio1_29 */
> >;
> };
> status = "okay";
> pinctrl-names = "default";
> pinctrl-0 = <&bb_uart1_pins>;
> };
> };
> };
>
>
> > Robert,
> > Thank you for the fast reply.
> > So I assume that I need to edit your lines: P2_01_pinmux { status =
> "disabled"; }; /* gpio1_18 - EXTINT */
> >
> > P2_03_pinmux { status = "disabled"; }; /* gpio0_23 - PULSE */
>
> >
> > P2_05_pinmux { status = "disabled"; }; /* gpio0_30 - TXD */
> >
> > P2_07_pinmux { status = "disabled"; }; /* gpio0_31 - RXD */
> P1_04_pinmux { status = "disabled"; }; /* gpio2_25 - RST */
> >
> >
> > I am unsure how you are getting the naming convention for these pins.
> Can you shed some light on it for me?
> >
> >
> > Those pin defintion's are tied to the PocketBeagle..
> > For the older BeagleBone use this example for the usart pis
> >
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-UART1-00A0.dts#L36-L66
>
> >
> > and expand that for P9_12, look at P8_26 here for help:
> >
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RTC-01-00A0.dts#L39
>
> >
> >
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-RTC-01-00A0.dts#L61-L65
>
> >
> > The main thing to take away from the PB-UART4-GNSS-5-CLICK.dts example
> is the pps node..
> >
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/PB-UART4-GNSS-5-CLICK.dts#L46-L58
>
> >
> > and the test it with the ppstest binary:
> > [ 30.902060] pps_core: LinuxPPS API ver. 1 registered[ 30.907113]
> pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <
> [email protected]>[ 30.945900] pps pps0: new PPS source pps.-1[
> 30.956911] pps pps0: Registered IRQ 74 as PPS sourcedebian@beaglebone:~$
> sudo ppstest /dev/pps0 trying PPS source "/dev/pps0"found PPS source
> "/dev/pps0"ok, found 1 source(s), now start fetching data...source 0 -
> assert 1523553378.571630304, sequence: 15 - clear 0.000000000, sequence:
> 0source 0 - assert 1523553379.571678846, sequence: 16 - clear 0.000000000,
> sequence: 0
> > Regards,
> > --
> > Robert Nelson
> > https://rcn-ee.com/
> > --
> > For more options, visit http://beagleboard.org/discuss
> > ---
> > You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> > To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/Qu78BPEdTtQ/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAOCHtYhHUGGU-Ms4%2BgisnpzOmK2ti%3DuTeWyYyr1y4V_2jq_QdA%40mail.gmail.com.
>
>
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
>
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/369af8c5-5ace-49e5-b0cd-cae3d15f25f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.