All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: <robh+dt@kernel.org>, <lee.jones@linaro.org>,
	<broonie@kernel.org>, <mturquette@baylibre.com>,
	<sboyd@kernel.org>, <jdelvare@suse.com>, <linux@roeck-us.net>,
	<linus.walleij@linaro.org>
Cc: <lgirdwood@gmail.com>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: [PATCH 5/6] clk: lochnagar: Move binding over to dtschema
Date: Mon, 27 Apr 2020 11:28:11 +0100	[thread overview]
Message-ID: <20200427102812.23251-5-ckeepax@opensource.cirrus.com> (raw)
In-Reply-To: <20200427102812.23251-1-ckeepax@opensource.cirrus.com>

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 .../devicetree/bindings/clock/cirrus,lochnagar.txt |  94 ---------
 .../bindings/clock/cirrus,lochnagar.yaml           | 220 +++++++++++++++++++++
 2 files changed, 220 insertions(+), 94 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
 create mode 100644 Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml

diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
deleted file mode 100644
index 52a064c789eec..0000000000000
--- a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.txt
+++ /dev/null
@@ -1,94 +0,0 @@
-Cirrus Logic Lochnagar Audio Development Board
-
-Lochnagar is an evaluation and development board for Cirrus Logic
-Smart CODEC and Amp devices. It allows the connection of most Cirrus
-Logic devices on mini-cards, as well as allowing connection of
-various application processor systems to provide a full evaluation
-platform.  Audio system topology, clocking and power can all be
-controlled through the Lochnagar, allowing the device under test
-to be used in a variety of possible use cases.
-
-This binding document describes the binding for the clock portion of
-the driver.
-
-Also see these documents for generic binding information:
-  [1] Clock : ../clock/clock-bindings.txt
-
-And these for relevant defines:
-  [2] include/dt-bindings/clock/lochnagar.h
-
-This binding must be part of the Lochnagar MFD binding:
-  [3] ../mfd/cirrus,lochnagar.txt
-
-Required properties:
-
-  - compatible : One of the following strings:
-                 "cirrus,lochnagar1-clk"
-                 "cirrus,lochnagar2-clk"
-
-  - #clock-cells : Must be 1. The first cell indicates the clock
-    number, see [2] for available clocks and [1].
-
-Optional properties:
-
-  - clocks : Must contain an entry for each clock in clock-names.
-  - clock-names : May contain entries for each of the following
-    clocks:
-     - ln-cdc-clkout : Output clock from CODEC card.
-     - ln-dsp-clkout : Output clock from DSP card.
-     - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional
-       input audio clocks from host system.
-     - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from
-       external connector.
-     - ln-spdif-mclk : Optional input audio clock from SPDIF.
-     - ln-spdif-clkout : Optional input audio clock from SPDIF.
-     - ln-adat-mclk : Optional input audio clock from ADAT.
-     - ln-pmic-32k : On board fixed clock.
-     - ln-clk-12m : On board fixed clock.
-     - ln-clk-11m : On board fixed clock.
-     - ln-clk-24m : On board fixed clock.
-     - ln-clk-22m : On board fixed clock.
-     - ln-clk-8m : On board fixed clock.
-     - ln-usb-clk-24m : On board fixed clock.
-     - ln-usb-clk-12m : On board fixed clock.
-
-  - assigned-clocks : A list of Lochnagar clocks to be reparented, see
-    [2] for available clocks.
-  - assigned-clock-parents : Parents to be assigned to the clocks
-    listed in "assigned-clocks".
-
-Optional nodes:
-
-  - fixed-clock nodes may be registered for the following on board clocks:
-     - ln-pmic-32k : 32768 Hz
-     - ln-clk-12m : 12288000 Hz
-     - ln-clk-11m : 11298600 Hz
-     - ln-clk-24m : 24576000 Hz
-     - ln-clk-22m : 22579200 Hz
-     - ln-clk-8m : 8192000 Hz
-     - ln-usb-clk-24m : 24576000 Hz
-     - ln-usb-clk-12m : 12288000 Hz
-
-Example:
-
-lochnagar {
-	lochnagar-clk {
-		compatible = "cirrus,lochnagar2-clk";
-
-		#clock-cells = <1>;
-
-		clocks = <&clk-audio>, <&clk_pmic>;
-		clock-names = "ln-gf-mclk2", "ln-pmic-32k";
-
-		assigned-clocks = <&lochnagar-clk LOCHNAGAR_CDC_MCLK1>,
-				  <&lochnagar-clk LOCHNAGAR_CDC_MCLK2>;
-		assigned-clock-parents = <&clk-audio>,
-					 <&clk-pmic>;
-	};
-
-	clk-pmic: clk-pmic {
-		compatible = "fixed-clock";
-		clock-cells = <0>;
-		clock-frequency = <32768>;
-	};
-};
diff --git a/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml
new file mode 100644
index 0000000000000..55d27e4475333
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/cirrus,lochnagar.yaml
@@ -0,0 +1,220 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/cirrus,lochnagar.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic Lochnagar Audio Development Board
+
+maintainers:
+  - patches@opensource.cirrus.com
+
+description: |
+  Lochnagar is an evaluation and development board for Cirrus Logic
+  Smart CODEC and Amp devices. It allows the connection of most Cirrus
+  Logic devices on mini-cards, as well as allowing connection of various
+  application processor systems to provide a full evaluation platform.
+  Audio system topology, clocking and power can all be controlled through
+  the Lochnagar, allowing the device under test to be used in a variety of
+  possible use cases.
+
+  This binding document describes the binding for the clock portion of the
+  driver.
+
+  Also see these documents for generic binding information:
+    [1] Clock : ../clock/clock-bindings.txt
+
+  And these for relevant defines:
+    [2] include/dt-bindings/clock/lochnagar.h
+
+  This binding must be part of the Lochnagar MFD binding:
+    [3] ../mfd/cirrus,lochnagar.yaml
+
+properties:
+  lochnagar-clk:
+    type: object
+
+    properties:
+      compatible:
+        contains:
+          enum:
+            - cirrus,lochnagar1-clk
+            - cirrus,lochnagar2-clk
+
+      '#clock-cells':
+        description:
+          Must be 1. The first cell indicates the clock number, see [2] for
+          available clocks and [1].
+        const: 1
+      clock-names:
+        description: |
+          May contain entries for each of the following clocks:
+           - ln-cdc-clkout : Output clock from CODEC card.
+           - ln-dsp-clkout : Output clock from DSP card.
+           - ln-gf-mclk1,ln-gf-mclk2,ln-gf-mclk3,ln-gf-mclk4 : Optional
+             input audio clocks from host system.
+           - ln-psia1-mclk, ln-psia2-mclk : Optional input audio clocks from
+             external connector.
+           - ln-spdif-mclk : Optional input audio clock from SPDIF.
+           - ln-spdif-clkout : Optional input audio clock from SPDIF.
+           - ln-adat-mclk : Optional input audio clock from ADAT.
+           - ln-pmic-32k : On board fixed clock.
+           - ln-clk-12m : On board fixed clock.
+           - ln-clk-11m : On board fixed clock.
+           - ln-clk-24m : On board fixed clock.
+           - ln-clk-22m : On board fixed clock.
+           - ln-clk-8m : On board fixed clock.
+           - ln-usb-clk-24m : On board fixed clock.
+           - ln-usb-clk-12m : On board fixed clock.
+        items:
+          enum:
+            - ln-cdc-clkout
+            - ln-dsp-clkout
+            - ln-gf-mclk1
+            - ln-gf-mclk2
+            - ln-gf-mclk3
+            - ln-gf-mclk4
+            - ln-psia1-mclk
+            - ln-psia2-mclk
+            - ln-spdif-mclk
+            - ln-spdif-clkout
+            - ln-adat-mclk
+            - ln-pmic-32k
+            - ln-clk-12m
+            - ln-clk-11m
+            - ln-clk-24m
+            - ln-clk-22m
+            - ln-clk-8m
+            - ln-usb-clk-24m
+            - ln-usb-clk-12m
+        minItems: 1
+        maxItems: 19
+      clocks: true
+      assigned-clocks: true
+      assigned-clock-parents: true
+
+    additionalProperties: false
+
+    required:
+      - compatible
+      - '#clock-cells'
+
+  lochnagar-pmic32k:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 32768
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-clk12m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 12288000
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-clk11m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 11298600
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-clk24m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 24576000
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-clk22m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 22579200
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-clk8m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 8192000
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-usb24m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 24576000
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
+
+  lochnagar-usb12m:
+    type: object
+    properties:
+      compatible:
+        enum:
+          - fixed-clock
+      '#clock-cells':
+        const: 0
+      clock-frequency:
+        const: 12288000
+    required:
+      - compatible
+      - '#clock-cells'
+      - clock-frequency
-- 
2.11.0


  parent reply	other threads:[~2020-04-27 10:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 10:28 [PATCH 1/6] hwmon: lochnagar: Move binding over to dtschema Charles Keepax
2020-04-27 10:28 ` [PATCH 2/6] ASoC: " Charles Keepax
2020-05-01 21:06   ` Rob Herring
2020-04-27 10:28 ` [PATCH 3/6] pinctrl: " Charles Keepax
2020-05-12 11:40   ` Linus Walleij
2020-04-27 10:28 ` [PATCH 4/6] regulator: " Charles Keepax
2020-04-27 10:28 ` Charles Keepax [this message]
2020-05-01 21:03   ` [PATCH 5/6] clk: " Rob Herring
2020-04-27 10:28 ` [PATCH 6/6] mfd: " Charles Keepax
2020-04-27 10:36   ` Charles Keepax
2020-05-01 20:47     ` Rob Herring
2020-05-04  9:55       ` Charles Keepax
2020-05-01 20:55   ` Rob Herring

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=20200427102812.23251-5-ckeepax@opensource.cirrus.com \
    --to=ckeepax@opensource.cirrus.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mturquette@baylibre.com \
    --cc=patches@opensource.cirrus.com \
    --cc=robh+dt@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 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.