diff mbox series

[1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK

Message ID 20230515-refclk-v1-1-5e89f01d6733@ti.com (mailing list archive)
State New, archived
Headers show
Series clk: keystone: syscon-clk: Enable audio reference clock | expand

Commit Message

Jai Luthra May 17, 2023, 7:34 a.m. UTC
Add DT bindings for TI's audio reference clocks (REFCLK) present on AM62
SoC.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Conor Dooley May 17, 2023, 5:15 p.m. UTC | #1
On Wed, May 17, 2023 at 01:04:05PM +0530, Jai Luthra wrote:
> Add DT bindings for TI's audio reference clocks (REFCLK) present on AM62
> SoC.

This seems fine to me. Perhaps Krzysztof will differ...
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>

> 
> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> ---
>  .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
> new file mode 100644
> index 000000000000..7c4cf7abe007
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
> @@ -0,0 +1,44 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/ti,am62-audio-refclk.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI Audio Reference Clock
> +
> +maintainers:
> +  - Jai Luthra <j-luthra@ti.com>
> +
> +properties:
> +  compatible:
> +    items:
> +      - const: ti,am62-audio-refclk
> +      - const: syscon
> +
> +  "#clock-cells":
> +    const: 0
> +
> +  reg:
> +    maxItems: 1

Just a minor comment, usually reg appears after compatible and before
anything else.

Thanks,
Conor.
Krzysztof Kozlowski May 18, 2023, 2:09 p.m. UTC | #2
On 17/05/2023 19:15, Conor Dooley wrote:
> On Wed, May 17, 2023 at 01:04:05PM +0530, Jai Luthra wrote:
>> Add DT bindings for TI's audio reference clocks (REFCLK) present on AM62
>> SoC.
> 
> This seems fine to me. Perhaps Krzysztof will differ...
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> 
>>
>> Signed-off-by: Jai Luthra <j-luthra@ti.com>
>> ---
>>  .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
>>  1 file changed, 44 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
>> new file mode 100644
>> index 000000000000..7c4cf7abe007
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
>> @@ -0,0 +1,44 @@
>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/clock/ti,am62-audio-refclk.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: TI Audio Reference Clock
>> +
>> +maintainers:
>> +  - Jai Luthra <j-luthra@ti.com>
>> +
>> +properties:
>> +  compatible:
>> +    items:
>> +      - const: ti,am62-audio-refclk
>> +      - const: syscon

I just don't get why this is syscon? There are no references to it, no
DTS change and nothing in the driver suggesting it has to be syscon
(creating regmap for internal use does not count).

Andrew,
Is this the pattern we discussed and wanted to remove?

Best regards,
Krzysztof
Jai Luthra May 19, 2023, 10:44 a.m. UTC | #3
Hi Krzysztof,

Thanks for the review,

On May 18, 2023 at 16:09:01 +0200, Krzysztof Kozlowski wrote:
> On 17/05/2023 19:15, Conor Dooley wrote:
> > On Wed, May 17, 2023 at 01:04:05PM +0530, Jai Luthra wrote:
> >> Add DT bindings for TI's audio reference clocks (REFCLK) present on AM62
> >> SoC.
> > 
> > This seems fine to me. Perhaps Krzysztof will differ...
> > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> > 
> >>
> >> Signed-off-by: Jai Luthra <j-luthra@ti.com>
> >> ---
> >>  .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
> >>  1 file changed, 44 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
> >> new file mode 100644
> >> index 000000000000..7c4cf7abe007
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
> >> @@ -0,0 +1,44 @@
> >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> >> +%YAML 1.2
> >> +---
> >> +$id: http://devicetree.org/schemas/clock/ti,am62-audio-refclk.yaml#
> >> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> >> +
> >> +title: TI Audio Reference Clock
> >> +
> >> +maintainers:
> >> +  - Jai Luthra <j-luthra@ti.com>
> >> +
> >> +properties:
> >> +  compatible:
> >> +    items:
> >> +      - const: ti,am62-audio-refclk
> >> +      - const: syscon
> 
> I just don't get why this is syscon? There are no references to it, no
> DTS change and nothing in the driver suggesting it has to be syscon
> (creating regmap for internal use does not count).

Sorry you're right, I missed Andrew's series removing syscon:
https://lore.kernel.org/linux-clk/20230516184626.154892-1-afd@ti.com/

Will re-base my patches on top of it and send v2.

> 
> Andrew,
> Is this the pattern we discussed and wanted to remove?
> 
> Best regards,
> Krzysztof
> 

Thanks,
Jai
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
new file mode 100644
index 000000000000..7c4cf7abe007
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/ti,am62-audio-refclk.yaml
@@ -0,0 +1,44 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ti,am62-audio-refclk.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI Audio Reference Clock
+
+maintainers:
+  - Jai Luthra <j-luthra@ti.com>
+
+properties:
+  compatible:
+    items:
+      - const: ti,am62-audio-refclk
+      - const: syscon
+
+  "#clock-cells":
+    const: 0
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+required:
+  - compatible
+  - "#clock-cells"
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    audio_refclk0: clock@82e0 {
+        compatible = "ti,am62-audio-refclk", "syscon";
+        reg = <0x82e0 0x4>;
+        clocks = <&k3_clks 157 0>;
+        assigned-clocks = <&k3_clks 157 0>;
+        assigned-clock-parents = <&k3_clks 157 8>;
+        #clock-cells = <0>;
+    };