diff mbox series

[2/2] mips: ralink: make SOC_MT7621 select PINCTRL

Message ID 20230221092435.22069-2-arinc.unal@arinc9.com (mailing list archive)
State Accepted
Commit 27fd82726995bd75b68df9ce6a1eda8f6b3ad498
Headers show
Series [1/2] mips: remove SYS_HAS_CPU_MIPS32_R1 from RALINK | expand

Commit Message

Arınç ÜNAL Feb. 21, 2023, 9:24 a.m. UTC
From: Arınç ÜNAL <arinc.unal@arinc9.com>

Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
uses pinctrl. Because of this, PINCTRL is not selected at all. Make
SOC_MT7621 select PINCTRL.

Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
the PINCTRL_MT7621 option.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 arch/mips/ralink/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergio Paracuellos Feb. 21, 2023, 9:38 a.m. UTC | #1
Hi Arınç,

On Tue, Feb 21, 2023 at 10:24 AM <arinc9.unal@gmail.com> wrote:
>
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>
> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
> SOC_MT7621 select PINCTRL.
>
> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
> the PINCTRL_MT7621 option.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/ralink/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> index 06031796c87b..83e61e147b90 100644
> --- a/arch/mips/ralink/Kconfig
> +++ b/arch/mips/ralink/Kconfig
> @@ -54,7 +54,7 @@ choice
>                 select HAVE_PCI
>                 select PCI_DRIVERS_GENERIC
>                 select SOC_BUS
> -               select PINCTRL_MT7621
> +               select PINCTRL
>
>                 help
>                   The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
> --
> 2.37.2
>

Which git tree are you working against? CONFIG_SOC_MT7621 is not
selecting PINCTRL_MT7621 at all in v6.2 [0]. I think it should select
'PINCTRL_MT7621' and the 'select PINCTRL' stuff added inside the
PINCTRL_RALINK option in [1].

Am I missing something?

Thanks,
    Sergio Paracuellos

[0]: https://elixir.bootlin.com/linux/v6.2/source/arch/mips/ralink/Kconfig
[1]: https://elixir.bootlin.com/linux/v6.2/source/drivers/pinctrl/ralink/Kconfig#L5
Arınç ÜNAL Feb. 21, 2023, 10:09 a.m. UTC | #2
On 21.02.2023 12:38, Sergio Paracuellos wrote:
> Hi Arınç,
> 
> On Tue, Feb 21, 2023 at 10:24 AM <arinc9.unal@gmail.com> wrote:
>>
>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>
>> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
>> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
>> SOC_MT7621 select PINCTRL.
>>
>> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
>> the PINCTRL_MT7621 option.
>>
>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>> ---
>>   arch/mips/ralink/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
>> index 06031796c87b..83e61e147b90 100644
>> --- a/arch/mips/ralink/Kconfig
>> +++ b/arch/mips/ralink/Kconfig
>> @@ -54,7 +54,7 @@ choice
>>                  select HAVE_PCI
>>                  select PCI_DRIVERS_GENERIC
>>                  select SOC_BUS
>> -               select PINCTRL_MT7621
>> +               select PINCTRL
>>
>>                  help
>>                    The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
>> --
>> 2.37.2
>>
> 
> Which git tree are you working against? CONFIG_SOC_MT7621 is not
> selecting PINCTRL_MT7621 at all in v6.2 [0]. I think it should select

mips/linux.git mips-next tree.

https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/log/

> 'PINCTRL_MT7621' and the 'select PINCTRL' stuff added inside the
> PINCTRL_RALINK option in [1].

I'm working on that, although not exactly the way you describe here, on 
this branch of mine.

https://github.com/arinc9/linux/commits/ralink-pinctrl

Arınç
Sergio Paracuellos Feb. 21, 2023, 10:21 a.m. UTC | #3
On Tue, Feb 21, 2023 at 11:09 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> On 21.02.2023 12:38, Sergio Paracuellos wrote:
> > Hi Arınç,
> >
> > On Tue, Feb 21, 2023 at 10:24 AM <arinc9.unal@gmail.com> wrote:
> >>
> >> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> >>
> >> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
> >> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
> >> SOC_MT7621 select PINCTRL.
> >>
> >> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
> >> the PINCTRL_MT7621 option.
> >>
> >> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> >> ---
> >>   arch/mips/ralink/Kconfig | 2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> >> index 06031796c87b..83e61e147b90 100644
> >> --- a/arch/mips/ralink/Kconfig
> >> +++ b/arch/mips/ralink/Kconfig
> >> @@ -54,7 +54,7 @@ choice
> >>                  select HAVE_PCI
> >>                  select PCI_DRIVERS_GENERIC
> >>                  select SOC_BUS
> >> -               select PINCTRL_MT7621
> >> +               select PINCTRL
> >>
> >>                  help
> >>                    The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
> >> --
> >> 2.37.2
> >>
> >
> > Which git tree are you working against? CONFIG_SOC_MT7621 is not
> > selecting PINCTRL_MT7621 at all in v6.2 [0]. I think it should select
>
> mips/linux.git mips-next tree.
>
> https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/log/

