NetBSD Problem Report #60311

From martin@duskware.de  Thu Jun  4 16:43:15 2026
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E98BF1A9239
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  4 Jun 2026 16:43:14 +0000 (UTC)
Message-Id: <20260604164310.AF015E1FFAD@mail.duskware.de>
Date: Thu, 04 Jun 2026 18:43:05 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: eMMC not powering up (used to work)
X-Send-Pr-Version: 3.95
X-From4GNATS: "martin@NetBSD.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60311
>Category:       kern
>Synopsis:       eMMC not powering up (used to work)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 04 16:45:00 +0000 2026
>Last-Modified:  Sun Jun 07 09:50:01 +0000 2026
>Originator:     Martin Husemann
>Release:        NetBSD 11.99.6
>Organization:
The NetBSD Foundation, Inc.
>Environment:


System: NetBSD 11.99.6 (GENERIC64) #0: Wed Jun  3 19:20:35 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
Architecture: aarch64
Machine: evbarm
>Description:
I have a Firefly ROC-RK3568-PC running Jared's latest edk2 UEFI firmware v1.3.
The firmware currently is on an SD card (ld1 in the dmesg below).
The machine also has a eMMC which should show up as ld0, but this fails
to power up (sdmmc_enable() returns ETIMEOUT).

Full -current dmesg below.

The failure modes for various NetBSD versions differ:

netbsd-10 and netbsd-11 latest show:

[     1.778543] sdmmc1: SD card status: 4-bit, C10
[     1.778543] ld1 at sdmmc1: <0x27:0x5048:SD4GB:0x60:0x7c557593:0x136>
[     1.778543] ld1: 3796 MB, 1928 cyl, 64 head, 63 sec, 512 bytes/sect x 7774208 sectors (0 bytes/physsect)
[     1.778543] ld1: GPT GUID: 3711ba77-acc1-4dbf-b250-7d7a6f6727ee
[     1.788546] dk0 at ld1: "loader", 20416 blocks at 64, type: ext2fs
[     1.788546] dk1 at ld1: "uboot", 10240 blocks at 20480, type: ext2fs
[     1.788546] ld1: 4-bit width, High-Speed/SDR25, 50.000 MHz
[     1.808544] sdmmc0: autoconfiguration error: unknown MMC version 6
[     1.828545] sdmmc0: autoconfiguration error: init failed
[     1.848546] sdmmc2: 4-bit width, 50.000 MHz
[     1.848546] sdmmc2: SDIO function
[     1.848546] bwfm0 at sdmmc2 function 1


However, a "current" kernel from feburary 2024 works:

[     1.000000] NetBSD 10.99.10 (GENERIC64) #0: Thu Feb 15 22:48:58 UTC 2024
[     1.000000] 	mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
[..]
[     1.805774] sdmmc1: SD card status: 4-bit, C10
[     1.805774] ld1 at sdmmc1: <0x27:0x5048:SD4GB:0x60:0x7c557593:0x136>
[     1.805774] ld1: 3796 MB, 1928 cyl, 64 head, 63 sec, 512 bytes/sect x 7774208 sectors
[     1.805774] ld1: GPT GUID: 3711ba77-acc1-4dbf-b250-7d7a6f6727ee
[     1.815778] dk0 at ld1: "loader", 20416 blocks at 64, type: ext2fs
[     1.815778] dk1 at ld1: "uboot", 10240 blocks at 20480, type: ext2fs
[     1.815778] ld1: 4-bit width, High-Speed/SDR25, 50.000 MHz
[     1.835776] ld0 at sdmmc0: <0x9b:0x0100:Y0S064:0x00:0xbada39e7:0x000>
[     1.835776] ld0: 59648 MB, 7604 cyl, 255 head, 63 sec, 512 bytes/sect x 122159104 sectors
[     1.835776] ld0: GPT GUID: 695e7379-436e-4dea-9bc1-63a550ec77fd

and I can actually access ld0.

I will enable SDMMC_DEBUG and see what that shows.

Full -current as of yesterday dmesg below:


