Sorry guys, I've trying several days now to get a 2nd uart (first one is console) configured on an FreeBSD 13.1-release installed on a SD Card on a Cubieboard2. Yes, I know, this isn't the newest hardware anymore.. but the problem is similar on olimex, odroid or even raspberry boards.
I can't fiddle out how to tell the kernel that there is a 2nd uart..and I've read many things in the meantime...
there is a sysutils/u-boot-cubieboard2 port for the u-boot, that gets installed at /usr/local/share/u-boot/u-boot-cubieboard2
I've followed the instructions from the README file there and installed the u-boot on the sd-card. The system is running fine so far.
I've patched the /usr/ports/sysutils/u-boot-cubieboard2/work/u-boot-2023.01/arch/arm/dts/sun7i-a20-cubieboard2.dts file as follows:
I've copied over the resulting sun7i-a20-cubieboard2.dtb file to /boot/dtb and /boot/msdos/dtb and after an reboot I've got
finally an
in the dmesg output, but the resulting device /dev/ttyu1 and /dev/cuau1 seems to be not functional. I've shorted PI18 and PI19 (which should be the corresponding TxD and RxD Pins) and tried to opened the line with kermit, I don't get any echo on cuau1 or ttyu1..
(I know that I have to set an option to enable HW flowcontrol somewhere..but that test should work w/o...)
What I'm missed here?
Edit: Sorry, please ignore for now. I'm an idiot. There is no connector available for PI18 and PI19..after changing the definition of uart3 and the Pins PG6 and 7 things started to work....
Regards,
Holm
I can't fiddle out how to tell the kernel that there is a 2nd uart..and I've read many things in the meantime...
there is a sysutils/u-boot-cubieboard2 port for the u-boot, that gets installed at /usr/local/share/u-boot/u-boot-cubieboard2
I've followed the instructions from the README file there and installed the u-boot on the sd-card. The system is running fine so far.
I've patched the /usr/ports/sysutils/u-boot-cubieboard2/work/u-boot-2023.01/arch/arm/dts/sun7i-a20-cubieboard2.dts file as follows:
Code:
--- arch/arm/dts/sun7i-a20-cubieboard2.dts.orig 2023-01-09 17:07:33.000000000 +0100
+++ arch/arm/dts/sun7i-a20-cubieboard2.dts 2023-06-21 18:59:42.198262000 +0200
@@ -55,6 +55,7 @@
aliases {
serial0 = &uart0;
+ serial1 = &uart2;
};
chosen {
@@ -221,6 +222,11 @@
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
+ status = "okay";
+};
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
status = "okay";
};
finally an
Code:
...
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 49 on simplebus0
uart0: console (115384,n,8,1)
uart1: <16750 or compatible> mem 0x1c28800-0x1c28bff irq 51 on simplebus0
gpioc1: <GPIO controller> on axp2xx_pmu0
..
in the dmesg output, but the resulting device /dev/ttyu1 and /dev/cuau1 seems to be not functional. I've shorted PI18 and PI19 (which should be the corresponding TxD and RxD Pins) and tried to opened the line with kermit, I don't get any echo on cuau1 or ttyu1..
(I know that I have to set an option to enable HW flowcontrol somewhere..but that test should work w/o...)
What I'm missed here?
Edit: Sorry, please ignore for now. I'm an idiot. There is no connector available for PI18 and PI19..after changing the definition of uart3 and the Pins PG6 and 7 things started to work....
Regards,
Holm
Code:
Connecting to /dev/cuau1, speed 9600
Escape character: Ctrl-X (ASCII 24, CAN): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
?Carrier required but not detected.
***********************************
Hint: To CONNECT to a serial device that
is not presenting the Carrier Detect signal,
first tell C-Kermit to:
SET CARRIER-WATCH OFF
***********************************
(~/) C-Kermit>set carrier off
(~/) C-Kermit>conn
Connecting to /dev/cuau1, speed 9600
Escape character: Ctrl-X (ASCII 24, CAN): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
Das ist ein Test
(Back at cubie2)
----------------------------------------------------
(~/) C-Kermit>set baud 57600
/dev/cuau1, 57600 bps
(~/) C-Kermit>conn
Connecting to /dev/cuau1, speed 57600
Escape character: Ctrl-X (ASCII 24, CAN): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
Das ist noch ein Test......