Skip to main content
Visitor II
December 11, 2020
Question

How can I change device tree?

  • December 11, 2020
  • 2 replies
  • 1851 views

I understand that when I create my own machine, I can create device tree by following 2 method.

 Method 1) Building device trees by Developer Package (separately from bitbake)

 This method is described in following Wiki page.

 https://wiki.st.com/stm32mpu/wiki/How_to_compile_the_device_tree_with_the_Developer_Package

 Method 2) Building device trees by Distribution Package (included in bitbake)

 This method is described in following Wiki page.

 https://wiki.st.com/stm32mpu/wiki/How_to_create_your_own_machine

In both of above two methods, I could create the device tree (.dtb file) successfully.

Now, I want to modify the "arch/arm/boot/dts/stm32mp157c.dtsi"

In Method1, I could create updated device tree (.dtb file) by modifying "arch/arm/boot/dts/stm32mp157c.dtsi".

However, In Method2, I could not create updated device tree (.dtb file) even though I modified "arch/arm/boot/dts/stm32mp157c.dtsi".

(The build was successful, but the changes were not reflected.)

Why does the difference between the two results occur?

How can I change device tree by modifying "arch/arm/boot/dts/stm32mp157c.dtsi" in Method 2?

Best Regards.

H. Masuda

    This topic has been closed for replies.

    2 replies

    Super User
    December 12, 2020

    The stm32mp157c.dtsi and similar files are MPU specific. There should be no reasons to change them.

    HMasu.1Author
    Visitor II
    December 16, 2020

    Hi @KnarfB​ 

    Thank you for your reply.

    I need to change usbh_ohci node and usbh_ehci node in stm32mp157c.dtsi to use USB on the original board we make.

    Actually, ​in Method 1, I have succeeded in making USB available by modifying stm32mp157c.dtsi.

    H. Masuda​

    Technical Moderator
    December 14, 2020

    Hi @HMasu.1​ ,

    Indeed you should not have to change anything in stm32mp157c.dtsi, but you can override some properties inside your board level dts. ( likely generated by mx )

    See DT structure : https://wiki.st.com/stm32mpu/wiki/STM32MP15_device_tree

    In case Distribution/Method2 if by "arch/arm/boot/dts/stm32mp157c.dtsi" you mean same file and directory as Developer package it's wrong.

    Distribution load and install source in its own folders.

    see : https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Distribution_Package

    Olivier

    HMasu.1Author
    Visitor II
    December 16, 2020

    Hi @Community member​ ,

    Thank you for your reply.

    I need to change usbh_ohci node and usbh_ehci node in stm32mp157c.dtsi to use USB on the original board we make.

    (We have paid support from another company to use USB on the original board, which company has instructed us to change STM32MP157c.dtsi.)

    Actually, ​in case Developer/Method1, I have succeeded in making USB available by modifying stm32mp157c.dtsi.

    Is my understanding wrong?

    In case Distribution/Method2, I understand that "arch / arm / boot / dts /stm32mp157c.dtsi" is not the same files and directories as the Developer Package.

    In case Distribution/Method2, it is ".../tmp-glibc/work-shared/stm32mp1-***/kernel-source/arch/arm/boot/dts/stm32mp157c.dtsi" in my own load and install folder.

    I'm sorry for the misleading description.

    H Masuda.​