[     1.000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[     1.000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[     1.000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023,
[     1.000000]     2024, 2025, 2026
[     1.000000]     The NetBSD Foundation, Inc.  All rights reserved.
[     1.000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[     1.000000]     The Regents of the University of California.  All rights reserved.
[     1.000000] NetBSD 11.99.6 (GENERIC64) #0: Wed Jun  3 19:20:35 UTC 2026
[     1.000000] 	mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64
[     1.000000] total memory = 7876 MB
[     1.000000] avail memory = 7591 MB
[     1.000000] entropy: ready
[     1.000000] timecounter: Timecounters tick every 10.000 msec
[     1.000000] Kernelized RAIDframe activated
[     1.000000] armfdt0 (root)
[     1.000000] armfdt0: using EFI runtime services for RTC
[     1.000000] simplebus0 at armfdt0: Firefly Firefly ROC-RK3568-PC
[     1.000000] simplebus1 at simplebus0
[     1.000000] acpifdt0 at simplebus0
[     1.000000] acpifdt0: SMBIOS rev. 3.3.0 @ 0xef270000
[     1.000000] ACPI: RSDP 0x00000000EF845018 000024 (v02 RKCP  )
[     1.000000] ACPI: XSDT 0x00000000EF845F18 000054 (v01 RKCP   RK356X   00000001      01000013)
[     1.000000] ACPI: FACP 0x00000000EF845C18 000114 (v06 RKCP   RK356X   00000001 EDK2 00000001)
[     1.000000] ACPI: DSDT 0x00000000EF361018 0014D6 (v02 RKCP   RK356X   00000002 INTL 20200925)
[     1.000000] ACPI: DBG2 0x00000000EF845B18 00005C (v00 RKCP   RK356X   00000001 EDK2 00000001)
[     1.000000] ACPI: GTDT 0x00000000EF845D98 000068 (v03 RKCP   RK356X   00000001 EDK2 00000001)
[     1.000000] ACPI: APIC 0x00000000EF845098 0001AC (v04 RKCP   RK356X   00000001 EDK2 00000001)
[     1.000000] ACPI: MCFG 0x00000000EF845E98 00003C (v01 RKCP   RK356X   00000001 EDK2 00000001)
[     1.000000] ACPI: BGRT 0x00000000EF845A18 000038 (v01 INTEL  EDK2     00000002      01000013)
[     1.000000] ACPI: 1 ACPI AML tables successfully acquired and loaded
[     1.000000] acpi0 at acpifdt0: Intel ACPICA 20260408
[     1.000000] acpi0: X/RSDT: OemId <RKCP  ,RK356X  ,00000001>, AslId <    ,01000013>
[     1.000000] acpi0: MCFG: segment 2, bus 1-1, address 0x0000000380008000
[     1.000000] cpu0 at acpi0: Arm Cortex-A55 r2p0 (v8.2-A+), id 0x0
[     1.000000] cpu0: package 0, core 0, smt 0, numa 0
[     1.000000] cpu0: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[     1.000000] cpu0: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[     1.000000] cpu0: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=0, LoC=2, LoUIS=0
[     1.000000] cpu0: L1 32KB/64B 4-way (128 set) VIPT Instruction cache
[     1.000000] cpu0: L1 32KB/64B 4-way (128 set) PIPT Data cache
[     1.000000] cpu0: L2 512KB/64B 16-way (512 set) PIPT Unified cache
[     1.000000] cpu0: revID=0x0, PMUv3p1, 4k table, 16k table, 64k table, 16bit ASID
[     1.000000] cpu0: auxID=0x100010211120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[     1.000000] cpu1 at acpi0: Arm Cortex-A55 r2p0 (v8.2-A+), id 0x100
[     1.000000] cpu1: package 0, core 1, smt 0, numa 0
[     1.000000] cpu1: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[     1.000000] cpu1: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[     1.000000] cpu1: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=0, LoC=2, LoUIS=0
[     1.000000] cpu1: L1 32KB/64B 4-way (128 set) VIPT Instruction cache
[     1.000000] cpu1: L1 32KB/64B 4-way (128 set) PIPT Data cache
[     1.000000] cpu1: L2 512KB/64B 16-way (512 set) PIPT Unified cache
[     1.000000] cpu1: revID=0x0, PMUv3p1, 4k table, 16k table, 64k table, 16bit ASID
[     1.000000] cpu1: auxID=0x100010211120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[     1.000000] cpu2 at acpi0: Arm Cortex-A55 r2p0 (v8.2-A+), id 0x200
[     1.000000] cpu2: package 0, core 2, smt 0, numa 0
[     1.000000] cpu2: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[     1.000000] cpu2: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[     1.000000] cpu2: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=0, LoC=2, LoUIS=0
[     1.000000] cpu2: L1 32KB/64B 4-way (128 set) VIPT Instruction cache
[     1.000000] cpu2: L1 32KB/64B 4-way (128 set) PIPT Data cache
[     1.000000] cpu2: L2 512KB/64B 16-way (512 set) PIPT Unified cache
[     1.000000] cpu2: revID=0x0, PMUv3p1, 4k table, 16k table, 64k table, 16bit ASID
[     1.000000] cpu2: auxID=0x100010211120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[     1.000000] cpu3 at acpi0: Arm Cortex-A55 r2p0 (v8.2-A+), id 0x300
[     1.000000] cpu3: package 0, core 3, smt 0, numa 0
[     1.000000] cpu3: IC enabled, DC enabled, EL0/EL1 stack Alignment check enabled
[     1.000000] cpu3: Cache Writeback Granule 16B, Exclusives Reservation Granule 16B
[     1.000000] cpu3: Dcache line 64, Icache line 64, DIC=0, IDC=0, LoUU=0, LoC=2, LoUIS=0
[     1.000000] cpu3: L1 32KB/64B 4-way (128 set) VIPT Instruction cache
[     1.000000] cpu3: L1 32KB/64B 4-way (128 set) PIPT Data cache
[     1.000000] cpu3: L2 512KB/64B 16-way (512 set) PIPT Unified cache
[     1.000000] cpu3: revID=0x0, PMUv3p1, 4k table, 16k table, 64k table, 16bit ASID
[     1.000000] cpu3: auxID=0x100010211120, GICv3, FP, CRC32, SHA1, SHA256, AES+PMULL, NEON, rounding, NaN propagation, denormals, 32x64bitRegs, Fused Multiply-Add
[     1.000000] gicvthree0 at acpi0: GICv3
[     1.000000] gicvthree0: iidr 0x0201743b, cpuif non-secure, dist non-secure, priority shift 4, pmr shift 4, quirks 0
[     1.000000] gicvthree0: GICv2m @ 0xfd410000, SPIs 296-320
[     1.000000] gtmr0 at acpi0: irq 27
[     1.000000] armgtmr0 at gtmr0: Generic Timer (24000 kHz, virtual)
[     1.000000] timecounter: Timecounter "armgtmr0" frequency 24000000 Hz quality 500
[     1.000004] CPU0 (ACPI0007) at acpi0 not configured
[     1.000004] CPU1 (ACPI0007) at acpi0 not configured
[     1.000004] CPU2 (ACPI0007) at acpi0 not configured
[     1.000004] CPU3 (ACPI0007) at acpi0 not configured
[     1.000004] THRM (PNP0C02) at acpi0 not configured
[     1.000004] acpitz0 at acpi0 (TCPU): cpu0 cpu1 cpu2 cpu3
[     1.000004] acpitz0: levels: critical 115.0 C, passive cooling
[     1.000004] acpitz1 at acpi0 (TGPU)
[     1.000004] acpitz1: levels: critical 115.0 C, passive cooling
[     1.000004] com0 at acpi0 (URT2, HISI0031-2): mem 0xfe660000-0xfe660fff irq 150
[     1.000004] com0: DesignWare APB UART, 64-byte FIFO
[     1.000004] com1 at acpi0 (URT3, HISI0031-3): mem 0xfe670000-0xfe670fff irq 151
[     1.000004] com1: DesignWare APB UART, 64-byte FIFO
[     1.000004] com2 at acpi0 (URT4, HISI0031-4): mem 0xfe680000-0xfe680fff irq 152
[     1.000004] com2: DesignWare APB UART, 64-byte FIFO
[     1.000004] dwcwdt0 at acpi0 (WDOG, PRP0001-7): mem 0xfe600000-0xfe6000ff irq 181
[     1.000004] dwcwdt0: default watchdog period is 15 seconds
[     1.000004] ohci0 at acpi0 (OHC0, PRP0001-0): mem 0xfd840000-0xfd87ffff irq 163
[     1.000004] ohci0: OHCI version 1.0
[     1.000004] usb0 at ohci0: USB revision 1.0
[     1.000004] ehci0 at acpi0 (EHC0, PNP0D20-0): mem 0xfd800000-0xfd83ffff irq 162
[     1.000004] ehci0: companion port: \_SB_.OHC0.RHUB.PRT1
[     1.000004] ehci0: 32-bit DMA
[     1.000004] ehci0: EHCI version 1.0
[     1.000004] ehci0: 1 companion controller, 1 port
[     1.000004] ehci0: Using DMA subregion for control data structures
[     1.000004] usb1 at ehci0: USB revision 2.0
[     1.000004] ohci1 at acpi0 (OHC1, PRP0001-1): mem 0xfd8c0000-0xfd8fffff irq 166
[     1.000004] ohci1: OHCI version 1.0
[     1.000004] usb2 at ohci1: USB revision 1.0
[     1.000004] ehci1 at acpi0 (EHC1, PNP0D20-1): mem 0xfd880000-0xfd8bffff irq 165
[     1.000004] ehci1: companion port: \_SB_.OHC1.RHUB.PRT1
[     1.000004] ehci1: 32-bit DMA
[     1.000004] ehci1: EHCI version 1.0
[     1.000004] ehci1: 1 companion controller, 1 port
[     1.000004] ehci1: Using DMA subregion for control data structures
[     1.000004] usb3 at ehci1: USB revision 2.0
[     1.000004] xhci0 at acpi0 (XHC0, PNP0D10-0): mem 0xfcc00000-0xfcffffff irq 201
[     1.000004] xhci0: 32-bit DMA
[     1.000004] xhci0: xHCI version 1.10
[     1.000004] usb4 at xhci0: USB revision 3.0
[     1.000004] usb5 at xhci0: USB revision 2.0
[     1.000004] xhci1 at acpi0 (XHC1, PNP0D10-1): mem 0xfd000000-0xfd3fffff irq 202
[     1.000004] xhci1: 32-bit DMA
[     1.000004] xhci1: xHCI version 1.10
[     1.000004] usb6 at xhci1: USB revision 3.0
[     1.000004] usb7 at xhci1: USB revision 2.0
[     1.000004] eqos0 at acpi0 (MAC0, PRP0001-2): mem 0xfe2a0000-0xfe2affff irq 59,56
[     1.000004] eqos0: DesignWare EQOS ver 0x51 (0x30)
[     1.000004] eqos0: hw features 160171e7 010c01c8 10000000 00000000
[     1.000004] eqos0: using 32-bit DMA
[     1.000004] eqos0: Ethernet address b6:3c:5c:ee:8a:e4
[     1.000004] ukphy0 at eqos0 phy 0: OUI 0x00e04c, model 0x0007, rev. 8
[     1.000004] ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
[     1.000004] ukphy1 at eqos0 phy 1: OUI 0x00e04c, model 0x0007, rev. 8
[     1.000004] ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
[     1.000004] eqos1 at acpi0 (MAC1, PRP0001-3): mem 0xfe010000-0xfe01ffff irq 64,61
[     1.000004] eqos1: DesignWare EQOS ver 0x51 (0x30)
[     1.000004] eqos1: hw features 160171e7 010c01c8 10000000 00000000
[     1.000004] eqos1: using 32-bit DMA
[     1.000004] eqos1: Ethernet address b6:3c:5c:ee:8a:e5
[     1.000004] ukphy2 at eqos1 phy 0: OUI 0x00e04c, model 0x0007, rev. 8
[     1.000004] ukphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
[     1.000004] ukphy3 at eqos1 phy 1: OUI 0x00e04c, model 0x0007, rev. 8
[     1.000004] ukphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, auto
[     1.000004] dwcmmc0 at acpi0 (MSH0, PRP0001-4): mem 0xfe2b0000-0xfe2b3fff irq 130
[     1.000004] dwcmmc1 at acpi0 (MSH2, PRP0001-6): mem 0xfe000000-0xfe003fff irq 132
[     1.000004] sdhc0 at acpi0 (EMMC, RKCP0D40-0): mem 0xfe310000-0xfe31ffff irq 51
[     1.000004] sdhc0: SDHC 4.2, rev 0, caps <226d3281/08000000>, 32-bit ADMA2, 50000 kHz, HS 3.0V, re-tuning mode 1, 1024 byte blocks
[     1.000004] sdmmc0 at sdhc0 slot 0
[     1.000004] ahcisata0 at acpi0 (SAT2, RKCP0161-2): mem 0xfc800000-0xfc800fff irq 128
[     1.000004] ahcisata0: using 32-bit DMA
[     1.000004] ahcisata0: AHCI revision 1.30, 1 port, 32 slots, CAP 0x6f37ff80<CCCS,PSC,SSC,PMD,FBSS,SPM,SAM,ISS=0x3=Gen3,SCLO,SAL,SALP,SSS,SSNTF,SNCQ>
[     1.000004] atabus0 at ahcisata0 channel 0
[     1.000004] RES0 (PNP0C02) at acpi0 not configured
[     1.000004] genfb0 at simplebus1: Simple Framebuffer (1920x1080 32-bpp @ 0xee8e0000)
[     1.000004] genfb0: framebuffer at 0xee8e0000, size 1920x1080, depth 32, stride 7680
[     1.000004] wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation)
[     1.000004] wsmux1: connecting to wsdisplay0
[     1.000004] wsdisplay0: screen 1-3 added (default, vt100 emulation)
[     1.000004] timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
[     1.676407] uhub0 at usb4: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 3.00/1.00, addr 0
[     1.676407] uhub0: 1 port with 1 removable, self powered
[     1.676407] uhub1 at usb5: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 0
[     1.676407] uhub1: 1 port with 1 removable, self powered
[     1.676407] uhub2 at usb6: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 3.00/1.00, addr 0
[     1.676407] uhub2: 1 port with 1 removable, self powered
[     1.676407] uhub3 at usb7: NetBSD (0x0000) xHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 0
[     1.676407] uhub3: 1 port with 1 removable, self powered
[     1.676407] sdmmc1 at dwcmmc0
[     1.686422] sdmmc2 at dwcmmc1
[     1.686422] cpu0: PMU interrupting on irq 260
[     1.686422] cpu1: PMU interrupting on irq 261
[     1.686422] cpu2: PMU interrupting on irq 262
[     1.686422] cpu3: PMU interrupting on irq 263
[     1.696412] uhub4 at usb0: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
[     1.696412] uhub4: 1 port with 1 removable, self powered
[     1.696412] uhub5 at usb3: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[     1.696412] uhub5: 1 port with 1 removable, self powered
[     1.696412] uhub6 at usb1: NetBSD (0x0000) EHCI root hub (0x0000), class 9/0, rev 2.00/1.00, addr 1
[     1.696412] uhub6: 1 port with 1 removable, self powered
[     1.696412] uhub7 at usb2: NetBSD (0x0000) OHCI root hub (0x0000), class 9/0, rev 1.00/1.00, addr 1
[     1.696412] uhub7: 1 port with 1 removable, self powered
[     1.696412] IPsec: Initialized Security Association Processing.
[     1.826415] sdmmc1: SD card status: 4-bit, C10
[     1.826415] ld1 at sdmmc1: <0x27:0x5048:SD4GB:0x60:0x7c557593:0x136>
[     1.826415] ld1: 3796 MB, 1928 cyl, 64 head, 63 sec, 512 bytes/sect x 7774208 sectors
[     1.826415] ld1: GPT GUID: 3711ba77-acc1-4dbf-b250-7d7a6f6727ee
[     1.836418] dk0 at ld1: "loader", 20416 blocks at 64, type: ext2fs
[     1.836418] dk1 at ld1: "uboot", 10240 blocks at 20480, type: ext2fs
[     1.836418] ld1: 4-bit width, High-Speed/SDR25, 50.000 MHz
[     1.876417] sdmmc2: 4-bit width, 50.000 MHz
[     1.876417] sdmmc2: SDIO function
[     1.876417] bwfm0 at sdmmc2 function 1
[     1.876417] (manufacturer 0x2d0, product 0xa9bf) at sdmmc2 function 2 not configured
[     1.876417] (manufacturer 0x2d0, product 0xa9bf, standard function interface code 0x2) at sdmmc2 function 3 not configured
[     2.766444] uhub8 at uhub6 port 1: vendor 1a40 (0x1a40) USB 2.0 Hub [MTT] (0x0101), class 9/0, rev 2.00/1.00, addr 2
[     2.766444] uhub8: multiple transaction translators
[     2.766444] uhub8: 4 ports with 4 removable, self powered
[     3.616464] umass0 at uhub8 port 3 configuration 1 interface 0
[     3.616464] umass0: vendor 13fe (0x13fe) USB DISK 2.0 (0x3e00), rev 2.00/1.00, addr 3
[     3.616464] umass0: using SCSI over Bulk-Only
[     3.626465] scsibus0 at umass0: 2 targets, 1 lun per target
[     3.626465] sd0 at scsibus0 target 0 lun 0: <, USB DISK 2.0, PMAP> disk removable
[     3.626465] sd0: 15272 MB, 3832 cyl, 255 head, 32 sec, 512 bytes/sect x 31277056 sectors
[     3.636467] sd0: GPT GUID: 65ce94da-94da-45ce-9a94-ce65da94ce65
[     3.636467] dk2 at sd0: "EFI system", 262144 blocks at 2048, type: msdos
[     3.636467] dk3 at sd0: "65ce94da-94da-45ce-9a94-ce65da94ce65", 3112960 blocks at 264192, type: ffs
[     4.146478] uhidev0 at uhub8 port 4 configuration 1 interface 0
[     4.146478] uhidev0: Dell (0x413c) Dell USB Keyboard (0x2105), rev 1.10/3.52, addr 4, iclass 3/1
[     4.156478] ukbd0 at uhidev0
[     4.156478] wskbd0 at ukbd0: console keyboard, using wsdisplay0
[     4.836495] sdmmc0: autoconfiguration error: couldn't enable card: 60
[     4.836495] swwdog0: software watchdog initialized
[     4.856497] WARNING: 1 error while detecting hardware; check system log.
[     4.856497] boot device: dk3
[     4.866498] root on dk3
[     4.886499] root file system type: ffs
[     4.886499] kern.module.path=/stand/evbarm/11.99.6/modules

>How-To-Repeat:
s/a

>Fix:
n/a

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Thu, 4 Jun 2026 19:18:51 +0200

 This gave suprisingly little details:

 [     4.836573] sdmmc0: cmd 1 arg=0x40060000 data=0x0 dlen=0 flags=0x4703 (error 60)
 [     4.836573] sdmmc_mmc_command: error=60
 [     4.836573] sdmmc0: sdmmc_mem_send_op_cond: error=60, ocr=0
 [     4.836573] sdmmc0: couldn't send memory OCR
 [     4.836573] sdmmc0: sdmmc_mem_enable failed 60
 [     4.846573] sdmmc0: autoconfiguration error: couldn't enable card: 60
 [     4.846573] sdmmc0: detach card

 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Thu, 4 Jun 2026 21:19:09 +0200

 Adding SDHC_DEBUG results in:

 [     4.878588] sdhc0: intr status 0 error 0
 [     4.878588] sdhc0: software reset reg=00000006
 [     4.888588] sdhc_exec_command: timeout for command
 [     4.888588] sdhc0: cmd 1 abort (flags=00004703 error=60)
 [     4.888588] sdmmc0: cmd 1 arg=0x40060000 data=0x0 dlen=0 flags=0x4703 (error 60)
 [     4.888588] sdmmc_mmc_command: error=60
 [     4.888588] sdmmc0: sdmmc_mem_send_op_cond: error=60, ocr=0
 [     4.888588] sdmmc0: couldn't send memory OCR
 [     4.888588] sdmmc0: sdmmc_mem_enable failed 60
 [     4.888588] sdhc0: software reset reg=00000001
 [     4.898589] sdmmc0: autoconfiguration error: couldn't enable card: 60
 [     4.898589] sdmmc0: detach card
 [     4.898589] sdhc0: software reset reg=00000001


 Martin

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Fri, 5 Jun 2026 22:49:58 +0200

 There are two separate issues here.

 First is solved by a patch suggested by Jared and only affects -current:

 Do not clear the SD Bus Power bit for Rockchip "RKCP0D40" sdhc controllers

 Index: sys/dev/acpi/sdhc_acpi.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/acpi/sdhc_acpi.c,v
 retrieving revision 1.22
 diff -u -p -r1.22 sdhc_acpi.c
 --- sys/dev/acpi/sdhc_acpi.c	17 Aug 2024 07:00:35 -0000	1.22
 +++ sys/dev/acpi/sdhc_acpi.c	5 Jun 2026 20:45:23 -0000
 @@ -108,6 +108,7 @@ static const struct sdhc_acpi_slot {
  	{ .hid = "RKCP0D40",		 .type = SLOT_TYPE_SD,
  					 .flags = SDHC_FLAG_32BIT_ACCESS |
  						  SDHC_FLAG_8BIT_MODE |
 +						  SDHC_FLAG_NO_PWR0 |
  						  SDHC_FLAG_SINGLE_POWER_WRITE },

  	/* Generic IDs last */


 With this patch my machine reliably detects the eMMC, but only if options
 DIAGNOSTIC is defined.

 Fix suggested by mlelstv. This also affects netbsd-10 and netbsd-11.

 When we see an error from the host controller, delay the soft reset by 100us.

 Index: sys/dev/sdmmc/sdhc.c
 ===================================================================
 RCS file: /cvsroot/src/sys/dev/sdmmc/sdhc.c,v
 retrieving revision 1.125
 diff -u -p -r1.125 sdhc.c
 --- sys/dev/sdmmc/sdhc.c	9 Jan 2026 22:54:34 -0000	1.125
 +++ sys/dev/sdmmc/sdhc.c	5 Jun 2026 20:37:48 -0000
 @@ -2356,8 +2356,10 @@ sdhc_wait_intr(struct sdhc_host *hp, int

  	if (nointr ||
  	    (ISSET(status, SDHC_ERROR_INTERRUPT) && error)) {
 -		if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED))
 +		if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
 +			sdmmc_delay(100);
  			(void)sdhc_soft_reset(hp, SDHC_RESET_CMD|SDHC_RESET_DAT);
 +		}
  		hp->intr_error_status = 0;
  		status = 0;
  	}

 Without this second part I get random failures (differing between cold
 boot and also changing after soft reboot). The most populare failures is
 "unknown MMC version 6".


 With both of thes changes my machine reliably detects the eMMC, with and
 without options DIAGNOSTIC.

 Martin

From: Jared McNeill <jmcneill@invisible.ca>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
    martin@NetBSD.org
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Sat, 6 Jun 2026 12:50:38 -0300 (ADT)

 On Fri, 5 Jun 2026, Martin Husemann via gnats wrote:

 > Fix suggested by mlelstv. This also affects netbsd-10 and netbsd-11.
 >
 > When we see an error from the host controller, delay the soft reset by 100us.
 >
 > Index: sys/dev/sdmmc/sdhc.c
 > ===================================================================
 > RCS file: /cvsroot/src/sys/dev/sdmmc/sdhc.c,v
 > retrieving revision 1.125
 > diff -u -p -r1.125 sdhc.c
 > --- sys/dev/sdmmc/sdhc.c	9 Jan 2026 22:54:34 -0000	1.125
 > +++ sys/dev/sdmmc/sdhc.c	5 Jun 2026 20:37:48 -0000
 > @@ -2356,8 +2356,10 @@ sdhc_wait_intr(struct sdhc_host *hp, int
 >
 >  	if (nointr ||
 >  	    (ISSET(status, SDHC_ERROR_INTERRUPT) && error)) {
 > -		if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED))
 > +		if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
 > +			sdmmc_delay(100);
 >  			(void)sdhc_soft_reset(hp, SDHC_RESET_CMD|SDHC_RESET_DAT);
 > +		}
 >  		hp->intr_error_status = 0;
 >  		status = 0;
 >  	}
 >
 > Without this second part I get random failures (differing between cold
 > boot and also changing after soft reboot). The most populare failures is
 > "unknown MMC version 6".

 The patch looks fine, but RK356x doesn't set SDHC_FLAG_ENHANCED, so I'm 
 struggling to see how this changes anything for you?

 When SDHC_FLAG_ENHANCED is NOT set, both with and without this patch, the 
 delay and sdhc_soft_reset lines will be executed. What am I missing?

