Mediatek MT6358 dt-binding documentation conversion and fixes
Subsystems (5)
v2 cover Mediatek MT6358 dt-binding documentation conversion and fixes
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 <[email protected]>
To: Mark Brown <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Matthias Brugger <[email protected]>
To: AngeloGioacchino Del Regno <[email protected]>
To: Lee Jones <[email protected]>
Changes for v2:
Fix problems with the compatible field
Add missing required properties
Previous Versions:
v1: https://lore.kernel.org/all/[email protected]/
---
Kartik Agarwala (3):
ASoC: dt-bindings: mt6358: Convert to dtschema
arm64: dts: mediatek: Add missing Avdd-supply property for mt6358codec
dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound
Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + .../devicetree/bindings/sound/mediatek,mt6358.yaml | 51 ++++++++++++++++++++++ Documentation/devicetree/bindings/sound/mt6358.txt | 26 ----------- arch/arm64/boot/dts/mediatek/mt8183-evb.dts | 4 ++ arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 4 ++ 5 files changed, 60 insertions(+), 26 deletions(-)
---
base-commit: 617f9a0a70e8bc27ef0343f3abac1faeba07cb71
change-id: 20240606-mt6358-e6fff7ed5747
Best regards,
Signature · 1 line
Kartik Agarwala <[email protected]>
PATCH v2 1/3 ASoC: dt-bindings: mt6358: Convert to dtschema
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(-)
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +51 -0
@@ -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 <[email protected]> + +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>; + };
Documentation/devicetree/bindings/sound/mt6358.txt deleted +0 -26
@@ -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>; -};
Signature · 1 line
2.34.1
AngeloGioacchino Del Regno
maintainerRe: [PATCH v2 1/3] ASoC: dt-bindings: mt6358: Convert to dtschema
Il 17/06/24 14:28, Kartik Agarwala ha scritto:
Quoted 12 lines
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(-)Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +0
-0
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 7
Quoted 7 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +7
-0@@ -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
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 10
Quoted 3 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +3
-0+ +maintainers: + - Kartik Agarwala <[email protected]>
- Jiaxin Yu <[email protected]>
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 16
Quoted 6 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +6
-0+ +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.
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 21
Quoted 5 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +5
-0+properties: + compatible: + oneOf: + - const: mediatek,mt6358-sound + - const: mediatek,mt6366-sound
This should be an enum.
Quoted 4 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +4
-0+ - items: + - const: mediatek,mt6366-sound + - const: mediatek,mt6358-sound +
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 35
Quoted 10 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +10
-0+ 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 ]
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml line 38
Quoted 3 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +3
-0+ - 0 + - 1 +
Regards,
Angelo
Quoted 46 lines
Documentation/devicetree/bindings/sound/mediatek,mt6358.yaml new file +13
-0+required: + - compatible + - Avdd-supply + +additionalProperties: false + +examples: + - | + audio-codec { + compatible = "mediatek,mt6366-sound"; + Avdd-supply = <&mt6358_vaud28_reg>; + mediatek,dmic-mode = <0>; + };Documentation/devicetree/bindings/sound/mt6358.txt deleted +0
-26@@ -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>; -};
PATCH v2 2/3 arm64: dts: mediatek: Add missing Avdd-supply property for mt6358codec
In reply to Kartik AgarwalaAvdd-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(+)
arch/arm64/boot/dts/mediatek/mt8183-evb.dts +4 -0
@@ -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 {
arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts +4 -0
@@ -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 {
Signature · 1 line
2.34.1
PATCH v2 3/3 dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound
In reply to Kartik AgarwalaAdd reference for mediatek,mt6358-sound
--- Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/mt6397.txt +1 -0
@@ -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"
Signature · 1 line
2.34.1
Rob Herring
maintainerRe: [PATCH v2 3/3] dt-bindings: mfd: mt6397: Add reference for mediatek,mt6358-sound
Quoted 10 lines · Kartik Agarwala
Add reference for mediatek,mt6358-sound
--- Documentation/devicetree/bindings/mfd/mt6397.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/mfd/mt6397.txt +0
-0
Documentation/devicetree/bindings/mfd/mt6397.txt Optional subnodes: · line 51
Quoted 4 lines
Documentation/devicetree/bindings/mfd/mt6397.txt +1
-0@@ -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
Lee Jones
maintainerQuoted 21 lines · Kartik Agarwala
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-supplyproperty.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, andmt8183-pumpkin.dts.To: Liam Girdwood <[email protected]>
To: Mark Brown <[email protected]>
To: Rob Herring <[email protected]>
To: Krzysztof Kozlowski <[email protected]>
To: Conor Dooley <[email protected]>
To: Matthias Brugger <[email protected]>
To: AngeloGioacchino Del Regno <[email protected]>
To: Lee Jones <[email protected]>
Quoted 6 lines
Please run your patches through scripts/checkpatch.pl.
Signature · 1 line
Lee Jones [李琼斯]