[PATCH v3 0/7] RISC-V: Add MMC support for TH1520 boards

Drew Fustini dfustini at baylibre.com
Mon Oct 23 14:16:14 PDT 2023


On Mon, Oct 23, 2023 at 01:33:02PM -0700, Drew Fustini wrote:
> This series adds support for the MMC controller in the T-Head TH1520
> SoC, and it enables the eMMC and microSD slot on both the BeagleV
> Ahead and the Sipeed LicheePi 4A.
> 
> I tested on top of v6.6-rc6 with riscv defconfig. I was able to boot
> both the Ahead [1] and LPi4a [2] from eMMC. The following prerequisites
> are required:
> 
>   [PATCH v2] riscv: dts: thead: set dma-noncoherent to soc bus [3]
> 
> I pushed a branch [4] with this patch series and the above patch for
> those that find a git branch easier to test.
> 
> Note: I have only tested eMMC and microSD. I have not yet configured
> or tested the mmc controller used for SDIO WiFi yet.
> 
> References:
> [1] https://gist.github.com/pdp7/7850027e8d256b6fd9cd53080240f0f6
> [2] https://gist.github.com/pdp7/fae4637378426723508b679420a0a5a1
> [3] https://lore.kernel.org/linux-riscv/20230912072232.2455-1-jszhang@kernel.org/
> [4] https://github.com/pdp7/linux/tree/b4/th1520-mmc
> 
> Changes in PATCH v3:
> - always call th1520_sdhci_set_phy() in th1520_set_uhs_signaling()
>   and not only when timing is MMC_TIMING_MMC_HS400. This allows the
>   microSD slot to work as th1520_phy_3_3v_init() is called from
>   th1520_sdhci_set_phy().
> - add mmc1 node for mmc controller connected to the microSD slot
> - add enable mmc1 and add properties for microSD on the Ahead and LPi4A

My apologies for sending this v3 series prematurely. I wanted to send
out the fix above that enabled microSD to work but I failed to address
the feedback from Adrian and Jisheng on v2 [1] and I also failed to
applied the tags from v2. I will address those in a v4 but I'll wait a
few days in case there is any feedback on the th1520_set_uhs_signaling()
change above.

Thank you,
Drew

[1] https://lore.kernel.org/r/20231017-th1520-mmc-v2-0-4678c8cc4048@baylibre.com



More information about the linux-riscv mailing list