All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C
@ 2026-05-14  2:40 thomas
  2026-05-15  9:37 ` Andy Shevchenko
  0 siblings, 1 reply; 11+ messages in thread
From: thomas @ 2026-05-14  2:40 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, thomas

This patch series adds ACPI identification for LECARC SoCs that
integrate Synopsys DesignWare peripherals.

LECARC platforms use the following ACPI HIDs:
- GPIO: LECA0001 (V1 register offsets)
- SPI:  LECA0002 (requires custom init function)
- I2C:  LECA0003

The patches are independent but share a common dependency on the
ACPI description file (drivers/acpi/acpi_apd.c) for SPI and I2C.
To avoid merge conflicts, they are submitted as a single series
with the following order:

Patch 1: gpio: dwapb – add LECA0001 to dwapb_acpi_match[].
Patch 2: spi: dw-mmio – add LECA0002 and dw_spi_lecarc_init(),
         plus corresponding entry in acpi_apd.c.
Patch 3: i2c: designware – add LECA0003 to dw_i2c_acpi_match[],
         plus corresponding entry in acpi_apd.c.

All changes have been tested on LECARC evaluation board with
kernel v7.0.0-rc6. No regressions observed on existing hardware.

Please apply.

thomas (3):
  gpio: dwapb: Add LECARC ACPI ID
  spi: dw-mmio: Add LECARC ACPI ID and init hook
  i2c: designware: Add LECARC ACPI ID

 drivers/acpi/acpi_apd.c                     | 12 ++++++++++++
 drivers/gpio/gpio-dwapb.c                   |  1 +
 drivers/i2c/busses/i2c-designware-platdrv.c |  1 +
 drivers/spi/spi-dw-mmio.c                   |  9 +++++++++
 4 files changed, 23 insertions(+)

--
2.43.0

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C
@ 2026-05-14  3:43 thomas
  2026-05-14  3:43 ` [PATCH 1/3] Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets thomas
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: thomas @ 2026-05-14  3:43 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, thomas

This patch series adds ACPI identification for LECARC SoCs that
integrate Synopsys DesignWare peripherals.

LECARC platforms use the following ACPI HIDs:
- GPIO: LECA0001 (V1 register offsets)
- SPI:  LECA0002 (requires custom init function)
- I2C:  LECA0003

The patches are independent but share a common dependency on the
ACPI description file (acpi_apd.c) for SPI and I2C. To avoid merge
conflicts, they are submitted as a single series with the following
order:

Patch 1: GPIO – add LECA0001 to dwapb_gpio ACPI match table.
Patch 2: SPI   – add LECA0002 and dw_spi_lecarc_init() to spi-dw-mmio,
                 plus corresponding entry in acpi_apd.c.
Patch 3: I2C   – add LECA0003 to DesignWare I2C ACPI match table,
                 plus corresponding entry in acpi_apd.c.

All changes have been tested on LECARC evaluation board with
kernel v7.0.0-rc7. No regressions observed on existing hardware.

Rebase from v7.0.0-rc6 onto v7.0.0-rc7.

Please apply.

 drivers/acpi/acpi_apd.c                     | 12 ++++++++++++
 drivers/gpio/gpio-dwapb.c                   |  1 +
 drivers/i2c/busses/i2c-designware-platdrv.c |  1 +
 drivers/spi/spi-dw-mmio.c                   |  9 +++++++++
 4 files changed, 23 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets.
  2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
@ 2026-05-14  3:43 ` thomas
  2026-05-14  3:43 ` [PATCH 2/3] 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 thomas
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: thomas @ 2026-05-14  3:43 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, thomas