I see :). Thanks!

>
> > 'PINCTRL_MT7621' and the 'select PINCTRL' stuff added inside the
> > PINCTRL_RALINK option in [1].
>
> I'm working on that, although not exactly the way you describe here, on
> this branch of mine.

So, in which way do you get PINCTRL_MT7621 automatically selected for
this SoC now? I think looking into the Kconfig for ralink pinctrl [0]
all of them at the end need the missing PINCTRL option to be added and
all of them are currently selecting PINCTRL_RALINK . Hence just adding
the PINCTRL option inside PINCTRL_RALINK looks convenient.

>
> https://github.com/arinc9/linux/commits/ralink-pinctrl

Wow! Tons of changes here ;-). Keep going!!

>
> Arınç

Best regards,
    Sergio Paracuellos

[0]: https://elixir.bootlin.com/linux/v6.2/source/drivers/pinctrl/ralink/Kconfig
Arınç ÜNAL Feb. 21, 2023, 10:54 a.m. UTC | #4
On 21.02.2023 13:21, Sergio Paracuellos wrote:
> On Tue, Feb 21, 2023 at 11:09 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>>
>> On 21.02.2023 12:38, Sergio Paracuellos wrote:
>>> Hi Arınç,
>>>
>>> On Tue, Feb 21, 2023 at 10:24 AM <arinc9.unal@gmail.com> wrote:
>>>>
>>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>
>>>> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
>>>> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
>>>> SOC_MT7621 select PINCTRL.
>>>>
>>>> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
>>>> the PINCTRL_MT7621 option.
>>>>
>>>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>> ---
>>>>    arch/mips/ralink/Kconfig | 2 +-
>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
>>>> index 06031796c87b..83e61e147b90 100644
>>>> --- a/arch/mips/ralink/Kconfig
>>>> +++ b/arch/mips/ralink/Kconfig
>>>> @@ -54,7 +54,7 @@ choice
>>>>                   select HAVE_PCI
>>>>                   select PCI_DRIVERS_GENERIC
>>>>                   select SOC_BUS
>>>> -               select PINCTRL_MT7621
>>>> +               select PINCTRL
>>>>
>>>>                   help
>>>>                     The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
>>>> --
>>>> 2.37.2
>>>>
>>>
>>> Which git tree are you working against? CONFIG_SOC_MT7621 is not
>>> selecting PINCTRL_MT7621 at all in v6.2 [0]. I think it should select
>>
>> mips/linux.git mips-next tree.
>>
>> https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/log/
> 
> I see :). Thanks!
> 
>>
>>> 'PINCTRL_MT7621' and the 'select PINCTRL' stuff added inside the
>>> PINCTRL_RALINK option in [1].
>>
>> I'm working on that, although not exactly the way you describe here, on
>> this branch of mine.
> 
> So, in which way do you get PINCTRL_MT7621 automatically selected for
> this SoC now? I think looking into the Kconfig for ralink pinctrl [0]
> all of them at the end need the missing PINCTRL option to be added and
> all of them are currently selecting PINCTRL_RALINK . Hence just adding
> the PINCTRL option inside PINCTRL_RALINK looks convenient.

PINCTRL_RALINK won't appear on the menuconfig unless PINCTRL is enabled. 
So this'd be pointless.

 From what I see on other MIPS and ARM platforms, PINCTRL is supposed to 
be enabled at the platform option, like CONFIG_RALINK. However, the 
Ralink SoCs except MT7621, or rather the DTs for them, do not use the 
pinctrl driver so I only enable it for MT7621, and keep it optional for 
the remaining SoCs.

MediaTek pinctrl kconfig enables the pinctrl driver specific to the SoC 
by default, if the said SoC is enabled. I'm keeping this method when 
moving ralink pinctrl to mediatek with the series below.

So once the pinctrl driver is defined on the DTs for the remaining SoCs, 
we can just put PINCTRL under CONFIG_RALINK and everything will work fine.

> 
>>
>> https://github.com/arinc9/linux/commits/ralink-pinctrl
> 
> Wow! Tons of changes here ;-). Keep going!!

Thanks a lot, I've started to refactor everything Ralink. With this 
series, I finalise the work on pinctrl.

