From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: <lee@kernel.org>, <robh+dt@kernel.org>,
<krzysztof.kozlowski+dt@linaro.org>, <linus.walleij@linaro.org>,
<broonie@kernel.org>, <tglx@linutronix.de>, <maz@kernel.org>
Cc: <alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>,
<linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<patches@opensource.cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Subject: [PATCH 11/12] dt-bindings: sound: Add Cirrus Logic CS48L31/32/33 codecs
Date: Wed, 9 Nov 2022 16:53:30 +0000 [thread overview]
Message-ID: <20221109165331.29332-12-rf@opensource.cirrus.com> (raw)
In-Reply-To: <20221109165331.29332-1-rf@opensource.cirrus.com>
Codecs in this family have multiple digital and analog audio I/O that
support a variety of external hardware connections and configurations.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
.../bindings/sound/cirrus,cs48l32.yaml | 96 +++++++++++++++++++
include/dt-bindings/sound/cs48l32.h | 25 +++++
2 files changed, 121 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
create mode 100644 include/dt-bindings/sound/cs48l32.h
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
new file mode 100644
index 000000000000..70fb294c6dc1
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs48l32.yaml
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/cirrus,cs48l32.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic CS48L31/32/33 audio CODECs
+
+maintainers:
+ - patches@opensource.cirrus.com
+
+description: |
+ This describes audio configuration bindings for these codecs.
+
+ See also the core bindings for the parent MFD driver:
+
+ Documentation/devicetree/bindings/mfd/cirrus,cs48l32.yaml
+
+ and defines for values used in these bindings:
+
+ include/dt-bindings/sound/cs48l32.h
+
+ The properties are all contained in the parent MFD node.
+
+properties:
+ '#sound-dai-cells':
+ const: 1
+
+ cirrus,in-type:
+ description:
+ A list of input type settings for each input. A maximum of 8 cells,
+ with four cells per input in the order INnL_1, INnR_1 INnL_2 INnR_2.
+ (where _1 and _2 are the alternative mux selections for that INn).
+ If the array is shorter than the number of inputs the unspecified
+ inputs default to CS48L32_IN_TYPE_DIFF.
+ $ref: "/schemas/types.yaml#/definitions/uint32-matrix"
+ minItems: 1
+ maxItems: 8
+ items:
+ items:
+ - description:
+ The first cell is INnL_1 input type. One of the CS48L32_IN_TYPE_xxx.
+ For non-muxed inputs this sets the type of INnL.
+ minimum: 0
+ maximum: 1
+ - description:
+ The second cell is INnR_1 input type. One of the CS48L32_IN_TYPE_xxx.
+ For non-muxed inputs this sets the type of INnR.
+ minimum: 0
+ maximum: 1
+ - description:
+ The third cell is INnL_2 input type. One of the CS48L32_IN_TYPE_xxx.
+ For non-muxed inputs this cell must be 0.
+ minimum: 0
+ maximum: 1
+ - description:
+ The fourth cell is INnR_2 input type. One of the CS48L32_IN_TYPE_xxx.
+ For non-muxed inputs this cell must be 0.
+ minimum: 0
+ maximum: 1
+
+ cirrus,max-channels-clocked:
+ description:
+ Maximum number of channels that clocks will be generated for. When using
+ multiple data lines, every sample slot can transfer multiple channels
+ (one per data line). This pdata sets the maximum number of slots.
+ One cell for each ASP, use a value of zero for ASPs that should be
+ handled normally.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 4
+ items:
+ default: 0
+
+ cirrus,pdm-sup:
+ description:
+ Indicates how the MICBIAS pins have been externally connected to DMICs
+ on each input. One cell per input (IN1, IN2, ...). One of the
+ CS48L32_MICBIAS_xxx values.
+ See the INn_PDM_SUP field in the datasheet for a description.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ minItems: 1
+ maxItems: 4
+
+examples:
+ - |
+ cs48l32@0 {
+ compatible = "cirrus,cs48l32";
+
+ cirrus,in-type = <
+ CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF /* IN1[LR]_1 differential */
+ CS48L32_IN_TYPE_SE CS48L32_IN_TYPE_SE /* IN1[LR]_2 single-ended */
+ CS48L32_IN_TYPE_DIFF CS48L32_IN_TYPE_DIFF /* IN2[LR]_1 differential */
+ >;
+ cirrus,max-channels-clocked = <2 0 0>;
+ };
diff --git a/include/dt-bindings/sound/cs48l32.h b/include/dt-bindings/sound/cs48l32.h
new file mode 100644
index 000000000000..0b774da0a6c8
--- /dev/null
+++ b/include/dt-bindings/sound/cs48l32.h
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Device Tree defines for CS48L32 codec.
+ *
+ * Copyright (C) 2016-2018, 2022 Cirrus Logic, Inc. and
+ * Cirrus Logic International Semiconductor Ltd.
+ */
+
+#ifndef DT_BINDINGS_SOUND_CS48L32_H
+#define DT_BINDINGS_SOUND_CS48L32_H
+
+#define CS48L32_IN_TYPE_DIFF 0
+#define CS48L32_IN_TYPE_SE 1
+
+#define CS48L32_PDM_SUP_VOUT_MIC 0
+#define CS48L32_PDM_SUP_MICBIAS1 1
+#define CS48L32_PDM_SUP_MICBIAS2 2
+#define CS48L32_PDM_SUP_MICBIAS3 3
+
+#define CS48L32_PDM_FMT_MODE_A_LSB_FIRST 0x0000
+#define CS48L32_PDM_FMT_MODE_B_LSB_FIRST 0x4000
+#define CS48L32_PDM_FMT_MODE_A_MSB_FIRST 0x8000
+#define CS48L32_PDM_FMT_MODE_B_MSB_FIRST 0xc000
+
+#endif
--
2.30.2
next prev parent reply other threads:[~2022-11-09 16:55 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 16:53 [PATCH 00/12] Add support for the Cirrus Logic CS48L32 audio codecs Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 01/12] dt-bindings: mfd: Add Cirrus Logic CS48L32 audio codec Richard Fitzgerald
2022-11-09 21:09 ` Rob Herring
2022-11-14 8:36 ` Krzysztof Kozlowski
2022-11-09 16:53 ` [PATCH 02/12] mfd: cs48l32: Add register definitions for Cirrus Logic CS48L31/32/33 Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 03/12] mfd: cs48l32: Add support for CS48L31/32/33 codecs Richard Fitzgerald
2022-11-11 23:07 ` kernel test robot
2022-11-16 15:43 ` Lee Jones
2022-11-09 16:53 ` [PATCH 04/12] dt-bindings: pinctrl: Add Cirrus Logic CS48L31/32/33 Richard Fitzgerald
2022-11-09 21:09 ` Rob Herring
2022-11-14 8:39 ` Krzysztof Kozlowski
2022-11-09 16:53 ` [PATCH 05/12] pinctrl: cirrus: Add support for CS48L31/32/33 codecs Richard Fitzgerald
2022-11-10 10:02 ` Linus Walleij
2022-11-10 10:55 ` Richard Fitzgerald
2022-11-12 21:01 ` kernel test robot
2022-11-09 16:53 ` [PATCH 06/12] regulator: arizona-micsupp: Don't hardcode use of ARIZONA defines Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 07/12] regulator: arizona-micsupp: Don't use a common regulator name Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 08/12] regulator: arizona-micsupp: Support Cirrus Logic CS48L31/32/33 Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 09/12] irqchip: cirrus: Add driver for Cirrus Logic CS48L31/32/33 codecs Richard Fitzgerald
2022-11-10 8:02 ` Marc Zyngier
2022-11-10 11:22 ` Richard Fitzgerald
2022-11-10 12:01 ` Marc Zyngier
2022-11-10 13:00 ` Richard Fitzgerald
2022-11-10 15:13 ` Marc Zyngier
2022-11-10 16:31 ` Richard Fitzgerald
2022-11-10 16:55 ` Mark Brown
2022-11-10 18:47 ` Marc Zyngier
2022-11-10 20:36 ` Mark Brown
2022-11-11 8:00 ` Marc Zyngier
2022-11-11 11:16 ` Charles Keepax
2022-11-11 11:49 ` Mark Brown
2022-11-11 13:01 ` Charles Keepax
2022-11-11 13:00 ` Charles Keepax
2022-11-16 16:44 ` Mark Brown
2022-11-10 13:14 ` Richard Fitzgerald
2022-11-10 15:40 ` Marc Zyngier
2022-11-10 13:01 ` Mark Brown
2022-11-09 16:53 ` [PATCH 10/12] ASoC: wm_adsp: Allow client to hook into pre_run callback Richard Fitzgerald
2022-11-09 16:53 ` Richard Fitzgerald [this message]
2022-11-09 21:09 ` [PATCH 11/12] dt-bindings: sound: Add Cirrus Logic CS48L31/32/33 codecs Rob Herring
2022-11-14 8:45 ` Krzysztof Kozlowski
2022-11-14 11:00 ` Richard Fitzgerald
2022-11-14 11:03 ` Krzysztof Kozlowski
2022-11-14 12:34 ` Richard Fitzgerald
2022-11-09 16:53 ` [PATCH 12/12] ASoC: cs48l32: Add codec driver for Cirrus Logic CS48L31/32/33 Richard Fitzgerald
2022-11-10 20:20 ` kernel test robot
2022-11-10 20:53 ` [PATCH 00/12] Add support for the Cirrus Logic CS48L32 audio codecs Mark Brown
2022-11-11 13:50 ` Richard Fitzgerald
2022-11-23 13:11 ` (subset) " 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=20221109165331.29332-12-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).