cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change device tree?

HMasu.1
Senior

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

5 REPLIES 5
KnarfB
Principal III

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

Olivier GALLIEN
ST Employee

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

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 @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​

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.​

I also want to know the relationship between "/layers/meta-st/meta-st-stm32mp-addons/mx//kernel/***.dts" and "/tmp-glibc/work-shared//kernel-source/arch/arm/boot/dts/***.dts".

Best Regards,

H. Masuda