Arınç
Sergio Paracuellos Feb. 21, 2023, 3:33 p.m. UTC | #5
On Tue, Feb 21, 2023 at 11:54 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> On 21.02.2023 13:21, Sergio Paracuellos wrote:
> > On Tue, Feb 21, 2023 at 11:09 AM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> >>
> >> On 21.02.2023 12:38, Sergio Paracuellos wrote:
> >>> Hi Arınç,
> >>>
> >>> On Tue, Feb 21, 2023 at 10:24 AM <arinc9.unal@gmail.com> wrote:
> >>>>
> >>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> >>>>
> >>>> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
> >>>> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
> >>>> SOC_MT7621 select PINCTRL.
> >>>>
> >>>> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
> >>>> the PINCTRL_MT7621 option.
> >>>>
> >>>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> >>>> ---
> >>>>    arch/mips/ralink/Kconfig | 2 +-
> >>>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> >>>> index 06031796c87b..83e61e147b90 100644
> >>>> --- a/arch/mips/ralink/Kconfig
> >>>> +++ b/arch/mips/ralink/Kconfig
> >>>> @@ -54,7 +54,7 @@ choice
> >>>>                   select HAVE_PCI
> >>>>                   select PCI_DRIVERS_GENERIC
> >>>>                   select SOC_BUS
> >>>> -               select PINCTRL_MT7621
> >>>> +               select PINCTRL
> >>>>
> >>>>                   help
> >>>>                     The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
> >>>> --
> >>>> 2.37.2
> >>>>
> >>>
> >>> Which git tree are you working against? CONFIG_SOC_MT7621 is not
> >>> selecting PINCTRL_MT7621 at all in v6.2 [0]. I think it should select
> >>
> >> mips/linux.git mips-next tree.
> >>
> >> https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/log/
> >
> > I see :). Thanks!
> >
> >>
> >>> 'PINCTRL_MT7621' and the 'select PINCTRL' stuff added inside the
> >>> PINCTRL_RALINK option in [1].
> >>
> >> I'm working on that, although not exactly the way you describe here, on
> >> this branch of mine.
> >
> > So, in which way do you get PINCTRL_MT7621 automatically selected for
> > this SoC now? I think looking into the Kconfig for ralink pinctrl [0]
> > all of them at the end need the missing PINCTRL option to be added and
> > all of them are currently selecting PINCTRL_RALINK . Hence just adding
> > the PINCTRL option inside PINCTRL_RALINK looks convenient.
>
> PINCTRL_RALINK won't appear on the menuconfig unless PINCTRL is enabled.
> So this'd be pointless.

Oh, yes. You are totally right. My bad here, sorry for the noise.

>
>  From what I see on other MIPS and ARM platforms, PINCTRL is supposed to
> be enabled at the platform option, like CONFIG_RALINK. However, the
> Ralink SoCs except MT7621, or rather the DTs for them, do not use the
> pinctrl driver so I only enable it for MT7621, and keep it optional for
> the remaining SoCs.
>
> MediaTek pinctrl kconfig enables the pinctrl driver specific to the SoC
> by default, if the said SoC is enabled. I'm keeping this method when
> moving ralink pinctrl to mediatek with the series below.
>
> So once the pinctrl driver is defined on the DTs for the remaining SoCs,
> we can just put PINCTRL under CONFIG_RALINK and everything will work fine.

Sounds good, then. Thanks!

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

>
> >
> >>
> >> https://github.com/arinc9/linux/commits/ralink-pinctrl
> >
> > Wow! Tons of changes here ;-). Keep going!!
>
> Thanks a lot, I've started to refactor everything Ralink. With this
> series, I finalise the work on pinctrl.
>
> Arınç

Best regards,
    Sergio Paracuellos
Thomas Bogendoerfer Feb. 27, 2023, 10:55 p.m. UTC | #6
On Tue, Feb 21, 2023 at 12:24:35PM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> Currently, out of every Ralink SoC, only the dt-binding of the MT7621 SoC
> uses pinctrl. Because of this, PINCTRL is not selected at all. Make
> SOC_MT7621 select PINCTRL.
> 
> Remove PINCTRL_MT7621, enabling it for the MT7621 SoC will be handled under
> the PINCTRL_MT7621 option.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/ralink/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
> index 06031796c87b..83e61e147b90 100644
> --- a/arch/mips/ralink/Kconfig
> +++ b/arch/mips/ralink/Kconfig
> @@ -54,7 +54,7 @@ choice
>  		select HAVE_PCI
>  		select PCI_DRIVERS_GENERIC
>  		select SOC_BUS
> -		select PINCTRL_MT7621
> +		select PINCTRL
>  
>  		help
>  		  The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc
> -- 
> 2.37.2

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
index 06031796c87b..83e61e147b90 100644
--- a/arch/mips/ralink/Kconfig
+++ b/arch/mips/ralink/Kconfig
@@ -54,7 +54,7 @@  choice
 		select HAVE_PCI
 		select PCI_DRIVERS_GENERIC
 		select SOC_BUS
-		select PINCTRL_MT7621
+		select PINCTRL
 
 		help
 		  The MT7621 system-on-a-chip includes an 880 MHz MIPS1004Kc