Skip to main content
Explorer
April 7, 2021
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.

  • April 7, 2021
  • 5 replies
  • 1565 views

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

    Technical Moderator
    April 9, 2021

    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

    mishukAuthor
    Explorer
    April 12, 2021

    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.

    mishukAuthor
    Explorer
    April 16, 2021

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

    Technical Moderator
    April 19, 2021

    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

    mishukAuthor
    Explorer
    April 19, 2021

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