Skip to main content
JOhn1
Associate II
June 28, 2022
Solved

aliasing serial ports to names like (rs232, etc.)

  • June 28, 2022
  • 1 reply
  • 1220 views

Hi, Is there any way to give a more meaningful name to a serial port with the device tree, so that is shows up in the linux kernel?

Right now, in a device tree, it is possible to choose an alias in the alias node. But they do show up as ttySTMx in the /dev directory.

Is there a way to make it work so that it gets a more intutive name like rs232?

  • For my specific layout some serial ports are connected to a specific interface.
/ {
 
	aliases {
		serial1 = &usart1;
	};
 
}; /*root*/
// Instead
/ {
	aliases {
		rs232 = &usart1;
	};
 
}; /*root*/

This topic has been closed for replies.
Best answer by Olivier GALLIEN

Hi @JOhn​ ,

Serial name presented by the SoC is defined in the serial driver source code :

drivers/tty/serial/stm32-usart.h:#define STM32_SERIAL_NAME "ttySTM"

Olivier

1 reply

Olivier GALLIEN
Olivier GALLIENBest answer
Technical Moderator
July 11, 2022

Hi @JOhn​ ,

Serial name presented by the SoC is defined in the serial driver source code :

drivers/tty/serial/stm32-usart.h:#define STM32_SERIAL_NAME "ttySTM"

Olivier

Olivier GALLIEN In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.