Documentation / devicetree / bindings / sound / spacemit,k1-i2s.yaml


Based on kernel version 7.3. Page generated on 2026-10-19 13:17 EDT.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/spacemit,k1-i2s.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: SpacemiT K1/K3 I2S controller

description:
  The I2S bus (Inter-IC sound bus) is a serial link for digital
  audio data transfer between devices in the system.

maintainers:
  - Troy Mitchell <troy.mitchell@linux.spacemit.com>

allOf:
  - $ref: dai-common.yaml#
  - if:
      properties:
        compatible:
          contains:
            const: spacemit,k3-i2s
    then:
      properties:
        clocks:
          minItems: 6
        clock-names:
          minItems: 6
    else:
      properties:
        clocks:
          maxItems: 4
        clock-names:
          maxItems: 4

properties:
  compatible:
    enum:
      - spacemit,k1-i2s
      - spacemit,k3-i2s

  reg:
    maxItems: 1

  clocks:
    oneOf:
      - items:
          - description: clock for I2S sysclk
          - description: clock for I2S bclk
          - description: clock for I2S bus
          - description: clock for I2S controller
      - items:
          - description: clock for I2S sysclk
          - description: clock for I2S bclk
          - description: clock for I2S bus
          - description: clock for I2S controller
          - description: clock for I2S common sysclk
          - description: clock for I2S common bclk
      - items:
          - description: clock for I2S sysclk
          - description: clock for I2S bclk
          - description: clock for I2S bus
          - description: clock for I2S controller
          - description: clock for I2S sysclk divider
          - description: clock for I2S common sysclk
          - description: clock for I2S common bclk

  clock-names:
    oneOf:
      - items:
          - const: sysclk
          - const: bclk
          - const: bus
          - const: func
      - items:
          - const: sysclk
          - const: bclk
          - const: bus
          - const: func
          - const: c_sysclk
          - const: c_bclk
      - items:
          - const: sysclk
          - const: bclk
          - const: bus
          - const: func
          - const: sysclk_div
          - const: c_sysclk
          - const: c_bclk

  dmas:
    minItems: 1
    maxItems: 2

  dma-names:
    minItems: 1
    items:
      - const: tx
      - const: rx

  resets:
    maxItems: 1

  port:
    $ref: audio-graph-port.yaml#
    unevaluatedProperties: false
 
  "#sound-dai-cells":
    const: 0

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - dmas
  - dma-names
  - resets
  - "#sound-dai-cells"

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/clock/spacemit,k1-syscon.h>
    i2s@d4026000 {
      compatible = "spacemit,k1-i2s";
      reg = <0xd4026000 0x30>;
      clocks = <&syscon_mpmu CLK_I2S_SYSCLK>,
               <&syscon_mpmu CLK_I2S_BCLK>,
               <&syscon_apbc CLK_SSPA0_BUS>,
               <&syscon_apbc CLK_SSPA0>;
      clock-names = "sysclk", "bclk", "bus", "func";
      dmas = <&pdma0 21>, <&pdma0 22>;
      dma-names = "tx", "rx";
      resets = <&syscon_apbc RESET_SSPA0>;
      #sound-dai-cells = <0>;
    };