BBB uarts & pps dts definitions
Ian Lepore
ian at freebsd.org
Thu Jan 26 03:29:58 UTC 2017
On Wed, 2017-01-25 at 16:54 -0800, Tony Hain wrote:
> Hi,
>
> [...]
>
> I figured it would be simpler to start debugging with the serial port first
> since there was an example for the working console port. My original intent
> was to use uart5 since it was also on P8, but given gpioctl is only listing
> the first 32 I switched to uart1 (P9-26). Simply changing the "disabled" to
> "okay" for the uart was sufficient to make it show up as /dev/ttyu1, but not
> enough to make it work. Taking hints from various dts files for uart1, I
> have:
> uart1_pins: pinmux_uart1_pins {
> pinctrl-single,pins = <0x180 0x020 0x184 0x0>;
> linux,phandle = <0x1>;
> phandle = <0x1>;
> };
> ...
> serial at 48022000 {
> compatible = "ti,am3352-uart", "ti,omap3-uart";
> ti,hwmods = "uart2";
> clock-frequency = <0x2dc6c00>;
> reg = <0x48022000 0x2000>;
> interrupts = <0x49>;
> // status = "disabled";
> status = "okay";
> dmas = <0x29 0x1c 0x0 0x29 0x1d 0x0>;
> dma-names = "tx", "rx";
>
> pinctrl-names = "default";
> pinctrl-0 = <&uart1_pins>;
> };
> I am getting a duplication error for the phandle lines. I realize the
> existing devices have unique hex values for those, but the only references
> search is turning up and downloadable dtb files I can find have the phandle
> for that uart as 0x1. Is there a reason that all the uarts are not listed
> with the correct values & commented out in the default DTS? In addition,
> uart4 & 5 don't have the dma lines that the others have ... and those lines
> don't appear in the reference linux dts files so I can't tell what they are
> for. Comments in the dts hinting at where to look for references for other
> values would make it easier to clone a working device for another one.
>
I don't know anything about the dts overlay stuff, I haven't had time
to learn about it yet.
Back when I was first working on the dmtpps driver, before I made it
configure the timer input pin for itself, I was just modifying the main
dts source in sys/gnu/dts/arm/am335x-boneblack.dts to enable uart1 and
timer4 for testing. I'll attach the patch I used to enable them and
configure the pins.
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: am335x-boneblack.dts_uart1_timer4.diff
Type: text/x-patch
Size: 1053 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20170125/ed0b7ffb/attachment.bin>
More information about the freebsd-arm
mailing list