From: Jonathan Currier Date: Wed, 7 May 2025 08:36:21 +0000 (-0500) Subject: spi: fspi: Add imxrt1170 device data X-Git-Tag: v2025.07-rc3~15^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c1da88d54d835fd1b8e353103f3e21d569e9b73;p=pandora-u-boot.git spi: fspi: Add imxrt1170 device data Add the device specific driver data, and the clock configuration. Signed-off-by: Jonathan Currier --- diff --git a/drivers/clk/imx/clk-imxrt1170.c b/drivers/clk/imx/clk-imxrt1170.c index 3f55d0d0127..bfd5dd6c464 100644 --- a/drivers/clk/imx/clk-imxrt1170.c +++ b/drivers/clk/imx/clk-imxrt1170.c @@ -105,6 +105,8 @@ static const char * const usdhc1_sels[] = {"rcosc48M_div2", "osc", "rcosc400M", "pll2_pfd2", "pll2_pfd0", "pll1_div5", "pll_arm"}; static const char * const semc_sels[] = {"rcosc48M_div2", "osc", "rcosc400M", "rcosc16M", "pll1_div5", "pll2_sys", "pll2_pfd2", "pll3_pfd0"}; +static const char * const flexspi1_sels[] = {"rcosc48M_div2", "osc", "rcosc400M", "rcosc16M", +"pll3_pdf0", "pll2_clk", "pll2_pfd2", "pll3_clk"}; static int imxrt1170_clk_probe(struct udevice *dev) { @@ -163,6 +165,13 @@ static int imxrt1170_clk_probe(struct udevice *dev) imx_clk_divider(dev, "lpuart1", "lpuart1_sel", base + (25 * 0x80), 0, 8)); + clk_dm(IMXRT1170_CLK_FLEXSPI1_SEL, + imx_clk_mux(dev, "flexspi1_sel", base + (20 * 0x80), 8, 3, + flexspi1_sels, ARRAY_SIZE(flexspi1_sels))); + clk_dm(IMXRT1170_CLK_FLEXSPI1, + imx_clk_divider(dev, "flexspi1", "flexspi1_sel", + base + (20 * 0x80), 0, 8)); + clk_dm(IMXRT1170_CLK_USDHC1_SEL, imx_clk_mux(dev, "usdhc1_sel", base + (58 * 0x80), 8, 3, usdhc1_sels, ARRAY_SIZE(usdhc1_sels))); diff --git a/drivers/spi/nxp_fspi.c b/drivers/spi/nxp_fspi.c index 3d0f659ecb2..95ad7fcff7f 100644 --- a/drivers/spi/nxp_fspi.c +++ b/drivers/spi/nxp_fspi.c @@ -328,6 +328,15 @@ static struct nxp_fspi_devtype_data imx8mm_data = { .little_endian = true, /* little-endian */ }; +static struct nxp_fspi_devtype_data imxrt1170_data = { + .rxfifo = SZ_256, + .txfifo = SZ_256, + .ahb_buf_size = SZ_4K, + .quirks = 0, + .lut_num = 16, + .little_endian = true, +}; + struct nxp_fspi { struct udevice *dev; void __iomem *iobase; @@ -1061,6 +1070,7 @@ static const struct udevice_id nxp_fspi_ids[] = { { .compatible = "nxp,lx2160a-fspi", .data = (ulong)&lx2160a_data, }, { .compatible = "nxp,imx8mm-fspi", .data = (ulong)&imx8mm_data, }, { .compatible = "nxp,imx8mp-fspi", .data = (ulong)&imx8mm_data, }, + { .compatible = "nxp,imxrt1170-fspi", .data = (ulong)&imxrt1170_data, }, { } };