[PATCH] spi: Add MXIC controller driver
Jagan Teki
jagan at amarulasolutions.com
Fri Jun 25 17:31:32 CEST 2021
On Fri, Jun 25, 2021 at 3:01 PM Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> On Wed, Jun 23, 2021 at 2:46 PM Zhengxun <zhengxunli.mxic at gmail.com> wrote:
> >
> > Add a driver for Macronix SPI controller IP.
> >
> > This patch referred from linux spi-mxic.c. The difference from the
> > linux version is described here.
> >
> > 1. To adapt uboot spi framework, modify some functions naming.
> >
> > 2. Remove the incompatible functions of Uboot.
> >
> > 3. Add dummy byte recalculattion function to support dummy buswidth
> > not align data buswidth operation.(ex: 1-1-4, 1-1-8)
> >
> > 4. Add Octal mode support.
> >
> > Signed-off-by: Zhengxun <zhengxunli.mxic at gmail.com>
> > ---
> > drivers/spi/Kconfig | 5 +
> > drivers/spi/Makefile | 1 +
> > drivers/spi/spi-mxic.c | 546 +++++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 552 insertions(+)
> > create mode 100755 drivers/spi/spi-mxic.c
> >
> > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
> > index 1494c91763..ad4b918626 100644
> > --- a/drivers/spi/Kconfig
> > +++ b/drivers/spi/Kconfig
> > @@ -255,6 +255,11 @@ config MXS_SPI
> > Enable the MXS SPI controller driver. This driver can be used
> > on the i.MX23 and i.MX28 SoCs.
> >
> > +config SPI_MXIC
> > + bool "Macronix MX25F0A SPI controller"
> > + help
> > + This selects the Macronix MX25F0A SPI controller driver.
> > +
> > config NXP_FSPI
> > bool "NXP FlexSPI driver"
> > depends on SPI_MEM
> > diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> > index cfe4fae1d4..3dc83089b8 100644
> > --- a/drivers/spi/Makefile
> > +++ b/drivers/spi/Makefile
> > @@ -51,6 +51,7 @@ obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o
> > obj-$(CONFIG_PIC32_SPI) += pic32_spi.o
> > obj-$(CONFIG_PL022_SPI) += pl022_spi.o
> > obj-$(CONFIG_SPI_QUP) += spi-qup.o
> > +obj-$(CONFIG_SPI_MXIC) += spi-mxic.o
> > obj-$(CONFIG_RENESAS_RPC_SPI) += renesas_rpc_spi.o
> > obj-$(CONFIG_ROCKCHIP_SPI) += rk_spi.o
> > obj-$(CONFIG_SANDBOX_SPI) += sandbox_spi.o
> > diff --git a/drivers/spi/spi-mxic.c b/drivers/spi/spi-mxic.c
> > new file mode 100755
> > index 0000000000..7020e3ea87
> > --- /dev/null
> > +++ b/drivers/spi/spi-mxic.c
> > @@ -0,0 +1,546 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +//
> > +// Copyright (C) 2021 Macronix International Co., Ltd.
> > +//
> > +// Authors:
> > +// zhengxunli <zhengxunli at mxic.com.tw>
> > +//
>
> Replace with comment line instead of // except SPDX
>
> /*
> *
> */
>
> rest look good to me,
>
> Reviewed-by: Jagan Teki <jagan at amarulasolutions.com>
Updated, Applied to u-boot-spi/next
More information about the U-Boot
mailing list