cancel
Showing results for 
Search instead for 
Did you mean: 

USART6 Pins on PF4 & PF5 are shows NO ACCESS in Linux

Rajsingh_
Associate

Hi Team,

I am working on a custom STM32MP255 board with OpenSTLinux (Yocto, kernel 6.6).

I want to use USART6 only in Linux (no need in TF-A or U-Boot).
Console is on USART2 (ttySTM0). USART6 is intended for RS232 communication.

Device Tree Configuration (Linux)

Aliases

 

aliases {
serial0 = &usart2;
serial1 = &uart5;
serial2 = &usart1;
serial6 = &usart6;
ethernet0 = &eth1;
};

Pinctrl configuration

 

usart6_pins_mx: usart6_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, AF6)>; /* USART6_TX */
bias-disable;
drive-push-pull;
slew-rate = <0>;
};
pins2 {
pinmux = <STM32_PINMUX('F', 4, AF6)>; /* USART6_RX */
bias-disable;
drive-push-pull;
};
};

usart6_idle_pins_mx: usart6_idle_mx-0 {
pins1 {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>; /* USART6_TX */
};
pins2 {
pinmux = <STM32_PINMUX('F', 4, AF6)>; /* USART6_RX */
bias-disable;
drive-push-pull;
};
};

usart6_sleep_pins_mx: usart6_sleep_mx-0 {
pins {
pinmux = <STM32_PINMUX('F', 5, ANALOG)>,
<STM32_PINMUX('F', 4, ANALOG)>;
};
};

USART6 node

 

&usart6 {
pinctrl-names = "default", "idle", "sleep";
pinctrl-0 = <&usart6_pins_mx>;
pinctrl-1 = <&usart6_idle_pins_mx>;
pinctrl-2 = <&usart6_sleep_pins_mx>;
/delete-property/dmas;
/delete-property/dma-names;
status = "okay";
};

Runtime Observations

root@stm32mp255-customeds32-80-f7-b1-8c-8b:~# cat /sys/kernel/debug/pinctrl/*/pinconf-pins | grep -A0 "PF[45]"
pin 84 (PF4): NO ACCESS
pin 85 (PF5): alternate 6 (USART6_TX) - push pull - floating - low speed


root@stm32mp255-customeds32-80-f7-b1-8c-8b:~# cat /sys/kernel/debug/pinctrl/*/pinmux-pins | grep PF4
pin 84 (PF4): UNCLAIMED


root@stm32mp255-customeds32-80-f7-b1-8c-8b:~# cat /sys/kernel/debug/pinctrl/*/pinmux-pins | grep PF5
pin 85 (PF5): UNCLAIMED


root@stm32mp255-customeds32-80-f7-b1-8c-8b:~# ls /dev/ttySTM*
/dev/ttySTM0 /dev/ttySTM1 /dev/ttySTM6

USART6 is not used in TF-A or U-Boot — only in Linux.

How to configure USART6 with PF4 & PF5 ?

Is additional configuration required for USART6 access controller in STM32MP255?

I Checked AF with Datasheet its correct. 

Help me to Resolve this issue.

 

Thanks 

1 REPLY 1
DMårt
Lead

It's the M33 processor that's owning the USART6.

You need to disable the ownership of USART6 from M33 to A35.

STM32MP151AAC3 custom board with STM32-OS as operating system: https://github.com/DanielMartensson/STM32-Computer

STM32MP257FAK3 custom board with STM64-OS as operating system: https://github.com/DanielMartensson/STM64-Computer