Skip to main content
mishuk
Associate III
Apr 7, 2021 08:31 UTC
Question

What is a proper way for updating device tree for STM32MP1 ? I mean updating (pinmuxing, for instance), not creating from scratch or from CubeMX output.

We are using SoM MYC-YA157C from MYIR with STM32MP1 onboard. MYIR creates pretty device-tree hierarchy, which is handy for update. CubeMX creates partial single device tree file. I would like to merge some of it parts (pinmxing, for instance) with MYIR device tree into resulting DTS file. What is a proper way for doing it ?

PS. Xilinx provides system-user.dtsi file which is included AFTER all system DTSI`s in such way that it adds or overrides contents of system DTSI while merging into final DTS file. It is very convenient. Does STM provide similar capabilities ?

This topic has been closed for replies.

5 replies

Olivier GALLIEN
ST Technical Moderator
Apr 9, 2021 14:20 UTC

Hi @mishuk​ 

Did you have a look to https://wiki.st.com/stm32mpu/wiki/STM32MP15_device_tree ( pay attention current version fit with latest V3.0 release previous version are available as archive https://wiki.st.com/stm32mpu-ecosystem-v1/wiki/Main_Page https://wiki.st.com/stm32mpu-ecosystem-v2/wiki/Main_Page)

It explain device-tree hierarchy of our offer either from upstreamed source or from CubeMX.

For ST the latest level where you can adds/override contents is the "board" dts level.

I'm not aware of MYIR device-tree hierarchy but I guess might be same philosophy.

Hope it help

Olivier

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.
mishuk
mishukAuthor
Associate III
Apr 12, 2021 09:54 UTC

Thank you for your explanation. The link you have provided is helpful. Does Cube-MX generate GPIO specific pinctlr node ? I can`t find GPIO pinctrl`s in DTS file from CubeMX . I2C, SPI pinctrl`s seem OK.

mishuk
mishukAuthor
Associate III
Apr 16, 2021 14:04 UTC

I still can`t find GPIO pinctrls in DTS file from CubeMX. Why CubeMX doesn`t generate them ?

Olivier GALLIEN
ST Technical Moderator
Apr 19, 2021 12:01 UTC

Hi @mishuk​ 

CubeMX only handle GPIO pinctrl related to IPs. ( I2C, SPI)

For other GPIO configuration you have to manage it your own following https://wiki.st.com/stm32mpu/wiki/GPIO_device_tree_configuration

Hope it help

Olivier

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.
mishuk
mishukAuthor
Associate III
Apr 19, 2021 13:23 UTC

Would you be so kind for providing step-by-step manual for setting "free" (NOT related to IPs) GPIOs in device-tree ?