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

&spi0 {
  status = "disabled";
};
&uart1 {
  status = "okay";
  dma-names = "!tx", "!rx";
  pinctrl-0 = <&uart1_xfer &uart1_cts>;
};

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 :slight_smile:

Not suggest to do it changed, gpio of the rk3128 is used by other modules .
Do that change maybe cause some function unuseful.

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 ?

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 ?

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 :

#define CONFIG_UART_NUM			UART_CH1

This works for me :slight_smile:

Clicking the like button now—this content is amazing. With 1Z0-1133-24 new exam cram materials, you’ll find rich content, and it’s offered free of charge to help you.

The article is so insightful and inspiring, thanks for sharing! The rich content of Latest test dumps C_S4CPR_2502 file is available for free, designed to assist you in your studies.