mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
DT properties which can have multiple entries need to specify what the entries are and define how many entries there can be. In the case of only a single entry, just 'maxItems: 1' is sufficient. Add the missing entry constraints. These were found with a modified meta-schema. Unfortunately, there are a few cases where the size constraints are not defined such as common bindings, so the meta-schema can't be part of the normal checks. Cc: Jens Axboe <axboe@kernel.dk> Cc: Stephen Boyd <sboyd@kernel.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: MyungJoo Ham <myungjoo.ham@samsung.com> Cc: Chanwoo Choi <cw00.choi@samsung.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Marc Zyngier <maz@kernel.org> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Sebastian Reichel <sre@kernel.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Sebastian Reichel <sre@kernel.org> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> #for-iio Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Suman Anna <s-anna@ti.com> Acked-by: Paul Cercueil <paul@crapouillou.net> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210104230253.2805217-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
268 lines
5.5 KiB
YAML
268 lines
5.5 KiB
YAML
# SPDX-License-Identifier: GPL-2.0
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-codec.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Allwinner A10 Codec Device Tree Bindings
|
|
|
|
maintainers:
|
|
- Chen-Yu Tsai <wens@csie.org>
|
|
- Maxime Ripard <mripard@kernel.org>
|
|
|
|
properties:
|
|
"#sound-dai-cells":
|
|
const: 0
|
|
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun4i-a10-codec
|
|
- allwinner,sun6i-a31-codec
|
|
- allwinner,sun7i-a20-codec
|
|
- allwinner,sun8i-a23-codec
|
|
- allwinner,sun8i-h3-codec
|
|
- allwinner,sun8i-v3s-codec
|
|
|
|
reg:
|
|
maxItems: 1
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
clocks:
|
|
items:
|
|
- description: Bus Clock
|
|
- description: Module Clock
|
|
|
|
clock-names:
|
|
items:
|
|
- const: apb
|
|
- const: codec
|
|
|
|
dmas:
|
|
items:
|
|
- description: RX DMA Channel
|
|
- description: TX DMA Channel
|
|
|
|
dma-names:
|
|
items:
|
|
- const: rx
|
|
- const: tx
|
|
|
|
resets:
|
|
maxItems: 1
|
|
|
|
allwinner,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
|
|
minItems: 2
|
|
maxItems: 18
|
|
items:
|
|
enum:
|
|
# Audio Pins on the SoC
|
|
- HP
|
|
- HPCOM
|
|
- LINEIN
|
|
- LINEOUT
|
|
- MIC1
|
|
- MIC2
|
|
- MIC3
|
|
|
|
# Microphone Biases from the SoC
|
|
- HBIAS
|
|
- MBIAS
|
|
|
|
# Board Connectors
|
|
- Headphone
|
|
- Headset Mic
|
|
- Line In
|
|
- Line Out
|
|
- Mic
|
|
- Speaker
|
|
|
|
allwinner,codec-analog-controls:
|
|
$ref: /schemas/types.yaml#/definitions/phandle
|
|
description: Phandle to the codec analog controls in the PRCM
|
|
|
|
allwinner,pa-gpios:
|
|
maxItems: 1
|
|
description: GPIO to enable the external amplifier
|
|
|
|
required:
|
|
- "#sound-dai-cells"
|
|
- compatible
|
|
- reg
|
|
- interrupts
|
|
- clocks
|
|
- clock-names
|
|
- dmas
|
|
- dma-names
|
|
|
|
allOf:
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun6i-a31-codec
|
|
- allwinner,sun8i-a23-codec
|
|
- allwinner,sun8i-h3-codec
|
|
- allwinner,sun8i-v3s-codec
|
|
|
|
then:
|
|
if:
|
|
properties:
|
|
compatible:
|
|
const: allwinner,sun6i-a31-codec
|
|
|
|
then:
|
|
required:
|
|
- resets
|
|
- allwinner,audio-routing
|
|
|
|
else:
|
|
required:
|
|
- resets
|
|
- allwinner,audio-routing
|
|
- allwinner,codec-analog-controls
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun6i-a31-codec
|
|
|
|
then:
|
|
properties:
|
|
allwinner,audio-routing:
|
|
items:
|
|
enum:
|
|
- HP
|
|
- HPCOM
|
|
- LINEIN
|
|
- LINEOUT
|
|
- MIC1
|
|
- MIC2
|
|
- MIC3
|
|
- HBIAS
|
|
- MBIAS
|
|
- Headphone
|
|
- Headset Mic
|
|
- Line In
|
|
- Line Out
|
|
- Mic
|
|
- Speaker
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun8i-a23-codec
|
|
|
|
then:
|
|
properties:
|
|
allwinner,audio-routing:
|
|
items:
|
|
enum:
|
|
- HP
|
|
- HPCOM
|
|
- LINEIN
|
|
- MIC1
|
|
- MIC2
|
|
- HBIAS
|
|
- MBIAS
|
|
- Headphone
|
|
- Headset Mic
|
|
- Line In
|
|
- Line Out
|
|
- Mic
|
|
- Speaker
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun8i-h3-codec
|
|
|
|
then:
|
|
properties:
|
|
allwinner,audio-routing:
|
|
items:
|
|
enum:
|
|
- HP
|
|
- HPCOM
|
|
- LINEIN
|
|
- LINEOUT
|
|
- MIC1
|
|
- MIC2
|
|
- HBIAS
|
|
- MBIAS
|
|
- Headphone
|
|
- Headset Mic
|
|
- Line In
|
|
- Line Out
|
|
- Mic
|
|
- Speaker
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- allwinner,sun8i-v3s-codec
|
|
|
|
then:
|
|
properties:
|
|
allwinner,audio-routing:
|
|
items:
|
|
enum:
|
|
- HP
|
|
- HPCOM
|
|
- MIC1
|
|
- HBIAS
|
|
- Headphone
|
|
- Headset Mic
|
|
- Line In
|
|
- Line Out
|
|
- Mic
|
|
- Speaker
|
|
|
|
additionalProperties: false
|
|
|
|
examples:
|
|
- |
|
|
codec@1c22c00 {
|
|
#sound-dai-cells = <0>;
|
|
compatible = "allwinner,sun7i-a20-codec";
|
|
reg = <0x01c22c00 0x40>;
|
|
interrupts = <0 30 4>;
|
|
clocks = <&apb0_gates 0>, <&codec_clk>;
|
|
clock-names = "apb", "codec";
|
|
dmas = <&dma 0 19>, <&dma 0 19>;
|
|
dma-names = "rx", "tx";
|
|
};
|
|
|
|
- |
|
|
codec@1c22c00 {
|
|
#sound-dai-cells = <0>;
|
|
compatible = "allwinner,sun6i-a31-codec";
|
|
reg = <0x01c22c00 0x98>;
|
|
interrupts = <0 29 4>;
|
|
clocks = <&ccu 61>, <&ccu 135>;
|
|
clock-names = "apb", "codec";
|
|
resets = <&ccu 42>;
|
|
dmas = <&dma 15>, <&dma 15>;
|
|
dma-names = "rx", "tx";
|
|
allwinner,audio-routing =
|
|
"Headphone", "HP",
|
|
"Speaker", "LINEOUT",
|
|
"LINEIN", "Line In",
|
|
"MIC1", "MBIAS",
|
|
"MIC1", "Mic",
|
|
"MIC2", "HBIAS",
|
|
"MIC2", "Headset Mic";
|
|
};
|
|
|
|
...
|