xref: /linux/Documentation/devicetree/bindings/sound/fsl,xcvr.yaml (revision b3cc7428a32202936904b5b07cf9f135025bafd6)
10afb88d5SViorel Suman# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
20afb88d5SViorel Suman%YAML 1.2
30afb88d5SViorel Suman---
40afb88d5SViorel Suman$id: http://devicetree.org/schemas/sound/fsl,xcvr.yaml#
50afb88d5SViorel Suman$schema: http://devicetree.org/meta-schemas/core.yaml#
60afb88d5SViorel Suman
70afb88d5SViorel Sumantitle: NXP Audio Transceiver (XCVR) Controller
80afb88d5SViorel Suman
90afb88d5SViorel Sumanmaintainers:
100afb88d5SViorel Suman  - Viorel Suman <viorel.suman@nxp.com>
110afb88d5SViorel Suman
120afb88d5SViorel Sumandescription: |
130afb88d5SViorel Suman  NXP XCVR (Audio Transceiver) is a on-chip functional module
140afb88d5SViorel Suman  that allows CPU to receive and transmit digital audio via
150afb88d5SViorel Suman  HDMI2.1 eARC, HDMI1.4 ARC and SPDIF.
160afb88d5SViorel Suman
170afb88d5SViorel Sumanproperties:
180afb88d5SViorel Suman  $nodename:
190afb88d5SViorel Suman    pattern: "^xcvr@.*"
200afb88d5SViorel Suman
210afb88d5SViorel Suman  compatible:
220afb88d5SViorel Suman    enum:
230afb88d5SViorel Suman      - fsl,imx8mp-xcvr
240a22003cSChancel Liu      - fsl,imx93-xcvr
25fc127733SShengjiu Wang      - fsl,imx95-xcvr
260afb88d5SViorel Suman
270afb88d5SViorel Suman  reg:
280afb88d5SViorel Suman    items:
290afb88d5SViorel Suman      - description: 20K RAM for code and data
300afb88d5SViorel Suman      - description: registers space
310afb88d5SViorel Suman      - description: RX FIFO address
320afb88d5SViorel Suman      - description: TX FIFO address
330afb88d5SViorel Suman
340afb88d5SViorel Suman  reg-names:
350afb88d5SViorel Suman    items:
360afb88d5SViorel Suman      - const: ram
370afb88d5SViorel Suman      - const: regs
380afb88d5SViorel Suman      - const: rxfifo
390afb88d5SViorel Suman      - const: txfifo
400afb88d5SViorel Suman
410afb88d5SViorel Suman  interrupts:
42a6b5f50fSFabio Estevam    items:
43a6b5f50fSFabio Estevam      - description: WAKEUPMIX Audio XCVR Interrupt 1
44a6b5f50fSFabio Estevam      - description: WAKEUPMIX Audio XCVR Interrupt 2
45*28892123SShengjiu Wang      - description: SPDIF wakeup interrupt from PHY
46a6b5f50fSFabio Estevam    minItems: 1
470afb88d5SViorel Suman
480afb88d5SViorel Suman  clocks:
490afb88d5SViorel Suman    items:
500afb88d5SViorel Suman      - description: Peripheral clock
510afb88d5SViorel Suman      - description: PHY clock
520afb88d5SViorel Suman      - description: SPBA clock
530afb88d5SViorel Suman      - description: PLL clock
54fc127733SShengjiu Wang      - description: PLL clock source for 8kHz series
55fc127733SShengjiu Wang      - description: PLL clock source for 11kHz series
56fc127733SShengjiu Wang    minItems: 4
570afb88d5SViorel Suman
580afb88d5SViorel Suman  clock-names:
590afb88d5SViorel Suman    items:
600afb88d5SViorel Suman      - const: ipg
610afb88d5SViorel Suman      - const: phy
620afb88d5SViorel Suman      - const: spba
630afb88d5SViorel Suman      - const: pll_ipg
64fc127733SShengjiu Wang      - const: pll8k
65fc127733SShengjiu Wang      - const: pll11k
66fc127733SShengjiu Wang    minItems: 4
670afb88d5SViorel Suman
680afb88d5SViorel Suman  dmas:
690afb88d5SViorel Suman    items:
700afb88d5SViorel Suman      - description: DMA controller phandle and request line for RX
710afb88d5SViorel Suman      - description: DMA controller phandle and request line for TX
720afb88d5SViorel Suman
730afb88d5SViorel Suman  dma-names:
740afb88d5SViorel Suman    items:
750afb88d5SViorel Suman      - const: rx
760afb88d5SViorel Suman      - const: tx
770afb88d5SViorel Suman
780afb88d5SViorel Suman  resets:
790afb88d5SViorel Suman    maxItems: 1
800afb88d5SViorel Suman
810afb88d5SViorel Sumanrequired:
820afb88d5SViorel Suman  - compatible
830afb88d5SViorel Suman  - reg
840afb88d5SViorel Suman  - reg-names
850afb88d5SViorel Suman  - interrupts
860afb88d5SViorel Suman  - clocks
870afb88d5SViorel Suman  - clock-names
880afb88d5SViorel Suman  - dmas
890afb88d5SViorel Suman  - dma-names
900afb88d5SViorel Suman
91a6b5f50fSFabio EstevamallOf:
92*28892123SShengjiu Wang  - $ref: dai-common.yaml#
93a6b5f50fSFabio Estevam  - if:
94a6b5f50fSFabio Estevam      properties:
95a6b5f50fSFabio Estevam        compatible:
96a6b5f50fSFabio Estevam          contains:
97fc127733SShengjiu Wang            const: fsl,imx8mp-xcvr
98fc127733SShengjiu Wang    then:
99fc127733SShengjiu Wang      required:
100fc127733SShengjiu Wang        - resets
101fc127733SShengjiu Wang
102fc127733SShengjiu Wang  - if:
103fc127733SShengjiu Wang      properties:
104fc127733SShengjiu Wang        compatible:
105fc127733SShengjiu Wang          contains:
106a6b5f50fSFabio Estevam            enum:
107a6b5f50fSFabio Estevam              - fsl,imx93-xcvr
108fc127733SShengjiu Wang              - fsl,imx95-xcvr
109a6b5f50fSFabio Estevam    then:
110a6b5f50fSFabio Estevam      properties:
111a6b5f50fSFabio Estevam        interrupts:
112a6b5f50fSFabio Estevam          minItems: 2
113a6b5f50fSFabio Estevam          maxItems: 2
114a6b5f50fSFabio Estevam    else:
115a6b5f50fSFabio Estevam      properties:
116a6b5f50fSFabio Estevam        interrupts:
117*28892123SShengjiu Wang          minItems: 3
118*28892123SShengjiu Wang          maxItems: 3
119a6b5f50fSFabio Estevam
120fc127733SShengjiu Wang  - if:
121fc127733SShengjiu Wang      properties:
122fc127733SShengjiu Wang        compatible:
123fc127733SShengjiu Wang          contains:
124fc127733SShengjiu Wang            enum:
125fc127733SShengjiu Wang              - fsl,imx8mp-xcvr
126fc127733SShengjiu Wang              - fsl,imx93-xcvr
127fc127733SShengjiu Wang    then:
128fc127733SShengjiu Wang      properties:
129fc127733SShengjiu Wang        clocks:
130fc127733SShengjiu Wang          maxItems: 4
131fc127733SShengjiu Wang        clock-names:
132fc127733SShengjiu Wang          maxItems: 4
133fc127733SShengjiu Wang
134*28892123SShengjiu WangunevaluatedProperties: false
1350afb88d5SViorel Suman
1360afb88d5SViorel Sumanexamples:
1370afb88d5SViorel Suman  - |
1380afb88d5SViorel Suman    #include <dt-bindings/interrupt-controller/arm-gic.h>
1390afb88d5SViorel Suman    #include <dt-bindings/clock/imx8mp-clock.h>
1400afb88d5SViorel Suman    #include <dt-bindings/reset/imx8mp-reset.h>
1410afb88d5SViorel Suman
1420afb88d5SViorel Suman    xcvr: xcvr@30cc0000 {
1430afb88d5SViorel Suman        compatible = "fsl,imx8mp-xcvr";
1440afb88d5SViorel Suman        reg = <0x30cc0000 0x800>,
1450afb88d5SViorel Suman              <0x30cc0800 0x400>,
1460afb88d5SViorel Suman              <0x30cc0c00 0x080>,
1470afb88d5SViorel Suman              <0x30cc0e00 0x080>;
1480afb88d5SViorel Suman        reg-names = "ram", "regs", "rxfifo", "txfifo";
149*28892123SShengjiu Wang        interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>,
150*28892123SShengjiu Wang                     <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>,
151*28892123SShengjiu Wang                     <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>;
1520afb88d5SViorel Suman        clocks = <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_IPG>,
1530afb88d5SViorel Suman                 <&audiomix_clk IMX8MP_CLK_AUDIOMIX_EARC_PHY>,
1540afb88d5SViorel Suman                 <&audiomix_clk IMX8MP_CLK_AUDIOMIX_SPBA2_ROOT>,
1550afb88d5SViorel Suman                 <&audiomix_clk IMX8MP_CLK_AUDIOMIX_AUDPLL_ROOT>;
1560afb88d5SViorel Suman        clock-names = "ipg", "phy", "spba", "pll_ipg";
1570afb88d5SViorel Suman        dmas = <&sdma2 30 2 0>, <&sdma2 31 2 0>;
1580afb88d5SViorel Suman        dma-names = "rx", "tx";
1590afb88d5SViorel Suman        resets = <&audiomix_reset 0>;
1600afb88d5SViorel Suman    };
161