devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] MIPS: Boston: Fix syscon devicetree binding and node
@ 2024-05-13 18:58 Jiaxun Yang
  2024-05-13 18:58 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs Jiaxun Yang
  2024-05-13 18:58 ` [PATCH 2/2] MIPS: dts: Boston: Add simple-mfd compatible Jiaxun Yang
  0 siblings, 2 replies; 9+ messages in thread
From: Jiaxun Yang @ 2024-05-13 18:58 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Burton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips, Jiaxun Yang

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
Jiaxun Yang (2):
      dt-bindings: mfd: syscon: Add img,boston-platform-regs
      MIPS: dts: Boston: Add simple-mfd compatible

 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 arch/mips/boot/dts/img/boston.dts                 | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
---
base-commit: 6ba6c795dc73c22ce2c86006f17c4aa802db2a60
change-id: 20240513-boston-syscon-8e315e94a894

Best regards,
-- 
Jiaxun Yang <jiaxun.yang@flygoat.com>


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

* [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-13 18:58 [PATCH 0/2] MIPS: Boston: Fix syscon devicetree binding and node Jiaxun Yang
@ 2024-05-13 18:58 ` Jiaxun Yang
  2024-05-14  9:08   ` Krzysztof Kozlowski
  2024-05-13 18:58 ` [PATCH 2/2] MIPS: dts: Boston: Add simple-mfd compatible Jiaxun Yang
  1 sibling, 1 reply; 9+ messages in thread
From: Jiaxun Yang @ 2024-05-13 18:58 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Burton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips, Jiaxun Yang

This compatible has been used in arch/mips/boot/dts/img/boston.dts
for a while but never documented properly.

Add it to simple syscon binding.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml
index 7ed12a938baa..034765e6a37b 100644
--- a/Documentation/devicetree/bindings/mfd/syscon.yaml
+++ b/Documentation/devicetree/bindings/mfd/syscon.yaml
@@ -57,6 +57,7 @@ properties:
               - hisilicon,pcie-sas-subctrl
               - hisilicon,peri-subctrl
               - hpe,gxp-sysreg
+              - img,boston-platform-regs
               - intel,lgm-syscon
               - loongson,ls1b-syscon
               - loongson,ls1c-syscon

-- 
2.34.1


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

* [PATCH 2/2] MIPS: dts: Boston: Add simple-mfd compatible
  2024-05-13 18:58 [PATCH 0/2] MIPS: Boston: Fix syscon devicetree binding and node Jiaxun Yang
  2024-05-13 18:58 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs Jiaxun Yang
@ 2024-05-13 18:58 ` Jiaxun Yang
  1 sibling, 0 replies; 9+ messages in thread
From: Jiaxun Yang @ 2024-05-13 18:58 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Paul Burton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips, Jiaxun Yang

We certainly want subnodes of system-controller node to
be populated, add simple-mfd compatible to make that happen.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/boot/dts/img/boston.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/dts/img/boston.dts b/arch/mips/boot/dts/img/boston.dts
index 72f7605d2e31..f7a2c46f1eb8 100644
--- a/arch/mips/boot/dts/img/boston.dts
+++ b/arch/mips/boot/dts/img/boston.dts
@@ -203,7 +203,7 @@ cpc@16200000 {
 	};
 
 	plat_regs: system-controller@17ffd000 {
-		compatible = "img,boston-platform-regs", "syscon";
+		compatible = "img,boston-platform-regs", "syscon", "simple-mfd";
 		reg = <0x17ffd000 0x1000>;
 
 		clk_boston: clock {

-- 
2.34.1


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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-13 18:58 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs Jiaxun Yang
@ 2024-05-14  9:08   ` Krzysztof Kozlowski
  2024-05-14  9:11     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-14  9:08 UTC (permalink / raw)
  To: Jiaxun Yang, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Burton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips

On 13/05/2024 20:58, Jiaxun Yang wrote:
> This compatible has been used in arch/mips/boot/dts/img/boston.dts
> for a while but never documented properly.
> 
> Add it to simple syscon binding.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> ---
>  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +

It is documented in clock/img,boston-clock.txt. Please fix/convert/work
on that.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-14  9:08   ` Krzysztof Kozlowski
@ 2024-05-14  9:11     ` Krzysztof Kozlowski
  2024-05-15 21:44       ` Jiaxun Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-14  9:11 UTC (permalink / raw)
  To: Jiaxun Yang, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Paul Burton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips

On 14/05/2024 11:08, Krzysztof Kozlowski wrote:
> On 13/05/2024 20:58, Jiaxun Yang wrote:
>> This compatible has been used in arch/mips/boot/dts/img/boston.dts
>> for a while but never documented properly.
>>
>> Add it to simple syscon binding.
>>
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> ---
>>  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
> 
> It is documented in clock/img,boston-clock.txt. Please fix/convert/work
> on that.

No, that's different device.

Anyway, this is wrong - does no work with your second patch. Please test
them before sending.

You need proper, dedicated schema.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-14  9:11     ` Krzysztof Kozlowski
@ 2024-05-15 21:44       ` Jiaxun Yang
  2024-05-17  8:58         ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Jiaxun Yang @ 2024-05-15 21:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, paulburton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips



在2024年5月14日五月 上午10:11,Krzysztof Kozlowski写道:
> On 14/05/2024 11:08, Krzysztof Kozlowski wrote:
>> On 13/05/2024 20:58, Jiaxun Yang wrote:
>>> This compatible has been used in arch/mips/boot/dts/img/boston.dts
>>> for a while but never documented properly.
>>>
>>> Add it to simple syscon binding.
>>>
>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>> ---
>>>  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
>> 
>> It is documented in clock/img,boston-clock.txt. Please fix/convert/work
>> on that.
>
> No, that's different device.
>
> Anyway, this is wrong - does no work with your second patch. Please test
> them before sending.

Hi Krzysztof,

Do you mind telling dumb as me how to test bindings properly?

I tried to run make check_dtbs after applying this patch and that's all
the warnings I got:
```
arch/mips/boot/dts/img/boston.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'
/home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: /: 'model' is a required property
        from schema $id: http://devicetree.org/schemas/root-node.yaml#
arch/mips/boot/dts/img/boston.dtb: /: failed to match any schema with compatible: ['img,boston']
arch/mips/boot/dts/img/boston.dtb: /cpus/cpu@0: failed to match any schema with compatible: ['img,mips']
arch/mips/boot/dts/img/boston.dtb: /system-controller@17ffd000/clock: failed to match any schema with compatible: ['img,boston-clock']
/home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: uart@17ffe000: $nodename:0: 'uart@17ffe000' does not match '^serial(@.*)?$'
        from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
```

I think there is no new warning introduced by this patch.
Did I miss anything here?

Thanks
- Jiaxun
>
> You need proper, dedicated schema.
>
> Best regards,
> Krzysztof

-- 
- Jiaxun

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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-15 21:44       ` Jiaxun Yang
@ 2024-05-17  8:58         ` Krzysztof Kozlowski
  2024-05-17 10:15           ` Jiaxun Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-17  8:58 UTC (permalink / raw)
  To: Jiaxun Yang, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, paulburton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips

On 15/05/2024 23:44, Jiaxun Yang wrote:
> 
> 
> 在2024年5月14日五月 上午10:11,Krzysztof Kozlowski写道:
>> On 14/05/2024 11:08, Krzysztof Kozlowski wrote:
>>> On 13/05/2024 20:58, Jiaxun Yang wrote:
>>>> This compatible has been used in arch/mips/boot/dts/img/boston.dts
>>>> for a while but never documented properly.
>>>>
>>>> Add it to simple syscon binding.
>>>>
>>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>>> ---
>>>>  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
>>>
>>> It is documented in clock/img,boston-clock.txt. Please fix/convert/work
>>> on that.
>>
>> No, that's different device.
>>
>> Anyway, this is wrong - does no work with your second patch. Please test
>> them before sending.
> 
> Hi Krzysztof,
> 
> Do you mind telling dumb as me how to test bindings properly?
> 
> I tried to run make check_dtbs after applying this patch and that's all
> the warnings I got:
> ```
> arch/mips/boot/dts/img/boston.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'
> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: /: 'model' is a required property
>         from schema $id: http://devicetree.org/schemas/root-node.yaml#
> arch/mips/boot/dts/img/boston.dtb: /: failed to match any schema with compatible: ['img,boston']
> arch/mips/boot/dts/img/boston.dtb: /cpus/cpu@0: failed to match any schema with compatible: ['img,mips']
> arch/mips/boot/dts/img/boston.dtb: /system-controller@17ffd000/clock: failed to match any schema with compatible: ['img,boston-clock']
> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: uart@17ffe000: $nodename:0: 'uart@17ffe000' does not match '^serial(@.*)?$'
>         from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
> ```
> 
> I think there is no new warning introduced by this patch.
> Did I miss anything here?

Indeed there might be no warning for this, because syscon allows a lot,
including children. You need custom binding anyway.

Best regards,
Krzysztof


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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-17  8:58         ` Krzysztof Kozlowski
@ 2024-05-17 10:15           ` Jiaxun Yang
  2024-05-18 19:26             ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Jiaxun Yang @ 2024-05-17 10:15 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, paulburton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips



在2024年5月17日五月 上午9:58,Krzysztof Kozlowski写道:
> On 15/05/2024 23:44, Jiaxun Yang wrote:
>> 
>> 
>> 在2024年5月14日五月 上午10:11,Krzysztof Kozlowski写道:
>>> On 14/05/2024 11:08, Krzysztof Kozlowski wrote:
>>>> On 13/05/2024 20:58, Jiaxun Yang wrote:
>>>>> This compatible has been used in arch/mips/boot/dts/img/boston.dts
>>>>> for a while but never documented properly.
>>>>>
>>>>> Add it to simple syscon binding.
>>>>>
>>>>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>>>>> ---
>>>>>  Documentation/devicetree/bindings/mfd/syscon.yaml | 1 +
>>>>
>>>> It is documented in clock/img,boston-clock.txt. Please fix/convert/work
>>>> on that.
>>>
>>> No, that's different device.
>>>
>>> Anyway, this is wrong - does no work with your second patch. Please test
>>> them before sending.
>> 
>> Hi Krzysztof,
>> 
>> Do you mind telling dumb as me how to test bindings properly?
>> 
>> I tried to run make check_dtbs after applying this patch and that's all
>> the warnings I got:
>> ```
>> arch/mips/boot/dts/img/boston.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'
>> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: /: 'model' is a required property
>>         from schema $id: http://devicetree.org/schemas/root-node.yaml#
>> arch/mips/boot/dts/img/boston.dtb: /: failed to match any schema with compatible: ['img,boston']
>> arch/mips/boot/dts/img/boston.dtb: /cpus/cpu@0: failed to match any schema with compatible: ['img,mips']
>> arch/mips/boot/dts/img/boston.dtb: /system-controller@17ffd000/clock: failed to match any schema with compatible: ['img,boston-clock']
>> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: uart@17ffe000: $nodename:0: 'uart@17ffe000' does not match '^serial(@.*)?$'
>>         from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
>> ```
>> 
>> I think there is no new warning introduced by this patch.
>> Did I miss anything here?
>
> Indeed there might be no warning for this, because syscon allows a lot,
> including children. You need custom binding anyway.

Hi Krzysztof,

I really don't understand the reason behind having a custom binding for
such device. It even doesn't have a driver and purely rely on generic
syscon regmap to work.

I can see devices like mediatek,mt8365-syscfg being described by simple
binding have a similar nature, they all describe a register bank and with
serval sub nodes to describe devices being instanced under that register
block.

What makes img,boston-platform-regs special here?

Thanks
- Jiaxun

>
> Best regards,
> Krzysztof

-- 
- Jiaxun

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

* Re: [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs
  2024-05-17 10:15           ` Jiaxun Yang
@ 2024-05-18 19:26             ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-05-18 19:26 UTC (permalink / raw)
  To: Jiaxun Yang, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, paulburton, Thomas Bogendoerfer
  Cc: devicetree, linux-kernel, linux-mips

On 17/05/2024 12:15, Jiaxun Yang wrote:
>>>
>>> Do you mind telling dumb as me how to test bindings properly?
>>>
>>> I tried to run make check_dtbs after applying this patch and that's all
>>> the warnings I got:
>>> ```
>>> arch/mips/boot/dts/img/boston.dtb: Warning (interrupt_map): Failed prerequisite 'interrupt_provider'
>>> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: /: 'model' is a required property
>>>         from schema $id: http://devicetree.org/schemas/root-node.yaml#
>>> arch/mips/boot/dts/img/boston.dtb: /: failed to match any schema with compatible: ['img,boston']
>>> arch/mips/boot/dts/img/boston.dtb: /cpus/cpu@0: failed to match any schema with compatible: ['img,mips']
>>> arch/mips/boot/dts/img/boston.dtb: /system-controller@17ffd000/clock: failed to match any schema with compatible: ['img,boston-clock']
>>> /home/flygoat/linux-next/arch/mips/boot/dts/img/boston.dtb: uart@17ffe000: $nodename:0: 'uart@17ffe000' does not match '^serial(@.*)?$'
>>>         from schema $id: http://devicetree.org/schemas/serial/8250.yaml#
>>> ```
>>>
>>> I think there is no new warning introduced by this patch.
>>> Did I miss anything here?
>>
>> Indeed there might be no warning for this, because syscon allows a lot,
>> including children. You need custom binding anyway.
> 
> Hi Krzysztof,
> 
> I really don't understand the reason behind having a custom binding for
> such device. It even doesn't have a driver and purely rely on generic
> syscon regmap to work.
> 
> I can see devices like mediatek,mt8365-syscfg being described by simple
> binding have a similar nature, they all describe a register bank and with
> serval sub nodes to describe devices being instanced under that register
> block.
> 
> What makes img,boston-platform-regs special here?

Nothing is special here, I am in writing a patchset which will fix this
up and all will be treated similarly.

Bindings for devices should be specific, which then allows to see that
you do not have dependency of children on the parent, and your current
patch allows basically anything as a child. It allows also an
dependency, even if you did not code it.

Best regards,
Krzysztof


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

end of thread, other threads:[~2024-05-18 19:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-13 18:58 [PATCH 0/2] MIPS: Boston: Fix syscon devicetree binding and node Jiaxun Yang
2024-05-13 18:58 ` [PATCH 1/2] dt-bindings: mfd: syscon: Add img,boston-platform-regs Jiaxun Yang
2024-05-14  9:08   ` Krzysztof Kozlowski
2024-05-14  9:11     ` Krzysztof Kozlowski
2024-05-15 21:44       ` Jiaxun Yang
2024-05-17  8:58         ` Krzysztof Kozlowski
2024-05-17 10:15           ` Jiaxun Yang
2024-05-18 19:26             ` Krzysztof Kozlowski
2024-05-13 18:58 ` [PATCH 2/2] MIPS: dts: Boston: Add simple-mfd compatible Jiaxun Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).