How to modify u-boot device tree for a custom board based on iMX91 with yocto

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to modify u-boot device tree for a custom board based on iMX91 with yocto

ソリューションへジャンプ
2,309件の閲覧回数
RD-airzone
Contributor II

Hello NXP team,

I'm trying to build a custom image for my custom board. It is based on iMX91 so I've created a new machine copying configuration from evaluation board. I've also add a copy of the EV board device tree (named ws-hub.dts) to the u-boot-imx recipe and change the model name to something else, just to know it is using it. In addition, I've created succesfully a bbappend to add the custom DT to Makefile under "CONFIG_ARCH_IMX9" option.

Then I've created a "airzone_uboot_defconfig" file for my machine based on imx91_11x11_evk_defconfig and modify on my machine conf the variable "UBOOT_CONFIG_BASENAME" to "airzone_uboot". I can see that it is being compiled succesfully

If I leave it as it is, if flashs correctly and then loads kernel but it is not using my custom DT.

Then, I've modify "CONFIG_DEFAULT_FDT_FILE" from defconfig to ws-hub.dtb and it tells "Failed to load 'ws-hub.dtb' ".

I've checked the command "fdt list" on uboot to see the device tree but it show me this:

u-boot => fdt list
/ {
interrupt-parent = <0x00000001>;
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
model = "NXP i.MX91 11X11 EVK board";
compatible = "fsl,imx91-11x11-evk", "fsl,imx91";
aliases {
};
cpus {
};
clock-osc-32k {
};
clock-osc-24m {
};
clock-ext1 {
};
pmu {
};
thermal-zones {
};
psci {
};
timer {
};
interrupt-controller@48000000 {
};
usbphynop1 {
};
usbphynop2 {
};
soc@0 {
};
imx93-lpm {
};
se-fw2 {
};
chosen {
};
reserved-memory {
};
regulator-can2-stby {
};
regulator-adc-vref {
};
regulator-usdhc2 {
};
regulator-vdd-12v {
};
regulator-vrpi-3v3 {
};
binman {
};
firmware {
};
backlight {
};
panel {
};
signature {
};
__symbols__ {
};
};

So I don't know where that device tree comes from.

My question is how am I suppose to modify the u-boot to adapt it to my board? Am I on the right way or do I have to modify directly the evaluation board DT?

I post my machine.conf in case that you need for reference:

MACHINEOVERRIDES =. "mx91:"

require conf/machine/include/imx-base.inc
require conf/machine/include/arm/armv8-2a/tune-cortexa55.inc
 
DDR_FIRMWARE_NAME = " \
    lpddr4_dmem_1d_v202201.bin \
    lpddr4_dmem_2d_v202201.bin \
    lpddr4_imem_1d_v202201.bin \
    lpddr4_imem_2d_v202201.bin \
"

# Remove unused image types
IMAGE_FSTYPES:remove = "wic.bmap"
IMAGE_FSTYPES:remove = "tar.zst"

MACHINE_FEATURES += "pci wifi bluetooth"
MACHINE_FEATURES:append:use-nxp-bsp = " dpdk optee nxpwifi-all-sdio"
 
# No cares about kernel device tree right now
# KERNEL_DEVICETREE_BASENAME = "imx91-11x11-evk"
# KERNEL_DEVICETREE = "freescale/${KERNEL_DEVICETREE_BASENAME}.dtb"

# Select NXP U-Boot.
IMX_DEFAULT_BOOTLOADER:use-nxp-bsp = "u-boot-imx"

LOADADDR = ""
UBOOT_SUFFIX = "bin"
UBOOT_MAKE_TARGET = ""

SPL_BINARY = "spl/u-boot-spl.bin"

UBOOT_CONFIG ??= "sd"
#UBOOT_CONFIG_BASENAME = "imx91_11x11_evk"
UBOOT_CONFIG_BASENAME = "airzone_uboot"
UBOOT_CONFIG[sd]   = "${UBOOT_CONFIG_BASENAME}_defconfig,sdcard"

# Set ATF platform name
ATF_PLATFORM = "imx91"

IMXBOOT_TARGETS = "flash_singleboot"

IMX_BOOT_SOC_TARGET = "iMX91"
IMX_BOOT_SEEK = "32"

# We have to disable SERIAL_CONSOLE due to auto-serial-console
SERIAL_CONSOLES = "115200;ttyLP0"

IMX_DEFAULT_BSP = "nxp"
Thank you for your time.

 

ラベル(1)
1 解決策
2,149件の閲覧回数
RD-airzone
Contributor II

Hi everyone,

I post what it actually happens just in case anyone has the same issue.

I had to change CONFIG_DEFAULT_DEVICE_TREE as @Manuel_Salas said but I had to include "imx91-11x11-evk-u-boot.dtsi" at the end of my device tree as it seems to do some configuration needed for u-boot.

 

Kind regards.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,150件の閲覧回数
RD-airzone
Contributor II

Hi everyone,

I post what it actually happens just in case anyone has the same issue.

I had to change CONFIG_DEFAULT_DEVICE_TREE as @Manuel_Salas said but I had to include "imx91-11x11-evk-u-boot.dtsi" at the end of my device tree as it seems to do some configuration needed for u-boot.

 

Kind regards.

0 件の賞賛
返信
2,272件の閲覧回数
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @RD-airzone 

I hope you are doing very well.

 

Could you please try changing the CONFIG_DEFAULT_DEVICE_TREE?

 

Best regards,

Salas.

0 件の賞賛
返信
2,243件の閲覧回数
RD-airzone
Contributor II

Hi @Manuel_Salas,

If I change that setting, I cannot even flash the uboot with:

./uuu -b emmc .\imx-boot-ws-hub-sd.bin-flash_singleboot

The same command works with the default value (imx91-11x11-evk-tianma-wvga-panel) for CONFIG_DEFAULT_DEVICE_TREE.

 

Best regards.

0 件の賞賛
返信
464件の閲覧回数
galba
Contributor I

Hi @RD-airzone 

I'm an Airzone Webserver (Aircloud Wi-Fi) user.

On October 18th, this motherboard attempted to update from your version 4.15 to 4.20 and experienced an error during the process

The webserver you run on this motherboard stopped reporting information to Airzone Cloud, and I can't use the app. The webserver continues to connect to my Wi-Fi network without issue, although it has little activity.

I have SSH connectivity, but I don't have a username and password to send you logs.

Your technical support has kindly denied me the right to repair and only offered to sell me another motherboard. Is there a way I can correct this failed update?

0 件の賞賛
返信
392件の閲覧回数
RD-airzone
Contributor II

Hello @galba,

We can see your case but this isn't the right place to discuss it. May you provide me a contact email?

Kind regards.

 

 

0 件の賞賛
返信