imx8qxp的板子,从sd卡启动时,uboot执行sf probe失败

cancel
Showing results for 
Search instead for 
Did you mean: 

imx8qxp的板子,从sd卡启动时,uboot执行sf probe失败

1,050 Views
山水之间
Contributor II

imx8qxp的板子,从sd卡启动时,uboot执行sf probe失败,QSPI Flash不可用。请问是什么原因?

error2.png

7 Replies

650 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

 

Please try with the following command:
> sf probe 0:0


Also, please do remember that the i.MX 8X is still in pre-production stage so our support is limited, sorry for the inconvenience.

 

Hope this helps

Regards,

Aldo.

0 Kudos

650 Views
山水之间
Contributor II

Hello,

   This command and result are the same as above.

0 Kudos

650 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello, 

It may be the case that the BSP flashe on the uSD card in your kit is a beta version it may not be enabled, please try flashing a GA version from here:
i.MX Software and Development Tools | NXP 

Thank you,
Regards,
Aldo

0 Kudos

650 Views
山水之间
Contributor II

Hello Aldo,

   I tried, but it didn't work either.I saw another person on the forum with the same problem.He fixed part of the SCFW code.Here's his response.

Hi Hagen,

 

it seems to me it is a problem with scfw firmware ...

 

I added to "imx-scfw-porting-kit-1.2.7.1" the following 2 patches (Sorry do not know how to add here files)

 

hs@xmglap:scfw_export_mx8qx_b0 [master] $ cat 0001-spi.patch
From ed274d498488417615ce7a39156000fd70457ce7 Mon Sep 17 00:00:00 2001
From: Heiko Schocher <hs@denx.de>
Date: Wed, 18 Dec 2019 11:05:30 +0100
Subject: [PATCH] platform/board/mx8qx_mek/board.c: get SPI flash working

remove some code to get SPI flash working.

Signed-off-by: Heiko Schocher <hs@denx.de>

diff --git a/platform/board/mx8qx_mek/board.c b/platform/board/mx8qx_mek/board.c
index d0a6b4e..8f40f28 100755
--- a/platform/board/mx8qx_mek/board.c
+++ b/platform/board/mx8qx_mek/board.c
@@ -721,8 +721,17 @@ sc_err_t board_system_config(sc_bool_t early, sc_rm_pt_t pt_boot)
SC_R_CAN_2, SC_TRUE));
BRD_ERR(rm_set_resource_movable(pt_boot, SC_R_I2C_1,
SC_R_I2C_1, SC_TRUE));
+#if 0
+ /*
+ * without this code I see now in U-Boot:
+ * => sf probe
+ * unrecognized JEDEC id bytes: 00, 00, 00
+ * Failed to initialize SPI flash at 0:0 (error -2)
+ * =>
+ */
BRD_ERR(rm_set_resource_movable(pt_boot, SC_R_FSPI_0,
SC_R_FSPI_0, SC_TRUE));
+#endif

/* Move some pads not in the M4_0 subsystem */
BRD_ERR(rm_set_pad_movable(pt_boot, SC_P_FLEXCAN0_RX,
@@ -731,8 +740,16 @@ sc_err_t board_system_config(sc_bool_t early, sc_rm_pt_t pt_boot)
SC_P_USB_SS3_TC1, SC_TRUE));
BRD_ERR(rm_set_pad_movable(pt_boot,SC_P_USB_SS3_TC3,
SC_P_USB_SS3_TC3, SC_TRUE));
+#if 0
+ /*
+ * and without this code:
+ * => sf probe
+ * SF: Detected mt35xu512aba with page size 256 Bytes, erase size 128 KiB, total 64 MiB
+ * =>
+ */
BRD_ERR(rm_set_pad_movable(pt_boot, SC_P_QSPI0A_DATA0,
SC_P_COMP_CTL_GPIO_1V8_3V3_QSPI0B, SC_TRUE));
+#endif

/* Move everything flagged as movable */
BRD_ERR(rm_move_all(pt_boot, pt_boot, pt_m4_0, SC_TRUE,

 

and

 

hs@xmglap:scfw_export_mx8qx_b0  [master] $ cat 0002-spi.patch
From cccbf78ed6800a54c073ae0411069ed54ff49bf7 Mon Sep 17 00:00:00 2001
From: Heiko Schocher <hs@denx.de>
Date: Wed, 18 Dec 2019 12:32:14 +0100
Subject: [PATCH] platform/board/mx8qx_mek/board.c: fix sf read with sizes >
 0x80000

 

without this code, sf read with sizes > 0x80000 works.

 

Signed-off-by: Heiko Schocher <hs@denx.de>

 

diff --git a/platform/board/mx8qx_mek/board.c b/platform/board/mx8qx_mek/board.c
index 8f40f28..b21ab76 100755
--- a/platform/board/mx8qx_mek/board.c
+++ b/platform/board/mx8qx_mek/board.c
@@ -769,10 +769,15 @@ sc_err_t board_system_config(sc_bool_t early, sc_rm_pt_t pt_boot)
             0x088000000ULL, 0x08FFFFFFFULL));
         BRD_ERR(rm_assign_memreg(pt_boot, pt_m4_0, mr_m4_0));
 
+#if 0
+       /*
+        * without this code, sf read works with sizes > 0x80000
+        */
         /* Reserve FlexSPI for M4_0 */
         BRD_ERR(rm_memreg_frag(pt_boot, &mr_m4_0, 0x08081000ULL,
             0x08180FFFULL));
         BRD_ERR(rm_assign_memreg(pt_boot, pt_m4_0, mr_m4_0));
+#endif
 
         /* Allow AP and M4_1 to use SYSTEM */
         BRD_ERR(rm_set_peripheral_permissions(pt_m4_0, SC_R_SYSTEM,

 

and compiled the firmware new with:

 

$ make qx B=mek R=B0

 

and added it to my yocto build ... with that change it works like a charm ...

 

bye,

Heiko

I've tried this method, and it works.Without modifying SCFW code, I compiled ATF,UBOOT and SCFW separately through Makefile, and then produced flash.bin file through mkImage and copied it into SD card. I found that SPI flash can also be used normally.But with the sd card image compiled by yocto, SPI Flash has a problem.

650 Views
nxf46838
NXP TechSupport
NXP TechSupport

Hello,

 

Glad that you found it and thank you for sharing,

 

Best regards,

Aldo.

0 Kudos

650 Views
nxf45548
NXP TechSupport
NXP TechSupport

****************************Google translate******************************
mx8qxp board, uboot failed to execute sf probe when booting from SD card

imx8qxp board, when booting from SD card, uboot fails to execute sf probe, QSPI Flash is not available. May I ask what is the reason?

0 Kudos

650 Views
山水之间
Contributor II

yes,that's what I meant

0 Kudos