cancel
Showing results for 
Search instead for 
Did you mean: 

SPI5 in user spece with STM32MP135F-DK, MB1635B. Kernel Panic

MarioPieschel
Associate II

I try to activate the SPI5 in user space. It compieles correctly.

I use the repository:

repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mp1-v23.06.21

repo sync

DISTRO=openstlinux-weston MACHINE=stm32mp13-disco IMAGE="st-image-weston" source layers/meta-st/scripts/envsetup.sh

bitbake st-image-weston

after editting the device tree:

bitbake virtual/kernel -c compile -f && bitbake virtual/kernel

But I see not the spidev in /dev/...

&spi5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi5_pins_a>;
pinctrl-1 = <&spi5_sleep_pins_a>;
cs-gpios = <&gpioh 11 0>; /* PH11 */
status = "okay";

    spidev@0 {
            status = "okay";
            compatible = "rohm,dh2228fv";
            /*
            * spidev uses a compatible string 'rohm,fs2228fv' to have the
            * driver create an spi device node. This is just an example,
            * there is not a real device connected on the SPI bus.
            */
            reg = <0>;
            spi-max-frequency = <30000000>;
    };

};

Is this correct?

Please tell me not, that it goes on the STM32MP157, I know this!

---------------------------------------------------------------------------------------------------------------------------------------------------------

That nothing was happend with the SPI5, was that the devicetree blob not was in the sd-card image.

Now the devicetree is in my sd-card image and than I will get a kernel panic!!!

I gess the sorce code of the optee-os is buggy.


Starting kernel ...

E/TC:0 Panic 'Watchdog' at /usr/src/debug/optee-os-stm32mp/3.19.0-stm32mp-r1-r0/core/drivers/stm32_iwdg.c:198 <stm32_iwdg_it_handler>
E/TC:0 TEE load address @ 0xde000000
E/TC:0 Call stack:
E/TC:0 0xde0030f9
E/TC:0 0xde019f87
E/TC:0 0xde00c873
E/TC:0 0xde01966d
E/TC:0 0xde039601
E/TC:0 0xde000340

 

 

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @MarioPieschel ,

How did you generate the dts ? CubeMX ? 

Can you share the node related do SPI5 pinmux ? 

Thanks

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.


Hi Oliver,

The problem is, that I have to inset th folowing code in the devicetree of the op-tee. But I cannot find any source code of that. Whre is the sorce code of the op-tee and how to compile it?

I work with the Distribution Package! (bitbake)

Must be in the devicetree of the op-tee:

&etzpc{
...
DECPROT(STM32MP1_ETZPC_SPI5_ID, DECPROT_NS_RW, DECPROT_UNLOCK)
...
};
&rcc{
...
CLK_SPI5_PCLK6
};


I inserted/changed this the in the kernel devicetree (stm32mp135f-dk.dts, line 514):

&spi5 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&spi5_pins_a>;
pinctrl-1 = <&spi5_sleep_pins_a>;
cs-gpios = <&gpioh 11 0>; /* PH11 */
status = "okay";
spidev@0 {
status = "okay";
compatible = "rohm,dh2228fv";
reg = <0>;
spi-max-frequency = <30000000>;
};
};

Pinmux is in stm32mp13-pinctrl.dtsi, line 453.

stack_shailesh
Associate III

Did you get any solution for that? Because I am also getting same issue. I just added my customized uImage and dtb file. But during it is stuck at watchdog.

yes, with the Distribution Package you have no chance to fix this.

You have to install the SDK an build a new trusted firmware.

It is not easy :O(

Actually I compiled and generated uImage and dtb according to my requirement, but I still get same issue, I know if I edit configuration using bitbake linux-stm32mp -c menuconfig it will not create issue. I think we are missing some important step during making uImage and dtb.

bitbake virtual/kernel -c menuconfig

bitbake virtual/kernel -c compile -f && bitbake virtual/kernel -f -c deploy