diff mbox series

[v3,1/2] dt-bindings: linflexuart: add clock definitions

Message ID 20241107114611.758433-2-ciprianmarian.costea@oss.nxp.com (mailing list archive)
State Superseded
Headers show
Series add NXP LINFlexD UART clock support for S32G2/S32G3 | expand

Commit Message

Ciprian Costea Nov. 7, 2024, 11:46 a.m. UTC
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Add clock definitions for NXP LINFlexD UART bindings
and update the binding examples with S32G2 node.

Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
---
 .../bindings/serial/fsl,s32-linflexuart.yaml  | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Krzysztof Kozlowski Nov. 7, 2024, 11:53 a.m. UTC | #1
On 07/11/2024 12:46, Ciprian Costea wrote:
> From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
> 
> Add clock definitions for NXP LINFlexD UART bindings
> and update the binding examples with S32G2 node.

Why?

What you are doing we see easily from the diff. I do not see why. Your
commit msg must explain this.

> 
> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching. For bindings, the preferred subjects are
explained here:
https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters

Missing serial prefix and final is fsl,s32-linflexuart, not linflexuart

> ---
>  .../bindings/serial/fsl,s32-linflexuart.yaml  | 29 +++++++++++++++++++
>  1 file changed, 29 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
> index 4171f524a928..2716a9cd6c22 100644
> --- a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
> +++ b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
> @@ -34,10 +34,24 @@ properties:
>    interrupts:
>      maxItems: 1
>  
> +  clocks:
> +    items:
> +      - description:
> +          ipg clock drives the access to the LINFlexD
> +          iomapped registers
> +      - description: lin is the frequency of the baud clock
> +
> +  clock-names:
> +    items:
> +      - const: ipg
> +      - const: lin
> +
>  required:
>    - compatible
>    - reg
>    - interrupts
> +  - clocks
> +  - clock-names
>  
>  unevaluatedProperties: false
>  
> @@ -47,4 +61,19 @@ examples:
>          compatible = "fsl,s32v234-linflexuart";
>          reg = <0x40053000 0x1000>;
>          interrupts = <0 59 4>;
> +        clocks = <&clks 132>, <&clks 131>;
> +        clock-names = "ipg", "lin";
> +    };
> +
> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    serial@401c8000 {
> +        compatible = "nxp,s32g2-linflexuart",
> +                     "fsl,s32v234-linflexuart";
> +        reg = <0x401c8000 0x3000>;
> +        interrupts = <GIC_SPI 82 IRQ_TYPE_EDGE_RISING>;
> +        clocks = <&clks 13>, <&clks 14>;

Nope, drop the example. Not explained why you need it and really no point.

Best regards,
Krzysztof
Krzysztof Kozlowski Nov. 7, 2024, 11:53 a.m. UTC | #2
On 07/11/2024 12:46, Ciprian Costea wrote:
>  
> +  clocks:
> +    items:
> +      - description:
> +          ipg clock drives the access to the LINFlexD
> +          iomapped registers
> +      - description: lin is the frequency of the baud clock
> +
> +  clock-names:
> +    items:
> +      - const: ipg
> +      - const: lin
> +
>  required:
>    - compatible
>    - reg
>    - interrupts
> +  - clocks
> +  - clock-names

Ah, and that's an ABI break. That's a NAK unless explained in commit msg
(including impact on users).

Best regards,
Krzysztof
Ciprian Costea Nov. 7, 2024, noon UTC | #3
On 11/7/2024 1:53 PM, Krzysztof Kozlowski wrote:
> On 07/11/2024 12:46, Ciprian Costea wrote:
>> From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
>>
>> Add clock definitions for NXP LINFlexD UART bindings
>> and update the binding examples with S32G2 node.
> 
> Why?
> 
> What you are doing we see easily from the diff. I do not see why. Your
> commit msg must explain this.
> 
>>
>> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
> 
> Please use subject prefixes matching the subsystem. You can get them for
> example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
> your patch is touching. For bindings, the preferred subjects are
> explained here:
> https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html#i-for-patch-submitters
> 
> Missing serial prefix and final is fsl,s32-linflexuart, not linflexuart
> 

Hello Krzysztof,

Thank you for your remarks. I will try to address them/add more context 
for these changes in V4.

Regards,
Ciprian

>> ---
>>   .../bindings/serial/fsl,s32-linflexuart.yaml  | 29 +++++++++++++++++++
>>   1 file changed, 29 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
>> index 4171f524a928..2716a9cd6c22 100644
>> --- a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
>> +++ b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
>> @@ -34,10 +34,24 @@ properties:
>>     interrupts:
>>       maxItems: 1
>>   
>> +  clocks:
>> +    items:
>> +      - description:
>> +          ipg clock drives the access to the LINFlexD
>> +          iomapped registers
>> +      - description: lin is the frequency of the baud clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: ipg
>> +      - const: lin
>> +
>>   required:
>>     - compatible
>>     - reg
>>     - interrupts
>> +  - clocks
>> +  - clock-names
>>   
>>   unevaluatedProperties: false
>>   
>> @@ -47,4 +61,19 @@ examples:
>>           compatible = "fsl,s32v234-linflexuart";
>>           reg = <0x40053000 0x1000>;
>>           interrupts = <0 59 4>;
>> +        clocks = <&clks 132>, <&clks 131>;
>> +        clock-names = "ipg", "lin";
>> +    };
>> +
>> +  - |
>> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +    #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> +    serial@401c8000 {
>> +        compatible = "nxp,s32g2-linflexuart",
>> +                     "fsl,s32v234-linflexuart";
>> +        reg = <0x401c8000 0x3000>;
>> +        interrupts = <GIC_SPI 82 IRQ_TYPE_EDGE_RISING>;
>> +        clocks = <&clks 13>, <&clks 14>;
> 
> Nope, drop the example. Not explained why you need it and really no point.
> 
> Best regards,
> Krzysztof
>
Ciprian Costea Nov. 7, 2024, 12:05 p.m. UTC | #4
On 11/7/2024 1:53 PM, Krzysztof Kozlowski wrote:
> On 07/11/2024 12:46, Ciprian Costea wrote:
>>   
>> +  clocks:
>> +    items:
>> +      - description:
>> +          ipg clock drives the access to the LINFlexD
>> +          iomapped registers
>> +      - description: lin is the frequency of the baud clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: ipg
>> +      - const: lin
>> +
>>   required:
>>     - compatible
>>     - reg
>>     - interrupts
>> +  - clocks
>> +  - clock-names
> 
> Ah, and that's an ABI break. That's a NAK unless explained in commit msg
> (including impact on users).
> 
> Best regards,
> Krzysztof
> 

