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