cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
geck4031
Visitor
Visitor
1,784 Views
Registered: ‎05-12-2020

U-Boot: Error 84 whilst initializing SD card

Hi everyone,

I have run into an error

 

[    4.578098] mmc1: error -84 whilst initialising SD card

 

while U-Boot is initializing Linux. Subsequentally the OS gets stuck waiting for the RootFS which is located on that SD card.

I boot the system from a SD card as described in the PetaLinux Reference Manual.
The SD card and the content gets recognized by the FSBL as mmc1:

 

ZynqMP> mmc list
mmc@ff160000: 0
mmc@ff170000: 1

ZynqMP> fatls mmc 1:1
            System Volume Information/
 18114360   image.ub
  1124252   BOOT.BIN

ZynqMP> ext4ls mmc 1:2
<DIR>       4096 .
<DIR>       4096 ..
<DIR>       4096 lost+found
<DIR>       4096 lib
<DIR>       4096 var
<DIR>       4096 etc
<DIR>       4096 run
<DIR>       4096 usr
<DIR>       4096 media
<DIR>       4096 boot
<DIR>       4096 home
<DIR>       4096 dev
<DIR>       4096 sys
<DIR>       4096 proc
<DIR>       4096 tmp
<DIR>       4096 sbin
<DIR>       4096 bin
<DIR>       4096 mnt

 

 

Later on the U-Boot gets stuck waiting for mmc1 with the RootFS from the SD Card after dropping an error for the initialization of the SD card:

 

[    4.537593] mmc0: new HS200 MMC card at address 0001
[    4.543039] mmcblk0: mmc0:0001 IB2916 14.6 GiB
[    4.547954] mmcblk0boot0: mmc0:0001 IB2916 partition 1 4.00 MiB
[    4.554262] mmcblk0boot1: mmc0:0001 IB2916 partition 2 4.00 MiB
[    4.560333] mmcblk0rpmb: mmc0:0001 IB2916 partition 3 4.00 MiB, chardev (244:0)
[    4.568618]  mmcblk0: p1
[    4.578098] mmc1: error -84 whilst initialising SD card
[    4.579964] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    4.589857] clk: Not disabling unused clocks
[    4.594123] ALSA device list:
[    4.597088]   No soundcards found.
[    4.600797] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    4.609413] cfg80211: failed to load regulatory.db
[    4.614585] Waiting for root device /dev/mmcblk1p2...
[    4.728537] usb 3-1: new high-speed USB device number 2 using xhci-hcd
[    4.880662] usb 3-1: New USB device found, idVendor=0424, idProduct=2514, bcdDevice= b.b3
[    4.888839] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.956841] hub 3-1:1.0: USB hub found
[    4.960622] hub 3-1:1.0: 4 ports detected

 

 

Days of investigation couldn't tell me the reason for error 84 failing to initialize the SD card.
Do you have any idea?

The automatically generated Device Tree file zynqmp.dtsi shows the following entries for both mmc devices:

 

sdhci0: mmc@ff160000 {
			u-boot,dm-pre-reloc;
			compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
			status = "disabled";
			interrupt-parent = <&gic>;
			interrupts = <0 48 4>;
			reg = <0x0 0xff160000 0x0 0x1000>;
			clock-names = "clk_xin", "clk_ahb";
			xlnx,device_id = <0>;
			#stream-id-cells = <1>;
			iommus = <&smmu 0x870>;
			power-domains = <&zynqmp_firmware 39>;
			nvmem-cells = <&soc_revision>;
			nvmem-cell-names = "soc_revision";
		};

		sdhci1: mmc@ff170000 {
			u-boot,dm-pre-reloc;
			compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
			status = "disabled";
			interrupt-parent = <&gic>;
			interrupts = <0 49 4>;
			reg = <0x0 0xff170000 0x0 0x1000>;
			clock-names = "clk_xin", "clk_ahb";
			xlnx,device_id = <1>;
			#stream-id-cells = <1>;
			iommus = <&smmu 0x871>;
			power-domains = <&zynqmp_firmware 40>;
			nvmem-cells = <&soc_revision>;
			nvmem-cell-names = "soc_revision";
		};

 

Does it maybe make sense to set the status to "okay" within system-user.dtsi?

Thank you very much in advance!!

Benjamin

0 Kudos
4 Replies
jovitac
Moderator
Moderator
1,717 Views
Registered: ‎05-10-2017

Do you have sd1 enabled in your vivado design? If yes, then it should come up enabled in your device-tree.

Decompile the sytem.dtb that gets generated in the images/linux folder to see if the mmc node is enabled.

Run this command to get the dts.

dtc -I dtb -O dts -o system.dts system.dtb
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
geck4031
Visitor
Visitor
1,702 Views
Registered: ‎05-12-2020

Hi @jovitac ,

Thank you very much for your response!

Yes SD1 is enabled within Vivado.

Indeed I got a few warnings:

system.dts: Warning (unit_address_vs_reg): Node /memory has a reg or ranges property, but no unit name
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00000000 unit name should not have leading "0x"
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00000000 unit name should not have leading 0s
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00100000 unit name should not have leading "0x"
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00100000 unit name should not have leading 0s
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00140000 unit name should not have leading "0x"
system.dts: Warning (unit_address_format): Node /amba/spi@ff0f0000/flash@0/partition@0x00140000 unit name should not have leading 0s
system.dts: Warning (pci_device_reg): Node /amba/pcie@fd0e0000/legacy-interrupt-controller missing PCI reg property

I made a few slight changes (see attached files) to avoid these compiler warnings.

The boot process appears to be quite the same (see attached log).

Anything else wrong with the dts?

Thank you and best regards,
Benjamin

 

0 Kudos
jovitac
Moderator
Moderator
1,691 Views
Registered: ‎05-10-2017

Your device-tree looks good. If you look at the node mmc@ff170000 you can see that it is enabled.

Do you know which SD card are you using? Can you try running it at high speed and see if it works?

To do this, add the no-1-8-v entry to your device-tree and rebuild your petalinux images

$ vim project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi
&sdhci1 {
  no-1-8-v;
};
 
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
geck4031
Visitor
Visitor
1,674 Views
Registered: ‎05-12-2020

Hi @jovitac ,

thank you very much for your answer! I appreciate it a lot.

I added the suggested line to the system-user.dtsi and it was compiled into the final dts with the following result:

		mmc@ff170000 {
			u-boot,dm-pre-reloc;
			compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
			status = "okay";
			interrupt-parent = <0x4>;
			interrupts = <0x0 0x31 0x4>;
			reg = <0x0 0xff170000 0x0 0x1000>;
			clock-names = "clk_xin", "clk_ahb";
			xlnx,device_id = <0x1>;
			#stream-id-cells = <0x1>;
			iommus = <0xd 0x871>;
			power-domains = <0xc 0x28>;
			nvmem-cells = <0x10>;
			nvmem-cell-names = "soc_revision";
			clocks = <0x3 0x37 0x3 0x1f>;
			clock-frequency = <0xbebba31>;
			xlnx,mio_bank = <0x1>;
			no-1-8-v;
		};

Unfortunately it still delivers the save error: "[ 4.578543] mmc1: error -84 whilst initialising SD card"

Hm, any other ideas?

Thank you and best regards,
Benjamin

0 Kudos