lkml.org 
[lkml]   [2020]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] spi: spi-fsl-dspi: Add ACPI support
On Fri, Aug 21, 2020 at 06:40:29PM +0530, kuldip dwivedi wrote:
> Currently fsl DSPI driver has support of DT only. Adding ACPI
> support to the drive so that it can be used by UEFI firmware
> boot in ACPI mode. This driver will be probed if any firmware
> will expose HID "NXP0005" in DSDT table.
>
> Signed-off-by: tanveer <tanveer.alam@puresoftware.com>
> Signed-off-by: kuldip dwivedi <kuldip.dwivedi@puresoftware.com>
> ---
> drivers/spi/spi-fsl-dspi.c | 91 +++++++++++++++++++++++++++++---------
> 1 file changed, 69 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
> index 91c6affe139c..7100a8a0a30e 100644
> --- a/drivers/spi/spi-fsl-dspi.c
> +++ b/drivers/spi/spi-fsl-dspi.c
> @@ -1070,6 +1072,12 @@ static void dspi_cleanup(struct spi_device *spi)
> kfree(chip);
> }
>
> +static const struct acpi_device_id fsl_dspi_acpi_ids[] = {
> + { "NXP0005", .driver_data = (kernel_ulong_t)&devtype_data[LS2085A], },
> + {},
> +};
> +MODULE_DEVICE_TABLE(acpi, fsl_dspi_acpi_ids);
> +

Just noticed this now.
So for device tree, spi-fsl-dspi supports the following compatibles:

fsl,vf610-dspi
fsl,ls1021a-v1.0-dspi
fsl,ls1012a-dspi
fsl,ls1028a-dspi
fsl,ls1043a-dspi
fsl,ls1046a-dspi
fsl,ls2080a-dspi
fsl,ls2085a-dspi
fsl,lx2160a-dspi

Depending on the compatible string, the driver knows whether to use DMA
or XSPI mode, and what the FIFO size is.

Now, of course not all of the above SoCs are going to support ACPI, but
it is reasonable to expect that more than one will. And in that case,
the driver should still be able to know on what SoC it's running,
because for example LS1043A doesn't support DMA, and LS2085A doesn't
support XSPI.

How is this dealt with in ACPI?

Thanks,
-Vladimir

\
 
 \ /
  Last update: 2020-08-22 20:35    [W:0.107 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site