kontron_pitx_imx8m does not start

Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
--- 8< --- U-Boot SPL 2022.07-00607-g36b661dc91-dirty (Jul 15 2022 - 09:16:08 +0200) Trying to boot from SD card clk_register: failed to get <NULL> device (parent of ckil) clk_register: failed to get <NULL> device (parent of clock-osc-27m) alloc space exhausted clk_register: CLK: video_pll2_ref_sel driver bind error [-12]! alloc space exhausted clk_register: CLK: arm_pll driver bind error [-12]! imx_clk_pll14xx: failed to register pll arm_pll -12 alloc space exhausted alloc space exhausted : : Error binding driver 'serial_mxc': -12 alloc space exhausted alloc space exhausted alloc space exhausted No serial driver found resetting .. --- 8< ---
I have an imx8mq_evk and an imx8mq_phanbell on hand and can't see the behavior there.
If I increase the value SYS_MALLOC_F_LEN to 0xc000 the board starts. But as Peng already said in another mail this can't be the solution to the problem. I have looked at the differences between the boards, but can't find a reasonable reason why this happens.
Does anyone have any ideas or can give me a hint on what to look for?
Thanks, Heiko

On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.

Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.

Hi Heiko
On Fri, Jul 15, 2022 at 12:06 PM Heiko Thiery heiko.thiery@gmail.com wrote:
Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.
When you try to boot from sdcard your memory should be already in ddr. So the allocation should already be there.
Michael
-- Heiko

Hi Michael,
Am Fr., 15. Juli 2022 um 12:21 Uhr schrieb Michael Nazzareno Trimarchi michael@amarulasolutions.com:
Hi Heiko
On Fri, Jul 15, 2022 at 12:06 PM Heiko Thiery heiko.thiery@gmail.com wrote:
Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.
When you try to boot from sdcard your memory should be already in ddr. So the allocation should already be there.
Maybe I just don't understand it correctly, but isn't it the case that there is also code in the U-boot that uses malloc before the relocation takes place? And doesn't this use the memory that has SYS_MALLOC_F and the size SYS_MALLOC_F_LEN?
And the flag DM_FLAG_PRE_RELOC which is used e.g. in clk-imx8mq indicates that this is then in this memory area?
Michael
-- Heiko
-- Heiko

Hi
Il ven 15 lug 2022, 21:21 Heiko Thiery heiko.thiery@gmail.com ha scritto:
Hi Michael,
Am Fr., 15. Juli 2022 um 12:21 Uhr schrieb Michael Nazzareno Trimarchi michael@amarulasolutions.com:
Hi Heiko
On Fri, Jul 15, 2022 at 12:06 PM Heiko Thiery heiko.thiery@gmail.com
wrote:
Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut <marex@denx.de
:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m
board
does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself
does
not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.
When you try to boot from sdcard your memory should be already in ddr. So the allocation should already be there.
Maybe I just don't understand it correctly, but isn't it the case that there is also code in the U-boot that uses malloc before the relocation takes place? And doesn't this use the memory that has SYS_MALLOC_F and the size SYS_MALLOC_F_LEN?
And the flag DM_FLAG_PRE_RELOC which is used e.g. in clk-imx8mq indicates that this is then in this memory area?
I see it already seen it the flag after suggestion of fabio.
Michael
Michael
-- Heiko
-- Heiko

