mbox series

[0/6] few clean up for flexspi driver on imx8ulp and imx8mp

Message ID 20240904111727.1834935-1-haibo.chen@nxp.com
Headers show
Series few clean up for flexspi driver on imx8ulp and imx8mp | expand

Message

Bough Chen Sept. 4, 2024, 11:17 a.m. UTC
From: Haibo Chen <haibo.chen@nxp.com>

PATCH1~3 clean up the redundant imx8mp compatible string
PATCH4~5 add support on imx8ulp. The flexspi on imx8ulp has a difference
         with others, it only has 16 LUTs, while others all has upper to
	 32 LUTs. so add this distinguish in the driver.

Haibo Chen (6):
  dt-bindings: spi: nxp-fspi: adjust imx8mp to compatible with imx8mm
  spi: nxp-fspi: remove the imx8mp compatible string
  arm64: dts: imx8mp: add the compatible string for flexspi
  dt-bindings: spi: nxp-fspi: add imx8ulp support
  spi: fspi: add support for imx8ulp
  arm64: dts: imx8ulp: correct the flexspi compatible string

 .../devicetree/bindings/spi/spi-nxp-fspi.yaml |  3 +-
 arch/arm64/boot/dts/freescale/imx8mp.dtsi     |  2 +-
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi    |  2 +-
 drivers/spi/spi-nxp-fspi.c                    | 55 ++++++++++++-------
 4 files changed, 39 insertions(+), 23 deletions(-)

Comments

Marc Kleine-Budde Sept. 4, 2024, 11:20 a.m. UTC | #1
On 04.09.2024 19:17:23, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
> 
> According to imx8mp RM, the fspi is compatible with the fspi on
> imx8mm. So remove this redundant imx8mp compatible string here.
> 
> Fixes: 0467a97367d4 ("spi: fspi: enable fspi driver for on imx8mp")
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>  drivers/spi/spi-nxp-fspi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
> index fd1816befcd8..da110188bfed 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -1286,7 +1286,6 @@ static int nxp_fspi_resume(struct device *dev)
>  static const struct of_device_id nxp_fspi_dt_ids[] = {
>  	{ .compatible = "nxp,lx2160a-fspi", .data = (void *)&lx2160a_data, },
>  	{ .compatible = "nxp,imx8mm-fspi", .data = (void *)&imx8mm_data, },
> -	{ .compatible = "nxp,imx8mp-fspi", .data = (void *)&imx8mm_data, },

I think this breaks old DT with new driver, doesn't it?

>  	{ .compatible = "nxp,imx8qxp-fspi", .data = (void *)&imx8qxp_data, },
>  	{ .compatible = "nxp,imx8dxl-fspi", .data = (void *)&imx8dxl_data, },
>  	{ /* sentinel */ }

regards,
Marc
Frank Li Sept. 4, 2024, 3:17 p.m. UTC | #2
On Wed, Sep 04, 2024 at 07:17:21PM +0800, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> PATCH1~3 clean up the redundant imx8mp compatible string

look through these 3 patches, look like we can't get much benefit and broke
compatibility, I think it is not worth. just leave as it and add 8ulp
support.

Frank

> PATCH4~5 add support on imx8ulp. The flexspi on imx8ulp has a difference
>          with others, it only has 16 LUTs, while others all has upper to
> 	 32 LUTs. so add this distinguish in the driver.
>
> Haibo Chen (6):
>   dt-bindings: spi: nxp-fspi: adjust imx8mp to compatible with imx8mm
>   spi: nxp-fspi: remove the imx8mp compatible string
>   arm64: dts: imx8mp: add the compatible string for flexspi
>   dt-bindings: spi: nxp-fspi: add imx8ulp support
>   spi: fspi: add support for imx8ulp
>   arm64: dts: imx8ulp: correct the flexspi compatible string
>
>  .../devicetree/bindings/spi/spi-nxp-fspi.yaml |  3 +-
>  arch/arm64/boot/dts/freescale/imx8mp.dtsi     |  2 +-
>  arch/arm64/boot/dts/freescale/imx8ulp.dtsi    |  2 +-
>  drivers/spi/spi-nxp-fspi.c                    | 55 ++++++++++++-------
>  4 files changed, 39 insertions(+), 23 deletions(-)
>
> --
> 2.34.1
>
Krzysztof Kozlowski Sept. 4, 2024, 4:31 p.m. UTC | #3
On 04/09/2024 13:17, haibo.chen@nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
> 
> According to imx8mp RM, the fspi is compatible with the fspi on
> imx8mm. So remove this redundant imx8mp compatible string here.
> 
> Fixes: 0467a97367d4 ("spi: fspi: enable fspi driver for on imx8mp")
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---


This breaks users.

NAK

Best regards,
Krzysztof
Adam Ford Sept. 4, 2024, 5:47 p.m. UTC | #4
On Wed, Sep 4, 2024 at 11:32 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 04/09/2024 13:17, haibo.chen@nxp.com wrote:
> > From: Haibo Chen <haibo.chen@nxp.com>
> >
> > According to imx8mp RM, the fspi is compatible with the fspi on
> > imx8mm. So remove this redundant imx8mp compatible string here.

We'd need to have the device tree compatible fall back to
nxp,imx8mm-fspi, but it doesn't, so the driver would never associate
itself with nxp,imx8mp-fspi.

adam
> >
> > Fixes: 0467a97367d4 ("spi: fspi: enable fspi driver for on imx8mp")
> > Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> > ---
>
>
> This breaks users.
>
> NAK
>
> Best regards,
> Krzysztof
>
>