[PATCH 2/3] scsi: ufs: spacemit: k3: Add UFS Host Controller driver

Anirudh Srinivasan asrinivasan at oss.tenstorrent.com
Sat Jul 25 07:50:50 PDT 2026


Hi Yixun,

On Sat, Jul 25, 2026 at 4:18 AM Yixun Lan <dlan at kernel.org> wrote:
>
> Hi Anirudh,
>
> On 15:16 Sun 12 Jul     , Anirudh Srinivasan wrote:
> > On Thu, Jul 02, 2026 at 02:31:36AM +0000, Yixun Lan wrote:
> > > SpacemiT K3 SoC consist of UFS (Universal Flash Storage) Host Controller
> > > which has features compatible with JEDEC UFS 2.2, MIPI UniPro v1.61 and
> > > M-PHY v3.0 standard.
> > >
> > > Signed-off-by: Yixun Lan <dlan at kernel.org>
> > > ---
> > >  drivers/ufs/host/Kconfig        |  12 +
> > >  drivers/ufs/host/Makefile       |   1 +
> > >  drivers/ufs/host/ufs-spacemit.c | 931 ++++++++++++++++++++++++++++++++++++++++
> > >  drivers/ufs/host/ufs-spacemit.h |  90 ++++
> > >  4 files changed, 1034 insertions(+)
> > >
> > > diff --git a/drivers/ufs/host/Kconfig b/drivers/ufs/host/Kconfig
> > > index ff170c0b6da0..4f53b7f7688f 100644
> > > --- a/drivers/ufs/host/Kconfig
> > > +++ b/drivers/ufs/host/Kconfig
> > > @@ -132,6 +132,18 @@ config SCSI_UFS_VARIABLE_SG_ENTRY_SIZE
> > >     bool
> > >     default y if SCSI_UFS_EXYNOS && SCSI_UFS_CRYPTO
> > >
> > > +config SCSI_UFS_SPACEMIT
> > > +   tristate "SpacemiT UFS controller driver"
> > > +   depends on SCSI_UFSHCD_PLATFORM && ARCH_SPACEMIT
> >
> > Can you add SCSI_UFSHCD_PLATFORM and SCSI_UFS_SPACEMIT as modules to
> > riscv defconfig (or just add the former and add a default y if
> > ARCH_SPACEMIT in this Kconfig entry). This will let defconfig kernels
> > to boot with persistant rootfs on these devices.
> >
> Ok, will consider adding one entry to riscv defconfig, but this should be
> handled in another separate patch, for making it as module or built-in driver,
> I'm incline to choose latter one, but would be glad to hear different opinion

Module sounds good.

> --
> Yixun Lan (dlan)



More information about the linux-riscv mailing list