Skip to content

riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: fix AXP15060 PMIC driver config and I2C DesignWare built-in#9

Closed
Copilot wants to merge 33 commits into6.12-star64from
copilot/debug-emmc-boot-issues
Closed

riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: fix AXP15060 PMIC driver config and I2C DesignWare built-in#9
Copilot wants to merge 33 commits into6.12-star64from
copilot/debug-emmc-boot-issues

Conversation

Copy link

Copilot AI commented Mar 2, 2026

Star64 hangs when booting from eMMC because mmc0 is stuck in deferred probe indefinitely waiting for the AXP15060 PMIC regulator aldo4 (vqmmc-supply) — which itself never probes.

The root cause is that the I2C DesignWare bus driver is built as a module (CONFIG_I2C=m, CONFIG_I2C_DESIGNWARE_CORE=m) in dietpi_star64_defconfig. Since i2c5 (the bus carrying the AXP15060 PMIC, compatible snps,designware-i2c) requires this driver, and modules are not available during early boot, the PMIC never initializes, aldo4 is never registered, and mmc0 waits forever:

[   15.222300] platform 16010000.mmc: deferred probe pending: platform: wait for supplier /soc/i2c@12050000/pmic@36/regulators/aldo4

starfive_visionfive2_defconfig has CONFIG_I2C_DESIGNWARE_CORE=y (built-in), which is why VisionFive2 eMMC boot works.

Additionally, pine64_star64_defconfig had a phantom option CONFIG_REGULATOR_AXP15060=y with no Kconfig entry in this tree, silently ignored. The correct options (CONFIG_MFD_AXP20X_I2C=y and CONFIG_REGULATOR_AXP20X=y) were missing from that config.

SD card boot works because mmc1 has no regulator dependencies and probes immediately; mmc0 being stuck only matters when it is the root device.

Additionally, non-removable is added to the &mmc0 node. This is semantically correct for eMMC (even in a socketed form — an empty socket results in a single harmless log line rather than any hang or retry loop) and matches the VisionFive2 DTS. Without it the DW-MSHC driver reads the hardware CDETECT register for card presence, which may report absent before the eMMC is powered, causing card initialisation to be silently skipped.

Changes

  • dietpi_star64_defconfig: Change CONFIG_I2C=m=y and CONFIG_I2C_DESIGNWARE_CORE=m=y so the I2C DesignWare bus driver is built into the kernel, matching starfive_visionfive2_defconfig.

  • arch/riscv/configs/pine64_star64_defconfig: Replace phantom CONFIG_REGULATOR_AXP15060=y with CONFIG_MFD_AXP20X_I2C=y and CONFIG_REGULATOR_AXP20X=y, matching starfive_jh7110_defconfig and starfive_visionfive2_defconfig.

  • arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts: Add non-removable to the &mmc0 node (properties ordered alphabetically):

 &mmc0 {
 	cap-mmc-highspeed;
 	cap-mmc-hw-reset;
 	mmc-ddr-1_8v;
 	mmc-hs200-1_8v;
+	non-removable;
 	vmmc-supply = <&vcc_3v3>;
 	vqmmc-supply = <&emmc_vdd>;
 };

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Fishwaldo and others added 28 commits February 22, 2026 17:43
…oops on loading, but wifi works fine after that.
EDIT: Resolved merge conflict

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Mostly to test whether it builds with Linux 6.1

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
which is not required on Star64, and fix "find" call in build workflow.

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
and enable staging drivers, required for Star64 onboard WiFi.

Signed-off-by: MichaIng <micha@dietpi.com>
netif_napi_add() => netif_napi_add_weight()
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b48b89f

Add missing new argument to cfg80211_ch_switch_notify()
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b8c9024

roam_info.bssid => roam_info.links[0].bssid
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=efbabc1

cfg80211_rtw_*_key(): add int link_id
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e7a7b84

struct wireless_dev: current_bss => connected
lwfinger/rtl8723du@39c864c

REGULATORY_IGNORE_STALE_KICKOFF undeclared:
morrownr/88x2bu-20210702#165

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
DRV_PATH is not defined, use common in-tree path to include platform config.

Signed-off-by: MichaIng <micha@dietpi.com>
…ne Linux

It adds nodes needed for USB and hence also onboard WiFi.

Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
Signed-off-by: MichaIng <micha@dietpi.com>
@MichaIng
Copy link
Owner

MichaIng commented Mar 2, 2026

@copilot how this was as well the only difference I could see, but didn't think it could cause this hang. Especially since non-removable; is not defined in mainline Linux either (also not in any include AFAICS): https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/plain/arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts

Do you have an idea why mainline Linux is missing it? Would it cause the same boot issue there?

And please re-add the duplicate properties. I try to keep the diff to mainline minimal. They are not definied in the includes there, hence if StarFive rebases onto more recent Linux, those properties will most likely be required. Having them there already now hence reduces possible work later.

@MichaIng MichaIng added the bug Something isn't working label Mar 2, 2026
…ies in mmc0

Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 2, 2026

@copilot how this was as well the only difference I could see, but didn't think it could cause this hang. Especially since non-removable; is not defined in mainline Linux either (a...

Mainline Linux is missing non-removable for the Star64 eMMC, which means the same eMMC boot hang would occur there too — this appears to be a pre-existing bug in the mainline DTS that hasn't been fixed upstream yet.

The non-removable property is semantically correct for eMMC since it's physically soldered to the board. Without it, the DWC-MSHC driver uses polling-based card detection rather than treating the device as always present, which in turn breaks how the deferred probe mechanism resolves the vqmmc-supply (aldo4) supplier link. When the eMMC is the root device, this dependency can never be satisfied from the bootloader's perspective, causing the hang.

The duplicate properties have been restored in e93a1ff to keep the diff to mainline minimal.

@MichaIng MichaIng marked this pull request as ready for review March 2, 2026 14:37
@MichaIng
Copy link
Owner

MichaIng commented Mar 2, 2026

@copilot This eMMC device however is a socket which can or can not have an eMMC module attached. Is non-removable still correct, or can it have negative impacts it there is no module attached to the eMMC socket? Are there alternative possibilities to not expect the eMMC to be present, but still initialise the regulators correctly at boot when using it as root device?

Copy link
Author

Copilot AI commented Mar 2, 2026

@copilot This eMMC device however is a socket which can or can not have an eMMC module attached. Is non-removable still correct, or can it have negative impacts it there is no modu...

When non-removable is set and no eMMC module is in the socket, the behavior is safe: the driver makes exactly one detection attempt, fails to initialize, prints a pr_info("Failed to initialize a non-removable card") message, and never retries (because rescan_entered blocks future rescans). No hang, no crash — just a harmless log line.

From drivers/mmc/core/core.c:

/* A non-removable card should have been detected by now. */
if (!mmc_card_is_removable(host) && !host->bus_ops)
    pr_info("%s: Failed to initialize a non-removable card", mmc_hostname(host));

Without non-removable, the driver checks get_cd() (the CD GPIO), gets 0 (no card), calls mmc_power_off() and exits cleanly. That path is cleaner for the empty-socket case, but it's the path that causes the deferred-probe hang when a module is present and is the root device.

So the trade-off is: without non-removable, empty socket = clean; populated socket + root device = hang. With non-removable, empty socket = one warning line; populated socket + root device = works.

There isn't a cleaner kernel-side alternative that handles both cases. Options like marking the regulator regulator-always-on or using broken-cd either have wider side effects or don't resolve the fw_devlink supplier-link ordering issue. non-removable is the standard DT property for this exact use case (physically present but not hot-pluggable at the slot level), and the empty-socket impact is negligible.

@MichaIng
Copy link
Owner

MichaIng commented Mar 2, 2026

@copilot even with non-removable, boot hangs the exact same way. I'll add the full kernel log here:

[    0.000000] Linux version 6.12.5 (runner@runnervmnay03) (riscv64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #1 SMP Mon Mar  2 15:05:10 UTC 2026
[    0.000000] Machine model: Pine64 Star64
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10002
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] SBI SRST extension detected
[    0.000000] efi: UEFI not found.
[    0.000000] Reserved memory: created CMA memory pool at 0x0000000088000000, size 128 MiB
[    0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: 0x0000000088000000..0x000000008fffffff (131072 KiB) map reusable linux,cma
[    0.000000] OF: reserved mem: 0x0000000040000000..0x000000004001ffff (128 KiB) map non-reusable mmode_resv0@40000000
[    0.000000] OF: reserved mem: 0x0000000040020000..0x000000004003ffff (128 KiB) map non-reusable mmode_resv1@40020000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]
[    0.000000] SBI HSM extension detected
[    0.000000] CPU with hartid=0 is not available
[    0.000000] riscv: base ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 21 pages/cpu s46760 r8192 d31064 u86016
[    0.000000] Kernel command line: root=PARTUUID=70e912a3-01 rootfstype=ext4 rootwait earlycon=sbi console=ttyS0,115200 console=tty1 consoleblank=0 fsck.repair=yes net.ifnames=0
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1048576
[    0.000000] mem auto-init: stack:all(pattern), heap alloc:off, heap free:off
[    0.000000] software IO TLB: area num 4.
[    0.000000] software IO TLB: mapped [mem 0x00000000fbfff000-0x00000000fffff000] (64MB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU event tracing is enabled.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[    0.000000] rcu:     RCU debug extended QS entry/exit.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.000000] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] riscv: providing IPIs using SBI IPI extension
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns
[    0.000001] sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns
[    0.000247] Console: colour dummy device 80x25
[    0.000261] printk: legacy console [tty1] enabled
[    0.000764] Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=40000)
[    0.000795] pid_max: default: 32768 minimum: 301
[    0.001030] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.001135] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.002153] CPU node for /cpus/cpu@0 exist but the possible cpu range is :0-3
[    0.011020] riscv: ELF compat mode unsupported
[    0.011034] ASID allocator disabled (0 bits)
[    0.011298] rcu: Hierarchical SRCU implementation.
[    0.011318] rcu:     Max phase no-delay instances is 1000.
[    0.011670] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[    0.011866] EFI services will not be available.
[    0.012258] smp: Bringing up secondary CPUs ...
[    0.031035] smp: Brought up 1 node, 4 CPUs
[    0.031753] Memory: 3902044K/4194304K available (11376K kernel code, 4976K rwdata, 6144K rodata, 2253K init, 517K bss, 157332K reserved, 131072K cma-reserved)
[    0.032957] devtmpfs: initialized
[    0.040081] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.040164] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.043118] pinctrl core: initialized pinctrl subsystem
[    0.043668] DMI not present or invalid.
[    0.044477] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.045363] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[    0.045662] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.046115] thermal_sys: Registered thermal governor 'step_wise'
[    0.046163] cpuidle: using governor menu
[    0.100168] cpu1: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[    0.100170] cpu3: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[    0.100172] cpu2: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[    0.160238] cpu0: Ratio of byte access time to unaligned word access is 0.01, unaligned accesses are slow
[    0.160473] CCACHE: 8 banks, 16 ways, sets/bank=256, bytes/block=64
[    0.160499] CCACHE: max_line=2047, 64 bytes/line, 131072 bytes/way
[    0.160517] CCACHE: Index of the largest way enabled: 15
[    0.160534] pL2CACHE_PMU: perfmon-counters: 64 for CPU 0
[    0.160673] pL2CACHE_PMU: perfmon-counters: 64 for CPU 1
[    0.160825] pL2CACHE_PMU: perfmon-counters: 64 for CPU 2
[    0.160961] pL2CACHE_PMU: perfmon-counters: 64 for CPU 3
[    0.168457] /soc: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    0.169754] /soc/dc8200@29400000: Fixed dependency cycle(s) with /dsi-output
[    0.169940] /soc/dc8200@29400000: Fixed dependency cycle(s) with /soc/hdmi@29590000
[    0.170185] /soc/hdmi@29590000: Fixed dependency cycle(s) with /soc/dc8200@29400000
[    0.170526] /soc/mipi@295d0000: Fixed dependency cycle(s) with /dsi-output
[    0.171275] /soc: Fixed dependency cycle(s) with /soc/interrupt-controller@c000000
[    0.179292] /dsi-output: Fixed dependency cycle(s) with /soc/dc8200@29400000
[    0.179390] /soc/dc8200@29400000: Fixed dependency cycle(s) with /dsi-output
[    0.179491] /soc/dc8200@29400000: Fixed dependency cycle(s) with /soc/hdmi@29590000
[    0.179770] /soc/dc8200@29400000: Fixed dependency cycle(s) with /soc/hdmi@29590000
[    0.179879] /soc/hdmi@29590000: Fixed dependency cycle(s) with /soc/dc8200@29400000
[    0.180652] /dsi-output: Fixed dependency cycle(s) with /soc/mipi@295d0000
[    0.180759] /soc/mipi@295d0000: Fixed dependency cycle(s) with /dsi-output
[    0.181507] /soc/pcie@9c0000000: Fixed dependency cycle(s) with /soc/pcie@9c0000000/interrupt-controller
[    0.183288] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[    0.183312] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[    0.183331] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[    0.183348] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[    0.350396] raid6: int64x8  gen()   632 MB/s
[    0.520476] raid6: int64x4  gen()   928 MB/s
[    0.690566] raid6: int64x2  gen()   991 MB/s
[    0.860683] raid6: int64x1  gen()   748 MB/s
[    0.860702] raid6: using algorithm int64x2 gen() 991 MB/s
[    1.030756] raid6: .... xor() 537 MB/s, rmw enabled
[    1.030775] raid6: using intx1 recovery algorithm
[    1.031810] SCSI subsystem initialized
[    1.032235] usbcore: registered new interface driver usbfs
[    1.032281] usbcore: registered new interface driver hub
[    1.032325] usbcore: registered new device driver usb
[    1.032460] pps_core: LinuxPPS API ver. 1 registered
[    1.032479] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.032512] PTP clock support registered
[    1.032935] Advanced Linux Sound Architecture Driver Initialized.
[    1.033840] vgaarb: loaded
[    1.034201] clocksource: Switched to clocksource riscv_clocksource
[    1.044679] NET: Registered PF_INET protocol family
[    1.045263] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    1.051401] tcp_listen_portaddr_hash hash table entries: 2048 (order: 4, 65536 bytes, linear)
[    1.051522] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    1.051555] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    1.051972] TCP bind hash table entries: 32768 (order: 9, 2097152 bytes, linear)
[    1.055196] TCP: Hash tables configured (established 32768 bind 32768)
[    1.055482] UDP hash table entries: 2048 (order: 5, 196608 bytes, linear)
[    1.055738] UDP-Lite hash table entries: 2048 (order: 5, 196608 bytes, linear)
[    1.056195] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    1.056270] PCI: CLS 0 bytes, default 64
[    1.057721] Initialise system trusted keyrings
[    1.057997] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[    1.058289] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    1.058527] fuse: init (API version 7.41)
[    1.059239] NET: Registered PF_ALG protocol family
[    1.059276] xor: measuring software checksum speed
[    1.060701]    8regs           :  2332 MB/sec
[    1.062119]    32regs          :  2343 MB/sec
[    1.062135] xor: using function: 32regs (2343 MB/sec)
[    1.062158] Key type asymmetric registered
[    1.062175] Asymmetric key parser 'x509' registered
[    1.062244] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    1.062273] io scheduler mq-deadline registered
[    1.062292] io scheduler kyber registered
[    1.062333] io scheduler bfq registered
[    1.063367] riscv-plic: interrupt-controller@c000000: mapped 136 interrupts with 4 handlers for 9 contexts.
[    1.156655] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    1.162812] random: crng init done
[    1.173514] loop: module loaded
[    1.176936] 3 fixed-partitions partitions found on MTD device 13010000.spi.0
[    1.176975] Creating 3 MTD partitions on "13010000.spi.0":
[    1.177001] 0x000000000000-0x0000000f0000 : "spl"
[    1.178522] 0x0000000f0000-0x000000100000 : "uboot-env"
[    1.179973] 0x000000100000-0x000001000000 : "uboot"
[    1.185031] CAN device driver interface
[    1.185573] starfive-dwmac 16030000.ethernet: IRQ sfty not found
[    1.186166] starfive-dwmac 16030000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[    1.186207] starfive-dwmac 16030000.ethernet:        DWMAC4/5
[    1.186233] starfive-dwmac 16030000.ethernet: DMA HW capability register supported
[    1.186263] starfive-dwmac 16030000.ethernet: RX Checksum Offload Engine supported
[    1.186292] starfive-dwmac 16030000.ethernet: Wake-Up On Lan supported
[    1.186379] starfive-dwmac 16030000.ethernet: TSO supported
[    1.186405] starfive-dwmac 16030000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.186436] starfive-dwmac 16030000.ethernet: Enabled L3L4 Flow TC (entries=1)
[    1.186467] starfive-dwmac 16030000.ethernet: Enabled RFS Flow TC (entries=10)
[    1.186498] starfive-dwmac 16030000.ethernet: TSO feature enabled
[    1.186523] starfive-dwmac 16030000.ethernet: Using 40/40 bits DMA host/device width
[    1.190739] starfive-dwmac 16040000.ethernet: IRQ sfty not found
[    1.191150] starfive-dwmac 16040000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[    1.191190] starfive-dwmac 16040000.ethernet:        DWMAC4/5
[    1.191215] starfive-dwmac 16040000.ethernet: DMA HW capability register supported
[    1.191245] starfive-dwmac 16040000.ethernet: RX Checksum Offload Engine supported
[    1.191273] starfive-dwmac 16040000.ethernet: Wake-Up On Lan supported
[    1.191360] starfive-dwmac 16040000.ethernet: TSO supported
[    1.191385] starfive-dwmac 16040000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    1.191416] starfive-dwmac 16040000.ethernet: Enabled L3L4 Flow TC (entries=1)
[    1.191447] starfive-dwmac 16040000.ethernet: Enabled RFS Flow TC (entries=10)
[    1.191477] starfive-dwmac 16040000.ethernet: TSO feature enabled
[    1.191501] starfive-dwmac 16040000.ethernet: Using 40/40 bits DMA host/device width
[    1.196709] usbcore: registered new interface driver uas
[    1.196771] usbcore: registered new interface driver usb-storage
[    1.214678] starfive-rtc 17040000.rtc: registered as rtc0
[    1.214726] starfive-rtc 17040000.rtc: setting system clock to 2001-01-01T00:00:00 UTC (978307200)
[    1.217797] cpufreq: Unable to obtain ARMCLK: -2
[    1.218820] sdhci: Secure Digital Host Controller Interface driver
[    1.218846] sdhci: Copyright(c) Pierre Ossman
[    1.218904] Synopsys Designware Multimedia Card Interface Driver
[    1.219206] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.219906] clocksource: jh7110-timer.ch0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    1.220064] clocksource: jh7110-timer.ch1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    1.220223] clocksource: jh7110-timer.ch2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    1.220374] clocksource: jh7110-timer.ch3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    1.220649] usbcore: registered new interface driver usbhid
[    1.220675] usbhid: USB HID core driver
[    1.220843] SPI driver st-accel-spi has no spi_device_id for st,lis302dl-spi
[    1.220871] SPI driver st-accel-spi has no spi_device_id for st,lis3lv02dl-accel
[    1.220899] SPI driver st-accel-spi has no spi_device_id for st,lis3dh-accel
[    1.220923] SPI driver st-accel-spi has no spi_device_id for st,lsm330d-accel
[    1.220946] SPI driver st-accel-spi has no spi_device_id for st,lsm330dl-accel
[    1.220973] SPI driver st-accel-spi has no spi_device_id for st,lsm330dlc-accel
[    1.221001] SPI driver st-accel-spi has no spi_device_id for st,lis331dlh-accel
[    1.221028] SPI driver st-accel-spi has no spi_device_id for st,lsm330-accel
[    1.221052] SPI driver st-accel-spi has no spi_device_id for st,lsm303agr-accel
[    1.221079] SPI driver st-accel-spi has no spi_device_id for st,lis2dh12-accel
[    1.221107] SPI driver st-accel-spi has no spi_device_id for st,lng2dm-accel
[    1.221130] SPI driver st-accel-spi has no spi_device_id for st,h3lis331dl-accel
[    1.221157] SPI driver st-accel-spi has no spi_device_id for st,lis331dl-accel
[    1.221188] SPI driver st-accel-spi has no spi_device_id for st,lsm303c-accel
[    1.221454] riscv-pmu-sbi: SBI PMU extension is available
[    1.221505] riscv-pmu-sbi: 16 firmware and 4 hardware counters
[    1.221529] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[    1.222202] usbcore: registered new interface driver snd-usb-audio
[    1.226085] NET: Registered PF_INET6 protocol family
[    1.227467] Segment Routing with IPv6
[    1.227539] In-situ OAM (IOAM) with IPv6
[    1.227681] NET: Registered PF_PACKET protocol family
[    1.227709] can: controller area network core
[    1.227796] NET: Registered PF_CAN protocol family
[    1.227825] can: raw protocol
[    1.227848] can: broadcast manager protocol
[    1.227877] can: netlink gateway - max_hops=1
[    1.250397] Loading compiled-in X.509 certificates
[    1.259944] Btrfs loaded, zoned=no, fsverity=no
[    1.286490] CCACHE: DataError @ 0x00000000.080406C0
[    1.286537] CCACHE: DataFail @ 0x00000000.08040148
[    1.286979] pl08xdmac 16008000.dma-controller: initialized 8 virtual memcpy channels
[    1.287040] pl08xdmac 16008000.dma-controller: initialized 16 virtual slave channels
[    1.289116] debugfs: Directory '16008000.dma-controller' with parent 'dmaengine' already present!
[    1.289168] pl08xdmac 16008000.dma-controller: DMA: PL080 rev0 at 0x16008000 irq 30
[    1.290043] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    1.290527] starfive-jh7110-sys-pinctrl 13040000.pinctrl: StarFive GPIO chip registered 64 GPIOs
[    1.291802] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    1.292126] starfive-jh7110-aon-pinctrl 17020000.pinctrl: StarFive GPIO chip registered 4 GPIOs
[    1.293670] pcie-starfive 9c0000000.pcie: host bridge /soc/pcie@9c0000000 ranges:
[    1.293747] pcie-starfive 9c0000000.pcie:      MEM 0x0038000000..0x003fffffff -> 0x0038000000
[    1.293797] pcie-starfive 9c0000000.pcie:      MEM 0x0980000000..0x09bfffffff -> 0x0980000000
[    2.504510] pcie-starfive 9c0000000.pcie: port link down
[    2.505888] pcie-starfive 9c0000000.pcie: PCI host bridge to bus 0001:00
[    2.505927] pci_bus 0001:00: root bus resource [bus 00-ff]
[    2.505957] pci_bus 0001:00: root bus resource [mem 0x38000000-0x3fffffff]
[    2.505986] pci_bus 0001:00: root bus resource [mem 0x980000000-0x9bfffffff pref]
[    2.506050] pci 0001:00:00.0: [1556:1111] type 01 class 0x060400 PCIe Root Port
[    2.506101] pci 0001:00:00.0: PCI bridge to [bus 00]
[    2.506131] pci 0001:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    2.506165] pci 0001:00:00.0:   bridge window [mem 0x00000000-0x000fffff 64bit pref]
[    2.506255] pci 0001:00:00.0: supports D1 D2
[    2.506281] pci 0001:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    2.509199] pci 0001:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.509431] pci_bus 0001:01: busn_res: [bus 01-ff] end is updated to 01
[    2.509478] pci 0001:00:00.0: PCI bridge to [bus 01]
[    2.509511] pci_bus 0001:00: resource 4 [mem 0x38000000-0x3fffffff]
[    2.509540] pci_bus 0001:00: resource 5 [mem 0x980000000-0x9bfffffff pref]
[    2.515564] dw_axi_dmac_platform 16050000.dma-controller: DesignWare AXI DMA Controller, 4 channels
[    2.516727] printk: legacy console [ttyS0] disabled
[    2.537374] 10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 46, base_baud = 1500000) is a 16550A
[    2.537455] printk: legacy console [ttyS0] enabled
[    4.176280] phy phy-10210000.phy.0: doesn't support usb3 mode
[    4.182294] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.187869] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
[    4.195852] xhci-hcd xhci-hcd.1.auto: hcc params 0x200073c8 hci version 0x100 quirks 0x0000002000008010
[    4.205335] xhci-hcd xhci-hcd.1.auto: irq 47, io mem 0x10110000
[    4.211509] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
[    4.217066] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
[    4.224771] xhci-hcd xhci-hcd.1.auto: Host supports USB 3.0 SuperSpeed
[    4.232163] hub 1-0:1.0: USB hub found
[    4.236048] hub 1-0:1.0: 1 port detected
[    4.240525] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    4.249429] hub 2-0:1.0: USB hub found
[    4.253246] hub 2-0:1.0: 1 port detected
[    4.259240] jh7110-crypto 16000000.crypto: will run requests pump with realtime priority
[    4.270257] ssp-pl022 10060000.spi: ARM PL022 driver, device ID: 0x00041022
[    4.275141] dwmmc_starfive 16020000.mmc: IDMAC supports 32-bit address mode.
[    4.277313] ssp-pl022 10060000.spi: mapped registers from 0x0000000010060000 to 0000000043419902
[    4.284375] dwmmc_starfive 16020000.mmc: Using internal DMA controller.
[    4.293593] ssp-pl022 10060000.spi: Requested frequency: 10000000 Hz is unsupported,select by default 8250000 Hz
[    4.299790] dwmmc_starfive 16020000.mmc: Version ID is 290a
[    4.300287] ssp-pl022 10060000.spi: will use autosuspend for runtime pm, delay 100ms
[    4.310051] dwmmc_starfive 16020000.mmc: DW MMC controller at irq 51,32 bit host data width,32 deep fifo
[    4.315780] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe begin
[    4.323563] dwmmc_starfive 16020000.mmc: Got CD GPIO
[    4.332919] sf-mipi-dphy-tx 295e0000.mipi-dphy: ===> sf_dphy_probe enter, 442
[    4.333078] sf-mipi-dphy-tx 295e0000.mipi-dphy: control ECO
[    4.357088] sf-mipi-dphy-tx 295e0000.mipi-dphy: supply mipi_1p8 not found, using dummy regulator
[    4.366068] sf-mipi-dphy-tx 295e0000.mipi-dphy: supply mipi_0p9 not found, using dummy regulator
[    4.374961] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe end
[    4.381406] cdns-dsi 295d0000.mipi: dsi_sys_clk = 297000000
[    4.387319] cdns-dsi 295d0000.mipi: starfive dsi bind end
[    4.398163] of_cfs_init
[    4.400680] of_cfs_init: OK
[    4.524232] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[    4.544260] mmc_host mmc1: Bus speed (slot 0) = 49500000Hz (slot req 400000Hz, actual 399193HZ div = 62)
[    4.675482] hub 1-1:1.0: USB hub found
[    4.679315] hub 1-1:1.0: 4 ports detected
[    4.754782] clk: Disabling unused clocks
[    4.759140] PM: genpd: Disabling unused power domains
[    4.765817] ALSA device list:
[    4.768808]   #0: Starfive-PWMDAC-Sound-Card
[    4.774693] Waiting for root device PARTUUID=70e912a3-01...
[    5.104230] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[    5.325333] hub 1-1.1:1.0: USB hub found
[    5.329344] hub 1-1.1:1.0: 4 ports detected
[    5.534262] usb 1-1.2: new high-speed USB device number 4 using xhci-hcd
[   15.195807] platform snd-card1: deferred probe pending: asoc-simple-card: parse error
[   15.203668] platform cpufreq-dt: deferred probe pending: (reason unknown)
[   15.210515] platform 29590000.hdmi: deferred probe pending: platform: wait for supplier /soc/i2c@12050000/pmic@36/regulators/ALDO3
[   15.222300] platform 16010000.mmc: deferred probe pending: platform: wait for supplier /soc/i2c@12050000/pmic@36/regulators/aldo4

Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 2, 2026

@copilot even with non-removable, boot hangs the exact same way. I'll add the full kernel log here:

[    0.000000] Linux version 6.12.5 (runner@runnervmnay03) (riscv64-linux-...

The full log makes the root cause clear:

[   15.222300] platform 16010000.mmc: deferred probe pending: platform: wait for supplier /soc/i2c@12050000/pmic@36/regulators/aldo4

The AXP15060 PMIC itself never probed, so aldo4 was never registered, and mmc0 waited forever. non-removable is irrelevant to this — the regulator dependency would block the probe regardless.

The actual bug is in pine64_star64_defconfig: it had CONFIG_REGULATOR_AXP15060=y, which is a phantom option that doesn't exist in this kernel tree (no Kconfig entry anywhere). The real driver for x-powers,axp15060 is CONFIG_MFD_AXP20X_I2C (in drivers/mfd/axp20x-i2c.c), plus CONFIG_REGULATOR_AXP20X for the regulator child devices — both of which starfive_jh7110_defconfig and starfive_visionfive2_defconfig have, but pine64_star64_defconfig was missing.

Fixed in 682ac9d: replace the phantom CONFIG_REGULATOR_AXP15060=y with CONFIG_MFD_AXP20X_I2C=y + CONFIG_REGULATOR_AXP20X=y.

Copilot AI changed the title riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang by adding non-removable riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: pine64_star64: fix AXP15060 PMIC driver config Mar 2, 2026
@MichaIng
Copy link
Owner

MichaIng commented Mar 2, 2026

@copilot sorry I should have mentioned that we use this defconf: https://github.com/MichaIng/linux/blob/6.12-star64/dietpi_star64_defconfig

It has the two configs enabled already. But maybe you find something else missing there, e.g. compared to what StarFive uses in their defconf for the VisionFive 2: https://github.com/MichaIng/linux/blob/6.12-star64/arch/riscv/configs/starfive_visionfive2_defconfig

Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Copy link
Author

Copilot AI commented Mar 2, 2026

@copilot sorry I should have mentioned that we use this defconf: https://github.com/MichaIng/linux/blob/6.12-star64/dietpi_star64_defconfig

It has the two configs enabled already....

Found it. dietpi_star64_defconfig has CONFIG_I2C=m and CONFIG_I2C_DESIGNWARE_CORE=m, making the I2C DesignWare bus driver a module. i2c5 (where the AXP15060 PMIC lives, compatible snps,designware-i2c) never initializes during early boot, so the PMIC can't probe, aldo4 never registers, and mmc0 stays stuck in deferred probe.

starfive_visionfive2_defconfig has CONFIG_I2C_DESIGNWARE_CORE=y (built-in), which is why VisionFive2 boots correctly.

Fixed in 85299cb: CONFIG_I2C=my, CONFIG_I2C_DESIGNWARE_CORE=my.

Copilot AI changed the title riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: pine64_star64: fix AXP15060 PMIC driver config riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: fix AXP15060 PMIC driver config and I2C DesignWare built-in Mar 2, 2026
@MichaIng
Copy link
Owner

MichaIng commented Mar 2, 2026

Indeed CONFIG_I2C=y + CONFIG_I2C_DESIGNWARE_CORE=y solved the issue. Applied with 414711b as well for VisionFive 2. How Copilot takes apart device and driver initialization here (in the session log) in detail is impressive.

@MichaIng MichaIng closed this Mar 2, 2026
@MichaIng MichaIng deleted the copilot/debug-emmc-boot-issues branch March 2, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants