Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32MP13x support #6

Open
antisvin opened this issue May 7, 2022 · 10 comments
Open

STM32MP13x support #6

antisvin opened this issue May 7, 2022 · 10 comments

Comments

@antisvin
Copy link

antisvin commented May 7, 2022

There's no available hardware yet AFAICT, but ST have published Linux kernel support about this device and there's some info online. So it's a simpler MPU with 1 A7 core running up to 900 Mhz, no M4 coprocessor. There will be a discovery board from ST.

Seems to be largely compatible with STM32MP15x on software side.

@danngreen
Copy link
Member

danngreen commented May 7, 2022

Interesting! I heard rumors about a new MP1 series. Presumably these would be cheaper than the MP15x.

It looks like they use the same BOOTROM. If the GIC is also the same, then code for these projects should port easily (just updating pins and peripheral numbers). We'll see.

I do see support for USB-C DRD, for which the MP15x series requires an external chip.

Edit: the DTS references the same GIC as the MP15x:
stm32mp131.dtsi

@antisvin
Copy link
Author

antisvin commented May 7, 2022

I would be surprised if changes go much further than tweaks to some peripherals. I.e. kernel patches mention that GPIO banks can be secured, whatever that means.

@danngreen
Copy link
Member

Yeah, likely very similar. The DTS references a different EXTI peripheral, but a lot of things are missing from the linux DTS files, so it's hard to say. I haven't looked into the u-boot or TFA yet repos yet.

@antisvin
Copy link
Author

antisvin commented Mar 8, 2023

ST have added product pages and documentation for MP13x chips. A comparison to MP15x is available here - https://www.st.com/resource/en/application_note/an5475-migration-of-applications-from-stm32mp15x-lines-to-stm32mp13x-lines-microprocessor-stmicroelectronics.pdf

They also offer a discovery kit for it - https://www.st.com/en/evaluation-tools/stm32mp135f-dk.html

@danngreen
Copy link
Member

I actually just received my MP135 discovery kit! I haven't played with it yet.

The most exciting change to me is that ST announced they will officially support RTOS on the MP13x series (at least, there will be an Azure port). The migration guide even mentions that the A7 can run on bare metal. So we may see this repo become obsolete someday :) Not anytime soon, CubeMX still provides no code generation (only DTS), which is even less supportive than the MP15x (where at least you can get example code by selecting peripherals for the M4 core).

Anyways, I looked at the differences in bootroom, and if we don't need any security or encryption then it looks like just some minor differences in the FSBL header should get a minimal bare metal system booting.

@antisvin
Copy link
Author

antisvin commented Mar 9, 2023

That's a bit too optimistic, I still have seen no indication whatsoever that ST is going to support bare metal on cortex-A cores. Of course it's nice to see them stating the obvious (that it can run on it), but they haven't made any changes to their MPU offer where they consider A cores Linux only and have not even created a Cube FW repo.

@antisvin
Copy link
Author

There's a comment from ST employee on their forums that promises support for baremetal code on MP13x to be released by the end of the year: https://community.st.com/s/question/0D53W00002DZDseSAH/how-to-run-on-bare-metal-rtos-on-stm32mp135fdk-discovery-board

@danngreen
Copy link
Member

Good to hear some details and a rough time estimate from ST. Yes, I heard something similar from an engineer in their the video announcement of the MP13x line, but no date was given then. I still plan to port this project for the MP13x soon

@danngreen
Copy link
Member

A little update on this: I made a board with the MP135 chip, and it powers on and runs code in SYSRAM.

However, there is no CMSIS device file, nor SVD files, nor any mention of the MP13x line in ST's HAL. I had hoped the registers would be more-or-less aligned with the MP15x series, but that's not the case (i.e. RCC registers have different addresses, but same names).
The only resources available are the reference manual, and the U-Boot drivers for MP13x. Technically, either one of these would be sufficient, but the lack of good resources is making it take longer than I had hoped. I do still want to have baremetal examples for this line of chips.

There is this forum post: https://community.st.com/t5/stm32-mpu-products/how-to-run-on-bare-metal-rtos-on-stm32mp135f-dk-discovery-board/td-p/81248

Sounds like they intend to release the support files for baremetal usage at the end of the year (which I hope includes at least the CMSIS device files).

@danngreen
Copy link
Member

Cube HAL for the MP13x is released!
https://github.com/STMicroelectronics/STM32CubeMP13

It includes the CMSIS device files, and looks like a full set of peripheral drivers (including RCC and DDR Init).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants