Lines Matching +full:11 +full:- +full:14
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * rt5640.h -- RT5640 ALSA SoC audio driver
14 #include <dt-bindings/sound/rt5640.h>
21 /* I/O - Output */
26 /* I/O - Input */
30 /* I/O - ADC/DAC/DMIC */
37 /* Mixer - D-D */
47 /* Mixer - ADC */
52 /* Mixer - DAC */
77 /* Format - ADC/DAC */
83 /* Function - Analog */
101 /* Function - Digital */
184 #define RT5640_VOL_L_MUTE (0x1 << 14)
185 #define RT5640_VOL_L_SFT 14
256 #define RT5640_ADC_L_BST_MASK (0x3 << 14)
257 #define RT5640_ADC_L_BST_SFT 14
264 #define RT5640_M_ADC_L1 (0x1 << 14)
265 #define RT5640_M_ADC_L1_SFT 14
283 #define RT5640_M_MONO_ADC_L1 (0x1 << 14)
284 #define RT5640_M_MONO_ADC_L1_SFT 14
313 #define RT5640_M_IF1_DAC_L (0x1 << 14)
314 #define RT5640_M_IF1_DAC_L_SFT 14
321 #define RT5640_M_DAC_L1 (0x1 << 14)
322 #define RT5640_M_DAC_L1_SFT 14
327 #define RT5640_DAC_L2_STO_L_VOL_MASK (0x1 << 11)
328 #define RT5640_DAC_L2_STO_L_VOL_SFT 11
343 #define RT5640_M_DAC_L1_MONO_L (0x1 << 14)
344 #define RT5640_M_DAC_L1_MONO_L_SFT 14
349 #define RT5640_DAC_L2_MONO_L_VOL_MASK (0x1 << 11)
350 #define RT5640_DAC_L2_MONO_L_VOL_SFT 11
371 #define RT5640_STO_L_DAC_L_VOL_MASK (0x1 << 14)
372 #define RT5640_STO_L_DAC_L_VOL_SFT 14
377 #define RT5640_M_STO_R_DAC_R (0x1 << 11)
378 #define RT5640_M_STO_R_DAC_R_SFT 11
391 #define RT5640_TXDP_SRC_MASK (0x1 << 14)
392 #define RT5640_TXDP_SRC_SFT 14
393 #define RT5640_TXDP_SRC_NOR (0x0 << 14)
394 #define RT5640_TXDP_SRC_DIV3 (0x1 << 14)
397 #define RT5640_DAC_L2_SEL_MASK (0x3 << 14)
398 #define RT5640_DAC_L2_SEL_SFT 14
399 #define RT5640_DAC_L2_SEL_IF2 (0x0 << 14)
400 #define RT5640_DAC_L2_SEL_IF3 (0x1 << 14)
401 #define RT5640_DAC_L2_SEL_TXDC (0x2 << 14)
402 #define RT5640_DAC_L2_SEL_BASS (0x3 << 14)
408 #define RT5640_IF2_ADC_L_SEL_MASK (0x1 << 11)
409 #define RT5640_IF2_ADC_L_SEL_SFT 11
410 #define RT5640_IF2_ADC_L_SEL_TXDP (0x0 << 11)
411 #define RT5640_IF2_ADC_L_SEL_PASS (0x1 << 11)
442 #define RT5640_IF1_DAC_SEL_MASK (0x3 << 14)
443 #define RT5640_IF1_DAC_SEL_SFT 14
444 #define RT5640_IF1_DAC_SEL_NOR (0x0 << 14)
445 #define RT5640_IF1_DAC_SEL_SWAP (0x1 << 14)
446 #define RT5640_IF1_DAC_SEL_L2R (0x2 << 14)
447 #define RT5640_IF1_DAC_SEL_R2L (0x3 << 14)
546 #define RT5640_M_DAC1_HM (0x1 << 14)
547 #define RT5640_M_DAC1_HM_SFT 14
554 #define RT5640_G_RM_L_SM_L_MASK (0x3 << 14)
555 #define RT5640_G_RM_L_SM_L_SFT 14
576 #define RT5640_G_RM_R_SM_R_MASK (0x3 << 14)
577 #define RT5640_G_RM_R_SM_R_SFT 14
600 #define RT5640_M_DAC_L1_SPM_L (0x1 << 14)
601 #define RT5640_M_DAC_L1_SPM_L_SFT 14
606 #define RT5640_M_BST1_SPM_L (0x1 << 11)
607 #define RT5640_M_BST1_SPM_L_SFT 11
614 #define RT5640_M_BST1_SPM_R (0x1 << 11)
615 #define RT5640_M_BST1_SPM_R_SFT 11
624 #define RT5640_M_DAC_L2_MM (0x1 << 14)
625 #define RT5640_M_DAC_L2_MM_SFT 14
630 #define RT5640_M_BST1_MM (0x1 << 11)
631 #define RT5640_M_BST1_MM_SFT 11
718 #define RT5640_M_DAC_R1_LM (0x1 << 14)
719 #define RT5640_M_DAC_R1_LM_SFT 14
724 #define RT5640_G_LOUTMIX_MASK (0x1 << 11)
725 #define RT5640_G_LOUTMIX_SFT 11
730 #define RT5640_PWR_I2S2 (0x1 << 14)
731 #define RT5640_PWR_I2S2_BIT 14
734 #define RT5640_PWR_DAC_R1 (0x1 << 11)
735 #define RT5640_PWR_DAC_R1_BIT 11
750 #define RT5640_PWR_ADC_MF_L (0x1 << 14)
751 #define RT5640_PWR_ADC_MF_L_BIT 14
760 #define RT5640_PWR_FV1 (0x1 << 14)
761 #define RT5640_PWR_FV1_BIT 14
766 #define RT5640_PWR_BG (0x1 << 11)
767 #define RT5640_PWR_BG_BIT 11
788 #define RT5640_PWR_BST2 (0x1 << 14)
789 #define RT5640_PWR_BST2_BIT 14
794 #define RT5640_PWR_MB1 (0x1 << 11)
795 #define RT5640_PWR_MB1_BIT 11
802 #define RT5640_PWR_OM_R (0x1 << 14)
803 #define RT5640_PWR_OM_R_BIT 14
808 #define RT5640_PWR_RM_L (0x1 << 11)
809 #define RT5640_PWR_RM_L_BIT 11
816 #define RT5640_PWR_SV_R (0x1 << 14)
817 #define RT5640_PWR_SV_R_BIT 14
822 #define RT5640_PWR_HV_L (0x1 << 11)
823 #define RT5640_PWR_HV_L_BIT 11
886 #define RT5640_I2S_BCLK_MS2_MASK (0x1 << 11)
887 #define RT5640_I2S_BCLK_MS2_SFT 11
888 #define RT5640_I2S_BCLK_MS2_32 (0x0 << 11)
889 #define RT5640_I2S_BCLK_MS2_64 (0x1 << 11)
928 #define RT5640_DAC_L_OSR_MASK (0x3 << 14)
929 #define RT5640_DAC_L_OSR_SFT 14
930 #define RT5640_DAC_L_OSR_128 (0x0 << 14)
931 #define RT5640_DAC_L_OSR_64 (0x1 << 14)
932 #define RT5640_DAC_L_OSR_32 (0x2 << 14)
933 #define RT5640_DAC_L_OSR_16 (0x3 << 14)
940 #define RT5640_DAHPF_EN (0x1 << 11)
941 #define RT5640_DAHPF_EN_SFT 11
950 #define RT5640_DMIC_2_EN_MASK (0x1 << 14)
951 #define RT5640_DMIC_2_EN_SFT 14
952 #define RT5640_DMIC_2_DIS (0x0 << 14)
953 #define RT5640_DMIC_2_EN (0x1 << 14)
962 #define RT5640_DMIC_1_DP_MASK (0x1 << 11)
963 #define RT5640_DMIC_1_DP_SFT 11
964 #define RT5640_DMIC_1_DP_GPIO3 (0x0 << 11)
965 #define RT5640_DMIC_1_DP_IN1P (0x1 << 11)
982 #define RT5640_SCLK_SRC_MASK (0x3 << 14)
983 #define RT5640_SCLK_SRC_SFT 14
984 #define RT5640_SCLK_SRC_MCLK (0x0 << 14)
985 #define RT5640_SCLK_SRC_PLL1 (0x1 << 14)
986 #define RT5640_SCLK_SRC_RCCLK (0x2 << 14)
1012 #define RT5640_PLL_M_BP (0x1 << 11)
1013 #define RT5640_PLL_M_BP_SFT 11
1020 #define RT5640_M1_T_MASK (0x1 << 14)
1021 #define RT5640_M1_T_SFT 14
1022 #define RT5640_M1_T_I2S2 (0x0 << 14)
1023 #define RT5640_M1_T_I2S2_D3 (0x1 << 14)
1046 #define RT5640_MDA_R_M_MASK (0x1 << 14)
1047 #define RT5640_MDA_R_M_SFT 14
1048 #define RT5640_MDA_R_M_NOR (0x0 << 14)
1049 #define RT5640_MDA_R_M_ASYN (0x1 << 14)
1058 #define RT5640_ADC_M_MASK (0x1 << 11)
1059 #define RT5640_ADC_M_SFT 11
1060 #define RT5640_ADC_M_NOR (0x0 << 11)
1061 #define RT5640_ADC_M_ASYN (0x1 << 11)
1119 #define RT5640_CLSD_OM_MASK (0x1 << 11)
1120 #define RT5640_CLSD_OM_SFT 11
1121 #define RT5640_CLSD_OM_MONO (0x0 << 11)
1122 #define RT5640_CLSD_OM_STO (0x1 << 11)
1183 #define RT5640_BPS_MASK (0x1 << 11)
1184 #define RT5640_BPS_SFT 11
1185 #define RT5640_BPS_DIS (0x0 << 11)
1186 #define RT5640_BPS_EN (0x1 << 11)
1227 #define RT5640_OSW_L_MASK (0x1 << 11)
1228 #define RT5640_OSW_L_SFT 11
1229 #define RT5640_OSW_L_DIS (0x0 << 11)
1230 #define RT5640_OSW_L_EN (0x1 << 11)
1252 #define RT5640_SPK_AG_MASK (0x1 << 14)
1253 #define RT5640_SPK_AG_SFT 14
1254 #define RT5640_SPK_AG_DIS (0x0 << 14)
1255 #define RT5640_SPK_AG_EN (0x1 << 14)
1262 #define RT5640_MIC2_BS_MASK (0x1 << 14)
1263 #define RT5640_MIC2_BS_SFT 14
1264 #define RT5640_MIC2_BS_9AV (0x0 << 14)
1265 #define RT5640_MIC2_BS_75AV (0x1 << 14)
1274 #define RT5640_MIC1_OVCD_MASK (0x1 << 11)
1275 #define RT5640_MIC1_OVCD_SFT 11
1276 #define RT5640_MIC1_OVCD_DIS (0x0 << 11)
1277 #define RT5640_MIC1_OVCD_EN (0x1 << 11)
1306 #define RT5640_EQ_UPD (0x1 << 14)
1307 #define RT5640_EQ_UPD_BIT 14
1368 #define RT5640_DRC_AGC_MASK (0x1 << 14)
1369 #define RT5640_DRC_AGC_SFT 14
1370 #define RT5640_DRC_AGC_DIS (0x0 << 14)
1371 #define RT5640_DRC_AGC_EN (0x1 << 14)
1424 #define RT5640_ANC_MASK (0x1 << 14)
1425 #define RT5640_ANC_SFT 14
1426 #define RT5640_ANC_DIS (0x0 << 14)
1427 #define RT5640_ANC_EN (0x1 << 14)
1434 #define RT5640_ANC_SN_MASK (0x1 << 11)
1435 #define RT5640_ANC_SN_SFT 11
1436 #define RT5640_ANC_SN_DIS (0x0 << 11)
1437 #define RT5640_ANC_SN_EN (0x1 << 11)
1487 #define RT5640_JD_HP_MASK (0x1 << 11)
1488 #define RT5640_JD_HP_SFT 11
1489 #define RT5640_JD_HP_DIS (0x0 << 11)
1490 #define RT5640_JD_HP_EN (0x1 << 11)
1563 #define RT5640_IRQ_OT_MASK (0x1 << 14)
1564 #define RT5640_IRQ_OT_SFT 14
1565 #define RT5640_IRQ_OT_BP (0x0 << 14)
1566 #define RT5640_IRQ_OT_NOR (0x1 << 14)
1575 #define RT5640_JD_P_MASK (0x1 << 11)
1576 #define RT5640_JD_P_SFT 11
1577 #define RT5640_JD_P_NOR (0x0 << 11)
1578 #define RT5640_JD_P_INV (0x1 << 11)
1589 #define RT5640_IRQ_MB2_OC_MASK (0x1 << 14)
1590 #define RT5640_IRQ_MB2_OC_SFT 14
1591 #define RT5640_IRQ_MB2_OC_BP (0x0 << 14)
1592 #define RT5640_IRQ_MB2_OC_NOR (0x1 << 14)
1593 #define RT5640_MB1_OC_STKY_MASK (0x1 << 11)
1594 #define RT5640_MB1_OC_STKY_SFT 11
1595 #define RT5640_MB1_OC_STKY_DIS (0x0 << 11)
1596 #define RT5640_MB1_OC_STKY_EN (0x1 << 11)
1626 #define RT5640_GP2_PIN_MASK (0x1 << 14)
1627 #define RT5640_GP2_PIN_SFT 14
1628 #define RT5640_GP2_PIN_GPIO2 (0x0 << 14)
1629 #define RT5640_GP2_PIN_DMIC1_SCL (0x1 << 14)
1635 #define RT5640_GP4_PIN_MASK (0x1 << 11)
1636 #define RT5640_GP4_PIN_SFT 11
1637 #define RT5640_GP4_PIN_GPIO4 (0x0 << 11)
1638 #define RT5640_GP4_PIN_DMIC2_SDA (0x1 << 11)
1649 #define RT5640_GP4_PF_MASK (0x1 << 11)
1650 #define RT5640_GP4_PF_SFT 11
1651 #define RT5640_GP4_PF_IN (0x0 << 11)
1652 #define RT5640_GP4_PF_OUT (0x1 << 11)
1698 /* FM34-500 Register Control 1 (0xc4) */
1701 /* FM34-500 Register Control 2 (0xc5) */
1704 /* FM34-500 Register Control 3 (0xc6) */
1707 #define RT5640_DSP_DS_MASK (0x1 << 14)
1708 #define RT5640_DSP_DS_SFT 14
1709 #define RT5640_DSP_DS_FM3010 (0x1 << 14)
1710 #define RT5640_DSP_DS_TEMP (0x1 << 14)
1717 #define RT5640_DSP_PD_PIN_MASK (0x1 << 11)
1718 #define RT5640_DSP_PD_PIN_SFT 11
1719 #define RT5640_DSP_PD_PIN_LO (0x0 << 11)
1720 #define RT5640_DSP_PD_PIN_HI (0x1 << 11)
1739 #define RT5640_SEQ1_ST_MASK (0x1 << 11) /*RO*/
1740 #define RT5640_SEQ1_ST_SFT 11
1741 #define RT5640_SEQ1_ST_RUN (0x0 << 11)
1742 #define RT5640_SEQ1_ST_FIN (0x1 << 11)
1793 #define RT5640_SCB_MASK (0x1 << 14)
1794 #define RT5640_SCB_SFT 14
1795 #define RT5640_SCB_DIS (0x0 << 14)
1796 #define RT5640_SCB_EN (0x1 << 14)
1823 #define RT5640_M_MP3_R_MASK (0x1 << 14)
1824 #define RT5640_M_MP3_R_SFT 14
1855 #define RT5640_3D_HP_MASK (0x1 << 14)
1856 #define RT5640_3D_HP_SFT 14
1857 #define RT5640_3D_HP_DIS (0x0 << 14)
1858 #define RT5640_3D_HP_EN (0x1 << 14)
1863 #define RT5640_3D_1F_MIX_MASK (0x3 << 11)
1864 #define RT5640_3D_1F_MIX_SFT 11
1885 #define RT5640_1ST_HPF_MASK (0x1 << 11)
1886 #define RT5640_1ST_HPF_SFT 11
1887 #define RT5640_1ST_HPF_DIS (0x0 << 11)
1888 #define RT5640_1ST_HPF_EN (0x1 << 11)
1901 #define RT5640_SI_DAC_MASK (0x1 << 11)
1902 #define RT5640_SI_DAC_SFT 11
1903 #define RT5640_SI_DAC_AUTO (0x0 << 11)
1904 #define RT5640_SI_DAC_TEST (0x1 << 11)
1942 #define RT5640_SPO_SV_MASK (0x1 << 14)
1943 #define RT5640_SPO_SV_SFT 14
1944 #define RT5640_SPO_SV_DIS (0x0 << 14)
1945 #define RT5640_SPO_SV_EN (0x1 << 14)
1954 #define RT5640_ZCD_DIG_MASK (0x1 << 11)
1955 #define RT5640_ZCD_DIG_SFT 11
1956 #define RT5640_ZCD_DIG_DIS (0x0 << 11)
1957 #define RT5640_ZCD_DIG_EN (0x1 << 11)
1984 #define RT5640_MCLK_DET (0x1 << 11)
2035 #define RT5640_WND_WIND_MASK (0x1 << 13) /* Read-Only */
2037 #define RT5640_WND_STRONG_MASK (0x1 << 12) /* Read-Only */
2046 #define RT5640_DP_ATT_MASK (0x3 << 14)
2047 #define RT5640_DP_ATT_SFT 14