diff mbox series

[2/2] spi: nxp_fspi: Enable support for nxp,imx8mm-fspi

Message ID 20210118213250.727994-2-aford173@gmail.com
State Accepted
Commit 5fb6b824714022f4455a920b97351f1945bc112c
Delegated to: Stefano Babic
Headers show
Series [1/2] spi: nxp_fspi: Fix error reporting | expand

Commit Message

Adam Ford Jan. 18, 2021, 9:32 p.m. UTC
The i.MX8M Mini can use the FlexSPI driver.  Add support
for it to the driver.

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Stefano Babic Jan. 23, 2021, 3:50 p.m. UTC | #1
> The i.MX8M Mini can use the FlexSPI driver.  Add support
> for it to the driver.
> Signed-off-by: Adam Ford <aford173@gmail.com>
> diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
> index d74561578a..6c5bad4c2c 100644
> --- a/drivers/spi/nxp_fspi.c
> +++ b/drivers/spi/nxp_fspi.c
> @@ -320,6 +320,14 @@ static const struct nxp_fspi_devtype_data lx2160a_data = {
>  	.little_endian = true,  /* little-endian    */
>  };
>  
> +static const struct nxp_fspi_devtype_data imx8mm_data = {
> +	.rxfifo = SZ_512,       /* (64  * 64 bits)  */
> +	.txfifo = SZ_1K,        /* (128 * 64 bits)  */
> +	.ahb_buf_size = SZ_2K,  /* (256 * 64 bits)  */
> +	.quirks = 0,
> +	.little_endian = true,  /* little-endian    */
> +};
> +
>  struct nxp_fspi {
>  	struct udevice *dev;
>  	void __iomem *iobase;
> @@ -985,6 +993,7 @@ static const struct dm_spi_ops nxp_fspi_ops = {
>  
>  static const struct udevice_id nxp_fspi_ids[] = {
>  	{ .compatible = "nxp,lx2160a-fspi", .data = (ulong)&lx2160a_data, },
> +	{ .compatible = "nxp,imx8mm-fspi", .data = (ulong)&imx8mm_data, },
>  	{ }
>  };
>  
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c
index d74561578a..6c5bad4c2c 100644
--- a/drivers/spi/nxp_fspi.c
+++ b/drivers/spi/nxp_fspi.c
@@ -320,6 +320,14 @@  static const struct nxp_fspi_devtype_data lx2160a_data = {
 	.little_endian = true,  /* little-endian    */
 };
 
+static const struct nxp_fspi_devtype_data imx8mm_data = {
+	.rxfifo = SZ_512,       /* (64  * 64 bits)  */
+	.txfifo = SZ_1K,        /* (128 * 64 bits)  */
+	.ahb_buf_size = SZ_2K,  /* (256 * 64 bits)  */
+	.quirks = 0,
+	.little_endian = true,  /* little-endian    */
+};
+
 struct nxp_fspi {
 	struct udevice *dev;
 	void __iomem *iobase;
@@ -985,6 +993,7 @@  static const struct dm_spi_ops nxp_fspi_ops = {
 
 static const struct udevice_id nxp_fspi_ids[] = {
 	{ .compatible = "nxp,lx2160a-fspi", .data = (ulong)&lx2160a_data, },
+	{ .compatible = "nxp,imx8mm-fspi", .data = (ulong)&imx8mm_data, },
 	{ }
 };