xref: /freebsd-src/sys/contrib/device-tree/Bindings/sound/infineon,peb2466.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1cb7aa33aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2cb7aa33aSEmmanuel Vadot%YAML 1.2
3cb7aa33aSEmmanuel Vadot---
4cb7aa33aSEmmanuel Vadot$id: http://devicetree.org/schemas/sound/infineon,peb2466.yaml#
5cb7aa33aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6cb7aa33aSEmmanuel Vadot
7cb7aa33aSEmmanuel Vadottitle: Infineon PEB2466 codec
8cb7aa33aSEmmanuel Vadot
9cb7aa33aSEmmanuel Vadotmaintainers:
10cb7aa33aSEmmanuel Vadot  - Herve Codina <herve.codina@bootlin.com>
11cb7aa33aSEmmanuel Vadot
12cb7aa33aSEmmanuel Vadotdescription: |
13cb7aa33aSEmmanuel Vadot  The Infineon PEB2466 codec is a programmable DSP-based four channels codec
14cb7aa33aSEmmanuel Vadot  with filters capabilities.
15cb7aa33aSEmmanuel Vadot
16cb7aa33aSEmmanuel Vadot  The time-slots used by the codec must be set and so, the properties
17cb7aa33aSEmmanuel Vadot  'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and
18cb7aa33aSEmmanuel Vadot  'dai-tdm-slot-rx-mask' must be present in the sound card node for sub-nodes
19cb7aa33aSEmmanuel Vadot  that involve the codec. The codec uses one 8bit time-slot per channel.
20cb7aa33aSEmmanuel Vadot  'dai-tdm-tdm-slot-with' must be set to 8.
21cb7aa33aSEmmanuel Vadot
22cb7aa33aSEmmanuel Vadot  The PEB2466 codec also supports 28 gpios (signaling pins).
23cb7aa33aSEmmanuel Vadot
24cb7aa33aSEmmanuel VadotallOf:
25cb7aa33aSEmmanuel Vadot  - $ref: /schemas/spi/spi-peripheral-props.yaml
26cb7aa33aSEmmanuel Vadot  - $ref: dai-common.yaml#
27cb7aa33aSEmmanuel Vadot
28cb7aa33aSEmmanuel Vadotproperties:
29cb7aa33aSEmmanuel Vadot  compatible:
30cb7aa33aSEmmanuel Vadot    const: infineon,peb2466
31cb7aa33aSEmmanuel Vadot
32cb7aa33aSEmmanuel Vadot  reg:
33cb7aa33aSEmmanuel Vadot    description:
34cb7aa33aSEmmanuel Vadot      SPI device address.
35cb7aa33aSEmmanuel Vadot    maxItems: 1
36cb7aa33aSEmmanuel Vadot
37cb7aa33aSEmmanuel Vadot  clocks:
38cb7aa33aSEmmanuel Vadot    items:
39cb7aa33aSEmmanuel Vadot      - description: Master clock
40cb7aa33aSEmmanuel Vadot
41cb7aa33aSEmmanuel Vadot  clock-names:
42cb7aa33aSEmmanuel Vadot    items:
43cb7aa33aSEmmanuel Vadot      - const: mclk
44cb7aa33aSEmmanuel Vadot
45cb7aa33aSEmmanuel Vadot  spi-max-frequency:
46cb7aa33aSEmmanuel Vadot    maximum: 8192000
47cb7aa33aSEmmanuel Vadot
48cb7aa33aSEmmanuel Vadot  reset-gpios:
49cb7aa33aSEmmanuel Vadot    description:
50cb7aa33aSEmmanuel Vadot      GPIO used to reset the device.
51cb7aa33aSEmmanuel Vadot    maxItems: 1
52cb7aa33aSEmmanuel Vadot
53cb7aa33aSEmmanuel Vadot  firmware-name:
54*01950c46SEmmanuel Vadot    maxItems: 1
55cb7aa33aSEmmanuel Vadot    description:
56cb7aa33aSEmmanuel Vadot      Filters coefficients file to load. If this property is omitted, internal
57cb7aa33aSEmmanuel Vadot      filters are disabled.
58cb7aa33aSEmmanuel Vadot
59cb7aa33aSEmmanuel Vadot  '#sound-dai-cells':
60cb7aa33aSEmmanuel Vadot    const: 0
61cb7aa33aSEmmanuel Vadot
62cb7aa33aSEmmanuel Vadot  '#gpio-cells':
63cb7aa33aSEmmanuel Vadot    const: 2
64cb7aa33aSEmmanuel Vadot
65cb7aa33aSEmmanuel Vadot  gpio-controller: true
66cb7aa33aSEmmanuel Vadot
67cb7aa33aSEmmanuel Vadotrequired:
68cb7aa33aSEmmanuel Vadot  - compatible
69cb7aa33aSEmmanuel Vadot  - reg
70cb7aa33aSEmmanuel Vadot  - '#sound-dai-cells'
71cb7aa33aSEmmanuel Vadot  - gpio-controller
72cb7aa33aSEmmanuel Vadot  - '#gpio-cells'
73cb7aa33aSEmmanuel Vadot
74cb7aa33aSEmmanuel VadotunevaluatedProperties: false
75cb7aa33aSEmmanuel Vadot
76cb7aa33aSEmmanuel Vadotexamples:
77cb7aa33aSEmmanuel Vadot  - |
78cb7aa33aSEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
79cb7aa33aSEmmanuel Vadot    spi {
80cb7aa33aSEmmanuel Vadot        #address-cells = <1>;
81cb7aa33aSEmmanuel Vadot        #size-cells = <0>;
82cb7aa33aSEmmanuel Vadot        audio-codec@0 {
83cb7aa33aSEmmanuel Vadot            compatible = "infineon,peb2466";
84cb7aa33aSEmmanuel Vadot            reg = <0>;
85cb7aa33aSEmmanuel Vadot            spi-max-frequency = <8192000>;
86cb7aa33aSEmmanuel Vadot            reset-gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
87cb7aa33aSEmmanuel Vadot            #sound-dai-cells = <0>;
88cb7aa33aSEmmanuel Vadot            gpio-controller;
89cb7aa33aSEmmanuel Vadot            #gpio-cells = <2>;
90cb7aa33aSEmmanuel Vadot        };
91cb7aa33aSEmmanuel Vadot    };
92