From: Jared McNeill <jmcneill@invisible.ca>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, 
    martin@NetBSD.org
Subject: Re: kern/60311: eMMC not powering up (used to work)
Date: Sat, 6 Jun 2026 12:56:16 -0300 (ADT)

 On Sat, 6 Jun 2026, Jared McNeill via gnats wrote:

 > When SDHC_FLAG_ENHANCED is NOT set, both with and without this patch, the
 > delay and sdhc_soft_reset lines will be executed. What am I missing?

 Ignore me, I misread the patch. LGTM, ship it!

From: "Michael van Elst" <mlelstv@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60311 CVS commit: src/sys/dev/sdmmc
Date: Sat, 6 Jun 2026 16:09:22 +0000

 Module Name:	src
 Committed By:	mlelstv
 Date:		Sat Jun  6 16:09:21 UTC 2026

 Modified Files:
 	src/sys/dev/sdmmc: sdhc.c

 Log Message:
 When seeing an error from the host controller, delay the soft reset by 100us.

 This helps the hardware found in Rockchip RK3568 and RK3588 SoCs.
 See PR kern/60311.

 Needs pullup to netbsd-10 and -11.


 To generate a diff of this commit:
 cvs rdiff -u -r1.125 -r1.126 src/sys/dev/sdmmc/sdhc.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60311 CVS commit: [netbsd-11] src/sys/dev/sdmmc
