iMX8MN - Custom board cannot find DT

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX8MN - Custom board cannot find DT

Jump to solution
2,691 Views
khang_letruong
Senior Contributor III

Dear Forum,

We are in the process of bringing an iMX8M Nano based custom board. The board only differs from the EVK in the PCB layout, thus we updated the DDR timing and it booted from the SD card. However, it could not enter the phase of loading the kernel as the DT cannot be found. Below is the boot log :

U-Boot SPL 2023.04-lf_v2023.04+gc9bc261c344 (Nov 21 2023 - 07:28:53 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
SEC0: RNG instantiated
Normal Boot
Trying to boot from BOOTROM
Boot Stage: Recovery boot
image offset 0x8000, pagesize 0x200, ivt offset 0x0
NOTICE: Do not release JR0 to NS as it can be used by HAB
NOTICE: BL31: v2.8(release):lf-6.1.55-2.2.1-rc1-0-g08e9d4eef
NOTICE: BL31: Built : 06:43:30, Nov 21 2023


U-Boot 2023.04-lf_v2023.04+gc9bc261c344 (Nov 21 2023 - 07:28:53 +0000)

CPU: i.MX8MNano Quad rev1.0 1500 MHz (running at 1200 MHz)
CPU: Commercial temperature grade (0C to 95C) at 45C
Reset cause: POR
Model: NXP i.MX8MNano EVK board
DRAM: 2 GiB
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x52]
Power supply on USB2
TCPC: Vendor ID [0x1fc9], Product ID [0x5110], Addr [I2C1 0x50]
Core: 198 devices, 35 uclasses, devicetree: separate
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment

[*]-Video Link 0adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22

[0] lcd-controller@32e00000, video
[1] dsi_controller@32e10000, video_bridge
[2] adv7535@3d, panel
adv7535_mipi2hdmi adv7535@3d: Can't find cec device id=0x3c
fail to probe panel device adv7535@3d
mxs_video lcd-controller@32e00000: failed to get any video link display timings
probe video device failed, ret -22
In: serial
Out: serial
Err: serial
SEC0: RNG instantiated
MMC: no card present
flash target is MMC:1
MMC: no card present
MMC card init failed!
MMC: no card present
** Block device MMC 1 not supported
Net: Could not get PHY for FEC0: addr 0
No ethernet found.

Fastboot: Normal
Normal Boot
Hit any key to stop autoboot: 0
Working FDT set to 43000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
starting USB...
Bus usb@32e40000: Port not available.
USB is stopped. Please issue 'usb start' first.
MMC: no card present
switch to partitions #0, OK
mmc2(part 0) is current device
** No partition table - mmc 2 **
Couldn't find partition mmc 2:1
Running BSP bootcmd ...
MMC: no card present
MMC: no card present
** Bad device specification mmc 1 **
Couldn't find partition mmc 1:1
Can't set block device
MMC: no card present
** Bad device specification mmc 1 **
Couldn't find partition mmc 1:1
Can't set block device
Booting from net ...
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
WARN: Cannot load the DT
u-boot=>

I wonder if there's something wrong with the initialization of other bootable media?

Best Regards,

Khang

Labels (1)
0 Kudos
Reply
1 Solution
2,550 Views
Chavira
NXP TechSupport
NXP TechSupport

HI @khang_letruong!

 

1>> The driver busfreq-imx8mq.c is for iMX8M family, you can consult this information on LINUX REFERENCE MANUAL .

 

2>> You can disable the frequency scaling directly on  the driver like the iMX6 instructions is not required to add any configuration in kernel.

View solution in original post

0 Kudos
Reply
10 Replies
2,687 Views
khang_letruong
Senior Contributor III

One more thing : the eMMC has 16GB capacity instead of 32GB in case of the EVK.

0 Kudos
Reply
2,682 Views
khang_letruong
Senior Contributor III

Additional info :

