How to create an UART interface in device tree
Hello,
I would like to use the UART7 with A7 on the STM32MP157C-DK2 with the openstlinux-20-02-19 ecosystem. Therefore i tried to include/enable the UART interface in the device tree but it is not working correctly.
I configured UART7 in the stm32mp157a-dk1.dts file by setting the status "okay":
&uart7 {
pinctrl-names = "default";
pinctrl-0 = <&uart7_pins_a>;
status = "okay";
};
and in the stm32mp157.c.dtsi file by setting the status "okay":
uart7: serial@40018000 {
compatible = "st,stm32h7-uart";
reg = <0x40018000 0x400>;
clocks = <&rcc UART7_K>;
resets = <&rcc UART7_R>;
status = "okay";
};
An alias was already given:
aliases {
serial0 = &uart4;
serial1 = &usart3;
serial2 = &uart7;
};
I ran bitbake again,flashed the new image to the board and ran the dmesg command.
The following output was generated:
root@stm32mp1-disco:~# dmesg | grep ttySTM*
[ 0.000000] Kernel command line: root=/dev/mmcblk0p6 rootwait rw console=ttySTM0,115200
[ 0.531634] 4000e000.serial: ttySTM3 at MMIO 0x4000e000 (irq = 24, base_baud = 4000000) is a stm32-usart
[ 0.531934] serial serial0: tty port ttySTM3 registered
[ 0.533538] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 25, base_baud = 4000000) is a stm32-usart
[ 1.476144] console [ttySTM0] enabled
[ 5.672859] systemd[1]: Unnecessary job for dev-ttySTM0.device was removed.
It seems that UART7 is not registered nor enabled.
Does Yocto compile a .dtb file or do I have to take additional steps?
I kindly ask you for support. Best wishes
