public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bard Liao <bardliao@realtek.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: dt-bindings: Convert realtek,rt5651 to DT schema
Date: Thu,  8 Jan 2026 15:44:40 -0600	[thread overview]
Message-ID: <20260108214443.1127685-1-robh@kernel.org> (raw)

Convert the Realtek RT5661 codec binding to DT schema format. Add
missing clocks/clock-names for MCLK which is in use already. Also add
the standard "#sound-dai-cells" property.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 .../bindings/sound/realtek,rt5651.yaml        | 100 ++++++++++++++++++
 .../devicetree/bindings/sound/rt5651.txt      |  63 -----------
 2 files changed, 100 insertions(+), 63 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/realtek,rt5651.yaml
 delete mode 100644 Documentation/devicetree/bindings/sound/rt5651.txt

diff --git a/Documentation/devicetree/bindings/sound/realtek,rt5651.yaml b/Documentation/devicetree/bindings/sound/realtek,rt5651.yaml
new file mode 100644
index 000000000000..dc4f2eef7cf9
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/realtek,rt5651.yaml
@@ -0,0 +1,100 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/realtek,rt5651.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek RT5651 audio CODEC
+
+maintainers:
+  - Bard Liao <bardliao@realtek.com>
+
+description: >
+  This device supports I2C only.
+
+  Pins on the device (for linking into audio routes) for RT5651:
+
+    * DMIC L1
+    * DMIC R1
+    * IN1P
+    * IN2P
+    * IN2N
+    * IN3P
+    * HPOL
+    * HPOR
+    * LOUTL
+    * LOUTR
+    * PDML
+    * PDMR
+
+allOf:
+  - $ref: /schemas/sound/dai-common.yaml#
+
+properties:
+  compatible:
+    const: realtek,rt5651
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: mclk
+
+  '#sound-dai-cells':
+    const: 0
+
+  realtek,in2-differential:
+    type: boolean
+    description: Indicate MIC2 input are differential, rather than single-ended.
+
+  realtek,dmic-en:
+    type: boolean
+    description: Indicates DMIC is used.
+
+  realtek,jack-detect-source:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Select jack-detect input pin.
+    enum: [1, 2, 3]
+
+  realtek,jack-detect-not-inverted:
+    type: boolean
+    description:
+      Normal jack-detect switches give an inverted (active-low) signal. Set this
+      bool in the rare case you've a jack-detect switch which is not inverted.
+
+  realtek,over-current-threshold-microamp:
+    description: Micbias over-current detection threshold in µA.
+    enum: [600, 1500, 2000]
+
+  realtek,over-current-scale-factor:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: >
+      Micbias over-current detection scale factor:
+
+        0: scale current by 0.5
+        1: scale current by 0.75
+        2: scale current by 1.0
+        3: scale current by 1.5
+    enum: [0, 1, 2, 3]
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        codec@1a {
+            compatible = "realtek,rt5651";
+            reg = <0x1a>;
+            realtek,dmic-en;
+            realtek,in2-differential;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/sound/rt5651.txt b/Documentation/devicetree/bindings/sound/rt5651.txt
deleted file mode 100644
index 56e736a1cba9..000000000000
--- a/Documentation/devicetree/bindings/sound/rt5651.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-RT5651 audio CODEC
-
-This device supports I2C only.
-
-Required properties:
-
-- compatible : "realtek,rt5651".
-
-- reg : The I2C address of the device.
-
-Optional properties:
-
-- realtek,in2-differential
-  Boolean. Indicate MIC2 input are differential, rather than single-ended.
-
-- realtek,dmic-en
-  Boolean. true if dmic is used.
-
-- realtek,jack-detect-source
-  u32. Valid values:
-  1: Use JD1_1 pin for jack-detect
-  2: Use JD1_2 pin for jack-detect
-  3: Use JD2 pin for jack-detect
-
-- realtek,jack-detect-not-inverted
-  bool. Normal jack-detect switches give an inverted (active-low) signal,
-  set this bool in the rare case you've a jack-detect switch which is not
-  inverted.
-
-- realtek,over-current-threshold-microamp
-  u32, micbias over-current detection threshold in µA, valid values are
-  600, 1500 and 2000µA.
-
-- realtek,over-current-scale-factor
-  u32, micbias over-current detection scale-factor, valid values are:
-  0: Scale current by 0.5
-  1: Scale current by 0.75
-  2: Scale current by 1.0
-  3: Scale current by 1.5
-
-Pins on the device (for linking into audio routes) for RT5651:
-
-  * DMIC L1
-  * DMIC R1
-  * IN1P
-  * IN2P
-  * IN2N
-  * IN3P
-  * HPOL
-  * HPOR
-  * LOUTL
-  * LOUTR
-  * PDML
-  * PDMR
-
-Example:
-
-rt5651: codec@1a {
-	compatible = "realtek,rt5651";
-	reg = <0x1a>;
-	realtek,dmic-en = "true";
-	realtek,in2-diff = "false";
-};
-- 
2.51.0


             reply	other threads:[~2026-01-08 21:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08 21:44 Rob Herring (Arm) [this message]
2026-01-09  9:56 ` [PATCH] ASoC: dt-bindings: Convert realtek,rt5651 to DT schema Krzysztof Kozlowski
2026-01-12 20:08 ` Mark Brown

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=20260108214443.1127685-1-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.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