DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK
@ 2024-07-31 22:35 Uwe Kleine-König
  2024-08-01  9:50 ` Ahmad Fatoum
  2024-08-14  7:25 ` Robert Schwebel
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2024-07-31 22:35 UTC (permalink / raw)
  To: distrokit; +Cc: Uwe Kleine-König

From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

The i2c I/O expander MCP23S08 provides GPIOs to reset various components
(ethernet phy, display bridge, camera). The I/O expander is configured
as built-in as it is needed for nfs-root operation (once the kernel
contains the needed adaptions for the stmmac to support the stm32mp13x).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
Hello,

(implicit) v1 of this patch had a different subject as some more drivers
were enabled, see
https://lore.pengutronix.de/distrokit/20240730150915.2397723-2-u.kleine-koenig@baylibre.com/
. Ahmad requested to only enable the I/O expander as display and camera
are not supported in Distrokit userspace anyhow.

Best regards
Uwe

 configs/platform-v7a/kernelconfig | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index e6fadf500da3..5f12b549580c 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -1208,6 +1208,7 @@ CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_SOC_BUS=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_SPI=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGMAP_IRQ=y
 CONFIG_DMA_SHARED_BUFFER=y
@@ -2100,7 +2101,9 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_PINCTRL_AT91PIO4=y
 # CONFIG_PINCTRL_CY8C95X0 is not set
-# CONFIG_PINCTRL_MCP23S08 is not set
+CONFIG_PINCTRL_MCP23S08_I2C=y
+CONFIG_PINCTRL_MCP23S08_SPI=y
+CONFIG_PINCTRL_MCP23S08=y
 # CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
 # CONFIG_PINCTRL_OCELOT is not set
 # CONFIG_PINCTRL_PALMAS is not set

base-commit: 747926d7f2936451c93f72b8dc0cfc58c7bb3122
-- 
2.43.0




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