Signed-off-by: thomas <thomas_lin@lecomputing.com>
---
 drivers/gpio/gpio-dwapb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 15cebc8b5d66..c1f3d83a67c1 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -694,6 +694,7 @@ static const struct acpi_device_id dwapb_acpi_match[] = {
 	{"APMC0D07", GPIO_REG_OFFSET_V1},
 	{"APMC0D81", GPIO_REG_OFFSET_V2},
 	{"FUJI200A", GPIO_REG_OFFSET_V1},
+	{"LECA0001", GPIO_REG_OFFSET_V1},
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dwapb_acpi_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] 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.
  2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
  2026-05-14  3:43 ` [PATCH 1/3] Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets thomas
@ 2026-05-14  3:43 ` thomas
  2026-05-14  3:43 ` [PATCH 3/3] Add ACPI ID "LECA0003" for LECARC SoCs that integrate the DesignWare I2C controller thomas
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: thomas @ 2026-05-14  3:43 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, thomas

Also add corresponding ACPI description in acpi_apd.c.

Signed-off-by: thomas <thomas_lin@lecomputing.com>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] Add ACPI ID "LECA0003" for LECARC SoCs that integrate the DesignWare I2C controller.
  2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
  2026-05-14  3:43 ` [PATCH 1/3] Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets thomas
  2026-05-14  3:43 ` [PATCH 2/3] 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 thomas
@ 2026-05-14  3:43 ` thomas
  2026-05-14  7:06 ` [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C Mark Brown
  2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
  4 siblings, 0 replies; 11+ messages in thread
From: thomas @ 2026-05-14  3:43 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, thomas

Also add corresponding ACPI description in acpi_apd.c.

Signed-off-by: thomas <thomas_lin@lecomputing.com>
---
 drivers/acpi/acpi_apd.c                     | 5 +++++
 drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 3a80e833215e..ae6a7da56e89 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -187,6 +187,10 @@ static const struct apd_device_desc leca_spi_desc = {
 	.fixed_clk_rate = 400000000,
 };
 
+static const struct apd_device_desc leca_i2c_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 250000000,
+};
 #endif /* CONFIG_ARM64 */
 
 #endif
@@ -259,6 +263,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
 	{ "HISI0173", APD_ADDR(hip08_spi_desc) },
 	{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
 	{ "LECA0002", APD_ADDR(leca_spi_desc) },
+	{ "LECA0003", APD_ADDR(leca_i2c_desc) },
 #endif
 	{ }
 };
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 3351c4a9ef11..b435b4015f02 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -279,6 +279,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = {
 	{ "INT3432", 0 },
 	{ "INT3433", 0 },
 	{ "INTC10EF", 0 },
+	{ "LECA0003", 0 },
 	{}
 };
 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C
  2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
                   ` (2 preceding siblings ...)
  2026-05-14  3:43 ` [PATCH 3/3] Add ACPI ID "LECA0003" for LECARC SoCs that integrate the DesignWare I2C controller thomas
@ 2026-05-14  7:06 ` Mark Brown
  2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
  4 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2026-05-14  7:06 UTC (permalink / raw)
  To: thomas
  Cc: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, linux-acpi, linux-kernel,
	linux-gpio, linux-i2c, linux-spi, lucas_hao, puntar_liu,
	jihua_tao, stan_xu, lumin_liu, notics_zhang, braden_zhang,
	harold_wu, will_zhang, aurora_jiang, ryen_lin, andy_jiang

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

On Thu, May 14, 2026 at 11:43:14AM +0800, thomas wrote:
> This patch series adds ACPI identification for LECARC SoCs that
> integrate Synopsys DesignWare peripherals.

Please submit patches using subject lines reflecting the style for the
subsystem, this makes it easier for people to identify relevant patches.
Look at what existing commits in the area you're changing are doing and
make sure your subject lines visually resemble what they're doing.
There's no need to resubmit to fix this alone.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C
  2026-05-14  2:40 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
