All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: keystone: syscon-clk: Enable audio reference clock
@ 2023-05-17  7:34 ` Jai Luthra
  0 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

TI's AM62 SoC can optionally provide two audio reference clocks
(AUDIO_REFCLKx) to external peripherals. By default the reference clock
is looped-back inside the SoC to a mux that goes to McASP AHCLK, but can
optionally be enabled as an output to peripherals outside the SoC by
setting a bit through the syscon (CTRL_MMR) registers.

This patch series extends the existing syscon-clk driver to support
the audio reference clock, and also adds new device tree bindings
documentation.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
Jai Luthra (2):
      dt-bindings: clock: Add binding documentation for TI Audio REFCLK
      clk: keystone: syscon-clk: Add support for audio refclk

 .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
 drivers/clk/keystone/syscon-clk.c                  | 43 ++++++++++++++++++---
 2 files changed, 82 insertions(+), 5 deletions(-)
---
base-commit: d3a08193ebf4220a69f1f13087f150429769f911
change-id: 20230515-refclk-5b544d314c23

Best regards,
-- 
Jai Luthra <j-luthra@ti.com>


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

* [PATCH 0/2] clk: keystone: syscon-clk: Enable audio reference clock
@ 2023-05-17  7:34 ` Jai Luthra
  0 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

TI's AM62 SoC can optionally provide two audio reference clocks
(AUDIO_REFCLKx) to external peripherals. By default the reference clock
is looped-back inside the SoC to a mux that goes to McASP AHCLK, but can
optionally be enabled as an output to peripherals outside the SoC by
setting a bit through the syscon (CTRL_MMR) registers.

This patch series extends the existing syscon-clk driver to support
the audio reference clock, and also adds new device tree bindings
documentation.

Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
Jai Luthra (2):
      dt-bindings: clock: Add binding documentation for TI Audio REFCLK
      clk: keystone: syscon-clk: Add support for audio refclk

 .../bindings/clock/ti,am62-audio-refclk.yaml       | 44 ++++++++++++++++++++++
 drivers/clk/keystone/syscon-clk.c                  | 43 ++++++++++++++++++---
 2 files changed, 82 insertions(+), 5 deletions(-)
---
base-commit: d3a08193ebf4220a69f1f13087f150429769f911
change-id: 20230515-refclk-5b544d314c23

Best regards,
-- 
Jai Luthra <j-luthra@ti.com>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  2023-05-17  7:34 ` Jai Luthra
@ 2023-05-17  7:34   ` Jai Luthra
  -1 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

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(+)

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>;
+    };

-- 
2.40.1


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

