Bug 250006 - mmc0: Failed to set VCCQ for card at relative address 22964 - bananapi-m1
Summary: mmc0: Failed to set VCCQ for card at relative address 22964 - bananapi-m1
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 12.1-RELEASE
Hardware: arm Any
: --- Affects Only Me
Assignee: Ilya Bakulin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-30 09:57 UTC by Franco
Modified: 2020-11-16 19:34 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franco 2020-09-30 09:57:35 UTC
BANANAPI M1 IMG kernel 12.1 RELEASE r354233

1) when boot from SD it crashes with the following error:

mmc0: Failed to set VCCQ for card at relative address 22964

I can override it with manually entering 

set hw.regulator.disable_unused=0

on loader prompt ( or putting line into boot/loader.conf)

With this command it does not crash...BUT NO LONGER SEES THE SATA DISK!

INSTEAD

2) if I enter the following command in U-BOOT
=> scsi scan
=> boot

and then manualmente entering :
set hw.regulator.disable_unused=0
on loader prompt

then everything is OK and the system is loaded correctly until login.

how to solve this problem?

thank you
regards
Comment 1 Ilya Bakulin freebsd_committer 2020-11-03 08:19:49 UTC
Hi Franco,
can you please try 13-CURRENT instead?
Comment 2 Franco 2020-11-03 18:04:03 UTC
(In reply to Ilya Bakulin from comment #1)

Hi Ilya Bakulin
thanks for attention!

Excuse me for bad english but I'm italian and I not speak english very well. 
I installed 13-CURRENT,  the system not crash but not see the sata disk .


if I enter the following command in U-BOOT
=> scsi scan
=> boot
then everything is OK and the system is loaded correctly until login.

now i don't need to enter manually
set hw.regulator.disable_unused = 0
on loader prompt .. but the hard disk is not working.

I always have to issue the - scsi scan - command in u-boot for the sata disk to work.

thanks again, I hope it works out.

regards
Comment 3 Ilya Bakulin freebsd_committer 2020-11-05 10:34:05 UTC
Can you please paste the output of:
# sysctl hw.regulator.disable_unused
# camcontrol devlist -v
once the system has booted with the SATA disk?
Comment 4 Ilya Bakulin freebsd_committer 2020-11-05 10:40:43 UTC
And by the way, which exact snapshot of -CURRENT did you use?

I happen to have BananaPi m1+ and can try it out.
Comment 5 Franco 2020-11-06 14:24:58 UTC
IMG
FreeBSD 12.1-RELEASE r354233 GENERIC

U-BOOT
=> scsi scan
=> boot

--- loader.conf ---
hw.regulator.disable_unused=0
hw.usb.template=3
umodem_load="YES"
# Disable the beastie menu and color
beastie_disable="YES"
loader_color="NO"

--------------
root@generic:~ # sysctl hw.regulator.disable_unused
sysctl: unknown oid 'hw.regulator.disable_unused'

-------------
root@generic:~ # camcontrol devlist -v
scbus0 on ahcich0 bus 0:
<TOSHIBA MK3265GSX GJ002J>         at scbus0 target 0 lun 0 (pass0,ada0)
<>                                 at scbus0 target -1 lun ffffffff ()
scbus-1 on xpt0 bus 0:
<>                                 at scbus-1 target -1 lun ffffffff (xpt0)
-------------------------------------------------------------
------------------------------------------------------

---- IMG -------
FreeBSD-13.0-CURRENT-arm-armv7-BANANAPI-20201029-b9403d7aae8.img

U-BOOT 
=> scsi scan
=> boot

root@generic:/ # uname -a
FreeBSD generic 13.0-CURRENT FreeBSD 13.0-CURRENT #0 b9403d7aae8-c254071(main):                   Thu Oct 29 11:30:05 UTC 2020     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/a                  rm.armv7/sys/GENERIC  arm

root@generic:~ # sysctl hw.regulator.disable_unused
sysctl: unknown oid 'hw.regulator.disable_unused'

root@generic:/ # camcontrol devlist -v
scbus0 on ahcich0 bus 0:
<TOSHIBA MK3265GSX GJ002J>         at scbus0 target 0 lun 0 (ada0,pass0)
<>                                 at scbus0 target -1 lun ffffffff ()
scbus-1 on xpt0 bus 0:
<>                                 at scbus-1 target -1 lun ffffffff (xpt0)

--------------------------------------------
-------------------------------------------
yesterday I tested the FreeBSD-12.2 release - 
the result is equal to 13-CURRENT version!

U-BOOT 
=> scsi scan
=> boot
this is the only way the system can see the hard disk.

THANKS!!
Comment 6 Ilya Bakulin freebsd_committer 2020-11-15 08:38:02 UTC
Unfortunately I couldn't get to debug the SATA issue yet. Meanwhile, you can modify there not sequence in U-Boot so that 'scsi scan' is issued automatically before the system boot. Let me know if you need help with this.
Comment 7 Franco 2020-11-15 10:24:34 UTC
(In reply to Ilya Bakulin from comment #6)

Yes, Thanks!
how do i automatically run 'scsi scan' in u-boot?
Comment 8 Ilya Bakulin freebsd_committer 2020-11-16 10:25:44 UTC
This is what you can do, assuming your device boots from mmc0:

(In U-Boot):
=> env print bootcmd_mmc0

on my board it is: "bootcmd_mmc0=setenv devnum 0; run mmc_boot"

Now you change the command and save:
=> env set bootcmd_mmc0 "scsi scan; setenv devnum 0; run mmc_boot"
=> saveenv

Now reset the board and see if it works!

If it doesn't: please post the output of "env print" and the boot log, from the board reset till FreeBSD boot loader starts.
Comment 9 Franco 2020-11-16 14:26:29 UTC
(In reply to Ilya Bakulin from comment #8)

Hi, 
i'm grateful to you, it works perfectly!!!

thanks

regards.
Comment 10 Ilya Bakulin freebsd_committer 2020-11-16 19:34:46 UTC
I'm glad it helped :-)

As the initial problem has been solved, I'll close this bug. Feel free to open another one for the SATA problem -- that would help to draw more people on it since it will have another title that talks about SATA.