@ 2026-05-15  9:37 ` Andy Shevchenko
  0 siblings, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-05-15  9:37 UTC (permalink / raw)
  To: thomas
  Cc: rafael, lenb, hoan, linusw, brgl, mika.westerberg, jsd,
	andi.shyti, broonie, linux-acpi, linux-kernel, linux-gpio,
	linux-i2c, linux-spi, lucas_hao, puntar_liu, jihua_tao, stan_xu,
	lumin_liu, notics_zhang, braden_zhang, harold_wu, will_zhang,
	aurora_jiang, ryen_lin, andy_jiang

On Thu, May 14, 2026 at 10:40:09AM +0800, thomas wrote:

This is a v2 of the series (Mark commented on the wrong one AFAICS), please
make sure you do proper versioning and changelog is provided.

> This patch series adds ACPI identification for LECARC SoCs that
> integrate Synopsys DesignWare peripherals.
> 
> LECARC platforms use the following ACPI HIDs:
> - GPIO: LECA0001 (V1 register offsets)
> - SPI:  LECA0002 (requires custom init function)
> - I2C:  LECA0003
> 
> The patches are independent but share a common dependency on the
> ACPI description file (drivers/acpi/acpi_apd.c) for SPI and I2C.
> To avoid merge conflicts, they are submitted as a single series
> with the following order:

> Patch 1: gpio: dwapb – add LECA0001 to dwapb_acpi_match[].
> Patch 2: spi: dw-mmio – add LECA0002 and dw_spi_lecarc_init(),
>          plus corresponding entry in acpi_apd.c.
> Patch 3: i2c: designware – add LECA0003 to dw_i2c_acpi_match[],
>          plus corresponding entry in acpi_apd.c.

You have to fix your SoB. There should be your real name and not an alias.

> All changes have been tested on LECARC evaluation board with
> kernel v7.0.0-rc6. No regressions observed on existing hardware.

Otherwise I can confirm that LECA is officially registered ACPI vendor ID and
the IDs look legit (it's up to the company to map the device ID parts to
whatever devices they have properly).

When you address the SoB and other comments, I ack them.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 0/3] arm64: Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C
  2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
                   ` (3 preceding siblings ...)
  2026-05-14  7:06 ` [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C Mark Brown
@ 2026-05-15 11:03 ` Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 1/3] gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs Thomas Lin
                     ` (2 more replies)
  4 siblings, 3 replies; 11+ messages in thread
From: Thomas Lin @ 2026-05-15 11:03 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, Thomas Lin

This patch series adds ACPI identification for LECARC SoCs that
integrate Synopsys DesignWare peripherals.

LECARC platforms use the following ACPI HIDs:

GPIO: LECA0001 (V1 register offsets)

SPI: LECA0002 (requires custom init function)

I2C: LECA0003

The patches are independent but share a common dependency on the
ACPI description file (acpi_apd.c) for SPI and I2C. To avoid merge
conflicts, they are submitted as a single series with the following
order:

Patch 1: GPIO – add LECA0001 to dwapb_gpio ACPI match table.
Patch 2: SPI – add LECA0002 and dw_spi_lecarc_init() to spi-dw-mmio,
plus corresponding entry in acpi_apd.c.
Patch 3: I2C – add LECA0003 to DesignWare I2C ACPI match table,
plus corresponding entry in acpi_apd.c.

All changes have been tested on LECARC evaluation board with
kernel v7.0.0-rc7. No regressions observed on existing hardware.

Changes since v1:

Revised subject lines to match subsystem style guidelines

No functional changes

All the comments from reviews has been fixed

Please apply.

Thomas Lin (3):
  gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs
  spi: dw-mmio: Add ACPI ID LECA0002 for LECARC SoCs
  i2c: designware: Add ACPI ID LECA0003 for LECARC SoCs

 drivers/acpi/acpi_apd.c                     | 13 +++++++++++++
 drivers/gpio/gpio-dwapb.c                   |  1 +
 drivers/i2c/busses/i2c-designware-platdrv.c |  1 +
 drivers/spi/spi-dw-mmio.c                   |  7 ++++---
 4 files changed, 19 insertions(+), 3 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2 1/3] gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs
  2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
@ 2026-05-15 11:03   ` Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 2/3] spi: dw-mmio: Add ACPI ID LECA0002 " Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 3/3] i2c: designware: Add ACPI ID LECA0003 " Thomas Lin
  2 siblings, 0 replies; 11+ messages in thread