Thanks for your review. I will try to add context for these changes in 
bindings in V4.

Best Regards,
Ciprian
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
index 4171f524a928..2716a9cd6c22 100644
--- a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
+++ b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
@@ -34,10 +34,24 @@  properties:
   interrupts:
     maxItems: 1
 
+  clocks:
+    items:
+      - description:
+          ipg clock drives the access to the LINFlexD
+          iomapped registers
+      - description: lin is the frequency of the baud clock
+
+  clock-names:
+    items:
+      - const: ipg
+      - const: lin
+
 required:
   - compatible
   - reg
   - interrupts
+  - clocks
+  - clock-names
 
 unevaluatedProperties: false
 
@@ -47,4 +61,19 @@  examples:
         compatible = "fsl,s32v234-linflexuart";
         reg = <0x40053000 0x1000>;
         interrupts = <0 59 4>;
+        clocks = <&clks 132>, <&clks 131>;
+        clock-names = "ipg", "lin";
+    };
+
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    serial@401c8000 {
+        compatible = "nxp,s32g2-linflexuart",
+                     "fsl,s32v234-linflexuart";
+        reg = <0x401c8000 0x3000>;
+        interrupts = <GIC_SPI 82 IRQ_TYPE_EDGE_RISING>;
+        clocks = <&clks 13>, <&clks 14>;
+        clock-names = "ipg", "lin";
     };