Firefly Open Source Community

Title: Changing debug output from uart2 to uart1 in Android5.1 [Print This Page]

Author: kiwor    Time: 1/15/2018 16:04
Title: Changing debug output from uart2 to uart1 in Android5.1
Hi everyone,

I want to change the debug output of the Android5.1 image on my fireprime S from uart2 to uart1.
To do so, I have added
  1. &spi0 {
  2.   status = "disabled";
  3. };
  4. &uart1 {
  5.   status = "okay";
  6.   dma-names = "!tx", "!rx";
  7.   pinctrl-0 = <&uart1_xfer &uart1_cts>;
  8. };
Copy the code

in the rk3128-fireprime device-tree file and set the "Debug UART" option to 1 (menuconfig->System Type->Debug UART).
Then I have built the whole Android image following the instructions in the wiki (http://en.t-firefly.com/doc/product/info/id/301.html) and created the update.img after changing  "console=ttyFIQ0" to "console=ttyS1" in "parameter" file. After flashing the update.img I can see ttyS1 in /dev but the debug output is still on uart2...

Did someone try to change the debug output ? If so, how did you manage to make it work ?

Thank you in advance for your help
Author: leungÏÈÉ­    Time: 1/16/2018 10:35
Not suggest to do it changed,  gpio of the rk3128 is used by other modules .
Do that change maybe cause some function unuseful.
Author: kiwor    Time: 1/16/2018 16:06
Thank you for your reply !

Searching in the DTS files I have found so far : SPI0, I2C2, rt5036, act8931 nodes using the same GPIOs as UART1and I do not need them.

Can I manage to make it work just by disabling these nodes ?
Do you know if there are other modules concerned by these GPIOs ?
Author: kiwor    Time: 1/24/2018 16:56
So, my image is still not working...

I have also tried changing fiq-debbuger node in rk312x.dtsi but it is even worse : the kernel does not load anymore.

Someone ?
Author: kiwor    Time: 2/2/2018 18:31
If someone has the same issue, here is the solution I found :

After disabling every nodes using the same pins as uart1, simply change the value of rockchip,serial-id to 1 in the node "fiq-debugger", then set the "Debug UART" option to 1 in menuconfig. Finally, in the file Android/u-boot/include/configs/rk_default_config.h change the definition of CONFIG_UART_NUM in the rockchip Hardware drivers section to :
  1. #define CONFIG_UART_NUM                        UART_CH1
Copy the code


This works for me




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1