avafinger / nanopi-r4s-minimal-image

NanoPi R4S Ubuntu 20.04 LTS
14 stars 1 forks source link

How to enable UART #5

Open matthewoots opened 2 years ago

matthewoots commented 2 years ago

Hi @avafinger wondering how do I enable UART on this guy, or is it enable already?

C7FB3D28-1F9D-469F-8EAB-CDCD591FDECF

Am I able to use debug console for normal UART or can I use the UART4

avafinger commented 2 years ago

I know it is possible to use debug uart as normal uart by editing the kernel boot argument but i have never done it. I think there is some info about this on the net.

I think for the UART4 is just to enable it like this:

uart4: serial@ff370000 { compatible = "rockchip,rk3399-uart", "snps,dw-apb-uart"; reg = <0x0 0xff370000 0x0 0x100>; clocks = <&pmucru 6>, <&pmucru 34>; clock-names = "baudclk", "apb_pclk"; interrupts = <0 102 4 0>; reg-shift = <2>; reg-io-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&uart4_xfer>; status = "okay"; };

you have to decompile dtb, change it to: status = "disabled"; and re-compile it.

Please, backup dtb before trying.