Beaglebone Serial Ports Progress

Iain Young iain at g7iii.net
Tue Feb 19 18:23:55 UTC 2013


On 17/02/13 18:21, Tim Kientzle wrote:

>>
>> Before I send the full patch what are the FreeBSD standards wrt the
>> above lines in am335x_prcm_attach() ? Should I leave as is ? Create
>> a separate function, and call it from am335x_prcm_attach() ? Or do I
>> create a #define in the same file, and create functions for each UART,
>> as I see some other clocks do ?
>
> It would require a little more work but I think the natural
> place to put this would be to put
>
>      uart1: serial at 48022000 {
>         ...
>         clocks = "UART1";
>         clock-parent = <&PRCM>;
>      };
>
> in the FDT (which is a straightforward way of
> saying "this device needs the PRCM to turn on
> "UART1" clocks) and then figure out how to
> actually support it.  ;-)
>
> This is the same issue that we've been discussing
> for pinmux, and the above is essentially the same solution
> being discussed for pinmux.
>
> It's not yet clear to me where/how this info should be acted on.
> It could actually be handled in the simplebus driver, I
> think, without modifying (in this case) the UART driver code
> at all.   That would need only a standard way for simplebus to
> communicate the clock-init string to the designated
> clock handler.

In that case, I shall leave things as they are for now, until a
consensus is come to, and other, better kernel coders than I
have written the necessary glue :)

In the meantime, the patch is attached here for anyone that wants
to use the other 5 UARTS (note UART3's TX and RX lines are not
brought out, but it's CTS and RTS lines can still be used for
other things.

The patch is in two parts, one for beaglebone.dts, and one for 
am335x_prcm.c. You need to apply both. patch -p0 from /usr/src
or patch -p1 from /usr/src/sys should suffice.

Thanks to all those that helped point me in the right direction,
I couldn't have got the UARTs  working without your help.

Iain



-------------- next part --------------
A non-text attachment was scrubbed...
Name: beaglebone.dts.patch
Type: text/x-patch
Size: 3004 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20130219/85321ea7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: am335x_prcm_uart_clks.patch
Type: text/x-patch
Size: 544 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20130219/85321ea7/attachment-0001.bin>


More information about the freebsd-arm mailing list