1b2441318SGreg 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 28*c25f2566SPhilipp Zabel /* 29*c25f2566SPhilipp Zabel * TFCSEL/RFCSEL (i.MX27) or TFSEL/TCSEL/RFSEL/RCSEL (i.MX31/51/53/6Q) 30*c25f2566SPhilipp Zabel * can be sourced from Rx/Tx. 31*c25f2566SPhilipp Zabel */ 32*c25f2566SPhilipp Zabel #define IMX_AUDMUX_RXFS 0x8 33*c25f2566SPhilipp Zabel #define IMX_AUDMUX_RXCLK 0x8 34*c25f2566SPhilipp Zabel 3574b77b15SMarkus Pargmann /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ 3674b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) 3774b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_INMEN (1 << 8) 3874b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TXRXEN (1 << 10) 3974b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_SYN (1 << 12) 4074b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RXDSEL(x) (((x) & 0x7) << 13) 4174b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RFCSEL(x) (((x) & 0xf) << 20) 4274b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RCLKDIR (1 << 24) 4374b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_RFSDIR (1 << 25) 4474b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TFCSEL(x) (((x) & 0xf) << 26) 4574b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TCLKDIR (1 << 30) 4674b77b15SMarkus Pargmann #define IMX_AUDMUX_V1_PCR_TFSDIR (1 << 31) 4774b77b15SMarkus Pargmann 4874b77b15SMarkus Pargmann /* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */ 4974b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TFSDIR (1 << 31) 5074b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) 5174b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) 5274b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_TCSEL(x) (((x) & 0xf) << 22) 5374b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RFSDIR (1 << 21) 5474b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RFSEL(x) (((x) & 0xf) << 17) 5574b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RCLKDIR (1 << 16) 5674b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_RCSEL(x) (((x) & 0xf) << 12) 5774b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PTCR_SYN (1 << 11) 5874b77b15SMarkus Pargmann 5974b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_RXDSEL(x) (((x) & 0x7) << 13) 6074b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_TXRXEN (1 << 12) 6174b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_MODE(x) (((x) & 0x3) << 8) 6274b77b15SMarkus Pargmann #define IMX_AUDMUX_V2_PDCR_INMMASK(x) ((x) & 0xff) 6374b77b15SMarkus Pargmann 6474b77b15SMarkus Pargmann #endif /* __DT_FSL_IMX_AUDMUX_H */ 65