[PATCH 2/3] spi: dw-mmio: Add LECARC ACPI ID and init hook
From: thomas
Date: Wed May 13 2026 - 22:56:34 EST
Add ACPI ID "LECA0002" for LECARC SoCs. This ID requires a custom
initialization function dw_spi_lecarc_init() that sets dws->dws.ip
to DW_HSSI_ID.
Also add corresponding ACPI description in acpi_apd.c.
Signed-off-by: thomas <thomas_lin@xxxxxxxxxxxxxxx>
---
drivers/acpi/acpi_apd.c | 7 +++++++
drivers/spi/spi-dw-mmio.c | 9 +++++++++
2 files changed, 16 insertions(+)
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index bed0791c17fc..3a80e833215e 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -181,6 +181,12 @@ static const struct apd_device_desc hip08_spi_desc = {
.setup = acpi_apd_setup,
.fixed_clk_rate = 250000000,
};
+
+static const struct apd_device_desc leca_spi_desc = {
+ .setup = acpi_apd_setup,
+ .fixed_clk_rate = 400000000,
+};
+
#endif /* CONFIG_ARM64 */
#endif
@@ -252,6 +258,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
{ "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) },
{ "HISI0173", APD_ADDR(hip08_spi_desc) },
{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
+ { "LECA0002", APD_ADDR(leca_spi_desc) },
#endif
{ }
};
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index 1bfdf24c3227..50b50553b360 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -234,6 +234,14 @@ static int dw_spi_intel_init(struct platform_device *pdev,
return 0;
}
+static int dw_spi_lecarc_init(struct platform_device *pdev,
+ struct dw_spi_mmio *dwsmmio)
+{
+ dwsmmio->dws.ip = DW_HSSI_ID;
+
+ return 0;
+}
+
/*
* DMA-based mem ops are not configured for this device and are not tested.
*/
@@ -453,6 +461,7 @@ MODULE_DEVICE_TABLE(of, dw_spi_mmio_of_match);
#ifdef CONFIG_ACPI
static const struct acpi_device_id dw_spi_mmio_acpi_match[] = {
{"HISI0173", (kernel_ulong_t)dw_spi_pssi_init},
+ {"LECA0002", (kernel_ulong_t)dw_spi_lecarc_init},
{},
};
MODULE_DEVICE_TABLE(acpi, dw_spi_mmio_acpi_match);
--
2.43.0