Linux clock framework development
 help / color / mirror / Atom feed
From: Paul Handrigan <paulha@opensource.cirrus.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<linux-clk@vger.kernel.org>, <robh@kernel.org>,
	<krzk+dt@kernel.org>, <conor+dt@kernel.org>,
	<devicetree@vger.kernel.org>
Cc: <patches@opensource.cirrus.com>,
	Paul Handrigan <paulha@opensource.cirrus.com>
Subject: [PATCH v2 1/2] dt-binding: clock: cs2600: Add support for the CS2600
Date: Wed, 18 Dec 2024 20:46:30 -0600	[thread overview]
Message-ID: <20241219024631.3145377-2-paulha@opensource.cirrus.com> (raw)
In-Reply-To: <20241219024631.3145377-1-paulha@opensource.cirrus.com>

Add device tree support for the Cirrus Logic CS2600 clock
device.

Signed-off-by: Paul Handrigan <paulha@opensource.cirrus.com>
---
 .../bindings/clock/cirrus,cs2600.yaml         | 81 +++++++++++++++++++
 include/dt-bindings/clock/cirrus,cs2600.h     | 24 ++++++
 2 files changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/cirrus,cs2600.yaml
 create mode 100644 include/dt-bindings/clock/cirrus,cs2600.h

diff --git a/Documentation/devicetree/bindings/clock/cirrus,cs2600.yaml b/Documentation/devicetree/bindings/clock/cirrus,cs2600.yaml
new file mode 100644
index 000000000000..f49f720addf1
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/cirrus,cs2600.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/cirrus,cs2600.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic Fractional-N Clock Synthesizer & Clock Multiplier
+
+maintainers:
+  - Paul Handrigan <paulha@opensource.cirrus.com>
+  - patches@opensource.cirrus.com>
+
+description:
+  The CS2600 is a system-clocking device that enables frequency synthesis and
+  clock generation from a stable timing reference clock. The device can
+  generate low-jitter clocks from a noisy clock reference at frequencies
+  as low as 50 Hz.
+
+properties:
+  compatible:
+    enum:
+      - cirrus,cs2600
+
+  clocks:
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: xti
+      - const: clk_in
+
+  '#clock-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  vdd-supply:
+    description: Power Supply
+
+  clock-output-names:
+    maxItems: 3
+    description: Names for CLK_OUT, BCLK_OUT and FSYNC_OUT clocks.
+
+  cirrus,aux-output-source:
+    description:
+      Specifies the function of the auxiliary output pin
+    $ref: /schemas/types.yaml#/definitions/uint32
+    enum:
+      - 0 # CS2600_AUX_OUTPUT_FREQ_UNLOCK: Frequency unlock notification
+      - 1 # CS2600_AUX_OUTPUT_PHASE_UNLOCK: Phase unlock notification
+      - 2 # CS2600_AUX_OUTPUT_NO_CLKIN: CLK_IN is not available
+    default: 0
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/cirrus,cs2600.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      clock-controller@2c {
+        #clock-cells = <1>;
+        compatible = "cirrus,cs2600";
+        reg = <0x2c>;
+        clocks = <&xtl_clk>, <&sync_clock>;
+        clock-names = "xti", "clk_in";
+        clock-output-names = "audio_clk_out", "audio_bclk", "audio_lrclk";
+        vdd-supply = <&vreg>;
+      };
+    };
diff --git a/include/dt-bindings/clock/cirrus,cs2600.h b/include/dt-bindings/clock/cirrus,cs2600.h
new file mode 100644
index 000000000000..86065f94a2b2
--- /dev/null
+++ b/include/dt-bindings/clock/cirrus,cs2600.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
+/*
+ * Copyright (c) 2024 Cirrus Logic, Inc. and
+ *		      Cirrus Logic International Simiconductor Ltd.
+ *
+ * Author: Paul Handrigan <paulha@opensource.cirrus.com>
+ *
+ */
+
+#ifndef _DT_BINDINGS_CLK_CIRRUS_CS2600_H
+#define _DT_BINDINGS_CLK_CIRRUS_CS2600_H
+
+/* CS2600 Clocks  */
+#define CS2600_PLL      0 /* Internal clock */
+#define CS2600_CLK		1
+#define CS2600_BCLK		2
+#define CS2600_FSYNC	3
+
+/* CS2600 Auxiliary Output */
+#define CS2600_AUX_OUTPUT_FREQ_UNLOCK	0
+#define CS2600_AUX_OUTPUT_PHASE_UNLOCK	1
+#define CS2600_AUX_OUTPUT_NO_CLKIN	2
+
+#endif
-- 
2.34.1


  reply	other threads:[~2024-12-19  2:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  2:46 [PATCH v2 0/2] Cirrus Logic CS2600 clock device Paul Handrigan
2024-12-19  2:46 ` Paul Handrigan [this message]
2024-12-19  8:51   ` [PATCH v2 1/2] dt-binding: clock: cs2600: Add support for the CS2600 Krzysztof Kozlowski
2024-12-19 11:02     ` Charles Keepax
2024-12-19 11:39       ` Krzysztof Kozlowski
2024-12-19 12:59         ` Charles Keepax
2024-12-19 13:16           ` Krzysztof Kozlowski
2024-12-19 13:36             ` Richard Fitzgerald
2024-12-19 15:57               ` Krzysztof Kozlowski
2024-12-19 16:22                 ` Richard Fitzgerald
2024-12-21 20:19                   ` Krzysztof Kozlowski
2024-12-19  2:46 ` [PATCH v2 2/2] clk: cs2600: Add Fractional-N clock driver Paul Handrigan
2024-12-19  8:48   ` Krzysztof Kozlowski
2024-12-19 10:51     ` Charles Keepax
2024-12-19 11:40       ` Krzysztof Kozlowski
2024-12-19 12:45         ` Charles Keepax
2024-12-19 12:52           ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241219024631.3145377-2-paulha@opensource.cirrus.com \
    --to=paulha@opensource.cirrus.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=patches@opensource.cirrus.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox