[PATCH v4 1/2] dt-bindings: serial: fsl-linflexuart: add clock definitions

Ciprian Costea posted 2 patches 1 week, 5 days ago
There is a newer version of this series
[PATCH v4 1/2] dt-bindings: serial: fsl-linflexuart: add clock definitions
Posted by Ciprian Costea 1 week, 5 days ago
From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Add clock definitions for NXP LINFlexD UART bindings.

The LINFlexD driver was working because the LINFlexD clocks were
configured and kept enabled by the downstream bootloader (TF-A [1]
and U-Boot [2]). This is not ideal since LINFlexD Linux driver should
manage its clocks independently and not rely on a previous bootloader
configuration.

[1] https://github.com/nxp-auto-linux/arm-trusted-firmware
[2] https://github.com/nxp-auto-linux/u-boot

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

diff --git a/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml b/Documentation/devicetree/bindings/serial/fsl,s32-linflexuart.yaml
index 4171f524a928..ca3146d9b872 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,6 @@ examples:
         compatible = "fsl,s32v234-linflexuart";
         reg = <0x40053000 0x1000>;
         interrupts = <0 59 4>;
+        clocks = <&clks 132>, <&clks 131>;
+        clock-names = "ipg", "lin";
     };
-- 
2.45.2
Re: [PATCH v4 1/2] dt-bindings: serial: fsl-linflexuart: add clock definitions
Posted by Conor Dooley 1 week, 5 days ago
On Mon, Nov 11, 2024 at 01:29:20PM +0200, Ciprian Costea wrote:
> From: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
> 
> Add clock definitions for NXP LINFlexD UART bindings.
> 
> The LINFlexD driver was working because the LINFlexD clocks were
> configured and kept enabled by the downstream bootloader (TF-A [1]
> and U-Boot [2]). This is not ideal since LINFlexD Linux driver should
> manage its clocks independently and not rely on a previous bootloader
> configuration.
> 
> [1] https://github.com/nxp-auto-linux/arm-trusted-firmware
> [2] https://github.com/nxp-auto-linux/u-boot
> 
> Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>