Linux I2C development
 help / color / mirror / Atom feed
* [PATCH] i2c: busses: make K1 driver default for SpacemiT platforms
@ 2026-05-26 14:36 Iker Pedrosa
  2026-06-01  7:38 ` Yixun Lan
  0 siblings, 1 reply; 2+ messages in thread
From: Iker Pedrosa @ 2026-05-26 14:36 UTC (permalink / raw)
  To: Andi Shyti
  Cc: linux-i2c, linux-kernel, Margherita Milani, Yixun Lan,
	Iker Pedrosa

Enable I2C_K1 by default when ARCH_SPACEMIT is configured to ensure SD
card functionality works out-of-the-box.

SpacemiT K1 boards use I2C-controlled PMICs (like the P1 chip) to
provide SD card power supplies. Without the I2C_K1 driver enabled,
regulators cannot be controlled and SD card detection/operation fails.

Suggested-by: Margherita Milani <margherita.milani@amarulasolutions.com>
Suggested-by: Yixun Lan <dlan@kernel.org>
Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>
---
This patch addresses a user experience issue where SD card support fails
on SpacemiT K1 boards due to missing I2C driver dependency.

Background:
SpacemiT K1 boards use I2C-controlled PMICs (such as the P1 chip) to
provide SD card power supplies. When CONFIG_MMC_SDHCI_OF_K1 is enabled
but CONFIG_I2C_K1 is disabled, SD card detection and operation fails
because the regulator subsystem cannot communicate with the PMIC over
I2C.

Solution:
Following discussion in the community, this patch implements Yixun Lan's
suggested approach of making CONFIG_I2C_K1 default to enabled when
ARCH_SPACEMIT is configured, rather than adding hard dependencies
between unrelated subsystems.

This ensures SD card functionality works out-of-the-box while
maintaining proper subsystem separation and supporting theoretical
future boards that might use different PMIC interfaces.

Link: https://lore.kernel.org/all/CABdCQ=NFuW-XBK2zrw2TUFrEg0Q1Wf3_qS28zT3v-Hfud8mkew@mail.gmail.com/
---
 drivers/i2c/busses/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 8c935f867a37..bfe191e50b49 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -794,6 +794,7 @@ config I2C_K1
 	tristate "SpacemiT K1 I2C adapter"
 	depends on ARCH_SPACEMIT || COMPILE_TEST
 	depends on OF
+	default ARCH_SPACEMIT
 	help
 	  This option enables support for the I2C interface on the SpacemiT K1
 	  platform.

---
base-commit: 6edd9a0d32e1ef81133b8cb5b3bb3157a44da4d1
change-id: 20260526-orangepi-sd-card-i2c-f04c89c12998

Best regards,
-- 
Iker Pedrosa <ikerpedrosam@gmail.com>


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

* Re: [PATCH] i2c: busses: make K1 driver default for SpacemiT platforms
  2026-05-26 14:36 [PATCH] i2c: busses: make K1 driver default for SpacemiT platforms Iker Pedrosa
@ 2026-06-01  7:38 ` Yixun Lan
  0 siblings, 0 replies; 2+ messages in thread
From: Yixun Lan @ 2026-06-01  7:38 UTC (permalink / raw)
  To: Iker Pedrosa; +Cc: Andi Shyti, linux-i2c, linux-kernel, Margherita Milani

Hi Iker,

On 16:36 Tue 26 May     , Iker Pedrosa wrote:
> Enable I2C_K1 by default when ARCH_SPACEMIT is configured to ensure SD
> card functionality works out-of-the-box.
> 
> SpacemiT K1 boards use I2C-controlled PMICs (like the P1 chip) to
> provide SD card power supplies. Without the I2C_K1 driver enabled,
> regulators cannot be controlled and SD card detection/operation fails.
> 
> Suggested-by: Margherita Milani <margherita.milani@amarulasolutions.com>
> Suggested-by: Yixun Lan <dlan@kernel.org>
> Signed-off-by: Iker Pedrosa <ikerpedrosam@gmail.com>

I'd say, that make a fair good default, but still allow people to
adjust, to build as module if they like, thanks, so :

Reviewed-by: Yixun Lan <dlan@kernel.org>

-- 
Yixun Lan (dlan)

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

end of thread, other threads:[~2026-06-01  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 14:36 [PATCH] i2c: busses: make K1 driver default for SpacemiT platforms Iker Pedrosa
2026-06-01  7:38 ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox