public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix syscfg-pctl compatible for MT8516
@ 2026-02-06 10:20 Luca Weiss
  2026-02-06 10:20 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg Luca Weiss
  2026-02-06 10:20 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible Luca Weiss
  0 siblings, 2 replies; 9+ messages in thread
From: Luca Weiss @ 2026-02-06 10:20 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, phone-devel
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	Luca Weiss

Address a dtbs_check warning on MT8516 by introducing a new compatible
for the syscon.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
Luca Weiss (2):
      dt-bindings: mfd: syscon: Add mt8516-syscfg
      arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible

 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 arch/arm64/boot/dts/mediatek/mt8516.dtsi          | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
---
base-commit: 9845cf73f7db6094c0d8419d6adb848028f4a921
change-id: 20260206-mt8516-syscfg-syscon-6e5d1b0a68e2

Best regards,
-- 
Luca Weiss <luca@lucaweiss.eu>



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

* [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-06 10:20 [PATCH 0/2] Fix syscfg-pctl compatible for MT8516 Luca Weiss
@ 2026-02-06 10:20 ` Luca Weiss
  2026-02-07 10:51   ` Krzysztof Kozlowski
  2026-02-06 10:20 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible Luca Weiss
  1 sibling, 1 reply; 9+ messages in thread
From: Luca Weiss @ 2026-02-06 10:20 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, phone-devel
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	Luca Weiss

Document the Mediatek mt8516-syscfg.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index e57add2bacd3..a67699f1faee 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -91,6 +91,7 @@ select:
           - mediatek,mt8135-pctl-b-syscfg
           - mediatek,mt8173-pctl-a-syscfg
           - mediatek,mt8365-syscfg
+          - mediatek,mt8516-syscfg
           - microchip,lan966x-cpu-syscon
           - microchip,mpfs-control-scb
           - microchip,mpfs-sysreg-scb
@@ -204,6 +205,7 @@ properties:
               - mediatek,mt8173-pctl-a-syscfg
               - mediatek,mt8365-infracfg-nao
               - mediatek,mt8365-syscfg
+              - mediatek,mt8516-syscfg
               - microchip,lan966x-cpu-syscon
               - microchip,mpfs-control-scb
               - microchip,mpfs-sysreg-scb

-- 
2.52.0



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

* [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible
  2026-02-06 10:20 [PATCH 0/2] Fix syscfg-pctl compatible for MT8516 Luca Weiss
  2026-02-06 10:20 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg Luca Weiss
@ 2026-02-06 10:20 ` Luca Weiss
  2026-02-07 10:51   ` Krzysztof Kozlowski
  1 sibling, 1 reply; 9+ messages in thread
From: Luca Weiss @ 2026-02-06 10:20 UTC (permalink / raw)
  To: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, phone-devel
  Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
	Luca Weiss

Just 'syscon' is not allowed by the dt-bindings, so add
mediatek,mt8516-syscfg to it.

Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
 arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/mediatek/mt8516.dtsi b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
index b5e753759465..67836407d0cc 100644
--- a/arch/arm64/boot/dts/mediatek/mt8516.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8516.dtsi
@@ -232,7 +232,7 @@ keypad: keypad@10002000 {
 		};
 
 		syscfg_pctl: syscfg-pctl@10005000 {
-			compatible = "syscon";
+			compatible = "mediatek,mt8516-syscfg", "syscon";
 			reg = <0 0x10005000 0 0x1000>;
 		};
 

-- 
2.52.0



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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-06 10:20 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg Luca Weiss
@ 2026-02-07 10:51   ` Krzysztof Kozlowski
  2026-02-09 11:34     ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-07 10:51 UTC (permalink / raw)
  To: Luca Weiss
  Cc: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, phone-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Fri, Feb 06, 2026 at 11:20:48AM +0100, Luca Weiss wrote:
> Document the Mediatek mt8516-syscfg.

Which is what? What is syscfg block?

> 
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
> ---
>  Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
> index e57add2bacd3..a67699f1faee 100644
> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
> @@ -91,6 +91,7 @@ select:
>            - mediatek,mt8135-pctl-b-syscfg
>            - mediatek,mt8173-pctl-a-syscfg
>            - mediatek,mt8365-syscfg
> +          - mediatek,mt8516-syscfg

Why aren't you placing it with all others mediatek,mt8516 syscons?

Why this is so generically called "syscfg", completely not looking like
a real name from datasheet unlike the others in this device.

You have entire commit msg to explain that.

Best regards,
Krzysztof



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

* Re: [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible
  2026-02-06 10:20 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible Luca Weiss
@ 2026-02-07 10:51   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-07 10:51 UTC (permalink / raw)
  To: Luca Weiss
  Cc: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
	AngeloGioacchino Del Regno, phone-devel, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek

On Fri, Feb 06, 2026 at 11:20:49AM +0100, Luca Weiss wrote:
> Just 'syscon' is not allowed by the dt-bindings, so add
> mediatek,mt8516-syscfg to it.

We also do not allow to add fake hardware description, so above is not
enough.

Best regards,
Krzysztof



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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-07 10:51   ` Krzysztof Kozlowski
@ 2026-02-09 11:34     ` AngeloGioacchino Del Regno
  2026-02-09 20:45       ` Luca Weiss
  0 siblings, 1 reply; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-02-09 11:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Luca Weiss
  Cc: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, phone-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Il 07/02/26 11:51, Krzysztof Kozlowski ha scritto:
> On Fri, Feb 06, 2026 at 11:20:48AM +0100, Luca Weiss wrote:
>> Document the Mediatek mt8516-syscfg.
> 
> Which is what? What is syscfg block?
> 

Not sure this is really a SYSCFG block.

This should be a GPIO controller range, which is split between IOCFG and EINT.
Now, the legacy drivers are declaring the EINT iospace in the pinctrl node, and
getting the GPIO controller (IOCFG) iospace from a regmap.

I don't have any board with MT8516... but well, the really-right-thing to do
would be to migrate that SoC off of the legacy driver, to the new-style one
that *properly* takes two iospaces:
"base" -> (0x10005000)
"eint" -> (0x1000b000)

Luca, if you've got such a board, could you please try to migrate this SoC out
of the improper (but working good) driver and bindings?

If not... well, I think this block is IOCFG, not SYSCFG...

Cheers,
Angelo

>>
>> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
>> ---
>>   Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> index e57add2bacd3..a67699f1faee 100644
>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
>> @@ -91,6 +91,7 @@ select:
>>             - mediatek,mt8135-pctl-b-syscfg
>>             - mediatek,mt8173-pctl-a-syscfg
>>             - mediatek,mt8365-syscfg
>> +          - mediatek,mt8516-syscfg
> 
> Why aren't you placing it with all others mediatek,mt8516 syscons?
> 
> Why this is so generically called "syscfg", completely not looking like
> a real name from datasheet unlike the others in this device.
> 
> You have entire commit msg to explain that.
> 
> Best regards,
> Krzysztof
> 




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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-09 11:34     ` AngeloGioacchino Del Regno
@ 2026-02-09 20:45       ` Luca Weiss
  2026-02-10 10:51         ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 9+ messages in thread
From: Luca Weiss @ 2026-02-09 20:45 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Krzysztof Kozlowski
  Cc: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, phone-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Hi AngeloGioacchino,

On 09-02-2026 12:34, AngeloGioacchino Del Regno wrote:
> Il 07/02/26 11:51, Krzysztof Kozlowski ha scritto:
>> On Fri, Feb 06, 2026 at 11:20:48AM +0100, Luca Weiss wrote:
>>> Document the Mediatek mt8516-syscfg.
>>
>> Which is what? What is syscfg block?
>>
> 
> Not sure this is really a SYSCFG block.
> 
> This should be a GPIO controller range, which is split between IOCFG and 
> EINT.
> Now, the legacy drivers are declaring the EINT iospace in the pinctrl 
> node, and
> getting the GPIO controller (IOCFG) iospace from a regmap.
> 
> I don't have any board with MT8516... but well, the really-right-thing 
> to do
> would be to migrate that SoC off of the legacy driver, to the new-style one
> that *properly* takes two iospaces:
> "base" -> (0x10005000)
> "eint" -> (0x1000b000)
> 
> Luca, if you've got such a board, could you please try to migrate this 
> SoC out
> of the improper (but working good) driver and bindings?
> 
> If not... well, I think this block is IOCFG, not SYSCFG...

Thanks for the suggestions. This is essentially my first Mediatek patch 
and while I'd say I have a good understanding of Qualcomm SoCs, Mediatek 
is very different, so I've got no clue about anything here really ;)

I'll try to decipher your comment and see what I can do about it, 
hopefully soon. Thanks!

Regards
Luca

> 
> Cheers,
> Angelo
> 
>>>
>>> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
>>> ---
>>>   Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/ 
>>> Documentation/devicetree/bindings/mfd/syscon.yaml
>>> index e57add2bacd3..a67699f1faee 100644
>>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
>>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
>>> @@ -91,6 +91,7 @@ select:
>>>             - mediatek,mt8135-pctl-b-syscfg
>>>             - mediatek,mt8173-pctl-a-syscfg
>>>             - mediatek,mt8365-syscfg
>>> +          - mediatek,mt8516-syscfg
>>
>> Why aren't you placing it with all others mediatek,mt8516 syscons?
>>
>> Why this is so generically called "syscfg", completely not looking like
>> a real name from datasheet unlike the others in this device.
>>
>> You have entire commit msg to explain that.
>>
>> Best regards,
>> Krzysztof
>>
> 
> 



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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-09 20:45       ` Luca Weiss
@ 2026-02-10 10:51         ` AngeloGioacchino Del Regno
  2026-02-24  9:25           ` Re: " Luca Leonardo Scorcia
  0 siblings, 1 reply; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2026-02-10 10:51 UTC (permalink / raw)
  To: Luca Weiss, Krzysztof Kozlowski
  Cc: ~postmarketos/upstreaming, Lee Jones, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, phone-devel,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

Il 09/02/26 21:45, Luca Weiss ha scritto:
> Hi AngeloGioacchino,
> 
> On 09-02-2026 12:34, AngeloGioacchino Del Regno wrote:
>> Il 07/02/26 11:51, Krzysztof Kozlowski ha scritto:
>>> On Fri, Feb 06, 2026 at 11:20:48AM +0100, Luca Weiss wrote:
>>>> Document the Mediatek mt8516-syscfg.
>>>
>>> Which is what? What is syscfg block?
>>>
>>
>> Not sure this is really a SYSCFG block.
>>
>> This should be a GPIO controller range, which is split between IOCFG and EINT.
>> Now, the legacy drivers are declaring the EINT iospace in the pinctrl node, and
>> getting the GPIO controller (IOCFG) iospace from a regmap.
>>
>> I don't have any board with MT8516... but well, the really-right-thing to do
>> would be to migrate that SoC off of the legacy driver, to the new-style one
>> that *properly* takes two iospaces:
>> "base" -> (0x10005000)
>> "eint" -> (0x1000b000)
>>
>> Luca, if you've got such a board, could you please try to migrate this SoC out
>> of the improper (but working good) driver and bindings?
>>
>> If not... well, I think this block is IOCFG, not SYSCFG...
> 
> Thanks for the suggestions. This is essentially my first Mediatek patch and while 
> I'd say I have a good understanding of Qualcomm SoCs, Mediatek is very different, 
> so I've got no clue about anything here really ;)
> 
> I'll try to decipher your comment and see what I can do about it, hopefully soon. 
> Thanks!
> 

Oh, okay. You want to check mt6795.dtsi - that's a SoC that has "more or less" the
same generation of GPIO Controller IP as MT8516.

Also, useless to say, drivers/pinctrl/mediatek ... there's a pinctrl-moore and a
pinctrl-paris; your SoC *should* be paris, but I don't really know - you want to
definitely check if the register layout matches between the old-legacy-deprecated
driver and the Paris IP.

Check a bit; should you have any question, either reply here or shoot me an email,
I'll do anything I can (though probably with late replies, as I'm usually a bit
busy with work - but no worries about disturbing in any way!) to clarify things
for you.

Cheers,
Angelo

> Regards
> Luca
> 
>>
>> Cheers,
>> Angelo
>>
>>>>
>>>> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
>>>> ---
>>>>   Documentation/devicetree/bindings/mfd/syscon.yaml | 2 ++
>>>>   1 file changed, 2 insertions(+)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/ 
>>>> Documentation/devicetree/bindings/mfd/syscon.yaml
>>>> index e57add2bacd3..a67699f1faee 100644
>>>> --- a/Documentation/devicetree/bindings/mfd/syscon.yaml
>>>> +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
>>>> @@ -91,6 +91,7 @@ select:
>>>>             - mediatek,mt8135-pctl-b-syscfg
>>>>             - mediatek,mt8173-pctl-a-syscfg
>>>>             - mediatek,mt8365-syscfg
>>>> +          - mediatek,mt8516-syscfg
>>>
>>> Why aren't you placing it with all others mediatek,mt8516 syscons?
>>>
>>> Why this is so generically called "syscfg", completely not looking like
>>> a real name from datasheet unlike the others in this device.
>>>
>>> You have entire commit msg to explain that.
>>>
>>> Best regards,
>>> Krzysztof
>>>
>>
>>
> 


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

* Re: Re: Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg
  2026-02-10 10:51         ` AngeloGioacchino Del Regno
@ 2026-02-24  9:25           ` Luca Leonardo Scorcia
  0 siblings, 0 replies; 9+ messages in thread
From: Luca Leonardo Scorcia @ 2026-02-24  9:25 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Krzysztof Kozlowski, Luca Leonardo Scorcia, Matthias Brugger,
	AngeloGioacchino Del Regno, linux-kernel, linux-arm-kernel

Hi, I have successfully migrated the old driver to the pinctrl-paris platform.
It turned out that 10005000 is the actual pinctrl register while 1000b000 is
only used to configure eint. Once that was clear, adapting the driver was
mostly a matter of being careful with offsets.
Also there's a couple of obvious typos in the current maps that I fixed.

Before I send in the patches I'd like a hint on how to package the changes as
I hit a small issue.

mt8167.dtsi includes mt8516.dtsi as they're very similar SoCs. They both
currently define their pinctrl node like this:

  syscfg_pctl: syscfg-pctl@10005000 {
    compatible = "syscon";
    reg = <0 0x10005000 0 0x1000>;
  };

  pio: pinctrl@1000b000 {
    [...]
    reg = <0 0x1000b000 0 0x1000>;
    mediatek,pctl-regmap = <&syscfg_pctl>;
    [...]
  }

With the paris-based driver, mt8167.dtsi changes as follows:

  pio: pinctrl@10005000 {
    [...]
    reg = <0 0x10005000 0 0x1000>, <0 0x1000b000 0 0x1000>;
    reg-names = "base", "eint";
    [...]
  }

After this change, the dtsi compiler rightly complains that the pio name is
used for two different nodes.

I am evaluating the following options:

1. I could edit the mt8516.dtsi to change its address in the name too and it
_should_ still work, but I don't have a mt8516 board to actually test it.
This however causes some dtbs warnings as the mediatek,pctl-regmap entry is
not allowed by the paris driver. Cleaning the documentation would be tricky.

2. I could use /delete-node/ in mt8167 to remove the entry coming from mt8516.
Ugly but does the job.

3. I could break the dependency of mt8167 from mt8516, this would mean
duplicating some dts nodes but might be cleaner in the end. Still it's
useful to know that those two SoC are mostly the same.

4. Lastly, I could migrate mt8516 to the paris driver too. With no board
to test it and no datasheet however that's a bit risky.

Do you have any suggestion or preference?

Also, one last small question re: documentation. Would it be better to create
a separate yaml file for this pinctrl or to add a compatible to one of the
existing ones? I am looking at mt6795-pinctrl in particular.

Thanks for your help!


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

end of thread, other threads:[~2026-02-24  9:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 10:20 [PATCH 0/2] Fix syscfg-pctl compatible for MT8516 Luca Weiss
2026-02-06 10:20 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add mt8516-syscfg Luca Weiss
2026-02-07 10:51   ` Krzysztof Kozlowski
2026-02-09 11:34     ` AngeloGioacchino Del Regno
2026-02-09 20:45       ` Luca Weiss
2026-02-10 10:51         ` AngeloGioacchino Del Regno
2026-02-24  9:25           ` Re: " Luca Leonardo Scorcia
2026-02-06 10:20 ` [PATCH 2/2] arm64: dts: mediatek: mt8516: fix syscfg-pctl compatible Luca Weiss
2026-02-07 10:51   ` Krzysztof Kozlowski

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