* [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema
@ 2024-12-11 11:29 Charan Pedumuru
2024-12-16 10:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Charan Pedumuru @ 2024-12-11 11:29 UTC (permalink / raw)
To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
Cc: devicetree, linux-arm-kernel, linux-kernel, Charan Pedumuru
Convert old text based binding to json schema.
Changes during conversion:
Add a fallback for all compatibles as the IP core is compatible
with `syscon`.
Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com>
---
.../bindings/mfd/atmel,at91sam9260-matrix.yaml | 54 ++++++++++++++++++++++
.../devicetree/bindings/mfd/atmel-matrix.txt | 26 -----------
2 files changed, 54 insertions(+), 26 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
new file mode 100644
index 000000000000..0e827882823f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
@@ -0,0 +1,54 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/atmel,at91sam9260-matrix.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip AT91 Bus Matrix
+
+maintainers:
+ - Nicolas Ferre <nicolas.ferre@microchip.com>
+
+description:
+ The Bus Matrix (MATRIX) implements a multi-layer AHB, based on the
+ AHB-Lite protocol, that enables parallel access paths between multiple
+ masters and slaves in a system, thus increasing the overall bandwidth.
+
+properties:
+ compatible:
+ anyOf:
+ - items:
+ - enum:
+ - atmel,at91sam9260-matrix
+ - atmel,at91sam9261-matrix
+ - atmel,at91sam9263-matrix
+ - atmel,at91sam9rl-matrix
+ - atmel,at91sam9g45-matrix
+ - atmel,at91sam9n12-matrix
+ - atmel,at91sam9x5-matrix
+ - atmel,sama5d3-matrix
+ - const: syscon
+ - items:
+ - const: microchip,sam9x60-matrix
+ - const: atmel,at91sam9x5-matrix
+ - const: syscon
+ - items:
+ - const: microchip,sam9x7-matrix
+ - const: atmel,at91sam9x5-matrix
+ - const: syscon
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ matrix@ffffec00 {
+ compatible = "atmel,sama5d3-matrix", "syscon";
+ reg = <0xffffec00 0x200>;
+ };
diff --git a/Documentation/devicetree/bindings/mfd/atmel-matrix.txt b/Documentation/devicetree/bindings/mfd/atmel-matrix.txt
deleted file mode 100644
index 6e5f83614e83..000000000000
--- a/Documentation/devicetree/bindings/mfd/atmel-matrix.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-* Device tree bindings for Atmel Bus Matrix
-
-The Bus Matrix registers are used to configure Atmel SoCs internal bus
-behavior (master/slave priorities, undefined burst length type, ...)
-
-Required properties:
-- compatible: Should be one of the following
- "atmel,at91sam9260-matrix", "syscon"
- "atmel,at91sam9261-matrix", "syscon"
- "atmel,at91sam9263-matrix", "syscon"
- "atmel,at91sam9rl-matrix", "syscon"
- "atmel,at91sam9g45-matrix", "syscon"
- "atmel,at91sam9n12-matrix", "syscon"
- "atmel,at91sam9x5-matrix", "syscon"
- "atmel,sama5d3-matrix", "syscon"
- "microchip,sam9x60-matrix", "syscon"
- "microchip,sam9x7-matrix", "atmel,at91sam9x5-matrix", "syscon"
-- reg: Contains offset/length value of the Bus Matrix
- memory region.
-
-Example:
-
-matrix: matrix@ffffec00 {
- compatible = "atmel,sama5d3-matrix", "syscon";
- reg = <0xffffec00 0x200>;
-};
---
base-commit: 1b2ab8149928c1cea2d7eca30cd35bb7fe014053
change-id: 20241210-matrix-30021676fb6f
Best regards,
--
Charan Pedumuru <charan.pedumuru@microchip.com>
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema
2024-12-11 11:29 [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema Charan Pedumuru
@ 2024-12-16 10:14 ` Krzysztof Kozlowski
2024-12-17 5:00 ` Charan.Pedumuru
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-16 10:14 UTC (permalink / raw)
To: Charan Pedumuru
Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Nicolas Ferre, Alexandre Belloni, Claudiu Beznea, devicetree,
linux-arm-kernel, linux-kernel
On Wed, Dec 11, 2024 at 04:59:22PM +0530, Charan Pedumuru wrote:
> Convert old text based binding to json schema.
> Changes during conversion:
> Add a fallback for all compatibles as the IP core is compatible
> with `syscon`.
I don't understand. The syscon was already there. You added different
fallback, so provide explanation why do you think they are compatible.
>
> Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com>
> ---
> .../bindings/mfd/atmel,at91sam9260-matrix.yaml | 54 ++++++++++++++++++++++
> .../devicetree/bindings/mfd/atmel-matrix.txt | 26 -----------
> 2 files changed, 54 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
> new file mode 100644
> index 000000000000..0e827882823f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/mfd/atmel,at91sam9260-matrix.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip AT91 Bus Matrix
> +
> +maintainers:
> + - Nicolas Ferre <nicolas.ferre@microchip.com>
> +
> +description:
> + The Bus Matrix (MATRIX) implements a multi-layer AHB, based on the
> + AHB-Lite protocol, that enables parallel access paths between multiple
> + masters and slaves in a system, thus increasing the overall bandwidth.
> +
> +properties:
> + compatible:
> + anyOf:
oneOf
See other bindings for preferred syntax. There is never anyOf.
> + - items:
> + - enum:
> + - atmel,at91sam9260-matrix
> + - atmel,at91sam9261-matrix
> + - atmel,at91sam9263-matrix
> + - atmel,at91sam9rl-matrix
> + - atmel,at91sam9g45-matrix
> + - atmel,at91sam9n12-matrix
> + - atmel,at91sam9x5-matrix
> + - atmel,sama5d3-matrix
> + - const: syscon
> + - items:
> + - const: microchip,sam9x60-matrix
> + - const: atmel,at91sam9x5-matrix
> + - const: syscon
> + - items:
> + - const: microchip,sam9x7-matrix
So that's just enum with previous group.
> + - const: atmel,at91sam9x5-matrix
> + - const: syscon
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + matrix@ffffec00 {
syscon@
or system-controller@
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema
2024-12-16 10:14 ` Krzysztof Kozlowski
@ 2024-12-17 5:00 ` Charan.Pedumuru
2024-12-17 5:31 ` Krzysztof Kozlowski
0 siblings, 1 reply; 5+ messages in thread
From: Charan.Pedumuru @ 2024-12-17 5:00 UTC (permalink / raw)
To: krzk
Cc: lee, robh, krzk+dt, conor+dt, Nicolas.Ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
On 16/12/24 15:44, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On Wed, Dec 11, 2024 at 04:59:22PM +0530, Charan Pedumuru wrote:
>> Convert old text based binding to json schema.
>> Changes during conversion:
>> Add a fallback for all compatibles as the IP core is compatible
>> with `syscon`.
> I don't understand. The syscon was already there. You added different
> fallback, so provide explanation why do you think they are compatible.
The old binding was misleading, `microchip,sam9x60-matrix` has a
compatible `atmel,at91sam9x5-matrix` and `atmel,at91sam9x5-matrix` has a
compatible `syscon`, which was missing in the old binding. I will add
this to the commit message.
>
>> Signed-off-by: Charan Pedumuru <charan.pedumuru@microchip.com>
>> ---
>> .../bindings/mfd/atmel,at91sam9260-matrix.yaml | 54 ++++++++++++++++++++++
>> .../devicetree/bindings/mfd/atmel-matrix.txt | 26 -----------
>> 2 files changed, 54 insertions(+), 26 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
>> new file mode 100644
>> index 000000000000..0e827882823f
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mfd/atmel,at91sam9260-matrix.yaml
>> @@ -0,0 +1,54 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/mfd/atmel,at91sam9260-matrix.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Microchip AT91 Bus Matrix
>> +
>> +maintainers:
>> + - Nicolas Ferre <nicolas.ferre@microchip.com>
>> +
>> +description:
>> + The Bus Matrix (MATRIX) implements a multi-layer AHB, based on the
>> + AHB-Lite protocol, that enables parallel access paths between multiple
>> + masters and slaves in a system, thus increasing the overall bandwidth.
>> +
>> +properties:
>> + compatible:
>> + anyOf:
> oneOf
> See other bindings for preferred syntax. There is never anyOf.
Yes, I will change that.
>
>> + - items:
>> + - enum:
>> + - atmel,at91sam9260-matrix
>> + - atmel,at91sam9261-matrix
>> + - atmel,at91sam9263-matrix
>> + - atmel,at91sam9rl-matrix
>> + - atmel,at91sam9g45-matrix
>> + - atmel,at91sam9n12-matrix
>> + - atmel,at91sam9x5-matrix
>> + - atmel,sama5d3-matrix
>> + - const: syscon
>> + - items:
>> + - const: microchip,sam9x60-matrix
>> + - const: atmel,at91sam9x5-matrix
>> + - const: syscon
>> + - items:
>> + - const: microchip,sam9x7-matrix
> So that's just enum with previous group.
Yes, as both boards have 2 compatibles one after another, I defined them
as two different groups to resolve dt_check warnings.
>
>
>> + - const: atmel,at91sam9x5-matrix
>> + - const: syscon
>> +
>> + reg:
>> + maxItems: 1
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> + - |
>> + matrix@ffffec00 {
> syscon@
> or system-controller@
Will use `syscon@` instead of `matrix@` in next revision.
>
>
> Best regards,
> Krzysztof
>
--
Best Regards,
Charan.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema
2024-12-17 5:00 ` Charan.Pedumuru
@ 2024-12-17 5:31 ` Krzysztof Kozlowski
2024-12-17 6:44 ` Charan.Pedumuru
0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-12-17 5:31 UTC (permalink / raw)
To: Charan.Pedumuru
Cc: lee, robh, krzk+dt, conor+dt, Nicolas.Ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
On 17/12/2024 06:00, Charan.Pedumuru@microchip.com wrote:
>>
>>> + - items:
>>> + - enum:
>>> + - atmel,at91sam9260-matrix
>>> + - atmel,at91sam9261-matrix
>>> + - atmel,at91sam9263-matrix
>>> + - atmel,at91sam9rl-matrix
>>> + - atmel,at91sam9g45-matrix
>>> + - atmel,at91sam9n12-matrix
>>> + - atmel,at91sam9x5-matrix
>>> + - atmel,sama5d3-matrix
>>> + - const: syscon
>>> + - items:
>>> + - const: microchip,sam9x60-matrix
>>> + - const: atmel,at91sam9x5-matrix
>>> + - const: syscon
>>> + - items:
>>> + - const: microchip,sam9x7-matrix
>> So that's just enum with previous group.
>
> Yes, as both boards have 2 compatibles one after another, I defined them
> as two different groups to resolve dt_check warnings.
My comment stands. I understand your "Yes" means you will fix it.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema
2024-12-17 5:31 ` Krzysztof Kozlowski
@ 2024-12-17 6:44 ` Charan.Pedumuru
0 siblings, 0 replies; 5+ messages in thread
From: Charan.Pedumuru @ 2024-12-17 6:44 UTC (permalink / raw)
To: krzk
Cc: lee, robh, krzk+dt, conor+dt, Nicolas.Ferre, alexandre.belloni,
claudiu.beznea, devicetree, linux-arm-kernel, linux-kernel
On 17/12/24 11:01, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 17/12/2024 06:00, Charan.Pedumuru@microchip.com wrote:
>>>> + - items:
>>>> + - enum:
>>>> + - atmel,at91sam9260-matrix
>>>> + - atmel,at91sam9261-matrix
>>>> + - atmel,at91sam9263-matrix
>>>> + - atmel,at91sam9rl-matrix
>>>> + - atmel,at91sam9g45-matrix
>>>> + - atmel,at91sam9n12-matrix
>>>> + - atmel,at91sam9x5-matrix
>>>> + - atmel,sama5d3-matrix
>>>> + - const: syscon
>>>> + - items:
>>>> + - const: microchip,sam9x60-matrix
>>>> + - const: atmel,at91sam9x5-matrix
>>>> + - const: syscon
>>>> + - items:
>>>> + - const: microchip,sam9x7-matrix
>>> So that's just enum with previous group.
>> Yes, as both boards have 2 compatibles one after another, I defined them
>> as two different groups to resolve dt_check warnings.
> My comment stands. I understand your "Yes" means you will fix it.
Yes, I will remove the other group and define both
`microchip,sam9x60-matrix` and `microchip,sam9x7-matrix` in enum under
items and add const.
>
>
> Best regards,
> Krzysztof
--
Best Regards,
Charan.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-17 6:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-11 11:29 [PATCH] dt-bindings: mfd: atmel,at91sam9260: Convert to json schema Charan Pedumuru
2024-12-16 10:14 ` Krzysztof Kozlowski
2024-12-17 5:00 ` Charan.Pedumuru
2024-12-17 5:31 ` Krzysztof Kozlowski
2024-12-17 6:44 ` Charan.Pedumuru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox