Linux Kernel does not start after migrating from LPDDR2 to DDR3

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

Linux Kernel does not start after migrating from LPDDR2 to DDR3

7,430 Views
steffendoster
Contributor IV

Hello everyone,

I have a custom i.MX6DL board running with mainline U-Boot and Linux-Kernel.

Now I have migrated from LPDDR2 to DDR3 and also increased the RAM-Size from 512MB to 1GB, thats all. The rest of the board is still identical.
I have managed to get the DDR3 running in U-Boot. I can start a netboot, can access USB, eMMC .....
Everything works fin there.

BUT: If I try to start my linux-kernel, everything I see is:

 

DHCP client bound to address 172.16.2.75 (255 ms)
Using FEC device
TFTP from server 172.16.0.72; our IP address is 172.16.2.75
Filename 'Board/board.dtb'.
Load address: 0x18000000
Loading: ###
         1.9 MiB/s
done
Bytes transferred = 30295 (7657 hex)
BOOTP broadcast 1
DHCP client bound to address 172.16.2.75 (4 ms)
Using FEC device
TFTP from server 172.16.0.72; our IP address is 172.16.2.75
Filename 'Board/linuximage'.
Load address: 0x12000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################################
         3.8 MiB/s
done
Bytes transferred = 7167880 (6d5f88 hex)
Kernel image @ 0x12000000 [ 0x000000 - 0x6d5f88 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Loading Device Tree to 4f58c000, end 4f596656 ... OK

Starting kernel ...

 

 

It seems that there is something running, but I don't know where to go from here.

 

Any ideas or suggestions?

More informations needed?

0 Kudos
17 Replies

7,308 Views
steffendoster
Contributor IV

OK, we think its a miss match between U-Boot's DDR3 configuration (mainly the clocks) and the clocks the devicetree expects.

We have plotted out the different clocks of our DDR3-Config (top) and LPDDR2-Config (bottom). See attached Picture.

0 Kudos

7,303 Views
igorpadykov
NXP Employee
NXP Employee

in general uboot and linux versions should be aligned, for example uboot v.2015.04 & L4.1.15, please try them:

https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=nxp%2Fimx_v2015.04_4.1.15_1.0.0_ga

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.1.15_2.0.0_ga

 

Best regards
igor

0 Kudos

7,314 Views
steffendoster
Contributor IV

I don't exactly know, where the error occures, but im relatively sure it should be in the Kernel/Devicetree (mostly devicetree).

For comparison I use the decompiled devicetrees of my board and the sabresd. See Attached files.

The *-nxp devicetree is provided by NXP-Kernel, the other by mainline. sie-imx6 is my own devicetree.

 

PS: I think this shouldn't occure in a Forum where Devicetree could be exchanged:

 

Correct the highlighted errors and try again.

The attachment's imx6dl-sabresd-nxp.dts content type (application/octet-stream) does not match its file extension and has been removed.
The attachment's sie-imx6dl.dts content type (application/octet-stream) does not match its file extension and has been removed.
The attachment's imx6dl-sabresd.dts content type (application/octet-stream) does not match its file extension and has been removed.

 

 

0 Kudos

7,426 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

7,383 Views
steffendoster
Contributor IV

By the way:
I would use the newest Script-Aid, but the link you sent me leads to LPDDR2 for i.MX6ULL and I have now a DDR3 and a i.MX6DL.

If I follow the link "i.MX6DQSDL DDR3 Script Aid" there it leads me only to the attachment "MX6Q_SabreSD_DDR3_register_programming_aid_v2.3.xlsx" which is useful for a i.MX6Q but somewhat useless for i.MX6DL because Q and DL have different Register-Adresses for most of the used Registers. If I want to use this script-aid, I have to redo all the Registers for i.MX6DL.

Is there a newer Script-Aid for i.MX6DL with DDR3?

0 Kudos

7,420 Views
steffendoster
Contributor IV

Hello Igor,

sorry, had forgot to mention that I already did that.
Script aid and resulting U-Boot-CFG is attached (U-Boot-CFG renamed to .txt because .cfg is not allowed here).

The DDR-Stresstester results looks fine. I ran a test for frequencies ranging from 350MHz to 500MHz and the first errors were shown at 475MHz.
(By the way: how can the Stress-Tester test frequencies above 400MHz when i.MX6DL only supports 400MHz?)

I tested also with mtest of u-boot and no errors occured.

Thanks for the fast reply.

0 Kudos

7,414 Views
igorpadykov
NXP Employee
NXP Employee

Hi Steffen

 

please try with nxp official uboot/linux releases from source.codeaurora.org/external/imx/ repository

(as mainline is not supported by nxp)

https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=imx_v2020.04_5.4.70_2.3.0

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_5.4.70_2.3.0

Documentation

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos

7,401 Views
steffendoster
Contributor IV

Hello Igor,

well, this solution was even worse than the Mainline-Kernel. The NXP-Kernel isn't even starting on my old LPDDR2 design, while the mainline kernel at least started on this board.

 

0 Kudos

7,397 Views
igorpadykov
NXP Employee
NXP Employee

what reference board was used for custom board  design - NXP i.MX6DL Sabre SD board or

some other third party board. What pmic used for custom board.

 

Best regards
igor

 

 

0 Kudos

7,395 Views
steffendoster
Contributor IV

Years ago (I think 2014) I derived it from SabreSD-Quad (although we had only i.MX6S and later i.MX6DL. I think SabreSD-DualLite was available sometime later).
Since then I used the resulting configs and code to get about 10 different i.MX6-boards to work (everthing with LPDDR2).

From time to time I compare my Devicetree and configs still with SabreSD (now with SabreSD-DualLite)

I never had the issue that the Linux-Kernel was loaded but could not start.

I'm still using the old-style u-boot with c/h-boardfiles.

We're using PF0100 as PMIC

0 Kudos

7,390 Views
igorpadykov
NXP Employee
NXP Employee

could you please provide full uboot log.

 

Best regards
igor

 

 

0 Kudos

7,387 Views
steffendoster
Contributor IV

Do you want the standard U-Boot-Outputs?

Well:

U-Boot 2015.01 (Apr 14 2021 - 17:24:36)

CPU:   Freescale i.MX6DL rev1.3 at 396 MHz
CPU:   Temperature 30 C
Reset cause: POR
Board: SIE-IMX6
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
Net:   Using phy at 3
PHY: Micrel ksz9031
FEC [PRIME]
Hit any key to stop autoboot:  0
=> run netboot
Booting from net ...
FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
BOOTP broadcast 8
BOOTP broadcast 9
BOOTP broadcast 10
BOOTP broadcast 11
BOOTP broadcast 12
BOOTP broadcast 13
BOOTP broadcast 14
BOOTP broadcast 15
BOOTP broadcast 16
BOOTP broadcast 17

Retry time exceeded; starting again
BOOTP broadcast 1
BOOTP broadcast 2
DHCP client bound to address 172.16.2.75 (255 ms)
Using FEC device
TFTP from server 172.16.0.72; our IP address is 172.16.2.75
Filename 'Board/board.dtb'.
Load address: 0x18000000
Loading: ###
         1.9 MiB/s
done
Bytes transferred = 30559 (775f hex)
BOOTP broadcast 1
DHCP client bound to address 172.16.2.75 (3 ms)
Using FEC device
TFTP from server 172.16.0.72; our IP address is 172.16.2.75
Filename 'Board/linuximage'.
Load address: 0x12000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########################################################
         3.9 MiB/s
done
Bytes transferred = 7536448 (72ff40 hex)
Kernel image @ 0x12000000 [ 0x000000 - 0x72ff40 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Loading Device Tree to 4f58c000, end 4f59675e ... OK

Starting kernel ...
0 Kudos

7,382 Views
igorpadykov
NXP Employee
NXP Employee

U-Boot 2015.01 is not supported by nxp, may be suggested to try for example 2015.04 uboot from nxp

source.codeaurora.org/external/imx/linux-imx repository:

https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=nxp%2Fimx_v2015.04_4.1.15_1.0.0_ga

Use i.MX Porting Guide​ and AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors

for any issues.

 

Best regards
igor

0 Kudos

7,346 Views
steffendoster
Contributor IV

Hi Igor,

have the NXP-U-Boot running. Here is the log:

U-Boot 2015.04-00381-gede7538aef-dirty (Apr 20 2021 - 11:20:19)

CPU:   Freescale i.MX6DL rev1.3 at 396 MHz
Reset cause: POR
Board: SIE-IMX6
I2C:   ready
DRAM:  1 GiB
PMIC:  PFUZE100 ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
Setting Bootloader-Version: 1.0
Writing to MMC(1)... done
Net:   Using phy at 3
PHY: Micrel ksz9031
FEC [PRIME]
Normal Boot
Hit any key to stop autoboot:  0
=> run usbboot
Boot from USB
resetting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 7 USB Device(s) found
USB1:   USB EHCI 1.00
scanning bus 1 for devices... EHCI timed out on TD - token=0x80008c80
1 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
       scanning usb for ethernet devices... 0 Ethernet Device(s) found
30375 bytes read in 164 ms (180.7 KiB/s)
7212424 bytes read in 984 ms (7 MiB/s)
Kernel image @ 0x12000000 [ 0x000000 - 0x6e0d88 ]
## Flattened Device Tree blob at 18000000
   Booting using the fdt blob at 0x18000000
   Loading Device Tree to 4f58b000, end 4f5956a6 ... OK

Starting kernel ...

 

Same as mainline, after this the board doesn't do anyting more.

0 Kudos

7,350 Views
steffendoster
Contributor IV

OK, I will change this also.

Sadly I get the messages

common/cli_readline.c:265: undefined reference to `get_tbclk'
lib/time.c:54: undefined reference to `get_tbclk'
lib/time.c:80: undefined reference to `get_tbclk'

while compiling. Any Ideas?

0 Kudos

7,347 Views
steffendoster
Contributor IV

OK, solved the compiling-problem:

had to add
#define CONFIG_GPT_TIMER
to the board-header-file

0 Kudos