Bug 242008

Summary: Installation on BananaPi fails: mmc0: Failed to set VCCQ for card at relative address 1
Product: Base System Reporter: Heinrich Schuchardt <xypron.glpk>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: helmut.schlattl, manu
Priority: ---    
Version: CURRENT   
Hardware: arm   
OS: Any   

Description Heinrich Schuchardt 2019-11-16 16:03:53 UTC
Both FreeBSD 12.1 and
FreeBSD 13.0-CURRENT #0 r354699: Thu Nov 14 11:14:44 UTC 2019
fail to in install on a BananaPi

The last output lines are
mmcsd0: 32GB <SDHC EB1QT 3.0 SN CA8B5F57 MFG 09/2018 by 27 SM> at mmc0 50.0MHz/4bit/32768-block
Release APs
WARNING: WITNESS option enabled, expect reduced performance.
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
mmc0: Failed to set VCCQ for card at relative address 1

OpenBSD 6.4 was running fine from the same SD card.

Best regards

Heinrich
Comment 1 Helmut 2019-12-16 08:28:29 UTC
Same problem with my Banana PI Pro. 

I tested various cards, but always got the same VCCQ-error.
Comment 2 Helmut 2019-12-20 15:36:28 UTC
I booted FreeBSD-12.1 verbosely and with kern.smp.disabled=1 and got the following output in the serial console:

usbus0: 480Mbps High Speed USB v2.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
axp2xx_pmu0: Powered by AC
aw_mmc0: Powering up sd/mmc
mmc0: Probing bus
ugen0.1: <Allwinner EHCI root HUB> at usbus0
uhub0: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
ugen1.1: <Generic OHCI root HUB> at usbus1
uhub1: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <Allwinner EHCI root HUB> at usbus2
uhub2: <Allwinner EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen3.1: <Generic OHCI root HUB> at usbus3
uhub3: <Generic OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
mmc0: SD 2.0 interface conditions: OK
mmc0: SD probe: OK (OCR: 0x00ff8000)
mmc0: Current OCR: 0x00ff8000
mmc0: Probing cards
mmc0: New card detected (CID 2842454e4434474221562a275e0107e7)
mmc0: New card detected (CSD 400e00325b5900001ddd7f800a4000e9)
mmc0: Card at relative address 0x59b4 added:
mmc0:  card: SDHC ND4GB 2.1 SN 562A275E MFG 07/2016 by 40 BE
mmc0:  quirks: 0
mmc0:  bus: 4bit, 50MHz (high speed timing)
mmc0:  memory: 7829504 blocks, erase sector 8192 blocks
mmc0: setting transfer rate to 50.000MHz (high speed timing)
mmcsd0: 4GB <SDHC ND4GB 2.1 SN 562A275E MFG 07/2016 by 40 BE> at mmc0 50.0MHz/4bit/32768-block
regulator: shutting down vcc3v0
regulator: shutting down vcc3v3
regulator: shutting down vcc5v0
regulator: shutting down ldo3
Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
GEOM: new disk mmcsd0
mmc0: setting bus width to 4 bits high speed timing
mmc0: Failed to set VCCQ for card at relative address 22964
GEOM_PART: partition 1 on (mmcsd0, MBR) is not aligned on 4194304 bytes
GEOM_PART: partition 2 on (mmcsd0, MBR) is not aligned on 4194304 bytes
aw_mmc0: error rint:
Comment 3 Helmut 2019-12-22 13:12:22 UTC
Found a workaorund under https://lists.freebsd.org/pipermail/freebsd-arm/2018-April/017852.html:

Set kernel argument: hw.regulator.disable_unused=0

According to the mailing list, the bug should have been fixed in r332843, but apparently is still there in 12-1 (r354233).
Comment 4 Emmanuel Vadot freebsd_committer freebsd_triage 2020-01-10 19:01:35 UTC
Both 356609 and r356610 should fix your issue.
It does for me on the A20 BananaPi.
Comment 5 Helmut 2020-02-16 12:47:47 UTC
Sorry for the late reply.

Yes, tested it with r357847 and it works now!

Thanks!
Comment 6 Emmanuel Vadot freebsd_committer freebsd_triage 2020-02-16 13:00:35 UTC
Thanks for the feedback.