AnsweredAssumed Answered

[i.MX7D][Yocto 2.1] Read failed for second QSPI

Question asked by Alex Cheng on Oct 2, 2018
Latest reply on Oct 8, 2018 by igorpadykov

1. I can read success for first QSPI. But I read failed for the second QSPI.
2. The attachment file(qspi_schematic.zip) is the circuit diagram of two QSPI.
3. Two QSPI setting in dts file:
&epdc {
status = "disabled";
};

&iomuxc {
qspi1 {
pinctrl_qspi1_1: qspi1grp_1 {
fsl,pins = <
MX7D_PAD_EPDC_DATA00__QSPI_A_DATA0 0x51
MX7D_PAD_EPDC_DATA01__QSPI_A_DATA1 0x51
MX7D_PAD_EPDC_DATA02__QSPI_A_DATA2 0x51
MX7D_PAD_EPDC_DATA03__QSPI_A_DATA3 0x51
MX7D_PAD_EPDC_DATA05__QSPI_A_SCLK 0x51
MX7D_PAD_EPDC_DATA06__QSPI_A_SS0_B 0x51
MX7D_PAD_EPDC_DATA08__QSPI_B_DATA0 0x51
MX7D_PAD_EPDC_DATA09__QSPI_B_DATA1 0x51
MX7D_PAD_EPDC_DATA10__QSPI_B_DATA2 0x51
MX7D_PAD_EPDC_DATA11__QSPI_B_DATA3 0x51
MX7D_PAD_EPDC_DATA13__QSPI_B_SCLK 0x51
MX7D_PAD_EPDC_DATA14__QSPI_B_SS0_B 0x51
>;
};
};
};

&qspi1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_qspi1_1>;
status = "okay";
ddrsmp=<0>;

 

flash0: mx66l1g45g@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "macronix,mx66l1g45g";
spi-max-frequency = <29000000>;
reg = <0>;
};

 

flash1: mx66l1g45g@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "macronix,mx66l1g45g";
spi-max-frequency = <29000000>;
reg = <1>;
};
};

