18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Socionext UniPhier AIO ALSA driver. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (c) 2016-2018 Socionext Inc. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifndef SND_UNIPHIER_AIO_REG_H__ 98c2ecf20Sopenharmony_ci#define SND_UNIPHIER_AIO_REG_H__ 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <linux/bitops.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* soc-glue */ 148c2ecf20Sopenharmony_ci#define SG_AOUTEN 0x1c04 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* SW view */ 178c2ecf20Sopenharmony_ci#define A2CHNMAPCTR0(n) (0x00000 + 0x40 * (n)) 188c2ecf20Sopenharmony_ci#define A2RBNMAPCTR0(n) (0x01000 + 0x40 * (n)) 198c2ecf20Sopenharmony_ci#define A2IPORTNMAPCTR0(n) (0x02000 + 0x40 * (n)) 208c2ecf20Sopenharmony_ci#define A2IPORTNMAPCTR1(n) (0x02004 + 0x40 * (n)) 218c2ecf20Sopenharmony_ci#define A2IIFNMAPCTR0(n) (0x03000 + 0x40 * (n)) 228c2ecf20Sopenharmony_ci#define A2OPORTNMAPCTR0(n) (0x04000 + 0x40 * (n)) 238c2ecf20Sopenharmony_ci#define A2OPORTNMAPCTR1(n) (0x04004 + 0x40 * (n)) 248c2ecf20Sopenharmony_ci#define A2OPORTNMAPCTR2(n) (0x04008 + 0x40 * (n)) 258c2ecf20Sopenharmony_ci#define A2OIFNMAPCTR0(n) (0x05000 + 0x40 * (n)) 268c2ecf20Sopenharmony_ci#define A2ATNMAPCTR0(n) (0x06000 + 0x40 * (n)) 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#define MAPCTR0_EN 0x80000000 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci/* CTL */ 318c2ecf20Sopenharmony_ci#define A2APLLCTR0 0x07000 328c2ecf20Sopenharmony_ci#define A2APLLCTR0_APLLXPOW_MASK GENMASK(3, 0) 338c2ecf20Sopenharmony_ci#define A2APLLCTR0_APLLXPOW_PWOFF (0x0 << 0) 348c2ecf20Sopenharmony_ci#define A2APLLCTR0_APLLXPOW_PWON (0xf << 0) 358c2ecf20Sopenharmony_ci#define A2APLLCTR1 0x07004 368c2ecf20Sopenharmony_ci#define A2APLLCTR1_APLLX_MASK 0x00010101 378c2ecf20Sopenharmony_ci#define A2APLLCTR1_APLLX_36MHZ 0x00000000 388c2ecf20Sopenharmony_ci#define A2APLLCTR1_APLLX_33MHZ 0x00000001 398c2ecf20Sopenharmony_ci#define A2EXMCLKSEL0 0x07030 408c2ecf20Sopenharmony_ci#define A2EXMCLKSEL0_EXMCLK_MASK GENMASK(2, 0) 418c2ecf20Sopenharmony_ci#define A2EXMCLKSEL0_EXMCLK_OUTPUT (0x0 << 0) 428c2ecf20Sopenharmony_ci#define A2EXMCLKSEL0_EXMCLK_INPUT (0x7 << 0) 438c2ecf20Sopenharmony_ci#define A2SSIFSW 0x07050 448c2ecf20Sopenharmony_ci#define A2CH22_2CTR 0x07054 458c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL 0x070e0 468c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI1_MASK GENMASK(2, 0) 478c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI1_HDMIRX1 (0x2 << 0) 488c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI2_MASK GENMASK(6, 4) 498c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI2_SIF (0x7 << 4) 508c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI3_MASK GENMASK(10, 8) 518c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_PCMI3_EVEA (0x1 << 8) 528c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_IECI1_MASK GENMASK(14, 12) 538c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_IECI1_HDMIRX1 (0x2 << 12) 548c2ecf20Sopenharmony_ci#define A2AIOINPUTSEL_RXSEL_MASK (A2AIOINPUTSEL_RXSEL_PCMI1_MASK | \ 558c2ecf20Sopenharmony_ci A2AIOINPUTSEL_RXSEL_PCMI2_MASK | \ 568c2ecf20Sopenharmony_ci A2AIOINPUTSEL_RXSEL_PCMI3_MASK | \ 578c2ecf20Sopenharmony_ci A2AIOINPUTSEL_RXSEL_IECI1_HDMIRX1) 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci/* INTC */ 608c2ecf20Sopenharmony_ci#define INTCHIM(m) (0x9028 + 0x80 * (m)) 618c2ecf20Sopenharmony_ci#define INTRBIM(m) (0x9030 + 0x80 * (m)) 628c2ecf20Sopenharmony_ci#define INTCHID(m) (0xa028 + 0x80 * (m)) 638c2ecf20Sopenharmony_ci#define INTRBID(m) (0xa030 + 0x80 * (m)) 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci/* AIN(PCMINN) */ 668c2ecf20Sopenharmony_ci#define IPORTMXCTR1(n) (0x22000 + 0x400 * (n)) 678c2ecf20Sopenharmony_ci#define IPORTMXCTR1_LRSEL_MASK GENMASK(11, 10) 688c2ecf20Sopenharmony_ci#define IPORTMXCTR1_LRSEL_RIGHT (0x0 << 10) 698c2ecf20Sopenharmony_ci#define IPORTMXCTR1_LRSEL_LEFT (0x1 << 10) 708c2ecf20Sopenharmony_ci#define IPORTMXCTR1_LRSEL_I2S (0x2 << 10) 718c2ecf20Sopenharmony_ci#define IPORTMXCTR1_OUTBITSEL_MASK (0x800003U << 8) 728c2ecf20Sopenharmony_ci#define IPORTMXCTR1_OUTBITSEL_32 (0x800000U << 8) 738c2ecf20Sopenharmony_ci#define IPORTMXCTR1_OUTBITSEL_24 (0x000000U << 8) 748c2ecf20Sopenharmony_ci#define IPORTMXCTR1_OUTBITSEL_20 (0x000001U << 8) 758c2ecf20Sopenharmony_ci#define IPORTMXCTR1_OUTBITSEL_16 (0x000002U << 8) 768c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_MASK GENMASK(6, 4) 778c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_ALL (0x0 << 4) 788c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_D0_D2 (0x1 << 4) 798c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_D0 (0x2 << 4) 808c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_D1 (0x3 << 4) 818c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_D2 (0x4 << 4) 828c2ecf20Sopenharmony_ci#define IPORTMXCTR1_CHSEL_DMIX (0x5 << 4) 838c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_MASK GENMASK(3, 0) 848c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_48 (0x0 << 0) 858c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_96 (0x1 << 0) 868c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_192 (0x2 << 0) 878c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_32 (0x3 << 0) 888c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_44_1 (0x4 << 0) 898c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_88_2 (0x5 << 0) 908c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_176_4 (0x6 << 0) 918c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_16 (0x8 << 0) 928c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_22_05 (0x9 << 0) 938c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_24 (0xa << 0) 948c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_8 (0xb << 0) 958c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_11_025 (0xc << 0) 968c2ecf20Sopenharmony_ci#define IPORTMXCTR1_FSSEL_12 (0xd << 0) 978c2ecf20Sopenharmony_ci#define IPORTMXCTR2(n) (0x22004 + 0x400 * (n)) 988c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_MASK GENMASK(19, 16) 998c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_A1 (0x0 << 16) 1008c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_F1 (0x1 << 16) 1018c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_A2 (0x2 << 16) 1028c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_F2 (0x3 << 16) 1038c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_A2PLL (0x4 << 16) 1048c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_RX1 (0x5 << 16) 1058c2ecf20Sopenharmony_ci#define IPORTMXCTR2_ACLKSEL_RX2 (0x6 << 16) 1068c2ecf20Sopenharmony_ci#define IPORTMXCTR2_MSSEL_MASK BIT(15) 1078c2ecf20Sopenharmony_ci#define IPORTMXCTR2_MSSEL_SLAVE (0x0 << 15) 1088c2ecf20Sopenharmony_ci#define IPORTMXCTR2_MSSEL_MASTER (0x1 << 15) 1098c2ecf20Sopenharmony_ci#define IPORTMXCTR2_EXTLSIFSSEL_MASK BIT(14) 1108c2ecf20Sopenharmony_ci#define IPORTMXCTR2_EXTLSIFSSEL_36 (0x0 << 14) 1118c2ecf20Sopenharmony_ci#define IPORTMXCTR2_EXTLSIFSSEL_24 (0x1 << 14) 1128c2ecf20Sopenharmony_ci#define IPORTMXCTR2_DACCKSEL_MASK GENMASK(9, 8) 1138c2ecf20Sopenharmony_ci#define IPORTMXCTR2_DACCKSEL_1_2 (0x0 << 8) 1148c2ecf20Sopenharmony_ci#define IPORTMXCTR2_DACCKSEL_1_3 (0x1 << 8) 1158c2ecf20Sopenharmony_ci#define IPORTMXCTR2_DACCKSEL_1_1 (0x2 << 8) 1168c2ecf20Sopenharmony_ci#define IPORTMXCTR2_DACCKSEL_2_3 (0x3 << 8) 1178c2ecf20Sopenharmony_ci#define IPORTMXCTR2_REQEN_MASK BIT(0) 1188c2ecf20Sopenharmony_ci#define IPORTMXCTR2_REQEN_DISABLE (0x0 << 0) 1198c2ecf20Sopenharmony_ci#define IPORTMXCTR2_REQEN_ENABLE (0x1 << 0) 1208c2ecf20Sopenharmony_ci#define IPORTMXCNTCTR(n) (0x22010 + 0x400 * (n)) 1218c2ecf20Sopenharmony_ci#define IPORTMXCOUNTER(n) (0x22014 + 0x400 * (n)) 1228c2ecf20Sopenharmony_ci#define IPORTMXCNTMONI(n) (0x22018 + 0x400 * (n)) 1238c2ecf20Sopenharmony_ci#define IPORTMXACLKSEL0EX(n) (0x22020 + 0x400 * (n)) 1248c2ecf20Sopenharmony_ci#define IPORTMXACLKSEL0EX_ACLKSEL0EX_MASK GENMASK(3, 0) 1258c2ecf20Sopenharmony_ci#define IPORTMXACLKSEL0EX_ACLKSEL0EX_INTERNAL (0x0 << 0) 1268c2ecf20Sopenharmony_ci#define IPORTMXACLKSEL0EX_ACLKSEL0EX_EXTERNAL (0xf << 0) 1278c2ecf20Sopenharmony_ci#define IPORTMXEXNOE(n) (0x22070 + 0x400 * (n)) 1288c2ecf20Sopenharmony_ci#define IPORTMXEXNOE_PCMINOE_MASK BIT(0) 1298c2ecf20Sopenharmony_ci#define IPORTMXEXNOE_PCMINOE_OUTPUT (0x0 << 0) 1308c2ecf20Sopenharmony_ci#define IPORTMXEXNOE_PCMINOE_INPUT (0x1 << 0) 1318c2ecf20Sopenharmony_ci#define IPORTMXMASK(n) (0x22078 + 0x400 * (n)) 1328c2ecf20Sopenharmony_ci#define IPORTMXMASK_IUXCKMSK_MASK GENMASK(18, 16) 1338c2ecf20Sopenharmony_ci#define IPORTMXMASK_IUXCKMSK_ON (0x0 << 16) 1348c2ecf20Sopenharmony_ci#define IPORTMXMASK_IUXCKMSK_OFF (0x7 << 16) 1358c2ecf20Sopenharmony_ci#define IPORTMXMASK_XCKMSK_MASK GENMASK(2, 0) 1368c2ecf20Sopenharmony_ci#define IPORTMXMASK_XCKMSK_ON (0x0 << 0) 1378c2ecf20Sopenharmony_ci#define IPORTMXMASK_XCKMSK_OFF (0x7 << 0) 1388c2ecf20Sopenharmony_ci#define IPORTMXRSTCTR(n) (0x2207c + 0x400 * (n)) 1398c2ecf20Sopenharmony_ci#define IPORTMXRSTCTR_RSTPI_MASK BIT(7) 1408c2ecf20Sopenharmony_ci#define IPORTMXRSTCTR_RSTPI_RELEASE (0x0 << 7) 1418c2ecf20Sopenharmony_ci#define IPORTMXRSTCTR_RSTPI_RESET (0x1 << 7) 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* AIN(PBinMX) */ 1448c2ecf20Sopenharmony_ci#define PBINMXCTR(n) (0x20200 + 0x40 * (n)) 1458c2ecf20Sopenharmony_ci#define PBINMXCTR_NCONNECT_MASK BIT(15) 1468c2ecf20Sopenharmony_ci#define PBINMXCTR_NCONNECT_CONNECT (0x0 << 15) 1478c2ecf20Sopenharmony_ci#define PBINMXCTR_NCONNECT_DISCONNECT (0x1 << 15) 1488c2ecf20Sopenharmony_ci#define PBINMXCTR_INOUTSEL_MASK BIT(14) 1498c2ecf20Sopenharmony_ci#define PBINMXCTR_INOUTSEL_IN (0x0 << 14) 1508c2ecf20Sopenharmony_ci#define PBINMXCTR_INOUTSEL_OUT (0x1 << 14) 1518c2ecf20Sopenharmony_ci#define PBINMXCTR_PBINSEL_SHIFT (8) 1528c2ecf20Sopenharmony_ci#define PBINMXCTR_ENDIAN_MASK GENMASK(5, 4) 1538c2ecf20Sopenharmony_ci#define PBINMXCTR_ENDIAN_3210 (0x0 << 4) 1548c2ecf20Sopenharmony_ci#define PBINMXCTR_ENDIAN_0123 (0x1 << 4) 1558c2ecf20Sopenharmony_ci#define PBINMXCTR_ENDIAN_1032 (0x2 << 4) 1568c2ecf20Sopenharmony_ci#define PBINMXCTR_ENDIAN_2301 (0x3 << 4) 1578c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_MASK GENMASK(3, 0) 1588c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_D0 (0x0 << 0) 1598c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_5_1CH_DMIX (0x1 << 0) 1608c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_6CH (0x2 << 0) 1618c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_4CH (0x3 << 0) 1628c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_DMIX (0x4 << 0) 1638c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_1CH (0x5 << 0) 1648c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_16LR (0x6 << 0) 1658c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_7_1CH (0x7 << 0) 1668c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_7_1CH_DMIX (0x8 << 0) 1678c2ecf20Sopenharmony_ci#define PBINMXCTR_MEMFMT_STREAM (0xf << 0) 1688c2ecf20Sopenharmony_ci#define PBINMXPAUSECTR0(n) (0x20204 + 0x40 * (n)) 1698c2ecf20Sopenharmony_ci#define PBINMXPAUSECTR1(n) (0x20208 + 0x40 * (n)) 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci/* AOUT */ 1728c2ecf20Sopenharmony_ci#define AOUTFADECTR0 0x40020 1738c2ecf20Sopenharmony_ci#define AOUTENCTR0 0x40040 1748c2ecf20Sopenharmony_ci#define AOUTENCTR1 0x40044 1758c2ecf20Sopenharmony_ci#define AOUTENCTR2 0x40048 1768c2ecf20Sopenharmony_ci#define AOUTRSTCTR0 0x40060 1778c2ecf20Sopenharmony_ci#define AOUTRSTCTR1 0x40064 1788c2ecf20Sopenharmony_ci#define AOUTRSTCTR2 0x40068 1798c2ecf20Sopenharmony_ci#define AOUTSRCRSTCTR0 0x400c0 1808c2ecf20Sopenharmony_ci#define AOUTSRCRSTCTR1 0x400c4 1818c2ecf20Sopenharmony_ci#define AOUTSRCRSTCTR2 0x400c8 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ci/* AOUT PCMOUT has 5 slots, slot0-3: D0-3, slot4: DMIX */ 1848c2ecf20Sopenharmony_ci#define OPORT_SLOT_MAX 5 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci/* AOUT(PCMOUTN) */ 1878c2ecf20Sopenharmony_ci#define OPORTMXCTR1(n) (0x42000 + 0x400 * (n)) 1888c2ecf20Sopenharmony_ci#define OPORTMXCTR1_I2SLRSEL_MASK (0x11 << 10) 1898c2ecf20Sopenharmony_ci#define OPORTMXCTR1_I2SLRSEL_RIGHT (0x00 << 10) 1908c2ecf20Sopenharmony_ci#define OPORTMXCTR1_I2SLRSEL_LEFT (0x01 << 10) 1918c2ecf20Sopenharmony_ci#define OPORTMXCTR1_I2SLRSEL_I2S (0x11 << 10) 1928c2ecf20Sopenharmony_ci#define OPORTMXCTR1_OUTBITSEL_MASK (0x800003U << 8) 1938c2ecf20Sopenharmony_ci#define OPORTMXCTR1_OUTBITSEL_32 (0x800000U << 8) 1948c2ecf20Sopenharmony_ci#define OPORTMXCTR1_OUTBITSEL_24 (0x000000U << 8) 1958c2ecf20Sopenharmony_ci#define OPORTMXCTR1_OUTBITSEL_20 (0x000001U << 8) 1968c2ecf20Sopenharmony_ci#define OPORTMXCTR1_OUTBITSEL_16 (0x000002U << 8) 1978c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_MASK GENMASK(3, 0) 1988c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_48 (0x0 << 0) 1998c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_96 (0x1 << 0) 2008c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_192 (0x2 << 0) 2018c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_32 (0x3 << 0) 2028c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_44_1 (0x4 << 0) 2038c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_88_2 (0x5 << 0) 2048c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_176_4 (0x6 << 0) 2058c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_16 (0x8 << 0) 2068c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_22_05 (0x9 << 0) 2078c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_24 (0xa << 0) 2088c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_8 (0xb << 0) 2098c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_11_025 (0xc << 0) 2108c2ecf20Sopenharmony_ci#define OPORTMXCTR1_FSSEL_12 (0xd << 0) 2118c2ecf20Sopenharmony_ci#define OPORTMXCTR2(n) (0x42004 + 0x400 * (n)) 2128c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_MASK GENMASK(19, 16) 2138c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_A1 (0x0 << 16) 2148c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_F1 (0x1 << 16) 2158c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_A2 (0x2 << 16) 2168c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_F2 (0x3 << 16) 2178c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_A2PLL (0x4 << 16) 2188c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_RX1 (0x5 << 16) 2198c2ecf20Sopenharmony_ci#define OPORTMXCTR2_ACLKSEL_RX2 (0x6 << 16) 2208c2ecf20Sopenharmony_ci#define OPORTMXCTR2_MSSEL_MASK BIT(15) 2218c2ecf20Sopenharmony_ci#define OPORTMXCTR2_MSSEL_SLAVE (0x0 << 15) 2228c2ecf20Sopenharmony_ci#define OPORTMXCTR2_MSSEL_MASTER (0x1 << 15) 2238c2ecf20Sopenharmony_ci#define OPORTMXCTR2_EXTLSIFSSEL_MASK BIT(14) 2248c2ecf20Sopenharmony_ci#define OPORTMXCTR2_EXTLSIFSSEL_36 (0x0 << 14) 2258c2ecf20Sopenharmony_ci#define OPORTMXCTR2_EXTLSIFSSEL_24 (0x1 << 14) 2268c2ecf20Sopenharmony_ci#define OPORTMXCTR2_DACCKSEL_MASK GENMASK(9, 8) 2278c2ecf20Sopenharmony_ci#define OPORTMXCTR2_DACCKSEL_1_2 (0x0 << 8) 2288c2ecf20Sopenharmony_ci#define OPORTMXCTR2_DACCKSEL_1_3 (0x1 << 8) 2298c2ecf20Sopenharmony_ci#define OPORTMXCTR2_DACCKSEL_1_1 (0x2 << 8) 2308c2ecf20Sopenharmony_ci#define OPORTMXCTR2_DACCKSEL_2_3 (0x3 << 8) 2318c2ecf20Sopenharmony_ci#define OPORTMXCTR3(n) (0x42008 + 0x400 * (n)) 2328c2ecf20Sopenharmony_ci#define OPORTMXCTR3_IECTHUR_MASK BIT(19) 2338c2ecf20Sopenharmony_ci#define OPORTMXCTR3_IECTHUR_IECOUT (0x0 << 19) 2348c2ecf20Sopenharmony_ci#define OPORTMXCTR3_IECTHUR_IECIN (0x1 << 19) 2358c2ecf20Sopenharmony_ci#define OPORTMXCTR3_SRCSEL_MASK GENMASK(18, 16) 2368c2ecf20Sopenharmony_ci#define OPORTMXCTR3_SRCSEL_PCM (0x0 << 16) 2378c2ecf20Sopenharmony_ci#define OPORTMXCTR3_SRCSEL_STREAM (0x1 << 16) 2388c2ecf20Sopenharmony_ci#define OPORTMXCTR3_SRCSEL_CDDTS (0x2 << 16) 2398c2ecf20Sopenharmony_ci#define OPORTMXCTR3_VALID_MASK BIT(12) 2408c2ecf20Sopenharmony_ci#define OPORTMXCTR3_VALID_PCM (0x0 << 12) 2418c2ecf20Sopenharmony_ci#define OPORTMXCTR3_VALID_STREAM (0x1 << 12) 2428c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSEL_MASK BIT(3) 2438c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSEL_MUTE (0x0 << 3) 2448c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSEL_PAUSE (0x1 << 3) 2458c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSW_MASK BIT(2) 2468c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSW_MUTE_OFF (0x0 << 2) 2478c2ecf20Sopenharmony_ci#define OPORTMXCTR3_PMSW_MUTE_ON (0x1 << 2) 2488c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR(n) (0x4200c + 0x400 * (n)) 2498c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSIIPNUM_SHIFT (24) 2508c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_THMODE_MASK BIT(23) 2518c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_THMODE_SRC (0x0 << 23) 2528c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_THMODE_BYPASS (0x1 << 23) 2538c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_LOCK_MASK BIT(16) 2548c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_LOCK_UNLOCK (0x0 << 16) 2558c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_LOCK_LOCK (0x1 << 16) 2568c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SRCPATH_MASK BIT(15) 2578c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SRCPATH_BYPASS (0x0 << 15) 2588c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SRCPATH_CALC (0x1 << 15) 2598c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SYNC_MASK BIT(14) 2608c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SYNC_ASYNC (0x0 << 14) 2618c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_SYNC_SYNC (0x1 << 14) 2628c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSOCK_MASK GENMASK(11, 10) 2638c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSOCK_44_1 (0x0 << 10) 2648c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSOCK_48 (0x1 << 10) 2658c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSOCK_32 (0x2 << 10) 2668c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSICK_MASK GENMASK(9, 8) 2678c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSICK_44_1 (0x0 << 8) 2688c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSICK_48 (0x1 << 8) 2698c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSICK_32 (0x2 << 8) 2708c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSIIPSEL_MASK GENMASK(5, 4) 2718c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSIIPSEL_INNER (0x0 << 4) 2728c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSIIPSEL_OUTER (0x1 << 4) 2738c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSISEL_MASK GENMASK(3, 0) 2748c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSISEL_ACLK (0x0 << 0) 2758c2ecf20Sopenharmony_ci#define OPORTMXSRC1CTR_FSISEL_DD (0x1 << 0) 2768c2ecf20Sopenharmony_ci#define OPORTMXDSDMUTEDAT(n) (0x42020 + 0x400 * (n)) 2778c2ecf20Sopenharmony_ci#define OPORTMXDXDFREQMODE(n) (0x42024 + 0x400 * (n)) 2788c2ecf20Sopenharmony_ci#define OPORTMXDSDSEL(n) (0x42028 + 0x400 * (n)) 2798c2ecf20Sopenharmony_ci#define OPORTMXDSDPORT(n) (0x4202c + 0x400 * (n)) 2808c2ecf20Sopenharmony_ci#define OPORTMXACLKSEL0EX(n) (0x42030 + 0x400 * (n)) 2818c2ecf20Sopenharmony_ci#define OPORTMXPATH(n) (0x42040 + 0x400 * (n)) 2828c2ecf20Sopenharmony_ci#define OPORTMXSYNC(n) (0x42044 + 0x400 * (n)) 2838c2ecf20Sopenharmony_ci#define OPORTMXREPET(n) (0x42050 + 0x400 * (n)) 2848c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_AC3 SBF_(IEC61937_FRM_STR_AC3, 16) 2858c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_MPA SBF_(IEC61937_FRM_STR_MPA, 16) 2868c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_MP3 SBF_(IEC61937_FRM_STR_MP3, 16) 2878c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_DTS1 SBF_(IEC61937_FRM_STR_DTS1, 16) 2888c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_DTS2 SBF_(IEC61937_FRM_STR_DTS2, 16) 2898c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_DTS3 SBF_(IEC61937_FRM_STR_DTS3, 16) 2908c2ecf20Sopenharmony_ci#define OPORTMXREPET_STRLENGTH_AAC SBF_(IEC61937_FRM_STR_AAC, 16) 2918c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_AC3 SBF_(IEC61937_FRM_PAU_AC3, 0) 2928c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_MPA SBF_(IEC61937_FRM_PAU_MPA, 0) 2938c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_MP3 SBF_(IEC61937_FRM_PAU_MP3, 0) 2948c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_DTS1 SBF_(IEC61937_FRM_PAU_DTS1, 0) 2958c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_DTS2 SBF_(IEC61937_FRM_PAU_DTS2, 0) 2968c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_DTS3 SBF_(IEC61937_FRM_PAU_DTS3, 0) 2978c2ecf20Sopenharmony_ci#define OPORTMXREPET_PMLENGTH_AAC SBF_(IEC61937_FRM_PAU_AAC, 0) 2988c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT(n) (0x42054 + 0x400 * (n)) 2998c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPC_CMN (IEC61937_PC_PAUSE << 16) 3008c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_AC3 (IEC61937_FRM_PAU_AC3 * 4) 3018c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_MPA (IEC61937_FRM_PAU_MPA * 4) 3028c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_MP3 (IEC61937_FRM_PAU_MP3 * 4) 3038c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_DTS1 (IEC61937_FRM_PAU_DTS1 * 4) 3048c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_DTS2 (IEC61937_FRM_PAU_DTS2 * 4) 3058c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_DTS3 (IEC61937_FRM_PAU_DTS3 * 4) 3068c2ecf20Sopenharmony_ci#define OPORTMXPAUDAT_PAUSEPD_AAC (IEC61937_FRM_PAU_AAC * 4) 3078c2ecf20Sopenharmony_ci#define OPORTMXRATE_I(n) (0x420e4 + 0x400 * (n)) 3088c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_EQU_MASK BIT(31) 3098c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_EQU_NOTEQUAL (0x0 << 31) 3108c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_EQU_EQUAL (0x1 << 31) 3118c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_SRCBPMD_MASK BIT(29) 3128c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_SRCBPMD_BYPASS (0x0 << 29) 3138c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_SRCBPMD_SRC (0x1 << 29) 3148c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_LRCKSTP_MASK BIT(24) 3158c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_LRCKSTP_START (0x0 << 24) 3168c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_LRCKSTP_STOP (0x1 << 24) 3178c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSRC_MASK GENMASK(15, 12) 3188c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSRC_APLL (0x0 << 12) 3198c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSRC_USB (0x1 << 12) 3208c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSRC_HSC (0x3 << 12) 3218c2ecf20Sopenharmony_ci/* if OPORTMXRATE_I_ACLKSRC_APLL */ 3228c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_MASK GENMASK(11, 8) 3238c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_APLLA1 (0x0 << 8) 3248c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_APLLF1 (0x1 << 8) 3258c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_APLLA2 (0x2 << 8) 3268c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_APLLF2 (0x3 << 8) 3278c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_APLL (0x4 << 8) 3288c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_HDMI1 (0x5 << 8) 3298c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_HDMI2 (0x6 << 8) 3308c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_AI1ADCCK (0xc << 8) 3318c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_AI2ADCCK (0xd << 8) 3328c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_ACLKSEL_AI3ADCCK (0xe << 8) 3338c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_MCKSEL_MASK GENMASK(7, 4) 3348c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_MCKSEL_36 (0x0 << 4) 3358c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_MCKSEL_33 (0x1 << 4) 3368c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_MCKSEL_HSC27 (0xb << 4) 3378c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_MASK GENMASK(3, 0) 3388c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_48 (0x0 << 0) 3398c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_96 (0x1 << 0) 3408c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_192 (0x2 << 0) 3418c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_32 (0x3 << 0) 3428c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_44_1 (0x4 << 0) 3438c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_88_2 (0x5 << 0) 3448c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_176_4 (0x6 << 0) 3458c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_16 (0x8 << 0) 3468c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_22_05 (0x9 << 0) 3478c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_24 (0xa << 0) 3488c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_8 (0xb << 0) 3498c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_11_025 (0xc << 0) 3508c2ecf20Sopenharmony_ci#define OPORTMXRATE_I_FSSEL_12 (0xd << 0) 3518c2ecf20Sopenharmony_ci#define OPORTMXEXNOE(n) (0x420f0 + 0x400 * (n)) 3528c2ecf20Sopenharmony_ci#define OPORTMXMASK(n) (0x420f8 + 0x400 * (n)) 3538c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUDXMSK_MASK GENMASK(28, 24) 3548c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUDXMSK_ON (0x00 << 24) 3558c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUDXMSK_OFF (0x1f << 24) 3568c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUXCKMSK_MASK GENMASK(18, 16) 3578c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUXCKMSK_ON (0x0 << 16) 3588c2ecf20Sopenharmony_ci#define OPORTMXMASK_IUXCKMSK_OFF (0x7 << 16) 3598c2ecf20Sopenharmony_ci#define OPORTMXMASK_DXMSK_MASK GENMASK(12, 8) 3608c2ecf20Sopenharmony_ci#define OPORTMXMASK_DXMSK_ON (0x00 << 8) 3618c2ecf20Sopenharmony_ci#define OPORTMXMASK_DXMSK_OFF (0x1f << 8) 3628c2ecf20Sopenharmony_ci#define OPORTMXMASK_XCKMSK_MASK GENMASK(2, 0) 3638c2ecf20Sopenharmony_ci#define OPORTMXMASK_XCKMSK_ON (0x0 << 0) 3648c2ecf20Sopenharmony_ci#define OPORTMXMASK_XCKMSK_OFF (0x7 << 0) 3658c2ecf20Sopenharmony_ci#define OPORTMXDEBUG(n) (0x420fc + 0x400 * (n)) 3668c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA1(n, m) (0x42100 + 0x400 * (n) + 0x20 * (m)) 3678c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA1_SLOPEU_MASK GENMASK(31, 16) 3688c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2(n, m) (0x42104 + 0x400 * (n) + 0x20 * (m)) 3698c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2_FADE_MASK GENMASK(17, 16) 3708c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2_FADE_NOOP (0x0 << 16) 3718c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2_FADE_FADEOUT (0x1 << 16) 3728c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2_FADE_FADEIN (0x2 << 16) 3738c2ecf20Sopenharmony_ci#define OPORTMXTYVOLPARA2_TARGET_MASK GENMASK(15, 0) 3748c2ecf20Sopenharmony_ci#define OPORTMXTYVOLGAINSTATUS(n, m) (0x42108 + 0x400 * (n) + 0x20 * (m)) 3758c2ecf20Sopenharmony_ci#define OPORTMXTYVOLGAINSTATUS_CUR_MASK GENMASK(15, 0) 3768c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR(n, m) (0x42114 + 0x400 * (n) + 0x20 * (m)) 3778c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_MODE BIT(15) 3788c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_MASK GENMASK(11, 8) 3798c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_SLOT0 (0x8 << 8) 3808c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_SLOT1 (0x9 << 8) 3818c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_SLOT2 (0xa << 8) 3828c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_SLOT3 (0xb << 8) 3838c2ecf20Sopenharmony_ci#define OPORTMXTYSLOTCTR_SLOTSEL_SLOT4 (0xc << 8) 3848c2ecf20Sopenharmony_ci#define OPORTMXT0SLOTCTR_MUTEOFF_MASK BIT(1) 3858c2ecf20Sopenharmony_ci#define OPORTMXT0SLOTCTR_MUTEOFF_MUTE (0x0 << 1) 3868c2ecf20Sopenharmony_ci#define OPORTMXT0SLOTCTR_MUTEOFF_UNMUTE (0x1 << 1) 3878c2ecf20Sopenharmony_ci#define OPORTMXTYRSTCTR(n, m) (0x4211c + 0x400 * (n) + 0x20 * (m)) 3888c2ecf20Sopenharmony_ci#define OPORTMXT0RSTCTR_RST_MASK BIT(1) 3898c2ecf20Sopenharmony_ci#define OPORTMXT0RSTCTR_RST_OFF (0x0 << 1) 3908c2ecf20Sopenharmony_ci#define OPORTMXT0RSTCTR_RST_ON (0x1 << 1) 3918c2ecf20Sopenharmony_ci 3928c2ecf20Sopenharmony_ci#define SBF_(frame, shift) (((frame) * 2 - 1) << shift) 3938c2ecf20Sopenharmony_ci 3948c2ecf20Sopenharmony_ci/* AOUT(PBoutMX) */ 3958c2ecf20Sopenharmony_ci#define PBOUTMXCTR0(n) (0x40200 + 0x40 * (n)) 3968c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_ENDIAN_MASK GENMASK(5, 4) 3978c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_ENDIAN_3210 (0x0 << 4) 3988c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_ENDIAN_0123 (0x1 << 4) 3998c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_ENDIAN_1032 (0x2 << 4) 4008c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_ENDIAN_2301 (0x3 << 4) 4018c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_MASK GENMASK(3, 0) 4028c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_10CH (0x0 << 0) 4038c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_8CH (0x1 << 0) 4048c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_6CH (0x2 << 0) 4058c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_4CH (0x3 << 0) 4068c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_2CH (0x4 << 0) 4078c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_STREAM (0x5 << 0) 4088c2ecf20Sopenharmony_ci#define PBOUTMXCTR0_MEMFMT_1CH (0x6 << 0) 4098c2ecf20Sopenharmony_ci#define PBOUTMXCTR1(n) (0x40204 + 0x40 * (n)) 4108c2ecf20Sopenharmony_ci#define PBOUTMXINTCTR(n) (0x40208 + 0x40 * (n)) 4118c2ecf20Sopenharmony_ci 4128c2ecf20Sopenharmony_ci/* A2D(subsystem) */ 4138c2ecf20Sopenharmony_ci#define CDA2D_STRT0 0x10000 4148c2ecf20Sopenharmony_ci#define CDA2D_STRT0_STOP_MASK BIT(31) 4158c2ecf20Sopenharmony_ci#define CDA2D_STRT0_STOP_START (0x0 << 31) 4168c2ecf20Sopenharmony_ci#define CDA2D_STRT0_STOP_STOP (0x1 << 31) 4178c2ecf20Sopenharmony_ci#define CDA2D_STAT0 0x10020 4188c2ecf20Sopenharmony_ci#define CDA2D_TEST 0x100a0 4198c2ecf20Sopenharmony_ci#define CDA2D_TEST_DDR_MODE_MASK GENMASK(3, 2) 4208c2ecf20Sopenharmony_ci#define CDA2D_TEST_DDR_MODE_EXTON0 (0x0 << 2) 4218c2ecf20Sopenharmony_ci#define CDA2D_TEST_DDR_MODE_EXTOFF1 (0x3 << 2) 4228c2ecf20Sopenharmony_ci#define CDA2D_STRTADRSLOAD 0x100b0 4238c2ecf20Sopenharmony_ci 4248c2ecf20Sopenharmony_ci#define CDA2D_CHMXCTRL1(n) (0x12000 + 0x80 * (n)) 4258c2ecf20Sopenharmony_ci#define CDA2D_CHMXCTRL1_INDSIZE_MASK BIT(0) 4268c2ecf20Sopenharmony_ci#define CDA2D_CHMXCTRL1_INDSIZE_FINITE (0x0 << 0) 4278c2ecf20Sopenharmony_ci#define CDA2D_CHMXCTRL1_INDSIZE_INFINITE (0x1 << 0) 4288c2ecf20Sopenharmony_ci#define CDA2D_CHMXCTRL2(n) (0x12004 + 0x80 * (n)) 4298c2ecf20Sopenharmony_ci#define CDA2D_CHMXSRCAMODE(n) (0x12020 + 0x80 * (n)) 4308c2ecf20Sopenharmony_ci#define CDA2D_CHMXDSTAMODE(n) (0x12024 + 0x80 * (n)) 4318c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_ENDIAN_MASK GENMASK(17, 16) 4328c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_ENDIAN_3210 (0x0 << 16) 4338c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_ENDIAN_0123 (0x1 << 16) 4348c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_ENDIAN_1032 (0x2 << 16) 4358c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_ENDIAN_2301 (0x3 << 16) 4368c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_RSSEL_SHIFT (8) 4378c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_AUPDT_MASK GENMASK(5, 4) 4388c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_AUPDT_INC (0x0 << 4) 4398c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_AUPDT_FIX (0x2 << 4) 4408c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_TYPE_MASK GENMASK(3, 2) 4418c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_TYPE_NORMAL (0x0 << 2) 4428c2ecf20Sopenharmony_ci#define CDA2D_CHMXAMODE_TYPE_RING (0x1 << 2) 4438c2ecf20Sopenharmony_ci#define CDA2D_CHMXSRCSTRTADRS(n) (0x12030 + 0x80 * (n)) 4448c2ecf20Sopenharmony_ci#define CDA2D_CHMXSRCSTRTADRSU(n) (0x12034 + 0x80 * (n)) 4458c2ecf20Sopenharmony_ci#define CDA2D_CHMXDSTSTRTADRS(n) (0x12038 + 0x80 * (n)) 4468c2ecf20Sopenharmony_ci#define CDA2D_CHMXDSTSTRTADRSU(n) (0x1203c + 0x80 * (n)) 4478c2ecf20Sopenharmony_ci 4488c2ecf20Sopenharmony_ci/* A2D(ring buffer) */ 4498c2ecf20Sopenharmony_ci#define CDA2D_RBFLUSH0 0x10040 4508c2ecf20Sopenharmony_ci#define CDA2D_RBADRSLOAD 0x100b4 4518c2ecf20Sopenharmony_ci#define CDA2D_RDPTRLOAD 0x100b8 4528c2ecf20Sopenharmony_ci#define CDA2D_RDPTRLOAD_LSFLAG_LOAD (0x0 << 31) 4538c2ecf20Sopenharmony_ci#define CDA2D_RDPTRLOAD_LSFLAG_STORE (0x1 << 31) 4548c2ecf20Sopenharmony_ci#define CDA2D_WRPTRLOAD 0x100bc 4558c2ecf20Sopenharmony_ci#define CDA2D_WRPTRLOAD_LSFLAG_LOAD (0x0 << 31) 4568c2ecf20Sopenharmony_ci#define CDA2D_WRPTRLOAD_LSFLAG_STORE (0x1 << 31) 4578c2ecf20Sopenharmony_ci 4588c2ecf20Sopenharmony_ci#define CDA2D_RBMXBGNADRS(n) (0x14000 + 0x80 * (n)) 4598c2ecf20Sopenharmony_ci#define CDA2D_RBMXBGNADRSU(n) (0x14004 + 0x80 * (n)) 4608c2ecf20Sopenharmony_ci#define CDA2D_RBMXENDADRS(n) (0x14008 + 0x80 * (n)) 4618c2ecf20Sopenharmony_ci#define CDA2D_RBMXENDADRSU(n) (0x1400c + 0x80 * (n)) 4628c2ecf20Sopenharmony_ci#define CDA2D_RBMXBTH(n) (0x14038 + 0x80 * (n)) 4638c2ecf20Sopenharmony_ci#define CDA2D_RBMXRTH(n) (0x1403c + 0x80 * (n)) 4648c2ecf20Sopenharmony_ci#define CDA2D_RBMXRDPTR(n) (0x14020 + 0x80 * (n)) 4658c2ecf20Sopenharmony_ci#define CDA2D_RBMXRDPTRU(n) (0x14024 + 0x80 * (n)) 4668c2ecf20Sopenharmony_ci#define CDA2D_RBMXWRPTR(n) (0x14028 + 0x80 * (n)) 4678c2ecf20Sopenharmony_ci#define CDA2D_RBMXWRPTRU(n) (0x1402c + 0x80 * (n)) 4688c2ecf20Sopenharmony_ci#define CDA2D_RBMXPTRU_PTRU_MASK GENMASK(1, 0) 4698c2ecf20Sopenharmony_ci#define CDA2D_RBMXCNFG(n) (0x14030 + 0x80 * (n)) 4708c2ecf20Sopenharmony_ci#define CDA2D_RBMXIR(n) (0x14014 + 0x80 * (n)) 4718c2ecf20Sopenharmony_ci#define CDA2D_RBMXIE(n) (0x14018 + 0x80 * (n)) 4728c2ecf20Sopenharmony_ci#define CDA2D_RBMXID(n) (0x1401c + 0x80 * (n)) 4738c2ecf20Sopenharmony_ci#define CDA2D_RBMXIX_SPACE BIT(3) 4748c2ecf20Sopenharmony_ci#define CDA2D_RBMXIX_REMAIN BIT(4) 4758c2ecf20Sopenharmony_ci 4768c2ecf20Sopenharmony_ci#endif /* SND_UNIPHIER_AIO_REG_H__ */ 477