hw/riscv: add SDHCI support for K230
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | hw/sd: add Kendryte K230 SDHCI controllerMAINTAINERS hw/ hw/ +2 more | +400 | 2 replies | |
| 2/3 | hw/riscv: enable SDHCI controllers on K230docs/ hw/ hw/ +1 more | +37 | 1 reply | |
| 3/3 | tests/qtest: add K230 SDHCI testsMAINTAINERS tests/ tests/ | +219 | 1 reply |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Daniel Henrique Barboza |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 0/3] hw/riscv: add SDHCI support for K230
The Kendryte K230 contains two Synopsys DesignWare Core Mobile Storage Host Controllers. The K230 machine currently exposes their MMIO ranges as unimplemented devices, so software cannot access SD storage.
This series adds a K230 SDHCIv3 model based on the generic SDHCI model. The model reuses the generic commands, PIO, SDMA and ADMA2 data paths and provides the K230 0x1000-byte register layout. It implements the documented capability and reset values, read-only Preset Value and extension pointer registers, writable backing storage for most PHY and vendor registers, and an always-ready PHY_PWRGOOD status bit required by the K230 SDK reset sequence. It is worth noting that K230 documentation describes an SDHCI v4.20 controller, while the generic QEMU SDHCI does not support ADMA3. So this model reports v3 and does not advertise ADMA3.
Testing:
- scripts/checkpatch.pl: 0 errors, 0 warnings, 747 lines checked
- qemu:qtest-riscv64/k230-sdhci-test: 3 subtests passed
- Linux direct boot: both controllers detected, r/w and e2fsck passed
Xin Xie (3):
hw/sd: add Kendryte K230 SDHCI controller
hw/riscv: enable SDHCI controllers on K230
tests/qtest: add K230 SDHCI tests
MAINTAINERS | 3 + docs/system/riscv/k230.rst | 6 +- hw/riscv/Kconfig | 1 + hw/riscv/k230.c | 34 +++- hw/sd/Kconfig | 4 + hw/sd/k230_sdhci.c | 311 ++++++++++++++++++++++++++++++++++ hw/sd/meson.build | 1 + include/hw/riscv/k230.h | 4 + include/hw/sd/k230_sdhci.h | 82 +++++++++ tests/qtest/k230-sdhci-test.c | 214 +++++++++++++++++++++++ tests/qtest/meson.build | 5 +- 11 files changed, 656 insertions(+), 9 deletions(-) create mode 100644 hw/sd/k230_sdhci.c create mode 100644 include/hw/sd/k230_sdhci.h create mode 100644 tests/qtest/k230-sdhci-test.c
Signature · 1 line
2.43.0