Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Changing debug output from uart2 to uart1 in Android5.1

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410

Changing debug output from uart2 to uart1 in Android5.1

Posted at 1/15/2018 16:04:32      View:2879 | Replies:4        Print      Only Author   [Copy Link] 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
Reply

Use props Report

792

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
792
Posted at 1/16/2018 10:35:12        Only Author  2#
Not suggest to do it changed,  gpio of the rk3128 is used by other modules .
Do that change maybe cause some function unuseful.
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 1/16/2018 16:06:10        Only Author  3#
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 ?
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 1/24/2018 16:56:15        Only Author  4#
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 ?
Reply

Use props Report

410

Credits

0

Prestige

0

Contribution

intermediate

Rank: 3Rank: 3

Credits
410
Posted at 2/2/2018 18:31:17        Only Author  5#
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
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list