4. Log information:
# dmesg |grep spi
[ 1.001371] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
[ 1.007737] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
#
# hexdump -C /dev/mtd0 -n 1024
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 01 00 00 00 40 00 00 00 02 00 00 03 00 00 00 02 |....@...........|
00000020 03 00 00 00 03 00 00 00 00 00 00 08 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|
00000040 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000060 00 00 00 00 00 00 00 00 0b 04 18 08 08 0c 04 1c |................|
00000070 00 24 00 00 00 00 00 00 05 04 01 1c 00 24 00 00 |.$...........$..|
00000080 00 00 00 00 00 00 00 00 06 04 00 24 00 00 00 00 |...........$....|
00000090 00 00 00 00 00 00 00 00 01 04 01 20 00 24 00 00 |........... .$..|
000000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000160 00 00 00 00 00 00 00 00 01 00 00 01 00 00 00 00 |................|
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 01 ee ff c0 |................|
00000200 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
*
00000400
#
# dmesg |grep spi
[ 1.001371] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
[ 1.007737] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
#
# hexdump -C /dev/mtd1 -n 1024
Unhandled fault: external abort on non-linefetch (0x008) at 0xf1000000
pgd = d8798000
[f1000000] *pgd=d87dd811, *pte=70000653, *ppte=70000453
Internal error: : 8 [#1] PREEMPT SMP ARM
Modules linked in: ath3k mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still v4l2_int_device ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc usb_f_acm u_serial g_serial libcompos
CPU: 0 PID: 999 Comm: hexdump Not tainted 4.1.15-2.1.0 #1
Hardware name: Freescale i.MX7 Dual (Device Tree)
task: d8549400 ti: d8b20000 task.ti: d8b20000
PC is at memcpy+0x48/0x330
LR is at fsl_qspi_read+0xd0/0x13c
pc : [<802d0ce8>] lr : [<80427230>] psr: 20070013
sp : d8b21e04 ip : 00000000 fp : d8b20000
r10: 00400000 r9 : 10000000 r8 : d8b21ea8
r7 : 00000000 r6 : 10000000 r5 : 00001000 r4 : d80f0010
r3 : 00000012 r2 : 00000f80 r1 : f1000000 r0 : d848e000
Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: d879806a DAC: 00000015
Process hexdump (pid: 999, stack limit = 0xd8b20210)
Stack: (0xd8b21e04 to 0xd8b22000)
1e00: 00001000 10000000 00000000 d8b21ea8 d848e000 d80f0010 80427230
1e20: 00000000 d80f0ab8 00000000 00000000 d8d10dc0 00000000 d848e000 80425614
1e40: 00001000 d8b21ea8 d848e000 00000000 d867f010 d80f04e0 00000000 d8b21f88
1e60: 00000000 8041e658 00001000 d8b21ea8 d848e000 d8b21f88 d80f04e0 00001000
1e80: 01930740 d8b21f88 d80f04e0 80423304 00001000 d8b21ea8 d848e000 d8b21fb0
1ea0: d88828c0 00000817 00000000 00001000 d88bdcb8 d88828f8 00000055 8001cfb0
1ec0: 8000f604 7e9bcb48 00000068 00000000 00000000 d881cc00 80423248 d8b21f88
1ee0: 00001000 8000f604 d8b20000 00000000 00029320 80104ec4 01931744 d8b21fb0
1f00: 0000270f 000001ff 76ea760c 80009288 7e9bcac4 7e9bcac4 d8b20000 80422fd0
1f20: 7e9bcac4 d83d5340 d881cc00 00000000 7e9bcac4 80115a14 000004b1 00000000
1f40: 7e9bcb48 d881cc00 01930740 d8b21f88 00001000 8000f604 d8b20000 801056ac
1f60: 00000001 00000000 00000000 d881cc00 d881cc00 01930740 00001000 8000f604
1f80: d8b20000 80105f44 00000000 00000000 76f166d0 76ec3648 00000000 ffffffff
1fa0: 00000003 8000f480 76ec3648 00000000 00000000 01930740 00001000 00000000
1fc0: 76ec3648 00000000 ffffffff 00000003 00000010 00000010 0192d640 00029320
1fe0: 00000000 7e9bcbac 76df4ce8 76e4b530 60070010 00000000 00000000 00000000
[<802d0ce8>] (memcpy) from [<80427230>] (fsl_qspi_read+0xd0/0x13c)
[<80427230>] (fsl_qspi_read) from [<80425614>] (spi_nor_read+0x60/0x90)
[<80425614>] (spi_nor_read) from [<8041e658>] (mtd_read+0x78/0xa8)
[<8041e658>] (mtd_read) from [<80423304>] (mtdchar_read+0xbc/0x200)
[<80423304>] (mtdchar_read) from [<80104ec4>] (__vfs_read+0x1c/0xd0)
[<80104ec4>] (__vfs_read) from [<801056ac>] (vfs_read+0x7c/0x108)
[<801056ac>] (vfs_read) from [<80105f44>] (SyS_read+0x44/0x9c)
[<80105f44>] (SyS_read) from [<8000f480>] (ret_fast_syscall+0x0/0x3c)
Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b151f8)
---[ end trace eeb2708ad919c7bb ]---
Segmentation fault

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: Internal error: : 8 [#1] PREEMPT SMP ARM

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: Process hexdump (pid: 999, stack limit = 0xd8b20210)

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1e00: 00001000 10000000 00000000 d8b21ea8 d848e000 d80f0010 80427230

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1e20: 00000000 d80f0ab8 00000000 00000000 d8d10dc0 00000000 d848e000 80425614

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1e60: 00000000 8041e658 00001000 d8b21ea8 d848e000 d8b21f88 d80f04e0 00001000

Message from syslogd@imx7dat Tue Oct 2 09:43:04 2018 ...

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7de kernel: 1e40: 00001000 d8b21ea8 d848e000 00000000 d867f010 d80f04e0 00000000 d8b21f88kernel: 1e80: 01930740 d8b21f88 d80f04e0 80423304 00


Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1ea0: d88828c0 00000817 00000000 00001000 d88bdcb8 d88828f8 00000055 8001cfb0

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1ec0: 8000f604 7e9bcb48 00000068 00000000 00000000 d881cc00 80423248 d8b21f88

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: Stack: (0xd8b21e04 to 0xd8b22000)

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1ee0: 00001000 8000f604 d8b20000 00000000 00029320 80104ec4 01931744 d8b21fb0

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1f20: 7e9bcac4 d83d5340 d881cc00 00000000 7e9bcac4 80115a14 000004b1 00000000

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1f40: 7e9bcb48 d881cc00 01930740 d8b21f88 00001000 8000f604 d8b20000 801056ac

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1f80: d8b20000 80105f44 00000000 00000000 76f166d0 76ec3648 00000000 ffffffff

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1fc0: 76ec3648 00000000 ffffffff 00000003 00000010 00000010 0192d640 00029320

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1f00: 0000270f 000001ff 76ea760c 80009288 7e9bcac4 7e9bcac4 d8b20000 80422fd0

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1fa0: 00000003 8000f480 76ec3648 00000000 00000000 01930740 00001000 00000000

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1f60: 00000001 00000000 00000000 d881cc00 d881cc00 01930740 00001000 8000f604

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: Code: ba000002 f5d1f03c f5d1f05c f5d1f07c (e8b151f8)

Message from syslogd@imx7d at Tue Oct 2 09:43:04 2018 ...
imx7d kernel: 1fe0: 00000000 7e9bcbac 76df4ce8 76e4b530 60070010 00000000 00000000 00000000

# dmesg |grep spi
[ 1.001371] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
[ 1.007737] fsl-quadspi 30bb0000.qspi: mx66l1g45g (131072 Kbytes)
[ 72.380658] LR is at fsl_qspi_read+0xd0/0x13c
[ 72.535223] [<802d0ce8>] (memcpy) from [<80427230>] (fsl_qspi_read+0xd0/0x13c)
[ 72.541155] [<80427230>] (fsl_qspi_read) from [<80425614>] (spi_nor_read+0x60/0x90)
[ 72.547519] [<80425614>] (spi_nor_read) from [<8041e658>] (mtd_read+0x78/0xa8)

Can you help to solve the issue about reading failed for the second QSPI?

Thank you.

Best Regards,
Alex Cheng

Attachments

Outcomes