* Re: [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK
  2024-07-31 22:35 [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK Uwe Kleine-König
@ 2024-08-01  9:50 ` Ahmad Fatoum
  2024-08-01 10:12   ` Uwe Kleine-König
  2024-08-14  7:25 ` Robert Schwebel
  1 sibling, 1 reply; 5+ messages in thread
From: Ahmad Fatoum @ 2024-08-01  9:50 UTC (permalink / raw)
  To: Uwe Kleine-König, distrokit; +Cc: Uwe Kleine-König

Hello Uwe,

On 01.08.24 00:35, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Thanks for your patch.

> 
> The i2c I/O expander MCP23S08 provides GPIOs to reset various components
> (ethernet phy, display bridge, camera). The I/O expander is configured
> as built-in as it is needed for nfs-root operation (once the kernel
> contains the needed adaptions for the stmmac to support the stm32mp13x).
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Just a small nit below:

> +CONFIG_PINCTRL_MCP23S08_I2C=y
> +CONFIG_PINCTRL_MCP23S08_SPI=y

Nit: We don't seem to actually need the SPI driver.

Cheers,
Ahmad

> +CONFIG_PINCTRL_MCP23S08=y
>  # CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
>  # CONFIG_PINCTRL_OCELOT is not set
>  # CONFIG_PINCTRL_PALMAS is not set
> 
> base-commit: 747926d7f2936451c93f72b8dc0cfc58c7bb3122

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK
  2024-08-01  9:50 ` Ahmad Fatoum
@ 2024-08-01 10:12   ` Uwe Kleine-König
  2024-08-01 10:13     ` Ahmad Fatoum
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2024-08-01 10:12 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

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

Hello Ahmad,

On Thu, Aug 01, 2024 at 11:50:17AM +0200, Ahmad Fatoum wrote:
> On 01.08.24 00:35, Uwe Kleine-König wrote:
> > +CONFIG_PINCTRL_MCP23S08_I2C=y
> > +CONFIG_PINCTRL_MCP23S08_SPI=y
> 
> Nit: We don't seem to actually need the SPI driver.

PINCTRL_MCP23S08_SPI wasn't explicitly enabled. That's a hidden symbol
enabled by

config PINCTRL_MCP23S08
	...
	select PINCTRL_MCP23S08_SPI if SPI_MASTER

. So not enabling this would require a kernel patch to make the SPI
variant explicitly selectable.

Best regards
Uwe

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

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

* Re: [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK
  2024-08-01 10:12   ` Uwe Kleine-König
@ 2024-08-01 10:13     ` Ahmad Fatoum
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2024-08-01 10:13 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: distrokit

On 01.08.24 12:12, Uwe Kleine-König wrote:
> Hello Ahmad,
> 
> On Thu, Aug 01, 2024 at 11:50:17AM +0200, Ahmad Fatoum wrote:
>> On 01.08.24 00:35, Uwe Kleine-König wrote:
>>> +CONFIG_PINCTRL_MCP23S08_I2C=y
>>> +CONFIG_PINCTRL_MCP23S08_SPI=y
>>
>> Nit: We don't seem to actually need the SPI driver.
> 
> PINCTRL_MCP23S08_SPI wasn't explicitly enabled. That's a hidden symbol
> enabled by
> 
> config PINCTRL_MCP23S08
> 	...
> 	select PINCTRL_MCP23S08_SPI if SPI_MASTER
> 
> . So not enabling this would require a kernel patch to make the SPI
> variant explicitly selectable.

Ok, thanks for checking.
In this case, the patch looks good to me, no nits.

Cheers,
Ahmad

> 
> Best regards
> Uwe

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




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

* Re: [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK
  2024-07-31 22:35 [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK Uwe Kleine-König
  2024-08-01  9:50 ` Ahmad Fatoum
@ 2024-08-14  7:25 ` Robert Schwebel
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Schwebel @ 2024-08-14  7:25 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: distrokit, Uwe Kleine-König

applied to next

On Thu, Aug 01, 2024 at 12:35:39AM +0200, Uwe Kleine-König wrote:
> From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> 
> The i2c I/O expander MCP23S08 provides GPIOs to reset various components
> (ethernet phy, display bridge, camera). The I/O expander is configured
> as built-in as it is needed for nfs-root operation (once the kernel
> contains the needed adaptions for the stmmac to support the stm32mp13x).
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> ---
> Hello,
> 
> (implicit) v1 of this patch had a different subject as some more drivers
> were enabled, see
> https://lore.pengutronix.de/distrokit/20240730150915.2397723-2-u.kleine-koenig@baylibre.com/
> . Ahmad requested to only enable the I/O expander as display and camera
> are not supported in Distrokit userspace anyhow.
> 
> Best regards
> Uwe
> 
>  configs/platform-v7a/kernelconfig | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
> index e6fadf500da3..5f12b549580c 100644
> --- a/configs/platform-v7a/kernelconfig
> +++ b/configs/platform-v7a/kernelconfig
> @@ -1208,6 +1208,7 @@ CONFIG_GENERIC_CPU_VULNERABILITIES=y
>  CONFIG_SOC_BUS=y
>  CONFIG_REGMAP=y
>  CONFIG_REGMAP_I2C=y
> +CONFIG_REGMAP_SPI=y
>  CONFIG_REGMAP_MMIO=y
>  CONFIG_REGMAP_IRQ=y
>  CONFIG_DMA_SHARED_BUFFER=y
> @@ -2100,7 +2101,9 @@ CONFIG_GENERIC_PINCONF=y
>  CONFIG_PINCTRL_AT91=y
>  CONFIG_PINCTRL_AT91PIO4=y
>  # CONFIG_PINCTRL_CY8C95X0 is not set
> -# CONFIG_PINCTRL_MCP23S08 is not set
> +CONFIG_PINCTRL_MCP23S08_I2C=y
> +CONFIG_PINCTRL_MCP23S08_SPI=y
> +CONFIG_PINCTRL_MCP23S08=y
>  # CONFIG_PINCTRL_MICROCHIP_SGPIO is not set
>  # CONFIG_PINCTRL_OCELOT is not set
>  # CONFIG_PINCTRL_PALMAS is not set
> 
> base-commit: 747926d7f2936451c93f72b8dc0cfc58c7bb3122
> -- 
> 2.43.0
> 
> 
> 

-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-9    |



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

end of thread, other threads:[~2024-08-14  7:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-31 22:35 [DistroKit] [PATCH v2] v7a: kernel: Enable I/O expander driver for STM32MP135F-DK Uwe Kleine-König
2024-08-01  9:50 ` Ahmad Fatoum
2024-08-01 10:12   ` Uwe Kleine-König
2024-08-01 10:13     ` Ahmad Fatoum
2024-08-14  7:25 ` Robert Schwebel

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