18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __DT_FSL_IMX_AUDMUX_H 38c2ecf20Sopenharmony_ci#define __DT_FSL_IMX_AUDMUX_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#define MX27_AUDMUX_HPCR1_SSI0 0 68c2ecf20Sopenharmony_ci#define MX27_AUDMUX_HPCR2_SSI1 1 78c2ecf20Sopenharmony_ci#define MX27_AUDMUX_HPCR3_SSI_PINS_4 2 88c2ecf20Sopenharmony_ci#define MX27_AUDMUX_PPCR1_SSI_PINS_1 3 98c2ecf20Sopenharmony_ci#define MX27_AUDMUX_PPCR2_SSI_PINS_2 4 108c2ecf20Sopenharmony_ci#define MX27_AUDMUX_PPCR3_SSI_PINS_3 5 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT1_SSI0 0 138c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT2_SSI1 1 148c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT3_SSI_PINS_3 2 158c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT4_SSI_PINS_4 3 168c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT5_SSI_PINS_5 4 178c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT6_SSI_PINS_6 5 188c2ecf20Sopenharmony_ci#define MX31_AUDMUX_PORT7_SSI_PINS_7 6 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT1_SSI0 0 218c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT2_SSI1 1 228c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT3 2 238c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT4 3 248c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT5 4 258c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT6 5 268c2ecf20Sopenharmony_ci#define MX51_AUDMUX_PORT7 6 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* 298c2ecf20Sopenharmony_ci * TFCSEL/RFCSEL (i.MX27) or TFSEL/TCSEL/RFSEL/RCSEL (i.MX31/51/53/6Q) 308c2ecf20Sopenharmony_ci * can be sourced from Rx/Tx. 318c2ecf20Sopenharmony_ci */ 328c2ecf20Sopenharmony_ci#define IMX_AUDMUX_RXFS 0x8 338c2ecf20Sopenharmony_ci#define IMX_AUDMUX_RXCLK 0x8 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci/* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ 368c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) 378c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_INMEN (1 << 8) 388c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_TXRXEN (1 << 10) 398c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_SYN (1 << 12) 408c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_RXDSEL(x) (((x) & 0x7) << 13) 418c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_RFCSEL(x) (((x) & 0xf) << 20) 428c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_RCLKDIR (1 << 24) 438c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_RFSDIR (1 << 25) 448c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_TFCSEL(x) (((x) & 0xf) << 26) 458c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_TCLKDIR (1 << 30) 468c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V1_PCR_TFSDIR (1 << 31) 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci/* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */ 498c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_TFSDIR (1 << 31) 508c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) 518c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) 528c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_TCSEL(x) (((x) & 0xf) << 22) 538c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_RFSDIR (1 << 21) 548c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_RFSEL(x) (((x) & 0xf) << 17) 558c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_RCLKDIR (1 << 16) 568c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_RCSEL(x) (((x) & 0xf) << 12) 578c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PTCR_SYN (1 << 11) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PDCR_RXDSEL(x) (((x) & 0x7) << 13) 608c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PDCR_TXRXEN (1 << 12) 618c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PDCR_MODE(x) (((x) & 0x3) << 8) 628c2ecf20Sopenharmony_ci#define IMX_AUDMUX_V2_PDCR_INMMASK(x) ((x) & 0xff) 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci#endif /* __DT_FSL_IMX_AUDMUX_H */ 65