ASoC: dt-bindings: atmel,asoc-wm8904: Convert to json-schema

Convert atmel,asoc-wm8904 devicetree binding to json-schema.

Signed-off-by: Dharma Balasubiramani <dharma.b@microchip.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240207094144.195397-1-dharma.b@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Dharma Balasubiramani 2024-02-07 15:11:44 +05:30 committed by Mark Brown
parent a15f859ca3
commit 565abf586f
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0
2 changed files with 84 additions and 55 deletions

View file

@ -0,0 +1,84 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/atmel,asoc-wm8904.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Atmel wm8904 audio codec complex
maintainers:
- Dharma Balasubiramani <dharma.b@microchip.com>
description:
The ASoC audio complex configuration for Atmel with WM8904 audio codec.
properties:
compatible:
const: atmel,asoc-wm8904
atmel,model:
$ref: /schemas/types.yaml#/definitions/string
description: The user-visible name of this sound complex.
atmel,ssc-controller:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the SSC controller.
atmel,audio-codec:
$ref: /schemas/types.yaml#/definitions/phandle
description: The phandle of the WM8731 audio codec.
atmel,audio-routing:
description:
A list of the connections between audio components. Each entry is a pair
of strings, the first being the connection's sink, the second being the
connection's source.
$ref: /schemas/types.yaml#/definitions/non-unique-string-array
items:
enum:
# Board Connectors
- Headphone Jack
- Line In Jack
- Mic
# WM8904 CODEC Pins
- IN1L
- IN1R
- IN2L
- IN2R
- IN3L
- IN3R
- HPOUTL
- HPOUTR
- LINEOUTL
- LINEOUTR
- MICBIAS
required:
- compatible
- atmel,model
- atmel,audio-routing
- atmel,ssc-controller
- atmel,audio-codec
additionalProperties: false
examples:
- |
sound {
compatible = "atmel,asoc-wm8904";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pck0_as_mck>;
atmel,model = "wm8904 @ AT91SAM9N12EK";
atmel,audio-routing =
"Headphone Jack", "HPOUTL",
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"Mic", "MICBIAS",
"IN1L", "Mic";
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8904>;
};

View file

@ -1,55 +0,0 @@
Atmel ASoC driver with wm8904 audio codec complex
Required properties:
- compatible: "atmel,asoc-wm8904"
- atmel,model: The user-visible name of this sound complex.
- atmel,audio-routing: A list of the connections between audio components.
Each entry is a pair of strings, the first being the connection's sink,
the second being the connection's source. Valid names for sources and
sinks are the WM8904's pins, and the jacks on the board:
WM8904 pins:
* IN1L
* IN1R
* IN2L
* IN2R
* IN3L
* IN3R
* HPOUTL
* HPOUTR
* LINEOUTL
* LINEOUTR
* MICBIAS
Board connectors:
* Headphone Jack
* Line In Jack
* Mic
- atmel,ssc-controller: The phandle of the SSC controller
- atmel,audio-codec: The phandle of the WM8904 audio codec
Optional properties:
- pinctrl-names, pinctrl-0: Please refer to pinctrl-bindings.txt
Example:
sound {
compatible = "atmel,asoc-wm8904";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pck0_as_mck>;
atmel,model = "wm8904 @ AT91SAM9N12EK";
atmel,audio-routing =
"Headphone Jack", "HPOUTL",
"Headphone Jack", "HPOUTR",
"IN2L", "Line In Jack",
"IN2R", "Line In Jack",
"Mic", "MICBIAS",
"IN1L", "Mic";
atmel,ssc-controller = <&ssc0>;
atmel,audio-codec = <&wm8904>;
};