Linux_TX and Linux _RX as UART in Android

Hallo Terry,

For our application we need 2 UART ports. Is it possible to use Linux_RX and Linux_TX as a normal UART in Android? Thank you.

Best Regards,

Doelmann

@doelmann you will need to tag the person to get their attention, I will tag him for you,

@Terry could you follow up please, Thank you

We haven’t do that. I think you can try to modify the source code.

@Terry For our application, we need 2 UARTs (For the Data Communication and for the Resistive Touchscreen). I checked the schematic of the VIM1 and found that there are some UARTs port available but it configured to I2C (Pin D1 and Pin E1). Is it possible to configure this pin to UART? How we change the source code? Thank you very much.

You can config the 2C_SCK_A/2C_SDA_A as uart. Have a try.

--- a/arch/arm/boot/dts/amlogic/kvim.dts
+++ b/arch/arm/boot/dts/amlogic/kvim.dts
@@ -1248,12 +1248,16 @@
 };
 
 &i2c0 {
-       status = "okay";
+       status = "disabled";
        pinctrl-names="default";
        pinctrl-0=<&a_i2c_master>;
        clock-frequency = <400000>;
 };
 
+&uart_A {
+       status = "okay";
+};
+

2 Likes

Hallo @Terry,

The content of the kvim.dts is not exactly the same like you wrote. But I manage to configure it. Thank you very much for the tip.

Hi, Terry:

May I do this change under Windows ? If yes, how to do it ?

Thanks,
Mark, zhang

Hi, @Terry:

May I do this change under Windows ? If yes, how to do it ?

Thanks,
Mark, zhang

@mark.zhang you need to modify related files from android source and recompile the kernel in Linux

@Electr1 Thanks for response, I never recompile Android kernel before, please give me some detial instruction or reference if it is possible.

you can refer to relevant docs :slight_smile:

1 Like