Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __DT_FSL_IMX_AUDMUX_H
0003 #define __DT_FSL_IMX_AUDMUX_H
0004 
0005 #define MX27_AUDMUX_HPCR1_SSI0      0
0006 #define MX27_AUDMUX_HPCR2_SSI1      1
0007 #define MX27_AUDMUX_HPCR3_SSI_PINS_4    2
0008 #define MX27_AUDMUX_PPCR1_SSI_PINS_1    3
0009 #define MX27_AUDMUX_PPCR2_SSI_PINS_2    4
0010 #define MX27_AUDMUX_PPCR3_SSI_PINS_3    5
0011 
0012 #define MX31_AUDMUX_PORT1_SSI0      0
0013 #define MX31_AUDMUX_PORT2_SSI1      1
0014 #define MX31_AUDMUX_PORT3_SSI_PINS_3    2
0015 #define MX31_AUDMUX_PORT4_SSI_PINS_4    3
0016 #define MX31_AUDMUX_PORT5_SSI_PINS_5    4
0017 #define MX31_AUDMUX_PORT6_SSI_PINS_6    5
0018 #define MX31_AUDMUX_PORT7_SSI_PINS_7    6
0019 
0020 #define MX51_AUDMUX_PORT1_SSI0      0
0021 #define MX51_AUDMUX_PORT2_SSI1      1
0022 #define MX51_AUDMUX_PORT3       2
0023 #define MX51_AUDMUX_PORT4       3
0024 #define MX51_AUDMUX_PORT5       4
0025 #define MX51_AUDMUX_PORT6       5
0026 #define MX51_AUDMUX_PORT7       6
0027 
0028 /*
0029  * TFCSEL/RFCSEL (i.MX27) or TFSEL/TCSEL/RFSEL/RCSEL (i.MX31/51/53/6Q)
0030  * can be sourced from Rx/Tx.
0031  */
0032 #define IMX_AUDMUX_RXFS         0x8
0033 #define IMX_AUDMUX_RXCLK        0x8
0034 
0035 /* Register definitions for the i.MX21/27 Digital Audio Multiplexer */
0036 #define IMX_AUDMUX_V1_PCR_INMMASK(x)    ((x) & 0xff)
0037 #define IMX_AUDMUX_V1_PCR_INMEN     (1 << 8)
0038 #define IMX_AUDMUX_V1_PCR_TXRXEN    (1 << 10)
0039 #define IMX_AUDMUX_V1_PCR_SYN       (1 << 12)
0040 #define IMX_AUDMUX_V1_PCR_RXDSEL(x) (((x) & 0x7) << 13)
0041 #define IMX_AUDMUX_V1_PCR_RFCSEL(x) (((x) & 0xf) << 20)
0042 #define IMX_AUDMUX_V1_PCR_RCLKDIR   (1 << 24)
0043 #define IMX_AUDMUX_V1_PCR_RFSDIR    (1 << 25)
0044 #define IMX_AUDMUX_V1_PCR_TFCSEL(x) (((x) & 0xf) << 26)
0045 #define IMX_AUDMUX_V1_PCR_TCLKDIR   (1 << 30)
0046 #define IMX_AUDMUX_V1_PCR_TFSDIR    (1 << 31)
0047 
0048 /* Register definitions for the i.MX25/31/35/51 Digital Audio Multiplexer */
0049 #define IMX_AUDMUX_V2_PTCR_TFSDIR   (1 << 31)
0050 #define IMX_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27)
0051 #define IMX_AUDMUX_V2_PTCR_TCLKDIR  (1 << 26)
0052 #define IMX_AUDMUX_V2_PTCR_TCSEL(x) (((x) & 0xf) << 22)
0053 #define IMX_AUDMUX_V2_PTCR_RFSDIR   (1 << 21)
0054 #define IMX_AUDMUX_V2_PTCR_RFSEL(x) (((x) & 0xf) << 17)
0055 #define IMX_AUDMUX_V2_PTCR_RCLKDIR  (1 << 16)
0056 #define IMX_AUDMUX_V2_PTCR_RCSEL(x) (((x) & 0xf) << 12)
0057 #define IMX_AUDMUX_V2_PTCR_SYN      (1 << 11)
0058 
0059 #define IMX_AUDMUX_V2_PDCR_RXDSEL(x)    (((x) & 0x7) << 13)
0060 #define IMX_AUDMUX_V2_PDCR_TXRXEN   (1 << 12)
0061 #define IMX_AUDMUX_V2_PDCR_MODE(x)  (((x) & 0x3) << 8)
0062 #define IMX_AUDMUX_V2_PDCR_INMMASK(x)   ((x) & 0xff)
0063 
0064 #endif /* __DT_FSL_IMX_AUDMUX_H */