What is the purpose of imx8mn-evk-u-boot.dtsi?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What is the purpose of imx8mn-evk-u-boot.dtsi?

跳至解决方案
1,547 次查看
moose
Contributor IV

According to imx8mn_evk_defconf, the boot dts file is imx8mn-elk.dts which includes imx8mn-elk.dtsi then imx8mn.dtsi. I don't see imx8mn-evk-u-boot.dtsi included, and I am not sure how and when this file is used. We are having a boot-up issue and wondering if this file is the issue. Do we need it if we are basing our board on imx8mn-evk with some modifications? Thank you.

标签 (1)
0 项奖励
回复
1 解答
1,291 次查看
moose
Contributor IV

The short answer is u-boot build system automatically includes <orig_filename>-u-boot.dtsi in addition to the defined board file. In this example, the final u-boot device tree is imx8mn-evk.dts + imx8mn-evk-u-boot.dtsi. I found this description to be helpful.

Not knowing this, we only created a custom device tree file for our board based on imx8mn-evk.dts and did not create -u-boot.dtsi version. @sinanakman this was causing SPL not to boot at all ( the common uuu USB cannot connect error). The underlying issue is inside imx8mn-evk-u-boot.dtsi, many nodes were decleraded with the property 'u-boot,dm-spl'. Apparently, this needed to select which node SPL would drive so you are not including the whole tree that u-boot uses. Obviously, without it, SPL did not have access to many key nodes such as pmic and uart, and it is no wonder we were not booting with zero output messages. I found this description to be useful.

@hustdage I do not believe Binman is in play here, but I could be wrong as I am new to all this. You are correct that binman node is described within *-u-boot.dtsi file, but I don't believe it is used in the imx8mn-evk board since CONFIG_BINMAN is not set. I see boards that specifically select it, such as IMX8MN_BEACON, but not the IMX8MN_EVK target. It may be there as an optional feature, but I think the imx8mn_evk board still uses ad-hoc scripts included within the imx-boot to support the imx-mkimage tool in building the final image (flash.bin). Please correct me if I am wrong.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,505 次查看
Zhiming_Liu
NXP TechSupport
NXP TechSupport

The imx8mn-evk-u-boot.dtsi will overlay  imx8mn-evk.dts, so the final dtb will contain properties in imx8mn-evk-u-boot.dtsi .

Of course, you need modify imx8mn-evk-u-boot.dtsi.

0 项奖励
回复
1,480 次查看
hustdage
Contributor II

Moose' question  is "I don't see imx8mn-evk-u-boot.dtsi included". 

And I have answered 

"

It is called binman node in u-boot.

You can check the u-boot document. And learn this u-boot knowledge.

It is not overlay, it is Automatic .dtsi includesion.

https://github.com/nxp-imx/uboot-imx/blob/lf-6.1.36-2.1.0/tools/binman/binman.rst

 

Automatic .dtsi inclusion

It is sometimes inconvenient to add a 'binman' node to the .dts file for each board. This can be done by using #include to bring in a common file. Another approach supported by the U-Boot build system is to automatically include a common header. You can then put the binman node (and anything else that is specific to U-Boot, such as u-boot,dm-pre-reloc properies) in that header file.

Binman will search for the following files in arch/<arch>/dts:

<dts>-u-boot.dtsi where <dts> is the base name of the .dts file
<CONFIG_SYS_SOC>-u-boot.dtsi
<CONFIG_SYS_CPU>-u-boot.dtsi
<CONFIG_SYS_VENDOR>-u-boot.dtsi
u-boot.dtsi
1,513 次查看
sinanakman
Senior Contributor III

Hi Moose

 

If you can show us what boot up issues you are having we might be able to help you a bit better. Please describe your custom board how it deviates from the eval board you might have based it and how you generate your images that you are having issues with.

 

Best regards

Sinan Akman

0 项奖励
回复
1,519 次查看
hustdage
Contributor II

It is called binman node in u-boot.

You can check the u-boot document. And learn this u-boot knowledge.

0 项奖励
回复
1,292 次查看
moose
Contributor IV

The short answer is u-boot build system automatically includes <orig_filename>-u-boot.dtsi in addition to the defined board file. In this example, the final u-boot device tree is imx8mn-evk.dts + imx8mn-evk-u-boot.dtsi. I found this description to be helpful.

Not knowing this, we only created a custom device tree file for our board based on imx8mn-evk.dts and did not create -u-boot.dtsi version. @sinanakman this was causing SPL not to boot at all ( the common uuu USB cannot connect error). The underlying issue is inside imx8mn-evk-u-boot.dtsi, many nodes were decleraded with the property 'u-boot,dm-spl'. Apparently, this needed to select which node SPL would drive so you are not including the whole tree that u-boot uses. Obviously, without it, SPL did not have access to many key nodes such as pmic and uart, and it is no wonder we were not booting with zero output messages. I found this description to be useful.

@hustdage I do not believe Binman is in play here, but I could be wrong as I am new to all this. You are correct that binman node is described within *-u-boot.dtsi file, but I don't believe it is used in the imx8mn-evk board since CONFIG_BINMAN is not set. I see boards that specifically select it, such as IMX8MN_BEACON, but not the IMX8MN_EVK target. It may be there as an optional feature, but I think the imx8mn_evk board still uses ad-hoc scripts included within the imx-boot to support the imx-mkimage tool in building the final image (flash.bin). Please correct me if I am wrong.

0 项奖励
回复