Unverified Commit 7f27be23 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: dt-bindings: audio-graph-port related update

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Audio-Graph-Card and Simple-Audio-Card are similar Card
and are sharing same utils. Thus we can also sharing same schema.

This patch-set fixup some Renesas's "make dtbs_check".
parents 8d076a99 9e8593ec
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -25,6 +25,13 @@ properties:
  "#sound-dai-cells":
    const: 0

  ports:
    $ref: audio-graph-port.yaml#/definitions/ports

  port:
    $ref: audio-graph-port.yaml#
    unevaluatedProperties: false

patternProperties:
  "^asahi-kasei,in[1-2]-single-end$":
    description: Input Pin 1 - 2.
+43 −22
Original line number Diff line number Diff line
@@ -11,32 +11,24 @@ maintainers:

select: false

allOf:
  - $ref: /schemas/graph.yaml#/$defs/port-base

definitions:
  port-base:
    $ref: /schemas/graph.yaml#/$defs/port-base
    properties:
  prefix:
    description: "device name prefix"
    $ref: /schemas/types.yaml#/definitions/string
      convert-rate:
        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
      convert-channels:
        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
      convert-sample-format:
        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
      mclk-fs:
        $ref: "simple-card.yaml#/definitions/mclk-fs"

patternProperties:
  "^endpoint(@[0-9a-f]+)?":
  endpoint-base:
    $ref: /schemas/graph.yaml#/$defs/endpoint-base
    unevaluatedProperties: false

    properties:
      mclk-fs:
        description: |
          Multiplication factor between stream rate and codec mclk.
          When defined, mclk-fs property defined in dai-link sub nodes are
          ignored.
        $ref: /schemas/types.yaml#/definitions/uint32
        $ref: "simple-card.yaml#/definitions/mclk-fs"
      frame-inversion:
        description: dai-link uses frame clock inversion
        $ref: /schemas/types.yaml#/definitions/flag
@@ -53,6 +45,15 @@ patternProperties:
        oneOf:
          - $ref: /schemas/types.yaml#/definitions/flag
          - $ref: /schemas/types.yaml#/definitions/phandle
      clocks:
        description: Indicates system clock
        $ref: /schemas/types.yaml#/definitions/phandle
      system-clock-frequency:
        $ref: "simple-card.yaml#/definitions/system-clock-frequency"
      system-clock-direction-out:
        $ref: "simple-card.yaml#/definitions/system-clock-direction-out"
      system-clock-fixed:
        $ref: "simple-card.yaml#/definitions/system-clock-fixed"

      dai-format:
        description: audio format.
@@ -100,4 +101,24 @@ patternProperties:
              minimum: 1
              maximum: 64

  ports:
    $ref: "#/definitions/port-base"
    unevaluatedProperties: false
    patternProperties:
      "^port(@[0-9a-f]+)?$":
        $ref: "#/definitions/port-base"
        unevaluatedProperties: false
        patternProperties:
          "^endpoint(@[0-9a-f]+)?":
            $ref: "#/definitions/endpoint-base"
            unevaluatedProperties: false

allOf:
  - $ref: "#/definitions/port-base"

patternProperties:
  "^endpoint(@[0-9a-f]+)?":
    $ref: "#/definitions/endpoint-base"
    unevaluatedProperties: false

additionalProperties: true
+23 −8
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ properties:
    description: |
      it must be 0 if your system is using single DAI
      it must be 1 if your system is using multi  DAIs
      This is used on simple-audio-card
    enum: [0, 1]

  "#clock-cells":
@@ -109,14 +110,33 @@ properties:
        - pattern: '^clk_(a|b|c|i)$'

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    $ref: audio-graph-port.yaml#/definitions/port-base
    unevaluatedProperties: false
    patternProperties:
      '^port(@[0-9a-f]+)?$':
        $ref: audio-graph-port.yaml#
        $ref: audio-graph-port.yaml#/definitions/port-base
        unevaluatedProperties: false
        patternProperties:
          "^endpoint(@[0-9a-f]+)?":
            $ref: audio-graph-port.yaml#/definitions/endpoint-base
            properties:
              playback:
                $ref: /schemas/types.yaml#/definitions/phandle-array
              capture:
                $ref: /schemas/types.yaml#/definitions/phandle-array
            unevaluatedProperties: false

  port:
    $ref: audio-graph-port.yaml#
    $ref: audio-graph-port.yaml#/definitions/port-base
    unevaluatedProperties: false
    patternProperties:
      "^endpoint(@[0-9a-f]+)?":
        $ref: audio-graph-port.yaml#/definitions/endpoint-base
        properties:
          playback:
            $ref: /schemas/types.yaml#/definitions/phandle-array
          capture:
            $ref: /schemas/types.yaml#/definitions/phandle-array
        unevaluatedProperties: false

  rcar_sound,dvc:
@@ -174,10 +194,6 @@ properties:
                  enum:
                    - tx
                    - rx
        required:
          - interrupts
          - dmas
          - dma-names
    additionalProperties: false

  rcar_sound,ssiu:
@@ -267,7 +283,6 @@ required:
  - reg-names
  - clocks
  - clock-names
  - "#sound-dai-cells"

allOf:
  - $ref: dai-common.yaml#
+4 −0
Original line number Diff line number Diff line
@@ -217,6 +217,10 @@ patternProperties:
      reg:
        maxItems: 1

      "#address-cells":
        const: 1
      "#size-cells":
        const: 0
      # common properties
      frame-master:
        $ref: "#/definitions/frame-master"
+0 −56
Original line number Diff line number Diff line
Texas Instruments pcm3168a DT bindings

This driver supports both SPI and I2C bus access for this codec

Required properties:

  - compatible: "ti,pcm3168a"

  - clocks : Contains an entry for each entry in clock-names

  - clock-names : Includes the following entries:
	"scki"	The system clock

  - VDD1-supply : Digital power supply regulator 1 (+3.3V)

  - VDD2-supply : Digital power supply regulator 2 (+3.3V)

  - VCCAD1-supply : ADC power supply regulator 1 (+5V)

  - VCCAD2-supply : ADC power supply regulator 2 (+5V)

  - VCCDA1-supply : DAC power supply regulator 1 (+5V)

  - VCCDA2-supply : DAC power supply regulator 2 (+5V)

For required properties on SPI/I2C, consult SPI/I2C device tree documentation

Optional properties:

  - reset-gpios : Optional reset gpio line connected to RST pin of the codec.
		  The RST line is low active:
		  RST = low: device power-down
		  RST = high: device is enabled

Examples:

i2c0: i2c0@0 {

	...

	pcm3168a: audio-codec@44 {
		compatible = "ti,pcm3168a";
		reg = <0x44>;
		reset-gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
		clocks = <&clk_core CLK_AUDIO>;
		clock-names = "scki";
		VDD1-supply = <&supply3v3>;
		VDD2-supply = <&supply3v3>;
		VCCAD1-supply = <&supply5v0>;
		VCCAD2-supply = <&supply5v0>;
		VCCDA1-supply = <&supply5v0>;
		VCCDA2-supply = <&supply5v0>;
		pinctrl-names = "default";
		pinctrl-0 = <&dac_clk_pin>;
	};
};
Loading