u-boot=> mmc info
Device: FSL_SDHC
Manufacturer ID: 45
OEM: 0
Name: DG4016
Bus Speed: 200000000
Mode: HS400ES (200MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 14.7 GiB
Bus Width: 8-bit DDR
Erase Group Size: 512 KiB
HC WP Group Size: 8 MiB
User Capacity: 14.7 GiB WRREL
Boot Capacity: 4 MiB ENH
RPMB Capacity: 4 MiB ENH
Boot area 0 is not write protected
Boot area 1 is not write protected
u-boot=> mmc list
FSL_SDHC: 1
FSL_SDHC: 2 (eMMC)
u-boot=> mmc dev 1
MMC: no card present
u-boot=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
u-boot=>

0 Kudos
Reply
2,643 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @khang_letruong!

Thank you for contacting NXP Support!

 

Aparently u-boot can't find the kernel image and the device tree in the partition 1:1 of the eMMC.

 

How you are flashing your board?

 I recommend to use the uuu tool.

 

Best Regards!

Chavira

 

0 Kudos
Reply
2,619 Views
khang_letruong
Senior Contributor III

Hi @Chavira,

Thanks for your suggestion about the flashing of SD card : effectively, we did use Balena (a UI tool similar to dd command) to flash the .wic image.

Now my question is about the toggling of ddrc freq from high to low and vice versa. I would like to know if it is relevant to the 2.5.4 Dynamic Bus Frequency chapter in the i.MX_Linux_Reference_Manual.pdf ? If yes, is it critical and how to disable it?

Best regards,

Khang

 

 

Tags (1)
0 Kudos
Reply
2,654 Views
khang_letruong
Senior Contributor III

Update :

We flashed to same firmware image into the eMMC and worked but with following messages :

 

[  170.014274] ddrc freq set to low bus mode
[  173.791817] ddrc freq set to high bus mode
[  174.878269] ddrc freq set to low bus mode
[  176.006203] ddrc freq set to high bus mode
[  177.086279] ddrc freq set to low bus mode
[  178.399346] ddrc freq set to high bus mode
[  179.486271] ddrc freq set to low bus mode

 

 

I haven't really found any solution in the relevant discussions yet :

 
Any harm? Can we stay with these messages?
 
Thanks in advance and best regards,
Khang
0 Kudos
Reply
2,595 Views
Chavira
NXP TechSupport
NXP TechSupport

HI @khang_letruong!

According to the Linux User Guide you can disable the cpu and ddr frequency scaling.

 

For DDR you can apply the next commands:

 

#displays the status of bus frequency
cat /sys/bus/platform/drivers/imx_busfreq/busfreq/enable  

#disables bus frequency
echo 0 >> /sys/bus/platform/drivers/imx_busfreq/busfreq/enable

#enables bus frequency
echo 1 >> /sys/bus/platform/drivers/imx_busfreq/busfreq/enable

 

I tried with the iMX8MP EVK but for iMX8MN should be the same:

Chavira_0-1727881309928.png

 

Best Regards!

Chavira

 

2,585 Views
khang_letruong
Senior Contributor III

Hi @Chavira ,

Thanks you for the advice. I will try the command to disable the ddrc log. By the way, can you confirm that it is NOT harmful as I haven't seen similar log with previous iMX8M Plus custom boards I brought up except for this time with an iMX8M Nano and with a slightly newer Yocto BSP (Mickledore-6.1.55 vs Mickledore-6.1.36) ?

 

Also for the failure of booting from the SD card, we found the issue : the card detection is not wired.

Best Regards,
K

0 Kudos
Reply
2,572 Views
khang_letruong
Senior Contributor III

Hi again @Chavira,

I searched a solution for disabling the DDR frequency scaling policy during the compiling of the firmware image and found 2 possibilities :

1. Following the similar instruction for iMX6 to modify the iMX busfreq driver, but for the iMX8M family, the driver source file seem to be : <linux-imx>/drivers/soc/imx/busfreq-imx8mq.c (based on the fact that the printed log is found within this file). Can you confirm as this looks more specific to iMX8MQ ?

2. Disabling completely the dynamic scaling for imx8m ddr controller by setting the ARM_IMX8M_DDRC_DEVFREQ token in the kernel default config to n(o).  This should be more generic for iMX8M family, however the token is not explicitly defined/set to y(es) or m(odule). What do you think?

Thanks in advance and best regards,

Khang

2,551 Views
Chavira
NXP TechSupport
NXP TechSupport

HI @khang_letruong!

 

1>> The driver busfreq-imx8mq.c is for iMX8M family, you can consult this information on LINUX REFERENCE MANUAL .

 

2>> You can disable the frequency scaling directly on  the driver like the iMX6 instructions is not required to add any configuration in kernel.

0 Kudos
Reply
2,541 Views
khang_letruong
Senior Contributor III

Hi @Chavira ,

2>> You can disable the frequency scaling directly on the driver like the iMX6 instructions is not required to add any configuration in kernel.

I tested modifying the <linux-imx>/drivers/soc/imx/busfreq-imx8mq.c  similar to the case of iMX6 and it worked. Also this is the only option as ARM_IMX8M_DDRC_DEVFREQ is already deselected (i.e. n) in the default kernel configuration :

Screenshot from 2024-10-03 12-35-28.png

Thanks for your support!

K.

0 Kudos
Reply