From: Macpaul Lin <macpaul.lin@mediatek.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Pavel Machek <pavel@ucw.cz>,
Lee Jones <lee@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Sen Chu <sen.chu@mediatek.com>,
Sean Wang <sean.wang@mediatek.com>,
Macpaul Lin <macpaul.lin@mediatek.com>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Sebastian Reichel <sre@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
<linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-leds@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>, <linux-pm@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-rtc@vger.kernel.org>,
<linux-sound@vger.kernel.org>,
Alexandre Mergnat <amergnat@baylibre.com>
Cc: Bear Wang <bear.wang@mediatek.com>,
Pablo Sun <pablo.sun@mediatek.com>,
Macpaul Lin <macpaul@gmail.com>,
Chris-qj chen <chris-qj.chen@mediatek.com>,
MediaTek Chromebook Upstream
<Project_Global_Chrome_Upstream_Group@mediatek.com>,
Chen-Yu Tsai <wenst@chromium.org>
Subject: [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema
Date: Mon, 30 Sep 2024 15:33:10 +0800 [thread overview]
Message-ID: <20240930073311.1486-2-macpaul.lin@mediatek.com> (raw)
In-Reply-To: <20240930073311.1486-1-macpaul.lin@mediatek.com>
Convert the MediaTek MT6358 Audio CODEC bindings to DT schema.
This change implements the following updates:
1. Compatible property: Added the const 'mediatek,mt6358-sound'
to ensure alignment with the schema in the actual (DTS) file
"mt8186-corsola.dtsi" with 'mediatek,mt6366-sound'.
2. Example: Removed the example section, as it should be relocated to
the MT6397 PMIC file 'mfd/mediatek,mt6397.yaml'.
Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
---
.../devicetree/bindings/sound/mt6358.txt | 26 ------------
.../devicetree/bindings/sound/mt6358.yaml | 41 +++++++++++++++++++
2 files changed, 41 insertions(+), 26 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/sound/mt6358.txt
create mode 100644 Documentation/devicetree/bindings/sound/mt6358.yaml
Changess for v1~v6:
- It was not in the origin patch set.
Changes for v7:
- It is seperated from the origin patch set (2/2, v6).
It could simplifies the audio-codec node in next patch (3/3, v7)
of 'mfd/mediatek,mt6397.yaml'
diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
deleted file mode 100644
index fbe9e55c68f5..000000000000
--- a/Documentation/devicetree/bindings/sound/mt6358.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-Mediatek MT6358 Audio Codec
-
-The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
-For more detail, please visit Mediatek PMIC wrapper documentation.
-
-Must be a child node of PMIC wrapper.
-
-Required properties:
-
-- compatible - "string" - One of:
- "mediatek,mt6358-sound"
- "mediatek,mt6366-sound"
-- Avdd-supply : power source of AVDD
-
-Optional properties:
-- mediatek,dmic-mode : Indicates how many data pins are used to transmit two
- channels of PDM signal. 0 means two wires, 1 means one wire. Default
- value is 0.
-
-Example:
-
-mt6358_snd {
- compatible = "mediatek,mt6358-sound";
- Avdd-supply = <&mt6358_vaud28_reg>;
- mediatek,dmic-mode = <0>;
-};
diff --git a/Documentation/devicetree/bindings/sound/mt6358.yaml b/Documentation/devicetree/bindings/sound/mt6358.yaml
new file mode 100644
index 000000000000..5f7611e26a89
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mt6358.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mt6358.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6358 Audio Codec
+
+maintainers:
+ - Jiaxin Yu <jiaxin.yu@mediatek.com>
+ - Macpaul Lin <macpaul.lin@mediatek.com>
+
+description: |
+ The communication between MT6358 and SoC is through Mediatek PMIC wrapper.
+ For more detail, please visit Mediatek PMIC wrapper documentation.
+ Must be a child node of PMIC wrapper.
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt6366-sound
+ - mediatek,mt6358-sound
+ const: mediatek,mt6358-sound
+
+ Avdd-supply:
+ description: Power source of AVDD
+
+ mediatek,dmic-mode:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Indicates how many data pins are used to transmit two channels of PDM
+ signal. 0 means two wires, 1 means one wire. Default value is 0.
+ enum:
+ - 0 # two wires
+ - 1 # one wire
+
+required:
+ - compatible
+ - Avdd-supply
+
+additionalProperties: false
--
2.45.2
next prev parent reply other threads:[~2024-09-30 7:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 7:33 [PATCH v7 1/3] regulator: dt-bindings: mt6323: Convert to DT schema Macpaul Lin
2024-09-30 7:33 ` Macpaul Lin [this message]
2024-10-01 6:34 ` [PATCH v7 2/3] ASoC: dt-bindings: mt6358: Convert to DT Schema Krzysztof Kozlowski
2024-10-01 7:05 ` Macpaul Lin
2024-10-01 7:50 ` Macpaul Lin
2024-10-01 9:19 ` Krzysztof Kozlowski
2024-10-01 8:56 ` Krzysztof Kozlowski
2024-09-30 7:33 ` [PATCH v7 3/3] dt-bindings: mfd: mediatek: mt6397: Convert to DT schema format Macpaul Lin
2024-10-01 6:29 ` Krzysztof Kozlowski
2024-10-01 6:35 ` Krzysztof Kozlowski
2024-10-01 7:56 ` Macpaul Lin
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=20240930073311.1486-2-macpaul.lin@mediatek.com \
--to=macpaul.lin@mediatek.com \
--cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
--cc=alexandre.belloni@bootlin.com \
--cc=amergnat@baylibre.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=bear.wang@mediatek.com \
--cc=broonie@kernel.org \
--cc=chris-qj.chen@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=macpaul@gmail.com \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=pablo.sun@mediatek.com \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
--cc=sean.wang@mediatek.com \
--cc=sen.chu@mediatek.com \
--cc=sre@kernel.org \
--cc=wenst@chromium.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;
as well as URLs for NNTP newsgroup(s).