brintos

brintos / linux-shallow public Read only

0
0
Text · 5.5 KiB · 7827364 Raw
269 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/sound/allwinner,sun4i-a10-codec.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Allwinner A10 Codec8 9maintainers:10  - Chen-Yu Tsai <wens@csie.org>11  - Maxime Ripard <mripard@kernel.org>12 13properties:14  "#sound-dai-cells":15    const: 016 17  compatible:18    enum:19      - allwinner,sun4i-a10-codec20      - allwinner,sun6i-a31-codec21      - allwinner,sun7i-a20-codec22      - allwinner,sun8i-a23-codec23      - allwinner,sun8i-h3-codec24      - allwinner,sun8i-v3s-codec25 26  reg:27    maxItems: 128 29  interrupts:30    maxItems: 131 32  clocks:33    items:34      - description: Bus Clock35      - description: Module Clock36 37  clock-names:38    items:39      - const: apb40      - const: codec41 42  dmas:43    items:44      - description: RX DMA Channel45      - description: TX DMA Channel46 47  dma-names:48    items:49      - const: rx50      - const: tx51 52  resets:53    maxItems: 154 55  allwinner,audio-routing:56    description: |-57      A list of the connections between audio components.  Each entry58      is a pair of strings, the first being the connection's sink, the59      second being the connection's source.60    $ref: /schemas/types.yaml#/definitions/non-unique-string-array61    minItems: 262    maxItems: 1863    items:64      enum:65        # Audio Pins on the SoC66        - HP67        - HPCOM68        - LINEIN69        - LINEOUT70        - MIC171        - MIC272        - MIC373 74        # Microphone Biases from the SoC75        - HBIAS76        - MBIAS77 78        # Board Connectors79        - Headphone80        - Headset Mic81        - Line In82        - Line Out83        - Mic84        - Speaker85 86  allwinner,codec-analog-controls:87    $ref: /schemas/types.yaml#/definitions/phandle88    description: Phandle to the codec analog controls in the PRCM89 90  allwinner,pa-gpios:91    maxItems: 192    description: GPIO to enable the external amplifier93 94required:95  - "#sound-dai-cells"96  - compatible97  - reg98  - interrupts99  - clocks100  - clock-names101  - dmas102  - dma-names103 104allOf:105  - $ref: dai-common.yaml#106  - if:107      properties:108        compatible:109          enum:110            - allwinner,sun6i-a31-codec111            - allwinner,sun8i-a23-codec112            - allwinner,sun8i-h3-codec113            - allwinner,sun8i-v3s-codec114 115    then:116      if:117        properties:118          compatible:119            const: allwinner,sun6i-a31-codec120 121      then:122        required:123          - resets124          - allwinner,audio-routing125 126      else:127        required:128          - resets129          - allwinner,audio-routing130          - allwinner,codec-analog-controls131 132  - if:133      properties:134        compatible:135          enum:136            - allwinner,sun6i-a31-codec137 138    then:139      properties:140        allwinner,audio-routing:141          items:142            enum:143              - HP144              - HPCOM145              - LINEIN146              - LINEOUT147              - MIC1148              - MIC2149              - MIC3150              - HBIAS151              - MBIAS152              - Headphone153              - Headset Mic154              - Line In155              - Line Out156              - Mic157              - Speaker158 159  - if:160      properties:161        compatible:162          enum:163            - allwinner,sun8i-a23-codec164 165    then:166      properties:167        allwinner,audio-routing:168          items:169            enum:170              - HP171              - HPCOM172              - LINEIN173              - MIC1174              - MIC2175              - HBIAS176              - MBIAS177              - Headphone178              - Headset Mic179              - Line In180              - Line Out181              - Mic182              - Speaker183 184  - if:185      properties:186        compatible:187          enum:188            - allwinner,sun8i-h3-codec189 190    then:191      properties:192        allwinner,audio-routing:193          items:194            enum:195              - HP196              - HPCOM197              - LINEIN198              - LINEOUT199              - MIC1200              - MIC2201              - HBIAS202              - MBIAS203              - Headphone204              - Headset Mic205              - Line In206              - Line Out207              - Mic208              - Speaker209 210  - if:211      properties:212        compatible:213          enum:214            - allwinner,sun8i-v3s-codec215 216    then:217      properties:218        allwinner,audio-routing:219          items:220            enum:221              - HP222              - HPCOM223              - MIC1224              - HBIAS225              - Headphone226              - Headset Mic227              - Line In228              - Line Out229              - Mic230              - Speaker231 232unevaluatedProperties: false233 234examples:235  - |236    codec@1c22c00 {237        #sound-dai-cells = <0>;238        compatible = "allwinner,sun7i-a20-codec";239        reg = <0x01c22c00 0x40>;240        interrupts = <0 30 4>;241        clocks = <&apb0_gates 0>, <&codec_clk>;242        clock-names = "apb", "codec";243        dmas = <&dma 0 19>, <&dma 0 19>;244        dma-names = "rx", "tx";245    };246 247  - |248    codec@1c22c00 {249        #sound-dai-cells = <0>;250        compatible = "allwinner,sun6i-a31-codec";251        reg = <0x01c22c00 0x98>;252        interrupts = <0 29 4>;253        clocks = <&ccu 61>, <&ccu 135>;254        clock-names = "apb", "codec";255        resets = <&ccu 42>;256        dmas = <&dma 15>, <&dma 15>;257        dma-names = "rx", "tx";258        allwinner,audio-routing =259            "Headphone", "HP",260            "Speaker", "LINEOUT",261            "LINEIN", "Line In",262            "MIC1", "MBIAS",263            "MIC1", "Mic",264            "MIC2", "HBIAS",265            "MIC2", "Headset Mic";266    };267 268...269