cancel
Showing results for 
Search instead for 
Did you mean: 

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

JOhn1
Associate III

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*/

1 ACCEPTED SOLUTION

Accepted Solutions
Olivier GALLIEN
ST Employee

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.

View solution in original post

1 REPLY 1
Olivier GALLIEN
ST Employee

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.