unifreq / arm64-kernel-configs

my arm64 kernel configs for armbian/openwrt , platform: amlogic/allwinner/rockchip
GNU General Public License v2.0
42 stars 26 forks source link

为 rk3568/rk3588 开启 SDHCI 支持 #3

Closed puteulanus closed 2 years ago

puteulanus commented 2 years ago

设备是 r68s(rk3568),使用 tg 频道下载的预编译内核,启动时卡在 initrd 挂载 rootfs:

图片

使用 Armbian 官方镜像的内核可以进到系统,对比排查之后发现是 SDHCI 支持的问题,rk3568 的 mmc 使用了 SDHCI(参考),并且使用了 Synopsys DWC MSHC(参考),需要开启支持才能挂载文件系统

图片

涉及配置:

CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_OF_DWCMSHC=y

Armbian 镜像(from rk3568 Station P2)相关配置:

#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_ARMMMCI=y
CONFIG_MMC_STM32_SDMMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
# CONFIG_MMC_SDHCI_PCI is not set
CONFIG_MMC_SDHCI_ACPI=y
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_OF_ARASAN=y
CONFIG_MMC_SDHCI_OF_ASPEED=m
CONFIG_MMC_SDHCI_OF_AT91=m
CONFIG_MMC_SDHCI_OF_DWCMSHC=m
CONFIG_MMC_SDHCI_CADENCE=y
CONFIG_MMC_SDHCI_TEGRA=y
CONFIG_MMC_SDHCI_F_SDH30=y
CONFIG_MMC_SDHCI_MILBEAUT=m
CONFIG_MMC_ALCOR=m
CONFIG_MMC_TIFM_SD=m
CONFIG_MMC_SPI=y
# CONFIG_MMC_CB710 is not set
CONFIG_MMC_VIA_SDMMC=m
CONFIG_MMC_DW=y
CONFIG_MMC_DW_PLTFM=y
CONFIG_MMC_DW_BLUEFIELD=m
CONFIG_MMC_DW_EXYNOS=y
CONFIG_MMC_DW_HI3798CV200=y
CONFIG_MMC_DW_K3=y
# CONFIG_MMC_DW_PCI is not set
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_VUB300=m
CONFIG_MMC_USHC=m
CONFIG_MMC_USDHI6ROL0=m
CONFIG_MMC_REALTEK_PCI=m
CONFIG_MMC_REALTEK_USB=m
CONFIG_MMC_CQHCI=y
CONFIG_MMC_HSQ=m
# CONFIG_MMC_TOSHIBA_PCI is not set
CONFIG_MMC_MTK=m
CONFIG_MMC_SDHCI_XENON=y
CONFIG_MMC_SDHCI_OMAP=m
CONFIG_MMC_SDHCI_AM654=y
CONFIG_MMC_SDHCI_EXTERNAL_DMA=y
# CONFIG_MMC_LITEX is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
CONFIG_LEDS_CLASS_FLASH=m
# CONFIG_LEDS_CLASS_MULTICOLOR is not set
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set

rk3588 应该也是一样

puteulanus commented 2 years ago

似乎CONFIG_PCIEPORTBUS=y也需要 r68s 的两个 2.5G 口是由 PCIE3x2 拆分的两个 lane 连接的,似乎需要 CONFIG_PCIEPORTBUS 的支持(参考

puteulanus commented 2 years ago

CONFIG_REGULATOR_FAN53555=y r68s 的 cpu regulator tcs4525 是由 drivers/regulator/fan53555.c 驱动的,这个 regulator 不初始化的话 cpufreq-dt 驱动注册的时候会失败