Okay, so I have made a little progress...
I modified .dtb file in the way similar to described here:
https://stackoverflow.com/questions/36090929/modifying-the-device-tree-for-the-beaglebone-black
I've put the am335x-boneblack.dtb file on SD card before installation and
then run installation to eMMC.
After installation nothing has changed, but I've checked the boot partition
("mount -t msdos /dev/sd0i /boot")
I've found that there are unchanged default .dtb files so I've removed all
am335x* and put my modified am335x-boneblack.dtb.

In dmesg appeared com1 and com2:
com0: console
com1 at simplebus0: ti16750, 64 byte fifo
com1: probed fifo depth: 0 bytes
com2 at simplebus0: ti16750, 64 byte fifo
com2: probed fifo depth: 0 bytes

But still I can't transmit anything e.g.:
echo "test" > /dev/cua01
echo "test" > /dev/cua02
should appears on P9_21 or P9_24 but can't see anything (high port state
all the time).

Do you have any suggestions why still it doesn't work?

devices /dev/cua01 and /dev/cua02 seems to be accessible and configured:
testboard# stty -a -f /dev/cua01
speed 9600 baud; 0 rows; 0 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
        -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
        -extproc -xcase
iflags: -istrip icrnl -inlcr -igncr -iuclc ixon -ixoff ixany imaxbel
        -ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -onocr -onlret -olcuc -oxtabs -onoeot
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;
testboard# stty -a -f /dev/cua02
speed 9600 baud; 0 rows; 0 columns;
lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl
        -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo
        -extproc -xcase
iflags: -istrip icrnl -inlcr -igncr -iuclc ixon -ixoff ixany imaxbel
        -ignbrk brkint -inpck -ignpar -parmrk
oflags: opost onlcr -ocrnl -onocr -onlret -olcuc -oxtabs -onoeot
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -mdmbuf
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
        eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
        min = 1; quit = ^\; reprint = ^R; start = ^Q; status = <undef>;
        stop = ^S; susp = ^Z; time = 0; werase = ^W;

What I've exactly made in .dts was:
In dts decompiled from default dtb:
I added:
uart1_pins: pinmux_uart1_pins {
pinctrl-single,pins = <
0x180 0x20
0x184 0x20
>;
};
uart2_pins: pinmux_uart2_pins {
pinctrl-single,pins = <
0x150 0x21
0x154 0x01
>;
};

and next:
serial@48022000 {
compatible = "ti,am3352-uart", "ti,omap3-uart";
ti,hwmods = "uart2";
clock-frequency = <0x2dc6c00>;
reg = <0x48022000 0x2000>;
interrupts = <0x49>;
status = "okay";
dmas = <0x27 0x1c 0x0 0x27 0x1d 0x0>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
};

serial@48024000 {
compatible = "ti,am3352-uart", "ti,omap3-uart";
ti,hwmods = "uart3";
clock-frequency = <0x2dc6c00>;
reg = <0x48024000 0x2000>;
interrupts = <0x4a>;
status = "okay";
dmas = <0x27 0x1e 0x0 0x27 0x1f 0x0>;
dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
};



śr., 22 lut 2023 o 16:29 mardu <[email protected]> napisał(a):

> Hello,
>
> How can I check which /dev/tty or /dev/cua corresponds to which physical
> pin at the connector?
>
> Is there a need to set or change something in dtb files (or something like
> that) to enable UART on OpenBSD on BBB?
> (I ask because to run UART on BBB on Debian I have to add  some lines to
> /boot/uEnv.txt.)
>
> Similarly, how to determine GPIOs?
>
> Marcin
>

Reply via email to