Date: Sun, 7 Jun 2026 09:43:59 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jun  7 09:43:59 UTC 2026

 Modified Files:
 	src/sys/dev/sdmmc [netbsd-11]: sdhc.c

 Log Message:
 Pull up following revision(s) (requested by mlelstv in ticket #305):

 	sys/dev/sdmmc/sdhc.c: revision 1.126

 When seeing an error from the host controller, delay the soft reset by 100us.

 This helps the hardware found in Rockchip RK3568 and RK3588 SoCs.
 See PR kern/60311.


 To generate a diff of this commit:
 cvs rdiff -u -r1.121.2.2 -r1.121.2.3 src/sys/dev/sdmmc/sdhc.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60311 CVS commit: [netbsd-10] src/sys/dev/sdmmc
Date: Sun, 7 Jun 2026 09:45:43 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jun  7 09:45:43 UTC 2026

 Modified Files:
 	src/sys/dev/sdmmc [netbsd-10]: sdhc.c

 Log Message:
 Pull up following revision(s) (requested by mlelstv in ticket #1270):

 	sys/dev/sdmmc/sdhc.c: revision 1.126

 When seeing an error from the host controller, delay the soft reset by 100us.

 This helps the hardware found in Rockchip RK3568 and RK3588 SoCs.
 See PR kern/60311.


 To generate a diff of this commit:
 cvs rdiff -u -r1.117.2.2 -r1.117.2.3 src/sys/dev/sdmmc/sdhc.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.