From: Thomas Lin @ 2026-05-15 11:03 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, Thomas Lin

Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets.

Signed-off-by: Thomas Lin <thomas_lin@lecomputing.com>
---
 drivers/gpio/gpio-dwapb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 15cebc8b5d66..c1f3d83a67c1 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -694,6 +694,7 @@ static const struct acpi_device_id dwapb_acpi_match[] = {
 	{"APMC0D07", GPIO_REG_OFFSET_V1},
 	{"APMC0D81", GPIO_REG_OFFSET_V2},
 	{"FUJI200A", GPIO_REG_OFFSET_V1},
+	{"LECA0001", GPIO_REG_OFFSET_V1},
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, dwapb_acpi_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 2/3] spi: dw-mmio: Add ACPI ID LECA0002 for LECARC SoCs
  2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 1/3] gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs Thomas Lin
@ 2026-05-15 11:03   ` Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 3/3] i2c: designware: Add ACPI ID LECA0003 " Thomas Lin
  2 siblings, 0 replies; 11+ messages in thread
From: Thomas Lin @ 2026-05-15 11:03 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, Thomas Lin

Add ACPI ID "LECA0002" for LECARC SoCs. This ID requires a custom initialization function dw_spi_hssi_no_dma_init() that sets dws->dws.ip to DW_HSSI_ID.

Signed-off-by: Thomas Lin <thomas_lin@lecomputing.com>
---
 drivers/acpi/acpi_apd.c   | 7 +++++++
 drivers/spi/spi-dw-mmio.c | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index bed0791c17fc..4d5a51d30adc 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
@@ -251,6 +257,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
 	{ "HISI02A2", APD_ADDR(hip08_i2c_desc) },
 	{ "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) },
 	{ "HISI0173", APD_ADDR(hip08_spi_desc) },
+	{ "LECA0002", APD_ADDR(leca_spi_desc) },
 	{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
 #endif
 	{ }
diff --git a/drivers/spi/spi-dw-mmio.c b/drivers/spi/spi-dw-mmio.c
index 1bfdf24c3227..e131520fe887 100644
--- a/drivers/spi/spi-dw-mmio.c
+++ b/drivers/spi/spi-dw-mmio.c
@@ -226,8 +226,8 @@ static int dw_spi_hssi_init(struct platform_device *pdev,
 	return 0;
 }
 
-static int dw_spi_intel_init(struct platform_device *pdev,
-			     struct dw_spi_mmio *dwsmmio)
+static int dw_spi_hssi_no_dma_init(struct platform_device *pdev,
+			           struct dw_spi_mmio *dwsmmio)
 {
 	dwsmmio->dws.ip = DW_HSSI_ID;
 
@@ -438,7 +438,7 @@ static const struct of_device_id dw_spi_mmio_of_match[] = {
 	{ .compatible = "amazon,alpine-dw-apb-ssi", .data = dw_spi_alpine_init},
 	{ .compatible = "renesas,rzn1-spi", .data = dw_spi_pssi_init},
 	{ .compatible = "snps,dwc-ssi-1.01a", .data = dw_spi_hssi_init},
-	{ .compatible = "intel,keembay-ssi", .data = dw_spi_intel_init},
+	{ .compatible = "intel,keembay-ssi", .data = dw_spi_hssi_no_dma_init},
 	{
 		.compatible = "intel,mountevans-imc-ssi",
 		.data = dw_spi_mountevans_imc_init,
@@ -453,6 +453,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_hssi_no_dma_init},
 	{},
 };
 MODULE_DEVICE_TABLE(acpi, dw_spi_mmio_acpi_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v2 3/3] i2c: designware: Add ACPI ID LECA0003 for LECARC SoCs
  2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 1/3] gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs Thomas Lin
  2026-05-15 11:03   ` [PATCH v2 2/3] spi: dw-mmio: Add ACPI ID LECA0002 " Thomas Lin
