Closed nnn112358 closed 1 week ago
Regarding the issue of rx-tx-swap not taking effect in TFA, OP-TEE, and U-Boot, this is a known problem and is currently considered a bug. There are two points to note about this bug: First, the order of txrx in Port.C port has been changing, which is why you see the appearance of rx-tx-swap. Second, the decision made by the boss is to use Port.C solely as a serial port without outputting log information. Therefore, I have made settings to disable log output and modify the txrx order. When adjusting the txrx order, I discovered this bug. After considering a few points, I have decided not to address this bug. First, the CoreMP135 requires a boot log output, especially when users need to adjust the U-Boot startup, which is crucial. It is very cumbersome to enable log output through other methods. Second, with a different pin order, the log output will not affect external devices connected to Port.C, thus minimizing errors. In conclusion, simply swapping the two wires will allow you to see the log output during the startup phase. I believe this is a rather ideal solution that meets the boss's requirements and fulfills the function of controlling U-Boot through log viewing. If you wish to use Port.C as the system's login port, please provide feedback to the boss at M5Stack, and I will implement this modification.
Thank you for your response.
I understood that without "rx-tx-swap" is incorrect because PortC needs to make a connection with an external device.I think you are right about the default. Since the CoreMP135 kernel is open source in this repository, I use Port.C, modified as needed in my CoreMP135.
In the future, anyone with the same question will be convinced by this issue.
The boot serial console can be accessed from Grove Port.C on the CoreMP135, via USB serial. U-Boot logs are output from Port.C pin 1 (non TX-RX swap signal), while the Linux console is output from Port.C pin 2 (with TX-RX swap signal).
Uart6 in linux-dts,opte-dts,tfa-dts,uboot-dts has "rx-tx-swap" set. Afer commit ( https://github.com/m5stack/CoreMP135_buildroot-external-st/commit/d01345a18a2f54aaca111e8eda60b4616c869545 ).
In uboot-dts uart6 has rx-tx-swap disabled. rx-tx-swap or no rx-tx-swap, IO is not switched. Otherwise, for example, uart6 on linux-dts has rx-tx-swap enabled, and IO can be switched with or without rx-tx-swap.
By @ciniml, the datasheet says that the IO of UART6 is the Boot UART when BOOT.
Isn't UART6 in uboot-dts fixed with HW? If so, I would like uart6 in linux-dts, opte-dts, tfa-dts, uboot-dts to be aligned without "rx-tx-swap". I would like to see the U-Boot logs and Linux console(linux, opte, tfa) aligned on the same IO.
U-Boot logs
Linux logs from Port.C with TX-RX swap signal
Reference:
https://community.m5stack.com/topic/6563/port-c-of-boot-serial-console-is-io-inverted-on-coremp135 https://www.st.com/ja/microcontrollers-microprocessors/stm32mp135d.html