* [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
@ 2023-05-17  7:34   ` Jai Luthra
  0 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

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(+)

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>;
+    };

-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] clk: keystone: syscon-clk: Add support for audio refclk
  2023-05-17  7:34 ` Jai Luthra
@ 2023-05-17  7:34   ` Jai Luthra
  -1 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

TI's AM62 SoC can optionally provide two audio reference clocks
(AUDIO_REFCLKx) to external peripherals.

By default this reference clock is looped-back inside the SoC to a mux
that goes to McASP AHCLK, but can optionally be enabled as an output to
peripherals outside the SoC by setting a bit through the syscon
(CTRL_MMR) registers.

This bit only controls the direction of the clock, while the parent
is a muxed input from sci-clk [1] which may be a configurable PLL or a
master clock from one of the McASP instances.

Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62x/clocks.html#clocks-for-board0-device [1]
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 drivers/clk/keystone/syscon-clk.c | 43 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c
index 5d7cc83682da..9f9ba7420756 100644
--- a/drivers/clk/keystone/syscon-clk.c
+++ b/drivers/clk/keystone/syscon-clk.c
@@ -61,21 +61,31 @@ static const struct clk_ops ti_syscon_gate_clk_ops = {
 
 static struct clk_hw
 *ti_syscon_gate_clk_register(struct device *dev, struct regmap *regmap,
+			     const char *parent_name,
 			     const struct ti_syscon_gate_clk_data *data)
 {
 	struct ti_syscon_gate_clk_priv *priv;
 	struct clk_init_data init;
+	char *name = NULL;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return ERR_PTR(-ENOMEM);
 
-	init.name = data->name;
 	init.ops = &ti_syscon_gate_clk_ops;
-	init.parent_names = NULL;
-	init.num_parents = 0;
-	init.flags = 0;
+	if (parent_name) {
+		name = kasprintf(GFP_KERNEL, "%s:%s", data->name, parent_name);
+		init.name = name;
+		init.parent_names = &parent_name;
+		init.num_parents = 1;
+		init.flags = CLK_SET_RATE_PARENT;
+	} else {
+		init.name = data->name;
+		init.parent_names = NULL;
+		init.num_parents = 0;
+		init.flags = 0;
+	}
 
 	priv->regmap = regmap;
 	priv->reg = data->offset;
@@ -83,6 +93,10 @@ static struct clk_hw
 	priv->hw.init = &init;
 
 	ret = devm_clk_hw_register(dev, &priv->hw);
+
+	if (name)
+		kfree(init.name);
+
 	if (ret)
 		return ERR_PTR(ret);
 
@@ -94,8 +108,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 	const struct ti_syscon_gate_clk_data *data, *p;
 	struct clk_hw_onecell_data *hw_data;
 	struct device *dev = &pdev->dev;
+	int num_clks, num_parents, i;
+	const char *parent_name;
 	struct regmap *regmap;
-	int num_clks, i;
 
 	data = device_get_match_data(dev);
 	if (!data)
@@ -110,6 +125,13 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 	for (p = data; p->name; p++)
 		num_clks++;
 
+	num_parents = of_clk_get_parent_count(dev->of_node);
+	if (of_device_is_compatible(dev->of_node, "ti,am62-audio-refclk") &&
+	    num_parents == 0) {
+		return dev_err_probe(dev, -EINVAL,
+				     "must specify a parent clock\n");
+	}
+
 	hw_data = devm_kzalloc(dev, struct_size(hw_data, hws, num_clks),
 			       GFP_KERNEL);
 	if (!hw_data)
@@ -117,8 +139,10 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 
 	hw_data->num = num_clks;
 
+	parent_name = of_clk_get_parent_name(dev->of_node, 0);
 	for (i = 0; i < num_clks; i++) {
 		hw_data->hws[i] = ti_syscon_gate_clk_register(dev, regmap,
+							      parent_name,
 							      &data[i]);
 		if (IS_ERR(hw_data->hws[i]))
 			dev_warn(dev, "failed to register %s\n",
@@ -166,6 +190,11 @@ static const struct ti_syscon_gate_clk_data am62_clk_data[] = {
 	{ /* Sentinel */ },
 };
 
+static const struct ti_syscon_gate_clk_data am62_audio_clk_data[] = {
+	TI_SYSCON_CLK_GATE("audio_refclk", 0x0, 15),
+	{ /* Sentinel */ },
+};
+
 static const struct of_device_id ti_syscon_gate_clk_ids[] = {
 	{
 		.compatible = "ti,am654-ehrpwm-tbclk",
@@ -179,6 +208,10 @@ static const struct of_device_id ti_syscon_gate_clk_ids[] = {
 		.compatible = "ti,am62-epwm-tbclk",
 		.data = &am62_clk_data,
 	},
+	{
+		.compatible = "ti,am62-audio-refclk",
+		.data = &am62_audio_clk_data,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ti_syscon_gate_clk_ids);

-- 
2.40.1


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

* [PATCH 2/2] clk: keystone: syscon-clk: Add support for audio refclk
@ 2023-05-17  7:34   ` Jai Luthra
  0 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-17  7:34 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar
  Cc: Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel, Jai Luthra

TI's AM62 SoC can optionally provide two audio reference clocks
(AUDIO_REFCLKx) to external peripherals.

By default this reference clock is looped-back inside the SoC to a mux
that goes to McASP AHCLK, but can optionally be enabled as an output to
peripherals outside the SoC by setting a bit through the syscon
(CTRL_MMR) registers.

This bit only controls the direction of the clock, while the parent
is a muxed input from sci-clk [1] which may be a configurable PLL or a
master clock from one of the McASP instances.

Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62x/clocks.html#clocks-for-board0-device [1]
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
 drivers/clk/keystone/syscon-clk.c | 43 ++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/keystone/syscon-clk.c b/drivers/clk/keystone/syscon-clk.c
index 5d7cc83682da..9f9ba7420756 100644
--- a/drivers/clk/keystone/syscon-clk.c
+++ b/drivers/clk/keystone/syscon-clk.c
@@ -61,21 +61,31 @@ static const struct clk_ops ti_syscon_gate_clk_ops = {
 
 static struct clk_hw
 *ti_syscon_gate_clk_register(struct device *dev, struct regmap *regmap,
+			     const char *parent_name,
 			     const struct ti_syscon_gate_clk_data *data)
 {
 	struct ti_syscon_gate_clk_priv *priv;
 	struct clk_init_data init;
+	char *name = NULL;
 	int ret;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return ERR_PTR(-ENOMEM);
 
-	init.name = data->name;
 	init.ops = &ti_syscon_gate_clk_ops;
-	init.parent_names = NULL;
-	init.num_parents = 0;
-	init.flags = 0;
+	if (parent_name) {
+		name = kasprintf(GFP_KERNEL, "%s:%s", data->name, parent_name);
+		init.name = name;
+		init.parent_names = &parent_name;
+		init.num_parents = 1;
+		init.flags = CLK_SET_RATE_PARENT;
+	} else {
+		init.name = data->name;
+		init.parent_names = NULL;
+		init.num_parents = 0;
+		init.flags = 0;
+	}
 
 	priv->regmap = regmap;
 	priv->reg = data->offset;
@@ -83,6 +93,10 @@ static struct clk_hw
 	priv->hw.init = &init;
 
 	ret = devm_clk_hw_register(dev, &priv->hw);
+
+	if (name)
+		kfree(init.name);
+
 	if (ret)
 		return ERR_PTR(ret);
 
@@ -94,8 +108,9 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 	const struct ti_syscon_gate_clk_data *data, *p;
 	struct clk_hw_onecell_data *hw_data;
 	struct device *dev = &pdev->dev;
+	int num_clks, num_parents, i;
+	const char *parent_name;
 	struct regmap *regmap;
-	int num_clks, i;
 
 	data = device_get_match_data(dev);
 	if (!data)
@@ -110,6 +125,13 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 	for (p = data; p->name; p++)
 		num_clks++;
 
+	num_parents = of_clk_get_parent_count(dev->of_node);
+	if (of_device_is_compatible(dev->of_node, "ti,am62-audio-refclk") &&
+	    num_parents == 0) {
+		return dev_err_probe(dev, -EINVAL,
+				     "must specify a parent clock\n");
+	}
+
 	hw_data = devm_kzalloc(dev, struct_size(hw_data, hws, num_clks),
 			       GFP_KERNEL);
 	if (!hw_data)
@@ -117,8 +139,10 @@ static int ti_syscon_gate_clk_probe(struct platform_device *pdev)
 
 	hw_data->num = num_clks;
 
+	parent_name = of_clk_get_parent_name(dev->of_node, 0);
 	for (i = 0; i < num_clks; i++) {
 		hw_data->hws[i] = ti_syscon_gate_clk_register(dev, regmap,
+							      parent_name,
 							      &data[i]);
 		if (IS_ERR(hw_data->hws[i]))
 			dev_warn(dev, "failed to register %s\n",
@@ -166,6 +190,11 @@ static const struct ti_syscon_gate_clk_data am62_clk_data[] = {
 	{ /* Sentinel */ },
 };
 
+static const struct ti_syscon_gate_clk_data am62_audio_clk_data[] = {
+	TI_SYSCON_CLK_GATE("audio_refclk", 0x0, 15),
+	{ /* Sentinel */ },
+};
+
 static const struct of_device_id ti_syscon_gate_clk_ids[] = {
 	{
 		.compatible = "ti,am654-ehrpwm-tbclk",
@@ -179,6 +208,10 @@ static const struct of_device_id ti_syscon_gate_clk_ids[] = {
 		.compatible = "ti,am62-epwm-tbclk",
 		.data = &am62_clk_data,
 	},
+	{
+		.compatible = "ti,am62-audio-refclk",
+		.data = &am62_audio_clk_data,
+	},
 	{ }
 };
 MODULE_DEVICE_TABLE(of, ti_syscon_gate_clk_ids);

-- 
2.40.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  2023-05-17  7:34   ` Jai Luthra
@ 2023-05-17 17:15     ` Conor Dooley
  -1 siblings, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2023-05-17 17:15 UTC (permalink / raw)
  To: Jai Luthra
  Cc: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar,
	Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
@ 2023-05-17 17:15     ` Conor Dooley
  0 siblings, 0 replies; 12+ messages in thread
From: Conor Dooley @ 2023-05-17 17:15 UTC (permalink / raw)
  To: Jai Luthra
  Cc: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar,
	Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1389 bytes --]

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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  2023-05-17 17:15     ` Conor Dooley
@ 2023-05-18 14:09       ` Krzysztof Kozlowski
  -1 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-18 14:09 UTC (permalink / raw)
  To: Conor Dooley, Jai Luthra, Andrew Davis
  Cc: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar,
	Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel

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


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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
@ 2023-05-18 14:09       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-18 14:09 UTC (permalink / raw)
  To: Conor Dooley, Jai Luthra, Andrew Davis
  Cc: Michael Turquette, Stephen Boyd, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Santosh Shilimkar,
	Vignesh Raghavendra, linux-clk, devicetree, linux-arm-kernel

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
  2023-05-18 14:09       ` Krzysztof Kozlowski
@ 2023-05-19 10:44         ` Jai Luthra
  -1 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-19 10:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Andrew Davis, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Santosh Shilimkar, Vignesh Raghavendra, linux-clk, devicetree,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1980 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK
@ 2023-05-19 10:44         ` Jai Luthra
  0 siblings, 0 replies; 12+ messages in thread
From: Jai Luthra @ 2023-05-19 10:44 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Andrew Davis, Michael Turquette, Stephen Boyd,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Santosh Shilimkar, Vignesh Raghavendra, linux-clk, devicetree,
	linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1980 bytes --]

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

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-05-19 10:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-17  7:34 [PATCH 0/2] clk: keystone: syscon-clk: Enable audio reference clock Jai Luthra
2023-05-17  7:34 ` Jai Luthra
2023-05-17  7:34 ` [PATCH 1/2] dt-bindings: clock: Add binding documentation for TI Audio REFCLK Jai Luthra
2023-05-17  7:34   ` Jai Luthra
2023-05-17 17:15   ` Conor Dooley
2023-05-17 17:15     ` Conor Dooley
2023-05-18 14:09     ` Krzysztof Kozlowski
2023-05-18 14:09       ` Krzysztof Kozlowski
2023-05-19 10:44       ` Jai Luthra
2023-05-19 10:44         ` Jai Luthra
2023-05-17  7:34 ` [PATCH 2/2] clk: keystone: syscon-clk: Add support for audio refclk Jai Luthra
2023-05-17  7:34   ` Jai Luthra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.