On 7/15/22 12:05, Heiko Thiery wrote:
Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.
Too many clock CCF nodes which each allocate udevice structure (which ... is sub-optimal) ?
Try commenting out some of the clock in drivers/clk/*mx8mm*c using #ifdef CONFIG_SPL_BUILD , does that make a difference ?

Hi Marek,
Am Fr., 15. Juli 2022 um 12:24 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 12:05, Heiko Thiery wrote:
Hi Marek
Am Fr., 15. Juli 2022 um 11:29 Uhr schrieb Marek Vasut marex@denx.de:
On 7/15/22 10:33, Heiko Thiery wrote:
Hi,
Hi,
I see since the change to CLK_IMX8MQ that the kontron_pitx_imx8m board does not start anymore. I have enabled the DUBUG_UART and see the following outputs
Pick [PATCH] board_init: Do not reserve MALLOC_F area on stack if non-zero MALLOC_F_ADDR
this does not solve the issue.
And also, increate SPL_MALLOC_F_LEN in board config if that itself does not help.
As said, I need to increase SYS_MALLOC_F_LEN to 0xc000. Then the board starts. But Peng said that this is not a valid value due to the OCRAM_S is limited to 32k and this is the MALLOC base. On the other hand, why does my board consums that much memory and the others not. I cannot find any difference in these boards that explains this to me.
Too many clock CCF nodes which each allocate udevice structure (which ... is sub-optimal) ?
Try commenting out some of the clock in drivers/clk/*mx8mm*c using #ifdef CONFIG_SPL_BUILD , does that make a difference ?
I have now commented out all the clocks that i think are not needed. Now my board at least starts again without a reboot.
gpu_XXX, vpu_XXX, audio_XXX
But what still makes me wonder is the fact that the same driver is used by imx8mq_evk and imx8mq_phanbell and this problem is not seen there.
---- 8< ---- U-Boot SPL 2022.07-00698-g208ed8a54e-dirty (Jul 15 2022 - 21:06:29 +0200) Trying to boot from SD card
U-Boot 2022.07-00698-g208ed8a54e-dirty (Jul 15 2022 - 21:06:29 +0200)
CPU: Freescale i.MX8MQLite rev2.1 at 1000 MHz Reset cause: POR Model: Kontron pITX-imx8m DRAM: alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted alloc space exhausted 4 GiB clk_register: failed to get <NULL> device (parent of ckil) clk_register: failed to get <NULL> device (parent of clock-osc-27m) clk_register: failed to get <NULL> device (parent of sys1_pll) clk_register: failed to get <NULL> device (parent of sys2_pll) clk_register: failed to get <NULL> device (parent of sys3_pll) Core: 124 devices, 21 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... OK In: serial@30880000 Out: serial@30880000 Err: serial@30880000 Net: Error: ethernet@30be0000 address not set.
Error: ethernet@30be0000 address not set. No ethernet found.
Hit any key to stop autoboot: 0 => ---- 8< ----
-- Heiko

Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?

On Fri, Jul 15, 2022 at 8:18 AM Fabio Estevam festevam@gmail.com wrote:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Also, try increasing CONFIG_SYS_SPL_MALLOC_SIZE.

Am Fr., 15. Juli 2022 um 13:35 Uhr schrieb Fabio Estevam festevam@gmail.com:
On Fri, Jul 15, 2022 at 8:18 AM Fabio Estevam festevam@gmail.com wrote:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Also, try increasing CONFIG_SYS_SPL_MALLOC_SIZE.
Increasing this has no effect.

HI,
Am Fr., 15. Juli 2022 um 13:18 Uhr schrieb Fabio Estevam festevam@gmail.com:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Unfortunately not .. I think the problem is not the SPL. Since the SPL does not use SPL_DM_SERIAL.
-- Heiko

On 7/15/2022 8:00 PM, Heiko Thiery wrote:
HI,
Am Fr., 15. Juli 2022 um 13:18 Uhr schrieb Fabio Estevam festevam@gmail.com:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Unfortunately not .. I think the problem is not the SPL. Since the SPL does not use SPL_DM_SERIAL.
You have CLK_IMX8MQ enabled in SPL, it will consume much memory.
Regards, Peng.
-- Heiko

Hi Peng,
Am Sa., 16. Juli 2022 um 10:11 Uhr schrieb Peng Fan peng.fan@oss.nxp.com:
On 7/15/2022 8:00 PM, Heiko Thiery wrote:
HI,
Am Fr., 15. Juli 2022 um 13:18 Uhr schrieb Fabio Estevam festevam@gmail.com:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Unfortunately not .. I think the problem is not the SPL. Since the SPL does not use SPL_DM_SERIAL.
You have CLK_IMX8MQ enabled in SPL, it will consume much memory.
You say CLK_IMX8MQ I have enabled. But I can't see where this should be done. Also, I don't understand what this has to do with the fact that the U-Boot (not SPL) shows the error messages. Is there a connection between SPL and U-Boot here?
-- Heiko
Regards, Peng.
-- Heiko

On 7/16/2022 4:31 PM, Heiko Thiery wrote:
Hi Peng,
Am Sa., 16. Juli 2022 um 10:11 Uhr schrieb Peng Fan peng.fan@oss.nxp.com:
On 7/15/2022 8:00 PM, Heiko Thiery wrote:
HI,
Am Fr., 15. Juli 2022 um 13:18 Uhr schrieb Fabio Estevam festevam@gmail.com:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Unfortunately not .. I think the problem is not the SPL. Since the SPL does not use SPL_DM_SERIAL.
You have CLK_IMX8MQ enabled in SPL, it will consume much memory.
You say CLK_IMX8MQ I have enabled. But I can't see where this should be done. Also, I don't understand what this has to do with the fact that the U-Boot (not SPL) shows the error messages. Is there a connection between SPL and U-Boot here?
In the very first mail, I only see you post out SPL log, not see U-Boot log. Could you please share your full log?
Thanks, Peng.
-- Heiko
Regards, Peng.
-- Heiko

Hi Peng,
Am Di., 19. Juli 2022 um 07:17 Uhr schrieb Peng Fan peng.fan@oss.nxp.com:
On 7/16/2022 4:31 PM, Heiko Thiery wrote:
Hi Peng,
Am Sa., 16. Juli 2022 um 10:11 Uhr schrieb Peng Fan peng.fan@oss.nxp.com:
On 7/15/2022 8:00 PM, Heiko Thiery wrote:
HI,
Am Fr., 15. Juli 2022 um 13:18 Uhr schrieb Fabio Estevam festevam@gmail.com:
Hi Heiko,
On Fri, Jul 15, 2022 at 5:33 AM Heiko Thiery heiko.thiery@gmail.com wrote:
Error binding driver 'serial_mxc': -12
Does the attached patch help?
Unfortunately not .. I think the problem is not the SPL. Since the SPL does not use SPL_DM_SERIAL.
You have CLK_IMX8MQ enabled in SPL, it will consume much memory.
You say CLK_IMX8MQ I have enabled. But I can't see where this should be done. Also, I don't understand what this has to do with the fact that the U-Boot (not SPL) shows the error messages. Is there a connection between SPL and U-Boot here?
In the very first mail, I only see you post out SPL log, not see U-Boot log. Could you please share your full log?
That was the only output shown on the console after enabling DEBUG_UART. I thought "Trying to boot from SD card" was one of the last issues of the SPL.
participants (5)
-
Fabio Estevam
-
Heiko Thiery
-
Marek Vasut
-
Michael Nazzareno Trimarchi
-
Peng Fan