Closed hilpara closed 2 months ago
First of all, are you using an ST evaluation board, or a custom board design ?
In all cases, I would recommend to first make sure that things are working as expected on a ST evaluation board. Could you try, on the STM32MP135 evaluation board from ST:
Which version of STM32CubeMX have you used to generate your Device Tree file? There is some level of dependency between the version of STM32CubeMX and the version of the ST BSP components (TF-A, U-Boot, Linux) that are used, so you can use whatever version of STM32CubeMX with whatever version of the ST BSP components.
Also the pinctrl_select_state_full messages are a bit worrying, you are getting an ENODEV from the pinctrl subsystem, this also doesn't look good.
I'm using development board from MyIR (MYD-YF13X https://www.myirtech.com/list.asp?id=727). I do not have access to evaluation board from ST (and it would not help in a future when we use the MyIR board) which doesn't have PMIC).
For the device trees, I used the mix of bootlin device trees and the ones from the MyIR. If there would be a PMIC I could directly use the bootlin files. All I have configured or at least try to configure is UART4 for debugging and mmc1 (SD-card) and mmc2 (EMMC). I'm just trying to get it boot (from SD-card) first and then add the rest later.
The biggest difference to bootlin device trees are missing PMIC (fixed regulators and maybe DDR, as I took that configuration from MyIR files) and therefore in op-tee:
cpu0-opp-table {
opp-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1350000>;
opp-supported-hw = <0x2>;
st,opp-default;
};
/delete-node/ opp-650000000;
};
As you said, ENODEV comes from pinctrl, but UART4 clocks and the pins are not controlled by the OP-TEE so it can't be that. UART4 is also working from u-boot, otherwise I would not be able to see the error messages. So I can't really understand why it can't find serial driver. Also it stops when it probes rcc part of device tree.
I did try to generate files from the CubeMX, but they are missing so much configuration that it doesn't make any sense.
Unfortunately @hilpara, we are unable to help you. Supporting the MyIR board is outside the scope of this buildroot-external-st project. Bootlin can provide commercial support to implement Linux BSP for customer STM32MP platforms, do not hesitate to contact us.
I'm trying to get help this way as I do not get any answers from ST community. I'm using your buildroot release (it doesn't matter if st/2023.02.10 or st/2024.02.3) and boot stops when u-boot starts as it can't find serial driver. Here is what I wrote to ST community and I hope you could help me to find the reason:
I have tried to debug this by adding print statements to serial-uclass.c.
In a function serial_check_stdout the chosen console is found serial0:115200n8, node 7780. Later the device uclass ID is UCLASS_SERIAL, but then the device_probe returns -ENODEV = No such device.
I did dump the tree of all devices
So the serial is found.
uclass
Driver
serial_stm32 095 serial serial@40010000
I went down the rabbit hole and managed to find, that the problem is clock, but I still don't know what is wrong:
uclass_find_device_by_ofnode (uclass.c) tries to find device node for rcc@50000000. uclass_get will find it with the key 29
and uclass_foreach_dev(dev, uc) do not anything as us->(I don't know which one) is NULL or 0 and then the uclass_find_device_by_ofnode will return -ENODEV.
I have also included my defconfig and device tree files. I hope you could point me to a right direction why the boot stops.
stm32mp135_defconfig.txt stm32mp135-optee.dts.txt stm32mp135-tfa.dts.txt stm32mp135-uboot-u-boot.dts.txt stm32mp135-uboot.dts.txt