* [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema
2024-06-17 12:28 [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Kartik Agarwala
@ 2024-06-17 12:28 ` Kartik Agarwala
2024-06-18 10:53 ` AngeloGioacchino Del Regno
2024-06-17 12:28 ` [PATCH v2 2/3] arm64: dts: mediatek: Add missing Avdd-supply property for mt6358codec Kartik Agarwala
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Kartik Agarwala @ 2024-06-17 12:28 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Lee Jones
Cc: linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Kartik Agarwala
Convert from txt to dtschema
---
.../devicetree/bindings/sound/mediatek,mt6358.yaml | 51 ++++++++++++++++++++++
Documentation/devicetree/bindings/sound/mt6358.txt | 26 -----------
2 files changed, 51 insertions(+), 26 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
new file mode 100644
index 000000000..336d2d969
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/mediatek,mt6358.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek MT6358 Audio Codec
+
+maintainers:
+ - Kartik Agarwala <agarwala.kartik@gmail.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:
+ oneOf:
+ - const: mediatek,mt6358-sound
+ - const: mediatek,mt6366-sound
+ - items:
+ - const: mediatek,mt6366-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.
+ default: 0
+ enum:
+ - 0
+ - 1
+
+required:
+ - compatible
+ - Avdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ audio-codec {
+ compatible = "mediatek,mt6366-sound";
+ Avdd-supply = <&mt6358_vaud28_reg>;
+ mediatek,dmic-mode = <0>;
+ };
diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
deleted file mode 100644
index fbe9e55c6..000000000
--- 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>;
-};
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema
2024-06-17 12:28 ` [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema Kartik Agarwala
@ 2024-06-18 10:53 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-06-18 10:53 UTC (permalink / raw)
To: Kartik Agarwala, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Lee Jones
Cc: linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 17/06/24 14:28, Kartik Agarwala ha scritto:
> Convert from txt to dtschema
> ---
> .../devicetree/bindings/sound/mediatek,mt6358.yaml | 51 ++++++++++++++++++++++
> Documentation/devicetree/bindings/sound/mt6358.txt | 26 -----------
> 2 files changed, 51 insertions(+), 26 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
> new file mode 100644
> index 000000000..336d2d969
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml
> @@ -0,0 +1,51 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/mediatek,mt6358.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Mediatek MT6358 Audio Codec
title: MediaTek MT6358/MT6366 Audio Codec
> +
> +maintainers:
> + - Kartik Agarwala <agarwala.kartik@gmail.com>
- Jiaxin Yu <jiaxin.yu@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.
> +
The communication between MT6358 or MT6366 and SoC happens through
the MediaTek PMIC Wrapper.
For more detail, please visit MediaTek PMIC wrapper documentation:
Documentation/devicetree/bindings/soc/mediatek/mediatek,pwrap.yaml
Must be a child node of a PMIC.
> +properties:
> + compatible:
> + oneOf:
> + - const: mediatek,mt6358-sound
> + - const: mediatek,mt6366-sound
This should be an enum.
> + - items:
> + - const: mediatek,mt6366-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.
> + default: 0
> + enum:
enum: [ 0, 1 ]
> + - 0
> + - 1
> +
Regards,
Angelo
> +required:
> + - compatible
> + - Avdd-supply
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + audio-codec {
> + compatible = "mediatek,mt6366-sound";
> + Avdd-supply = <&mt6358_vaud28_reg>;
> + mediatek,dmic-mode = <0>;
> + };
> diff --git a/Documentation/devicetree/bindings/sound/mt6358.txt b/Documentation/devicetree/bindings/sound/mt6358.txt
> deleted file mode 100644
> index fbe9e55c6..000000000
> --- 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>;
> -};
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] arm64: dts: mediatek: Add missing Avdd-supply property for mt6358codec
2024-06-17 12:28 [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Kartik Agarwala
2024-06-17 12:28 ` [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema Kartik Agarwala
@ 2024-06-17 12:28 ` Kartik Agarwala
2024-06-17 12:28 ` [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound Kartik Agarwala
2024-06-17 13:04 ` [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Lee Jones
3 siblings, 0 replies; 7+ messages in thread
From: Kartik Agarwala @ 2024-06-17 12:28 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Lee Jones
Cc: linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Kartik Agarwala
Avdd-supply property is a required property for the mt6358codec.
---
arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 4 ++++
arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
index 681deddff..241dc210d 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8183-evb.dts
@@ -154,6 +154,10 @@ &mt6358_vsram_gpu_reg {
regulator-coupled-max-spread = <100000>;
};
+&mt6358codec {
+ Avdd-supply = <&mt6358_vaud28_reg>;
+};
+
&pio {
i2c_pins_0: i2c0 {
pins_i2c {
diff --git a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
index 333c516af..b3c988e3c 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts
@@ -191,6 +191,10 @@ &mt6358_vsram_gpu_reg {
regulator-coupled-max-spread = <100000>;
};
+&mt6358codec {
+ Avdd-supply = <&mt6358_vaud28_reg>;
+};
+
&pio {
i2c_pins_0: i2c0 {
pins_i2c {
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound
2024-06-17 12:28 [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Kartik Agarwala
2024-06-17 12:28 ` [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema Kartik Agarwala
2024-06-17 12:28 ` [PATCH v2 2/3] arm64: dts: mediatek: Add missing Avdd-supply property for mt6358codec Kartik Agarwala
@ 2024-06-17 12:28 ` Kartik Agarwala
2024-06-27 20:05 ` Rob Herring
2024-06-17 13:04 ` [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Lee Jones
3 siblings, 1 reply; 7+ messages in thread
From: Kartik Agarwala @ 2024-06-17 12:28 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Lee Jones
Cc: linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Kartik Agarwala
Add reference for mediatek,mt6358-sound
---
Documentation/devicetree/bindings/mfd/mt6397.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
index 10540aa7a..cf7fcc402 100644
--- a/Documentation/devicetree/bindings/mfd/mt6397.txt
+++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
@@ -48,6 +48,7 @@ Optional subnodes:
- codec
Required properties:
- compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound"
+ see ../sound/mediatek,mt6358.yaml
- clk
Required properties:
- compatible: "mediatek,mt6397-clk"
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound
2024-06-17 12:28 ` [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound Kartik Agarwala
@ 2024-06-27 20:05 ` Rob Herring
0 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-06-27 20:05 UTC (permalink / raw)
To: Kartik Agarwala
Cc: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Lee Jones,
linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Mon, Jun 17, 2024 at 05:58:26PM +0530, Kartik Agarwala wrote:
> Add reference for mediatek,mt6358-sound
> ---
> Documentation/devicetree/bindings/mfd/mt6397.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/mfd/mt6397.txt b/Documentation/devicetree/bindings/mfd/mt6397.txt
> index 10540aa7a..cf7fcc402 100644
> --- a/Documentation/devicetree/bindings/mfd/mt6397.txt
> +++ b/Documentation/devicetree/bindings/mfd/mt6397.txt
> @@ -48,6 +48,7 @@ Optional subnodes:
> - codec
> Required properties:
> - compatible: "mediatek,mt6397-codec" or "mediatek,mt6358-sound"
> + see ../sound/mediatek,mt6358.yaml
No point in adding this as this file should get converted.
Rob
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes
2024-06-17 12:28 [PATCH v2 0/3] Mediatek MT6358 dt-binding documentation conversion and fixes Kartik Agarwala
` (2 preceding siblings ...)
2024-06-17 12:28 ` [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound Kartik Agarwala
@ 2024-06-17 13:04 ` Lee Jones
3 siblings, 0 replies; 7+ messages in thread
From: Lee Jones @ 2024-06-17 13:04 UTC (permalink / raw)
To: Kartik Agarwala
Cc: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
linux-sound, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Mon, 17 Jun 2024, Kartik Agarwala wrote:
> The primary purpose behind this series is to convert the Mediatek
> MT6358 Audio Codec dt-binding documentation from txt to dt-schema.
> Additionally, it fixes the dts for some mediatek boards which were using
> this dt-binding but were missing the required `Avdd-supply` property.
>
> I have also updated the parent PMIC txt documentation to
> reference this binding. I have not added any new examples as the older
> example already has a codec node.
>
> I have tested my patches against `mt8186-corsola-steelix-sku131072.dts`,
> `mt8186-corsola-steelix-sku131073.dts`, `mt8183-evb.dts`, and
> `mt8183-pumpkin.dts`.
>
> To: Liam Girdwood <lgirdwood@gmail.com>
> To: Mark Brown <broonie@kernel.org>
> To: Rob Herring <robh@kernel.org>
> To: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
> To: Conor Dooley <conor+dt@kernel.org>
> To: Matthias Brugger <matthias.bgg@gmail.com>
> To: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> To: Lee Jones <lee@kernel.org>
> Cc: linux-sound@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-mediatek@lists.infradead.org
> Signed-off-by: Kartik Agarwala <agarwala.kartik@gmail.com>
Please run your patches through scripts/checkpatch.pl.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 7+ messages in thread