Jump to content

NanoPi R2S - GPIO - UART1: Enabled by default ?


Go to solution Solved by Willena,

Recommended Posts

Posted (edited)

Hello everyone.

 

I'm using the latest version of armbian for the NanoPi R2S. I noticed that the board has 4 exposed GPIO ports on the board.

I'm interested in using the RX1 and TX1 and use it for the UART interface.

 

It seems I cannot use it. It might be disabled by default. Can somebody confirm or not if UART1 is enabled by default and if not what should I do to enable it ?

 

Thanks

Guillaume

 

 

 

Edited by Willena
Clarify the title
  • Willena changed the title to NanoPi R2S - GPIO - UART1: Enabled by default ?
  • Solution
Posted

After having spent a lot of time searching for the solution, I finally found it.

 

UART1 is not enabled by default. But referenced in the device-tree. It was as simple as changing some option in the dts.

After figuring out the symbol of UART1 in the symbol section of the dts

 __symbols__ {
   ...
   uart0 = "/serial@ff110000";
   uart1 = "/serial@ff120000";
   uart2 = "/serial@ff130000";
   ...

 

Further in the file we can find more information on the definition of uart1 (also known with symnol serial@ff120000)


serial@ff120000 {
  compatible = "rockchip,rk3328-uart\0snps,dw-apb-uart";
  reg = < 0x00 0xff120000 0x00 0x100 >;
  interrupts = < 0x00 0x38 0x04 >;
  clocks = < 0x02 0x27 0x02 0xd3 >;
  clock-names = "baudclk\0apb_pclk";
  dmas = < 0x12 0x04 0x12 0x05 >;
  dma-names = "tx\0rx";
  pinctrl-names = "default";
  pinctrl-0 = < 0x25 0x26 0x27 >;
  reg-io-width = < 0x04 >;
  reg-shift = < 0x02 >;
  status = "disabled";
  phandle = < 0x85 >;
};

Notice the disabled value in the status field.

Changing the status from 'disabled' to 'okay' did the trick.

After a restart UART1 was available on /dev/ttyS1 \0/

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines