riscv: dts: starfive: jh7110-pine64-star64: fix eMMC boot hang; riscv: configs: fix AXP15060 PMIC driver config and I2C DesignWare built-in#9
Conversation
…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>
prandom_u32() => get_random_u32() https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=de492c8 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>
https://github.com/morrownr/rtl8852bu-20250826 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>
|
@copilot how this was as well the only difference I could see, but didn't think it could cause this hang. Especially since 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. |
…ies in mmc0 Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
Mainline Linux is missing The The duplicate properties have been restored in e93a1ff to keep the diff to mainline minimal. |
|
@copilot This eMMC device however is a socket which can or can not have an eMMC module attached. Is |
When From /* 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 So the trade-off is: without There isn't a cleaner kernel-side alternative that handles both cases. Options like marking the regulator |
|
@copilot even with |
Co-authored-by: MichaIng <28480705+MichaIng@users.noreply.github.com>
The full log makes the root cause clear: The AXP15060 PMIC itself never probed, so The actual bug is in Fixed in 682ac9d: replace the phantom |
|
@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>
Found it.
Fixed in 85299cb: |
|
Indeed |
Star64 hangs when booting from eMMC because
mmc0is stuck in deferred probe indefinitely waiting for the AXP15060 PMIC regulatoraldo4(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) indietpi_star64_defconfig. Since i2c5 (the bus carrying the AXP15060 PMIC, compatiblesnps,designware-i2c) requires this driver, and modules are not available during early boot, the PMIC never initializes,aldo4is never registered, andmmc0waits forever:starfive_visionfive2_defconfighasCONFIG_I2C_DESIGNWARE_CORE=y(built-in), which is why VisionFive2 eMMC boot works.Additionally,
pine64_star64_defconfighad a phantom optionCONFIG_REGULATOR_AXP15060=ywith no Kconfig entry in this tree, silently ignored. The correct options (CONFIG_MFD_AXP20X_I2C=yandCONFIG_REGULATOR_AXP20X=y) were missing from that config.SD card boot works because
mmc1has no regulator dependencies and probes immediately;mmc0being stuck only matters when it is the root device.Additionally,
non-removableis added to the&mmc0node. 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: ChangeCONFIG_I2C=m→=yandCONFIG_I2C_DESIGNWARE_CORE=m→=yso the I2C DesignWare bus driver is built into the kernel, matchingstarfive_visionfive2_defconfig.arch/riscv/configs/pine64_star64_defconfig: Replace phantomCONFIG_REGULATOR_AXP15060=ywithCONFIG_MFD_AXP20X_I2C=yandCONFIG_REGULATOR_AXP20X=y, matchingstarfive_jh7110_defconfigandstarfive_visionfive2_defconfig.arch/riscv/boot/dts/starfive/jh7110-pine64-star64.dts: Addnon-removableto the&mmc0node (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.