Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/sound/amlogic,axg-pdm.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Amlogic Audio AXG PDM input |
| 8 | |
| 9 | maintainers: |
| 10 | - Jerome Brunet <jbrunet@baylibre.com> |
| 11 | |
| 12 | properties: |
| 13 | compatible: |
| 14 | oneOf: |
| 15 | - items: |
| 16 | - enum: |
| 17 | - amlogic,g12a-pdm |
| 18 | - amlogic,sm1-pdm |
| 19 | - const: amlogic,axg-pdm |
| 20 | - const: amlogic,axg-pdm |
| 21 | |
| 22 | reg: |
| 23 | maxItems: 1 |
| 24 | |
| 25 | "#sound-dai-cells": |
| 26 | const: 0 |
| 27 | |
| 28 | clocks: |
| 29 | items: |
| 30 | - description: Peripheral clock |
| 31 | - description: PDM digital clock |
| 32 | - description: DSP system clock |
| 33 | |
| 34 | clock-names: |
| 35 | items: |
| 36 | - const: pclk |
| 37 | - const: dclk |
| 38 | - const: sysclk |
| 39 | |
| 40 | resets: |
| 41 | maxItems: 1 |
| 42 | |
| 43 | required: |
| 44 | - compatible |
| 45 | - reg |
| 46 | - "#sound-dai-cells" |
| 47 | - clocks |
| 48 | - clock-names |
| 49 | |
| 50 | allOf: |
| 51 | - $ref: dai-common.yaml# |
| 52 | |
| 53 | - if: |
| 54 | properties: |
| 55 | compatible: |
| 56 | contains: |
| 57 | enum: |
| 58 | - amlogic,g12a-pdm |
| 59 | - amlogic,sm1-pdm |
| 60 | then: |
| 61 | required: |
| 62 | - resets |
| 63 | |
| 64 | else: |
| 65 | properties: |
| 66 | resets: false |
| 67 | |
| 68 | unevaluatedProperties: false |
| 69 | |
| 70 | examples: |
| 71 | - | |
| 72 | #include <dt-bindings/clock/axg-audio-clkc.h> |
| 73 | |
| 74 | audio-controller@ff632000 { |
| 75 | compatible = "amlogic,axg-pdm"; |
| 76 | reg = <0xff632000 0x34>; |
| 77 | #sound-dai-cells = <0>; |
| 78 | clocks = <&clkc_audio AUD_CLKID_PDM>, |
| 79 | <&clkc_audio AUD_CLKID_PDM_DCLK>, |
| 80 | <&clkc_audio AUD_CLKID_PDM_SYSCLK>; |
| 81 | clock-names = "pclk", "dclk", "sysclk"; |
| 82 | }; |