2021-12-08 08:04 AM
Hello, i'm trying to use M4 kernel from A7 kernel worked under linux.
I've started with openSTlinux distro and it works well (i can upload firmware to M4 using rproc), but for some reasons i need to make a very small distro (less than 16 mb). For this i'm started to use buildroot build system, which i configured to use linux kernel from
https://github.com/STMicroelectronics/linux (i've tried to use 5.10 and 5.4 branches)
I'm try to original .config from openstlinux (/proc/config.gz) to build my own kernel and it builds fine. But when system is booting up i've got a regrettable messages:
[ 1.667275] stm32-rproc 10000000.m4: error -EINVAL: failed to get mcu reset
[ 1.674148] remoteproc remoteproc0: releasing m4
[ 1.678863] stm32-rproc: probe of 10000000.m4 failed with error -22
Some investigation brought me to file drivers/reset/core.c and function
static int of_reset_simple_xlate(struct reset_controller_dev *rcdev,
const struct of_phandle_args *reset_spec)
i've printk some vars:
reset_spec->args_count = 1
reset_spec->args[0] = 11
rcdev->nr_resets = 11
reset_spec->np->full_name = protocol@16
okay it looks similar to stm32mp151.dtsi where i've found a definition
firmware {
scmi0: scmi0 {
compatible = "arm,scmi-smc";
#address-cells = <1>;
#size-cells = <0>;
arm,smc-id = <0x82002000>;
shmem = <&scmi0_shm>;
scmi0_clk: protocol@14 {
reg = <0x14>;
#clock-cells = <1>;
};
scmi0_reset: protocol@16 {
reg = <0x16>;
#reset-cells = <1>;
};
};
and as you remember:
reset_spec->args[0] = 11
which is
#define RST_SCMI0_MCU_HOLD_BOOT 11 from file include/dt-bindings/reset/stm32mp1-resets.h
but in some reasons process finding of function (i'm not sure in teminology) "hold_boot" ruins on a line
if (reset_spec->args[0] >= rcdev->nr_resets)
return -EINVAL;
The question is: why? How to make it works propertly?
Thanks in advance
Solved! Go to Solution.
2022-01-09 05:53 AM
btw my buildroot .config. Maybe it will help someone
2022-01-05 08:54 AM
Hi @OMORO.1 ,
Sorry for the late reply.
Thanks for the details and your investigation.
Before going further, please can you make a try with the official Buildroot on github from Bootlin?
ST and Bootlin company announced partnership from DV3.1 to support an official buildroot distribution: https://bootlin.com/blog/buildroot-external-st-buildroot-for-stm32mp1/
In your case, I advise you to build the configuration: st_stm32mp157a_dk1_demo
Which is the only one who enables the coprocessor M4 for your board.
Tell me if you still encounter the issue.
Regards,
Kevin
2022-01-09 05:52 AM
Thanks a lot for an answer. Some times ago i've tried to setup buildroot with set variable
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION
to
https://github.com/STMicroelectronics/arm-trusted-firmware/archive/refs/tags/v2.2-stm32mp-r2.3.tar.gz
and it's completelly helped.
2022-01-09 05:53 AM
btw my buildroot .config. Maybe it will help someone
2022-01-31 09:10 AM
Hello, I have encountered the same problem, and your solution is to modify TF-A? I use a third-party board similar to STM32MP157C-ED1, but it cannot be used directly due to the difference in power IC. I tried to modify but failed. Tf-a is currently using the one provided by the manufacturer, which I cannot modify. Could you tell me in detail how you solved this problem? Thank you.
2022-01-31 11:00 AM
There was a situation i faced when buildroot by default uses some TF-A which is not propertly avail to configure rproc on my devboard, in my case i've just start to use original TF-A from ST and it's just fixed my problem. I think you have some slightly different but similar case.
2022-02-01 01:56 AM
Hello@Kevin HUBER
I have encountered the same problem,After communication @OMORO.1, my problem may also be caused by TF-A.
I am using "STM32MP15-nerve-v3.1.0", but TF-A is provided by A third-party manufacturer. The main difference of the board lies in the difference of power IC. I tried to transplant TF-A but failed. Currently, THE TF-A I use is 2.2, not 2.4 in "STM32MP15-censor-v3.1.0". I want to confirm whether the difference of TF-A will cause M4 to fail to work. If so, I need to try to transplant TF-A again.
Thank you.