@ 2026-05-15 11:03   ` Thomas Lin
  2 siblings, 0 replies; 11+ messages in thread
From: Thomas Lin @ 2026-05-15 11:03 UTC (permalink / raw)
  To: rafael, lenb, hoan, linusw, brgl, mika.westerberg,
	andriy.shevchenko, jsd, andi.shyti, broonie
  Cc: linux-acpi, linux-kernel, linux-gpio, linux-i2c, linux-spi,
	lucas_hao, puntar_liu, jihua_tao, stan_xu, lumin_liu,
	notics_zhang, braden_zhang, harold_wu, will_zhang, aurora_jiang,
	ryen_lin, andy_jiang, Thomas Lin

Add ACPI ID "LECA0003" for LECARC SoCs that integrate the DesignWare I2C controller.

Also add corresponding ACPI description in acpi_apd.c.

Signed-off-by: Thomas Lin <thomas_lin@lecomputing.com>
---
 drivers/acpi/acpi_apd.c                     | 6 ++++++
 drivers/i2c/busses/i2c-designware-platdrv.c | 1 +
 2 files changed, 7 insertions(+)

diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index 4d5a51d30adc..008bd0552cb7 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -187,6 +187,11 @@ static const struct apd_device_desc leca_spi_desc = {
 	.fixed_clk_rate = 400000000,
 };
 
+static const struct apd_device_desc leca_i2c_desc = {
+	.setup = acpi_apd_setup,
+	.fixed_clk_rate = 250000000,
+};
+
 #endif /* CONFIG_ARM64 */
 
 #endif
@@ -258,6 +263,7 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
 	{ "HISI02A3", APD_ADDR(hip08_lite_i2c_desc) },
 	{ "HISI0173", APD_ADDR(hip08_spi_desc) },
 	{ "LECA0002", APD_ADDR(leca_spi_desc) },
+	{ "LECA0003", APD_ADDR(leca_i2c_desc) },
 	{ "NXP0001", APD_ADDR(nxp_i2c_desc) },
 #endif
 	{ }
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 3351c4a9ef11..b435b4015f02 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -279,6 +279,7 @@ static const struct acpi_device_id dw_i2c_acpi_match[] = {
 	{ "INT3432", 0 },
 	{ "INT3433", 0 },
 	{ "INTC10EF", 0 },
+	{ "LECA0003", 0 },
 	{}
 };
 MODULE_DEVICE_TABLE(acpi, dw_i2c_acpi_match);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-05-15 11:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  3:43 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
2026-05-14  3:43 ` [PATCH 1/3] Add ACPI ID "LECA0001" for LECARC SoCs that use the DesignWare GPIO controller with V1 register offsets thomas
2026-05-14  3:43 ` [PATCH 2/3] 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 thomas
2026-05-14  3:43 ` [PATCH 3/3] Add ACPI ID "LECA0003" for LECARC SoCs that integrate the DesignWare I2C controller thomas
2026-05-14  7:06 ` [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C Mark Brown
2026-05-15 11:03 ` [PATCH v2 0/3] arm64: " Thomas Lin
2026-05-15 11:03   ` [PATCH v2 1/3] gpio: dwapb: Add ACPI ID LECA0001 for LECARC SoCs Thomas Lin
2026-05-15 11:03   ` [PATCH v2 2/3] spi: dw-mmio: Add ACPI ID LECA0002 " Thomas Lin
2026-05-15 11:03   ` [PATCH v2 3/3] i2c: designware: Add ACPI ID LECA0003 " Thomas Lin
  -- strict thread matches above, loose matches on Subject: below --
2026-05-14  2:40 [PATCH 0/3] Add LECARC ACPI IDs for DesignWare GPIO, SPI, I2C thomas
2026-05-15  9:37 ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.