xref: /linux/include/dt-bindings/sound/fsl-imx-audmux.h (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
274b77b15SMarkus Pargmann #ifndef __DT_FSL_IMX_AUDMUX_H
374b77b15SMarkus Pargmann #define __DT_FSL_IMX_AUDMUX_H
474b77b15SMarkus Pargmann 
574b77b15SMarkus Pargmann #define MX27_AUDMUX_HPCR1_SSI0		0
674b77b15SMarkus Pargmann #define MX27_AUDMUX_HPCR2_SSI1		1
774b77b15SMarkus Pargmann #define MX27_AUDMUX_HPCR3_SSI_PINS_4	2
874b77b15SMarkus Pargmann #define MX27_AUDMUX_PPCR1_SSI_PINS_1	3
974b77b15SMarkus Pargmann #define MX27_AUDMUX_PPCR2_SSI_PINS_2	4
1074b77b15SMarkus Pargmann #define MX27_AUDMUX_PPCR3_SSI_PINS_3	5
1174b77b15SMarkus Pargmann 
1274b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT1_SSI0		0
1374b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT2_SSI1		1
1474b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT3_SSI_PINS_3	2
1574b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT4_SSI_PINS_4	3
1674b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT5_SSI_PINS_5	4
1774b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT6_SSI_PINS_6	5
1874b77b15SMarkus Pargmann #define MX31_AUDMUX_PORT7_SSI_PINS_7	6
1974b77b15SMarkus Pargmann 
2074b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT1_SSI0		0
2174b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT2_SSI1		1
2274b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT3		2
2374b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT4		3
2474b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT5		4
2574b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT6		5
2674b77b15SMarkus Pargmann #define MX51_AUDMUX_PORT7		6
2774b77b15SMarkus Pargmann 
2874b77b15SMarkus Pargmann /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */
2974b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_INMMASK(x)	((x) & 0xff)
3074b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_INMEN		(1 << 8)
3174b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TXRXEN	(1 << 10)
3274b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_SYN		(1 << 12)
3374b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RXDSEL(x)	(((x) & 0x7) << 13)
3474b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RFCSEL(x)	(((x) & 0xf) << 20)
3574b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RCLKDIR	(1 << 24)
3674b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RFSDIR	(1 << 25)
3774b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TFCSEL(x)	(((x) & 0xf) << 26)
3874b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TCLKDIR	(1 << 30)
3974b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TFSDIR	(1 << 31)
4074b77b15SMarkus Pargmann 
4174b77b15SMarkus Pargmann /* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */
4274b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TFSDIR	(1 << 31)
4374b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TFSEL(x)	(((x) & 0xf) << 27)
4474b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TCLKDIR	(1 << 26)
4574b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TCSEL(x)	(((x) & 0xf) << 22)
4674b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RFSDIR	(1 << 21)
4774b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RFSEL(x)	(((x) & 0xf) << 17)
4874b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RCLKDIR	(1 << 16)
4974b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RCSEL(x)	(((x) & 0xf) << 12)
5074b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_SYN		(1 << 11)
5174b77b15SMarkus Pargmann 
5274b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_RXDSEL(x)	(((x) & 0x7) << 13)
5374b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_TXRXEN	(1 << 12)
5474b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_MODE(x)	(((x) & 0x3) << 8)
5574b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_INMMASK(x)	((x) & 0xff)
5674b77b15SMarkus Pargmann 
5774b77b15SMarkus Pargmann #endif /* __DT_FSL_IMX_AUDMUX_H */
58