* [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms @ 2025-05-07 12:44 Alexander Stein 2025-05-07 14:30 ` Stefan Wahren 0 siblings, 1 reply; 11+ messages in thread From: Alexander Stein @ 2025-05-07 12:44 UTC (permalink / raw) To: Catalin Marinas, Will Deacon Cc: Alexander Stein, linux-arm-kernel, linux-kernel Select PINCTRL for NXP i.MX SoCs. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index a541bb029aa4e..49c3bc25e5f68 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -219,6 +219,7 @@ config ARCH_MXC select ARM64_ERRATUM_845719 if COMPAT select IMX_GPCV2 select IMX_GPCV2_PM_DOMAINS + select PINCTRL select PM select PM_GENERIC_DOMAINS select SOC_BUS -- 2.43.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-07 12:44 [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms Alexander Stein @ 2025-05-07 14:30 ` Stefan Wahren 2025-05-08 5:52 ` Alexander Stein 0 siblings, 1 reply; 11+ messages in thread From: Stefan Wahren @ 2025-05-07 14:30 UTC (permalink / raw) To: Alexander Stein, Catalin Marinas, Will Deacon Cc: linux-arm-kernel, linux-kernel, Shawn Guo, Esben Haabendal Hi Alexander, [add Shawn and Esben] Am 07.05.25 um 14:44 schrieb Alexander Stein: > Select PINCTRL for NXP i.MX SoCs. could you please explain the motivation behind your change? Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to disable pinctrl")? Best regards > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> > --- > arch/arm64/Kconfig.platforms | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms > index a541bb029aa4e..49c3bc25e5f68 100644 > --- a/arch/arm64/Kconfig.platforms > +++ b/arch/arm64/Kconfig.platforms > @@ -219,6 +219,7 @@ config ARCH_MXC > select ARM64_ERRATUM_845719 if COMPAT > select IMX_GPCV2 > select IMX_GPCV2_PM_DOMAINS > + select PINCTRL > select PM > select PM_GENERIC_DOMAINS > select SOC_BUS ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-07 14:30 ` Stefan Wahren @ 2025-05-08 5:52 ` Alexander Stein 2025-05-08 6:44 ` Esben Haabendal 0 siblings, 1 reply; 11+ messages in thread From: Alexander Stein @ 2025-05-08 5:52 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Stefan Wahren Cc: linux-arm-kernel, linux-kernel, Shawn Guo, Esben Haabendal Hi Stefan, Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: > Hi Alexander, > > [add Shawn and Esben] > > Am 07.05.25 um 14:44 schrieb Alexander Stein: > > Select PINCTRL for NXP i.MX SoCs. > could you please explain the motivation behind your change? > > Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to > disable pinctrl")? Ah, thanks for the pointer. It might be the case. I noticed that, when using arch/arm64/defconfig and disabling all platforms despite ARCH_MXC before running make olddefconfig, CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I noticed this when building in yocto and non-IMX platforms are disabled for build time reasons. Best regards, Alexader > > > > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> > > --- > > arch/arm64/Kconfig.platforms | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms > > index a541bb029aa4e..49c3bc25e5f68 100644 > > --- a/arch/arm64/Kconfig.platforms > > +++ b/arch/arm64/Kconfig.platforms > > @@ -219,6 +219,7 @@ config ARCH_MXC > > select ARM64_ERRATUM_845719 if COMPAT > > select IMX_GPCV2 > > select IMX_GPCV2_PM_DOMAINS > > + select PINCTRL > > select PM > > select PM_GENERIC_DOMAINS > > select SOC_BUS > > -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 5:52 ` Alexander Stein @ 2025-05-08 6:44 ` Esben Haabendal 2025-05-08 8:07 ` Alexander Stein 0 siblings, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-05-08 6:44 UTC (permalink / raw) To: Alexander Stein Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > Hi Stefan, > > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: >> Hi Alexander, >> >> [add Shawn and Esben] >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: >> > Select PINCTRL for NXP i.MX SoCs. >> could you please explain the motivation behind your change? >> >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to >> disable pinctrl")? > > Ah, thanks for the pointer. It might be the case. The goal of the patch mentioned above was to be able to build a kernel for LS1021A without pinctrl framework enabled, as LS1021A does not have a pinctrl driver. With your patch, that would not be possible anymore. > I noticed that, when using arch/arm64/defconfig and disabling all > platforms despite ARCH_MXC before running make olddefconfig, > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I > noticed this when building in yocto and non-IMX platforms are disabled > for build time reasons. But is that something that needs to be fixed? It sounds like quite a special use-case, and why not simply enable CONFIG_PINCTRL in that case then? /Esben >> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> >> > --- >> > arch/arm64/Kconfig.platforms | 1 + >> > 1 file changed, 1 insertion(+) >> > >> > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms >> > index a541bb029aa4e..49c3bc25e5f68 100644 >> > --- a/arch/arm64/Kconfig.platforms >> > +++ b/arch/arm64/Kconfig.platforms >> > @@ -219,6 +219,7 @@ config ARCH_MXC >> > select ARM64_ERRATUM_845719 if COMPAT >> > select IMX_GPCV2 >> > select IMX_GPCV2_PM_DOMAINS >> > + select PINCTRL >> > select PM >> > select PM_GENERIC_DOMAINS >> > select SOC_BUS ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 6:44 ` Esben Haabendal @ 2025-05-08 8:07 ` Alexander Stein 2025-05-08 8:18 ` Esben Haabendal 0 siblings, 1 reply; 11+ messages in thread From: Alexander Stein @ 2025-05-08 8:07 UTC (permalink / raw) To: Esben Haabendal Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo Hi Esben, Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: > "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > > > Hi Stefan, > > > > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: > >> Hi Alexander, > >> > >> [add Shawn and Esben] > >> > >> Am 07.05.25 um 14:44 schrieb Alexander Stein: > >> > Select PINCTRL for NXP i.MX SoCs. > >> could you please explain the motivation behind your change? > >> > >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to > >> disable pinctrl")? > > > > Ah, thanks for the pointer. It might be the case. > > The goal of the patch mentioned above was to be able to build a kernel > for LS1021A without pinctrl framework enabled, as LS1021A does not have > a pinctrl driver. > > With your patch, that would not be possible anymore. Why? LS1021A is arm, not arm64 which this patch is touching only. BTW: Commit b77bd3ba762f3 ("ARM: imx: Re-introduce the PINCTRL selection") is actually doing the same for arm as there is some fallout from 17d21001891402. > > I noticed that, when using arch/arm64/defconfig and disabling all > > platforms despite ARCH_MXC before running make olddefconfig, > > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I > > noticed this when building in yocto and non-IMX platforms are disabled > > for build time reasons. > > But is that something that needs to be fixed? > > It sounds like quite a special use-case, and why not simply enable > CONFIG_PINCTRL in that case then? PINCTRL is crucial for any SoC to even boot, so this is an option which has to be set if that platform is enabled. Best regards Alexander -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 8:07 ` Alexander Stein @ 2025-05-08 8:18 ` Esben Haabendal 2025-05-08 12:25 ` Alexander Stein 0 siblings, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-05-08 8:18 UTC (permalink / raw) To: Alexander Stein Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > Hi Esben, > > Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> >> > Hi Stefan, >> > >> > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: >> >> Hi Alexander, >> >> >> >> [add Shawn and Esben] >> >> >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: >> >> > Select PINCTRL for NXP i.MX SoCs. >> >> could you please explain the motivation behind your change? >> >> >> >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to >> >> disable pinctrl")? >> > >> > Ah, thanks for the pointer. It might be the case. >> >> The goal of the patch mentioned above was to be able to build a kernel >> for LS1021A without pinctrl framework enabled, as LS1021A does not have >> a pinctrl driver. >> >> With your patch, that would not be possible anymore. > > Why? LS1021A is arm, not arm64 which this patch is touching only. Good point :) Sorry about that. > BTW: Commit b77bd3ba762f3 ("ARM: imx: Re-introduce the PINCTRL selection") > is actually doing the same for arm as there is some fallout from > 17d21001891402. > >> > I noticed that, when using arch/arm64/defconfig and disabling all >> > platforms despite ARCH_MXC before running make olddefconfig, >> > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I >> > noticed this when building in yocto and non-IMX platforms are disabled >> > for build time reasons. >> >> But is that something that needs to be fixed? >> >> It sounds like quite a special use-case, and why not simply enable >> CONFIG_PINCTRL in that case then? > > PINCTRL is crucial for any SoC to even boot, so this is an option which has > to be set if that platform is enabled. Yes, but PINCTRL (framework) does not by itself do anything meaningful. You need the correct pinctrl driver. Making the various SOC's select the corresponding pinctrl drivers makes sense if it is required for booting under all circumstances. And this should then indirectly enable/select PINCTRL and anything else needed for that driver. Having ARCH_MXC select PINCTRL as such is mostly pointless IMHO. Enabling a driver framework without enabling any drivers for it, when building a kernel where no SOC's requiring any pinctrl drivers is kind of weird. If you want to do that, why not simply enable both ARCH_MXC and PINCTRL in your yocto recipe? /Esben ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 8:18 ` Esben Haabendal @ 2025-05-08 12:25 ` Alexander Stein 2025-05-08 12:43 ` Esben Haabendal 0 siblings, 1 reply; 11+ messages in thread From: Alexander Stein @ 2025-05-08 12:25 UTC (permalink / raw) To: Esben Haabendal Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo Hi Esben, Am Donnerstag, 8. Mai 2025, 10:18:35 CEST schrieb Esben Haabendal: > "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > > > Hi Esben, > > > > Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: > >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > >> > >> > Hi Stefan, > >> > > >> > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: > >> >> Hi Alexander, > >> >> > >> >> [add Shawn and Esben] > >> >> > >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: > >> >> > Select PINCTRL for NXP i.MX SoCs. > >> >> could you please explain the motivation behind your change? > >> >> > >> >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to > >> >> disable pinctrl")? > >> > > >> > Ah, thanks for the pointer. It might be the case. > >> > >> The goal of the patch mentioned above was to be able to build a kernel > >> for LS1021A without pinctrl framework enabled, as LS1021A does not have > >> a pinctrl driver. > >> > >> With your patch, that would not be possible anymore. > > > > Why? LS1021A is arm, not arm64 which this patch is touching only. > > Good point :) Sorry about that. > > > BTW: Commit b77bd3ba762f3 ("ARM: imx: Re-introduce the PINCTRL selection") > > is actually doing the same for arm as there is some fallout from > > 17d21001891402. > > > >> > I noticed that, when using arch/arm64/defconfig and disabling all > >> > platforms despite ARCH_MXC before running make olddefconfig, > >> > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I > >> > noticed this when building in yocto and non-IMX platforms are disabled > >> > for build time reasons. > >> > >> But is that something that needs to be fixed? > >> > >> It sounds like quite a special use-case, and why not simply enable > >> CONFIG_PINCTRL in that case then? > > > > PINCTRL is crucial for any SoC to even boot, so this is an option which has > > to be set if that platform is enabled. > > Yes, but PINCTRL (framework) does not by itself do anything meaningful. > You need the correct pinctrl driver. > > Making the various SOC's select the corresponding pinctrl drivers makes > sense if it is required for booting under all circumstances. And this > should then indirectly enable/select PINCTRL and anything else needed > for that driver. If you prefer I don't mind enabling PINCTRL and the SoC-specific driver (e.g. PINCTRL_IMX8MP) depending on each SoC-support, e.g. SOC_IMX35 or SOC_IMX8M. > Having ARCH_MXC select PINCTRL as such is mostly pointless IMHO. > Enabling a driver framework without enabling any drivers for it, when > building a kernel where no SOC's requiring any pinctrl drivers is kind > of weird. If you want to do that, why not simply enable both ARCH_MXC > and PINCTRL in your yocto recipe? PINCTRL is currently only enabled because other SoCs happen to enable it, just this feels just plain wrong. If these platforms are disabled or removed for whatever reason, the other platforms should still work. Best regards, Alexander -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 12:25 ` Alexander Stein @ 2025-05-08 12:43 ` Esben Haabendal 2025-05-08 13:18 ` Alexander Stein 0 siblings, 1 reply; 11+ messages in thread From: Esben Haabendal @ 2025-05-08 12:43 UTC (permalink / raw) To: Alexander Stein Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > Hi Esben, > > Am Donnerstag, 8. Mai 2025, 10:18:35 CEST schrieb Esben Haabendal: >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> >> > Hi Esben, >> > >> > Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: >> >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> >> >> >> > Hi Stefan, >> >> > >> >> > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: >> >> >> Hi Alexander, >> >> >> >> >> >> [add Shawn and Esben] >> >> >> >> >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: >> >> >> > Select PINCTRL for NXP i.MX SoCs. >> >> >> could you please explain the motivation behind your change? >> >> >> >> >> >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to >> >> >> disable pinctrl")? >> >> > >> >> > Ah, thanks for the pointer. It might be the case. >> >> >> >> The goal of the patch mentioned above was to be able to build a kernel >> >> for LS1021A without pinctrl framework enabled, as LS1021A does not have >> >> a pinctrl driver. >> >> >> >> With your patch, that would not be possible anymore. >> > >> > Why? LS1021A is arm, not arm64 which this patch is touching only. >> >> Good point :) Sorry about that. >> >> > BTW: Commit b77bd3ba762f3 ("ARM: imx: Re-introduce the PINCTRL selection") >> > is actually doing the same for arm as there is some fallout from >> > 17d21001891402. >> > >> >> > I noticed that, when using arch/arm64/defconfig and disabling all >> >> > platforms despite ARCH_MXC before running make olddefconfig, >> >> > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I >> >> > noticed this when building in yocto and non-IMX platforms are disabled >> >> > for build time reasons. >> >> >> >> But is that something that needs to be fixed? >> >> >> >> It sounds like quite a special use-case, and why not simply enable >> >> CONFIG_PINCTRL in that case then? >> > >> > PINCTRL is crucial for any SoC to even boot, so this is an option which has >> > to be set if that platform is enabled. >> >> Yes, but PINCTRL (framework) does not by itself do anything meaningful. >> You need the correct pinctrl driver. >> >> Making the various SOC's select the corresponding pinctrl drivers makes >> sense if it is required for booting under all circumstances. And this >> should then indirectly enable/select PINCTRL and anything else needed >> for that driver. > > If you prefer I don't mind enabling PINCTRL and the SoC-specific driver > (e.g. PINCTRL_IMX8MP) depending on each SoC-support, e.g. SOC_IMX35 or > SOC_IMX8M. For SOC_IMX35, it should be selected by default. config PINCTRL_IMX35 bool "IMX35 pinctrl driver" depends on OF depends on SOC_IMX35 || COMPILE_TEST default SOC_IMX35 For the IMX8M* SoC's, that is not done, as there is only a common SOC_IMX8M config entry, which corresponds to multiple pinctrl drivers, which we probably don't want to select all of by default. >> Having ARCH_MXC select PINCTRL as such is mostly pointless IMHO. >> Enabling a driver framework without enabling any drivers for it, when >> building a kernel where no SOC's requiring any pinctrl drivers is kind >> of weird. If you want to do that, why not simply enable both ARCH_MXC >> and PINCTRL in your yocto recipe? > > PINCTRL is currently only enabled because other SoCs happen to enable it, > just this feels just plain wrong. If these platforms are disabled or > removed for whatever reason, the other platforms should still work. As it is now, to build for let's say i.MX 8M Plus, you have to enable SOC_IMX8M PINCTRL_IMX8MP to get a kernel that is likely to boot. If you enable SOC_IMX8M PINCTRL but not PINCTRL_IMX8MP you won't have pinctrl support, and the kernel will probably not work as expected. What am I missing? /Esben ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 12:43 ` Esben Haabendal @ 2025-05-08 13:18 ` Alexander Stein 2025-05-08 17:09 ` Esben Haabendal 0 siblings, 1 reply; 11+ messages in thread From: Alexander Stein @ 2025-05-08 13:18 UTC (permalink / raw) To: Esben Haabendal Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo Am Donnerstag, 8. Mai 2025, 14:43:09 CEST schrieb Esben Haabendal: > "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > > > Hi Esben, > > > > Am Donnerstag, 8. Mai 2025, 10:18:35 CEST schrieb Esben Haabendal: > >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > >> > >> > Hi Esben, > >> > > >> > Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: > >> >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > >> >> > >> >> > Hi Stefan, > >> >> > > >> >> > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: > >> >> >> Hi Alexander, > >> >> >> > >> >> >> [add Shawn and Esben] > >> >> >> > >> >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: > >> >> >> > Select PINCTRL for NXP i.MX SoCs. > >> >> >> could you please explain the motivation behind your change? > >> >> >> > >> >> >> Is it related to this commit 17d21001891402 ("ARM: imx: Allow user to > >> >> >> disable pinctrl")? > >> >> > > >> >> > Ah, thanks for the pointer. It might be the case. > >> >> > >> >> The goal of the patch mentioned above was to be able to build a kernel > >> >> for LS1021A without pinctrl framework enabled, as LS1021A does not have > >> >> a pinctrl driver. > >> >> > >> >> With your patch, that would not be possible anymore. > >> > > >> > Why? LS1021A is arm, not arm64 which this patch is touching only. > >> > >> Good point :) Sorry about that. > >> > >> > BTW: Commit b77bd3ba762f3 ("ARM: imx: Re-introduce the PINCTRL selection") > >> > is actually doing the same for arm as there is some fallout from > >> > 17d21001891402. > >> > > >> >> > I noticed that, when using arch/arm64/defconfig and disabling all > >> >> > platforms despite ARCH_MXC before running make olddefconfig, > >> >> > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I > >> >> > noticed this when building in yocto and non-IMX platforms are disabled > >> >> > for build time reasons. > >> >> > >> >> But is that something that needs to be fixed? > >> >> > >> >> It sounds like quite a special use-case, and why not simply enable > >> >> CONFIG_PINCTRL in that case then? > >> > > >> > PINCTRL is crucial for any SoC to even boot, so this is an option which has > >> > to be set if that platform is enabled. > >> > >> Yes, but PINCTRL (framework) does not by itself do anything meaningful. > >> You need the correct pinctrl driver. > >> > >> Making the various SOC's select the corresponding pinctrl drivers makes > >> sense if it is required for booting under all circumstances. And this > >> should then indirectly enable/select PINCTRL and anything else needed > >> for that driver. > > > > If you prefer I don't mind enabling PINCTRL and the SoC-specific driver > > (e.g. PINCTRL_IMX8MP) depending on each SoC-support, e.g. SOC_IMX35 or > > SOC_IMX8M. > > For SOC_IMX35, it should be selected by default. > > config PINCTRL_IMX35 > bool "IMX35 pinctrl driver" > depends on OF > depends on SOC_IMX35 || COMPILE_TEST > default SOC_IMX35 > > For the IMX8M* SoC's, that is not done, as there is only a common > SOC_IMX8M config entry, which corresponds to multiple pinctrl drivers, > which we probably don't want to select all of by default. Well, is the SoC support is enabled, it makes totally sense to enable a crucial driver like pinctrl by default. It's still deselectable after all. > >> Having ARCH_MXC select PINCTRL as such is mostly pointless IMHO. > >> Enabling a driver framework without enabling any drivers for it, when > >> building a kernel where no SOC's requiring any pinctrl drivers is kind > >> of weird. If you want to do that, why not simply enable both ARCH_MXC > >> and PINCTRL in your yocto recipe? > > > > PINCTRL is currently only enabled because other SoCs happen to enable it, > > just this feels just plain wrong. If these platforms are disabled or > > removed for whatever reason, the other platforms should still work. > > As it is now, to build for let's say i.MX 8M Plus, you have to enable > SOC_IMX8M > PINCTRL_IMX8MP > to get a kernel that is likely to boot. Both SOC_IMX8M and SOC_IMX9 are enabled by default if ARCH_MXC is enabled too, even though you might not want to use both SoC families. > If you enable > SOC_IMX8M > PINCTRL > but not > PINCTRL_IMX8MP > you won't have pinctrl support, and the kernel will probably not work as > expected. > > What am I missing? PINCTRL is not enabled bydefault if only ARCH_MXC is enabled. It just happens that defconfig enables other platforms which in turn enable PINCTRL. If you prefer to explicitely enable CONFIG_PINCTRL=y in defconfig I'm fine with that as well. Best regards Alexander -- TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany Amtsgericht München, HRB 105018 Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider http://www.tq-group.com/ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms 2025-05-08 13:18 ` Alexander Stein @ 2025-05-08 17:09 ` Esben Haabendal 0 siblings, 0 replies; 11+ messages in thread From: Esben Haabendal @ 2025-05-08 17:09 UTC (permalink / raw) To: Alexander Stein Cc: Catalin Marinas, Will Deacon, Stefan Wahren, linux-arm-kernel, linux-kernel, Shawn Guo "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: > Am Donnerstag, 8. Mai 2025, 14:43:09 CEST schrieb Esben Haabendal: >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> > Am Donnerstag, 8. Mai 2025, 10:18:35 CEST schrieb Esben Haabendal: >> >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> >> > Am Donnerstag, 8. Mai 2025, 08:44:22 CEST schrieb Esben Haabendal: >> >> >> "Alexander Stein" <alexander.stein@ew.tq-group.com> writes: >> >> >> > Am Mittwoch, 7. Mai 2025, 16:30:33 CEST schrieb Stefan Wahren: >> >> >> >> Am 07.05.25 um 14:44 schrieb Alexander Stein: >> >> >> > I noticed that, when using arch/arm64/defconfig and disabling all >> >> >> > platforms despite ARCH_MXC before running make olddefconfig, >> >> >> > CONFIG_PINCTRL gets disabled as well. No platform is enabling it. I >> >> >> > noticed this when building in yocto and non-IMX platforms are disabled >> >> >> > for build time reasons. >> >> >> >> >> >> But is that something that needs to be fixed? >> >> >> >> >> >> It sounds like quite a special use-case, and why not simply enable >> >> >> CONFIG_PINCTRL in that case then? >> >> > >> >> > PINCTRL is crucial for any SoC to even boot, so this is an option which has >> >> > to be set if that platform is enabled. >> >> >> >> Yes, but PINCTRL (framework) does not by itself do anything meaningful. >> >> You need the correct pinctrl driver. >> >> >> >> Making the various SOC's select the corresponding pinctrl drivers makes >> >> sense if it is required for booting under all circumstances. And this >> >> should then indirectly enable/select PINCTRL and anything else needed >> >> for that driver. >> > >> > If you prefer I don't mind enabling PINCTRL and the SoC-specific driver >> > (e.g. PINCTRL_IMX8MP) depending on each SoC-support, e.g. SOC_IMX35 or >> > SOC_IMX8M. >> >> For SOC_IMX35, it should be selected by default. >> >> config PINCTRL_IMX35 >> bool "IMX35 pinctrl driver" >> depends on OF >> depends on SOC_IMX35 || COMPILE_TEST >> default SOC_IMX35 >> >> For the IMX8M* SoC's, that is not done, as there is only a common >> SOC_IMX8M config entry, which corresponds to multiple pinctrl drivers, >> which we probably don't want to select all of by default. > > Well, is the SoC support is enabled, it makes totally sense to enable a > crucial driver like pinctrl by default. It's still deselectable after > all. Yes. But now I think I figured out what I was missing here. In order for the patch to achieve something meaningful, it is not enough to select PINCTRL from ARCH_MXC. You should add default statements to the various related SoC specific pinctrl drivers. For example config PINCTRL_IMX8MP tristate "IMX8MP pinctrl driver" depends on OF depends on SOC_IMX8M || COMPILE_TEST default SOC_IMX8M select PINCTRL_IMX help Say Y here to enable the imx8mp pinctrl driver This aligns with the way it is done for the arch/arm pinctrl drivers, and will automatically enable the relevant SoC pinctrl drivers, and still allow completely disabling pinctrl if/when that is needed. For SOC_IMX8M, 4 pinctrl drivers will be selected. /Esben ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms @ 2025-05-14 12:19 Alexander Stein 0 siblings, 0 replies; 11+ messages in thread From: Alexander Stein @ 2025-05-14 12:19 UTC (permalink / raw) To: Catalin Marinas, Will Deacon Cc: Alexander Stein, linux-arm-kernel, linux-kernel Select PINCTRL for NXP i.MX SoCs. Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index a541bb029aa4e..49c3bc25e5f68 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -219,6 +219,7 @@ config ARCH_MXC select ARM64_ERRATUM_845719 if COMPAT select IMX_GPCV2 select IMX_GPCV2_PM_DOMAINS + select PINCTRL select PM select PM_GENERIC_DOMAINS select SOC_BUS -- 2.43.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-05-14 12:20 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-05-07 12:44 [PATCH 1/1] arm64: Kconfig: Enable PINCTRL on i.MX platforms Alexander Stein 2025-05-07 14:30 ` Stefan Wahren 2025-05-08 5:52 ` Alexander Stein 2025-05-08 6:44 ` Esben Haabendal 2025-05-08 8:07 ` Alexander Stein 2025-05-08 8:18 ` Esben Haabendal 2025-05-08 12:25 ` Alexander Stein 2025-05-08 12:43 ` Esben Haabendal 2025-05-08 13:18 ` Alexander Stein 2025-05-08 17:09 ` Esben Haabendal -- strict thread matches above, loose matches on Subject: below -- 2025-05-14 12:19 Alexander Stein
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox