16450ef55SDavid Rhodes /* SPDX-License-Identifier: GPL-2.0 26450ef55SDavid Rhodes * 36450ef55SDavid Rhodes * linux/sound/cs35l41.h -- Platform data for CS35L41 46450ef55SDavid Rhodes * 56450ef55SDavid Rhodes * Copyright (c) 2017-2021 Cirrus Logic Inc. 66450ef55SDavid Rhodes * 76450ef55SDavid Rhodes * Author: David Rhodes <david.rhodes@cirrus.com> 86450ef55SDavid Rhodes */ 96450ef55SDavid Rhodes 106450ef55SDavid Rhodes #ifndef __CS35L41_H 116450ef55SDavid Rhodes #define __CS35L41_H 126450ef55SDavid Rhodes 13a87d4222SLucas Tanure #include <linux/regmap.h> 140db99577SStefan Binding #include <linux/firmware/cirrus/cs_dsp.h> 15a87d4222SLucas Tanure 16a87d4222SLucas Tanure #define CS35L41_FIRSTREG 0x00000000 17a87d4222SLucas Tanure #define CS35L41_LASTREG 0x03804FE8 18a87d4222SLucas Tanure #define CS35L41_DEVID 0x00000000 19a87d4222SLucas Tanure #define CS35L41_REVID 0x00000004 20a87d4222SLucas Tanure #define CS35L41_FABID 0x00000008 21a87d4222SLucas Tanure #define CS35L41_RELID 0x0000000C 22a87d4222SLucas Tanure #define CS35L41_OTPID 0x00000010 23a87d4222SLucas Tanure #define CS35L41_SFT_RESET 0x00000020 24a87d4222SLucas Tanure #define CS35L41_TEST_KEY_CTL 0x00000040 25a87d4222SLucas Tanure #define CS35L41_USER_KEY_CTL 0x00000044 26a87d4222SLucas Tanure #define CS35L41_OTP_MEM0 0x00000400 27a87d4222SLucas Tanure #define CS35L41_OTP_MEM31 0x0000047C 28a87d4222SLucas Tanure #define CS35L41_OTP_CTRL0 0x00000500 29a87d4222SLucas Tanure #define CS35L41_OTP_CTRL1 0x00000504 30a87d4222SLucas Tanure #define CS35L41_OTP_CTRL3 0x00000508 31a87d4222SLucas Tanure #define CS35L41_OTP_CTRL4 0x0000050C 32a87d4222SLucas Tanure #define CS35L41_OTP_CTRL5 0x00000510 33a87d4222SLucas Tanure #define CS35L41_OTP_CTRL6 0x00000514 34a87d4222SLucas Tanure #define CS35L41_OTP_CTRL7 0x00000518 35a87d4222SLucas Tanure #define CS35L41_OTP_CTRL8 0x0000051C 36a87d4222SLucas Tanure #define CS35L41_PWR_CTRL1 0x00002014 37a87d4222SLucas Tanure #define CS35L41_PWR_CTRL2 0x00002018 38a87d4222SLucas Tanure #define CS35L41_PWR_CTRL3 0x0000201C 39a87d4222SLucas Tanure #define CS35L41_CTRL_OVRRIDE 0x00002020 40a87d4222SLucas Tanure #define CS35L41_AMP_OUT_MUTE 0x00002024 41a87d4222SLucas Tanure #define CS35L41_PROTECT_REL_ERR_IGN 0x00002034 42a87d4222SLucas Tanure #define CS35L41_GPIO_PAD_CONTROL 0x0000242C 43a87d4222SLucas Tanure #define CS35L41_JTAG_CONTROL 0x00002438 44f517ba49SCharles Keepax #define CS35L41_PWRMGT_CTL 0x00002900 45f517ba49SCharles Keepax #define CS35L41_WAKESRC_CTL 0x00002904 46f517ba49SCharles Keepax #define CS35L41_PWRMGT_STS 0x00002908 47a87d4222SLucas Tanure #define CS35L41_PLL_CLK_CTRL 0x00002C04 48a87d4222SLucas Tanure #define CS35L41_DSP_CLK_CTRL 0x00002C08 49a87d4222SLucas Tanure #define CS35L41_GLOBAL_CLK_CTRL 0x00002C0C 50a87d4222SLucas Tanure #define CS35L41_DATA_FS_SEL 0x00002C10 51a87d4222SLucas Tanure #define CS35L41_TST_FS_MON0 0x00002D10 52a87d4222SLucas Tanure #define CS35L41_MDSYNC_EN 0x00003400 53a87d4222SLucas Tanure #define CS35L41_MDSYNC_TX_ID 0x00003408 54a87d4222SLucas Tanure #define CS35L41_MDSYNC_PWR_CTRL 0x0000340C 55a87d4222SLucas Tanure #define CS35L41_MDSYNC_DATA_TX 0x00003410 56a87d4222SLucas Tanure #define CS35L41_MDSYNC_TX_STATUS 0x00003414 57a87d4222SLucas Tanure #define CS35L41_MDSYNC_DATA_RX 0x0000341C 58a87d4222SLucas Tanure #define CS35L41_MDSYNC_RX_STATUS 0x00003420 59a87d4222SLucas Tanure #define CS35L41_MDSYNC_ERR_STATUS 0x00003424 60a87d4222SLucas Tanure #define CS35L41_MDSYNC_SYNC_PTE2 0x00003528 61a87d4222SLucas Tanure #define CS35L41_MDSYNC_SYNC_PTE3 0x0000352C 62a87d4222SLucas Tanure #define CS35L41_MDSYNC_SYNC_MSM_STATUS 0x0000353C 63a87d4222SLucas Tanure #define CS35L41_BSTCVRT_VCTRL1 0x00003800 64a87d4222SLucas Tanure #define CS35L41_BSTCVRT_VCTRL2 0x00003804 65a87d4222SLucas Tanure #define CS35L41_BSTCVRT_PEAK_CUR 0x00003808 66a87d4222SLucas Tanure #define CS35L41_BSTCVRT_SFT_RAMP 0x0000380C 67a87d4222SLucas Tanure #define CS35L41_BSTCVRT_COEFF 0x00003810 68a87d4222SLucas Tanure #define CS35L41_BSTCVRT_SLOPE_LBST 0x00003814 69a87d4222SLucas Tanure #define CS35L41_BSTCVRT_SW_FREQ 0x00003818 70a87d4222SLucas Tanure #define CS35L41_BSTCVRT_DCM_CTRL 0x0000381C 71a87d4222SLucas Tanure #define CS35L41_BSTCVRT_DCM_MODE_FORCE 0x00003820 72a87d4222SLucas Tanure #define CS35L41_BSTCVRT_OVERVOLT_CTRL 0x00003830 73a87d4222SLucas Tanure #define CS35L41_VI_VOL_POL 0x00004000 74a87d4222SLucas Tanure #define CS35L41_VIMON_SPKMON_RESYNC 0x00004100 75a87d4222SLucas Tanure #define CS35L41_DTEMP_WARN_THLD 0x00004220 76a87d4222SLucas Tanure #define CS35L41_DTEMP_CFG 0x00004224 77a87d4222SLucas Tanure #define CS35L41_DTEMP_EN 0x00004308 78a87d4222SLucas Tanure #define CS35L41_VPVBST_FS_SEL 0x00004400 79a87d4222SLucas Tanure #define CS35L41_SP_ENABLES 0x00004800 80a87d4222SLucas Tanure #define CS35L41_SP_RATE_CTRL 0x00004804 81a87d4222SLucas Tanure #define CS35L41_SP_FORMAT 0x00004808 82a87d4222SLucas Tanure #define CS35L41_SP_HIZ_CTRL 0x0000480C 83a87d4222SLucas Tanure #define CS35L41_SP_FRAME_TX_SLOT 0x00004810 84a87d4222SLucas Tanure #define CS35L41_SP_FRAME_RX_SLOT 0x00004820 85a87d4222SLucas Tanure #define CS35L41_SP_TX_WL 0x00004830 86a87d4222SLucas Tanure #define CS35L41_SP_RX_WL 0x00004840 87a87d4222SLucas Tanure #define CS35L41_ASP_CONTROL4 0x00004854 88a87d4222SLucas Tanure #define CS35L41_DAC_PCM1_SRC 0x00004C00 89a87d4222SLucas Tanure #define CS35L41_ASP_TX1_SRC 0x00004C20 90a87d4222SLucas Tanure #define CS35L41_ASP_TX2_SRC 0x00004C24 91a87d4222SLucas Tanure #define CS35L41_ASP_TX3_SRC 0x00004C28 92a87d4222SLucas Tanure #define CS35L41_ASP_TX4_SRC 0x00004C2C 93a87d4222SLucas Tanure #define CS35L41_DSP1_RX1_SRC 0x00004C40 94a87d4222SLucas Tanure #define CS35L41_DSP1_RX2_SRC 0x00004C44 95a87d4222SLucas Tanure #define CS35L41_DSP1_RX3_SRC 0x00004C48 96a87d4222SLucas Tanure #define CS35L41_DSP1_RX4_SRC 0x00004C4C 97a87d4222SLucas Tanure #define CS35L41_DSP1_RX5_SRC 0x00004C50 98a87d4222SLucas Tanure #define CS35L41_DSP1_RX6_SRC 0x00004C54 99a87d4222SLucas Tanure #define CS35L41_DSP1_RX7_SRC 0x00004C58 100a87d4222SLucas Tanure #define CS35L41_DSP1_RX8_SRC 0x00004C5C 101a87d4222SLucas Tanure #define CS35L41_NGATE1_SRC 0x00004C60 102a87d4222SLucas Tanure #define CS35L41_NGATE2_SRC 0x00004C64 103a87d4222SLucas Tanure #define CS35L41_AMP_DIG_VOL_CTRL 0x00006000 104a87d4222SLucas Tanure #define CS35L41_VPBR_CFG 0x00006404 105a87d4222SLucas Tanure #define CS35L41_VBBR_CFG 0x00006408 106a87d4222SLucas Tanure #define CS35L41_VPBR_STATUS 0x0000640C 107a87d4222SLucas Tanure #define CS35L41_VBBR_STATUS 0x00006410 108a87d4222SLucas Tanure #define CS35L41_OVERTEMP_CFG 0x00006414 109a87d4222SLucas Tanure #define CS35L41_AMP_ERR_VOL 0x00006418 110a87d4222SLucas Tanure #define CS35L41_VOL_STATUS_TO_DSP 0x00006450 111a87d4222SLucas Tanure #define CS35L41_CLASSH_CFG 0x00006800 112a87d4222SLucas Tanure #define CS35L41_WKFET_CFG 0x00006804 113a87d4222SLucas Tanure #define CS35L41_NG_CFG 0x00006808 114a87d4222SLucas Tanure #define CS35L41_AMP_GAIN_CTRL 0x00006C04 115a87d4222SLucas Tanure #define CS35L41_DAC_MSM_CFG 0x00007400 116a87d4222SLucas Tanure #define CS35L41_IRQ1_CFG 0x00010000 117a87d4222SLucas Tanure #define CS35L41_IRQ1_STATUS 0x00010004 118a87d4222SLucas Tanure #define CS35L41_IRQ1_STATUS1 0x00010010 119a87d4222SLucas Tanure #define CS35L41_IRQ1_STATUS2 0x00010014 120a87d4222SLucas Tanure #define CS35L41_IRQ1_STATUS3 0x00010018 121a87d4222SLucas Tanure #define CS35L41_IRQ1_STATUS4 0x0001001C 122a87d4222SLucas Tanure #define CS35L41_IRQ1_RAW_STATUS1 0x00010090 123a87d4222SLucas Tanure #define CS35L41_IRQ1_RAW_STATUS2 0x00010094 124a87d4222SLucas Tanure #define CS35L41_IRQ1_RAW_STATUS3 0x00010098 125a87d4222SLucas Tanure #define CS35L41_IRQ1_RAW_STATUS4 0x0001009C 126a87d4222SLucas Tanure #define CS35L41_IRQ1_MASK1 0x00010110 127a87d4222SLucas Tanure #define CS35L41_IRQ1_MASK2 0x00010114 128a87d4222SLucas Tanure #define CS35L41_IRQ1_MASK3 0x00010118 129a87d4222SLucas Tanure #define CS35L41_IRQ1_MASK4 0x0001011C 130a87d4222SLucas Tanure #define CS35L41_IRQ1_FRC1 0x00010190 131a87d4222SLucas Tanure #define CS35L41_IRQ1_FRC2 0x00010194 132a87d4222SLucas Tanure #define CS35L41_IRQ1_FRC3 0x00010198 133a87d4222SLucas Tanure #define CS35L41_IRQ1_FRC4 0x0001019C 134a87d4222SLucas Tanure #define CS35L41_IRQ1_EDGE1 0x00010210 135a87d4222SLucas Tanure #define CS35L41_IRQ1_EDGE4 0x0001021C 136a87d4222SLucas Tanure #define CS35L41_IRQ1_POL1 0x00010290 137a87d4222SLucas Tanure #define CS35L41_IRQ1_POL2 0x00010294 138a87d4222SLucas Tanure #define CS35L41_IRQ1_POL3 0x00010298 139a87d4222SLucas Tanure #define CS35L41_IRQ1_POL4 0x0001029C 140a87d4222SLucas Tanure #define CS35L41_IRQ1_DB3 0x00010318 141a87d4222SLucas Tanure #define CS35L41_IRQ2_CFG 0x00010800 142a87d4222SLucas Tanure #define CS35L41_IRQ2_STATUS 0x00010804 143a87d4222SLucas Tanure #define CS35L41_IRQ2_STATUS1 0x00010810 144a87d4222SLucas Tanure #define CS35L41_IRQ2_STATUS2 0x00010814 145a87d4222SLucas Tanure #define CS35L41_IRQ2_STATUS3 0x00010818 146a87d4222SLucas Tanure #define CS35L41_IRQ2_STATUS4 0x0001081C 147a87d4222SLucas Tanure #define CS35L41_IRQ2_RAW_STATUS1 0x00010890 148a87d4222SLucas Tanure #define CS35L41_IRQ2_RAW_STATUS2 0x00010894 149a87d4222SLucas Tanure #define CS35L41_IRQ2_RAW_STATUS3 0x00010898 150a87d4222SLucas Tanure #define CS35L41_IRQ2_RAW_STATUS4 0x0001089C 151a87d4222SLucas Tanure #define CS35L41_IRQ2_MASK1 0x00010910 152a87d4222SLucas Tanure #define CS35L41_IRQ2_MASK2 0x00010914 153a87d4222SLucas Tanure #define CS35L41_IRQ2_MASK3 0x00010918 154a87d4222SLucas Tanure #define CS35L41_IRQ2_MASK4 0x0001091C 155a87d4222SLucas Tanure #define CS35L41_IRQ2_FRC1 0x00010990 156a87d4222SLucas Tanure #define CS35L41_IRQ2_FRC2 0x00010994 157a87d4222SLucas Tanure #define CS35L41_IRQ2_FRC3 0x00010998 158a87d4222SLucas Tanure #define CS35L41_IRQ2_FRC4 0x0001099C 159a87d4222SLucas Tanure #define CS35L41_IRQ2_EDGE1 0x00010A10 160a87d4222SLucas Tanure #define CS35L41_IRQ2_EDGE4 0x00010A1C 161a87d4222SLucas Tanure #define CS35L41_IRQ2_POL1 0x00010A90 162a87d4222SLucas Tanure #define CS35L41_IRQ2_POL2 0x00010A94 163a87d4222SLucas Tanure #define CS35L41_IRQ2_POL3 0x00010A98 164a87d4222SLucas Tanure #define CS35L41_IRQ2_POL4 0x00010A9C 165a87d4222SLucas Tanure #define CS35L41_IRQ2_DB3 0x00010B18 166a87d4222SLucas Tanure #define CS35L41_GPIO_STATUS1 0x00011000 167a87d4222SLucas Tanure #define CS35L41_GPIO1_CTRL1 0x00011008 168a87d4222SLucas Tanure #define CS35L41_GPIO2_CTRL1 0x0001100C 169a87d4222SLucas Tanure #define CS35L41_MIXER_NGATE_CFG 0x00012000 170a87d4222SLucas Tanure #define CS35L41_MIXER_NGATE_CH1_CFG 0x00012004 171a87d4222SLucas Tanure #define CS35L41_MIXER_NGATE_CH2_CFG 0x00012008 172a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_1 0x00013000 173a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_2 0x00013004 174a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_3 0x00013008 175a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_4 0x0001300C 176a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_5 0x00013010 177a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_6 0x00013014 178a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_7 0x00013018 179a87d4222SLucas Tanure #define CS35L41_DSP_MBOX_8 0x0001301C 180a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_1 0x00013020 181a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_2 0x00013024 182a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_3 0x00013028 183a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_4 0x0001302C 184a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_5 0x00013030 185a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_6 0x00013034 186a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_7 0x00013038 187a87d4222SLucas Tanure #define CS35L41_DSP_VIRT1_MBOX_8 0x0001303C 188a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_1 0x00013040 189a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_2 0x00013044 190a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_3 0x00013048 191a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_4 0x0001304C 192a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_5 0x00013050 193a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_6 0x00013054 194a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_7 0x00013058 195a87d4222SLucas Tanure #define CS35L41_DSP_VIRT2_MBOX_8 0x0001305C 196a87d4222SLucas Tanure #define CS35L41_CLOCK_DETECT_1 0x00014000 197a87d4222SLucas Tanure #define CS35L41_TIMER1_CONTROL 0x00015000 198a87d4222SLucas Tanure #define CS35L41_TIMER1_COUNT_PRESET 0x00015004 199a87d4222SLucas Tanure #define CS35L41_TIMER1_START_STOP 0x0001500C 200a87d4222SLucas Tanure #define CS35L41_TIMER1_STATUS 0x00015010 201a87d4222SLucas Tanure #define CS35L41_TIMER1_COUNT_READBACK 0x00015014 202a87d4222SLucas Tanure #define CS35L41_TIMER1_DSP_CLK_CFG 0x00015018 203a87d4222SLucas Tanure #define CS35L41_TIMER1_DSP_CLK_STATUS 0x0001501C 204a87d4222SLucas Tanure #define CS35L41_TIMER2_CONTROL 0x00015100 205a87d4222SLucas Tanure #define CS35L41_TIMER2_COUNT_PRESET 0x00015104 206a87d4222SLucas Tanure #define CS35L41_TIMER2_START_STOP 0x0001510C 207a87d4222SLucas Tanure #define CS35L41_TIMER2_STATUS 0x00015110 208a87d4222SLucas Tanure #define CS35L41_TIMER2_COUNT_READBACK 0x00015114 209a87d4222SLucas Tanure #define CS35L41_TIMER2_DSP_CLK_CFG 0x00015118 210a87d4222SLucas Tanure #define CS35L41_TIMER2_DSP_CLK_STATUS 0x0001511C 211a87d4222SLucas Tanure #define CS35L41_DFT_JTAG_CONTROL 0x00016000 212a87d4222SLucas Tanure #define CS35L41_DIE_STS1 0x00017040 213a87d4222SLucas Tanure #define CS35L41_DIE_STS2 0x00017044 214a87d4222SLucas Tanure #define CS35L41_TEMP_CAL1 0x00017048 215a87d4222SLucas Tanure #define CS35L41_TEMP_CAL2 0x0001704C 216a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_PACK_0 0x02000000 217a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_PACK_3068 0x02002FF0 218a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_UNPACK32_0 0x02400000 219a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_UNPACK32_2046 0x02401FF8 220a87d4222SLucas Tanure #define CS35L41_DSP1_TIMESTAMP_COUNT 0x025C0800 221a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_ID 0x025E0000 222a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_VERSION 0x025E0004 223a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_CORE_ID 0x025E0008 224a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_AHB_ADDR 0x025E000C 225a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_XSRAM_SIZE 0x025E0010 226a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_YSRAM_SIZE 0x025E0018 227a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_PSRAM_SIZE 0x025E0020 228a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_PM_BOOT_SIZE 0x025E0028 229a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_FEATURES 0x025E002C 230a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_FIR_FILTERS 0x025E0030 231a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_LMS_FILTERS 0x025E0034 232a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_XM_BANK_SIZE 0x025E0038 233a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_YM_BANK_SIZE 0x025E003C 234a87d4222SLucas Tanure #define CS35L41_DSP1_SYS_PM_BANK_SIZE 0x025E0040 235a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN0_CTRL0 0x025E2000 236a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN0_CTRL1 0x025E2004 237a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN1_CTRL0 0x025E2008 238a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN1_CTRL1 0x025E200C 239a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN2_CTRL0 0x025E2010 240a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN2_CTRL1 0x025E2014 241a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN3_CTRL0 0x025E2018 242a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN3_CTRL1 0x025E201C 243a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN4_CTRL0 0x025E2020 244a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN4_CTRL1 0x025E2024 245a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN5_CTRL0 0x025E2028 246a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN5_CTRL1 0x025E202C 247a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN6_CTRL0 0x025E2030 248a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN6_CTRL1 0x025E2034 249a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN7_CTRL0 0x025E2038 250a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN7_CTRL1 0x025E203C 251a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN_DBG_CTRL0 0x025E2040 252a87d4222SLucas Tanure #define CS35L41_DSP1_AHBM_WIN_DBG_CTRL1 0x025E2044 253a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_UNPACK24_0 0x02800000 254a87d4222SLucas Tanure #define CS35L41_DSP1_XMEM_UNPACK24_4093 0x02803FF4 255a87d4222SLucas Tanure #define CS35L41_DSP1_CTRL_BASE 0x02B80000 256a87d4222SLucas Tanure #define CS35L41_DSP1_CORE_SOFT_RESET 0x02B80010 257a87d4222SLucas Tanure #define CS35L41_DSP1_DEBUG 0x02B80040 258a87d4222SLucas Tanure #define CS35L41_DSP1_TIMER_CTRL 0x02B80048 259a87d4222SLucas Tanure #define CS35L41_DSP1_STREAM_ARB_CTRL 0x02B80050 260a87d4222SLucas Tanure #define CS35L41_DSP1_RX1_RATE 0x02B80080 261a87d4222SLucas Tanure #define CS35L41_DSP1_RX2_RATE 0x02B80088 262a87d4222SLucas Tanure #define CS35L41_DSP1_RX3_RATE 0x02B80090 263a87d4222SLucas Tanure #define CS35L41_DSP1_RX4_RATE 0x02B80098 264a87d4222SLucas Tanure #define CS35L41_DSP1_RX5_RATE 0x02B800A0 265a87d4222SLucas Tanure #define CS35L41_DSP1_RX6_RATE 0x02B800A8 266a87d4222SLucas Tanure #define CS35L41_DSP1_RX7_RATE 0x02B800B0 267a87d4222SLucas Tanure #define CS35L41_DSP1_RX8_RATE 0x02B800B8 268a87d4222SLucas Tanure #define CS35L41_DSP1_TX1_RATE 0x02B80280 269a87d4222SLucas Tanure #define CS35L41_DSP1_TX2_RATE 0x02B80288 270a87d4222SLucas Tanure #define CS35L41_DSP1_TX3_RATE 0x02B80290 271a87d4222SLucas Tanure #define CS35L41_DSP1_TX4_RATE 0x02B80298 272a87d4222SLucas Tanure #define CS35L41_DSP1_TX5_RATE 0x02B802A0 273a87d4222SLucas Tanure #define CS35L41_DSP1_TX6_RATE 0x02B802A8 274a87d4222SLucas Tanure #define CS35L41_DSP1_TX7_RATE 0x02B802B0 275a87d4222SLucas Tanure #define CS35L41_DSP1_TX8_RATE 0x02B802B8 276a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL1 0x02B80480 277a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL2 0x02B80488 278a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL3 0x02B80490 279a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL4 0x02B80498 280a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL5 0x02B804A0 281a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL6 0x02B804A8 282a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL7 0x02B804B0 283a87d4222SLucas Tanure #define CS35L41_DSP1_NMI_CTRL8 0x02B804B8 284a87d4222SLucas Tanure #define CS35L41_DSP1_RESUME_CTRL 0x02B80500 285a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ1_CTRL 0x02B80508 286a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ2_CTRL 0x02B80510 287a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ3_CTRL 0x02B80518 288a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ4_CTRL 0x02B80520 289a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ5_CTRL 0x02B80528 290a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ6_CTRL 0x02B80530 291a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ7_CTRL 0x02B80538 292a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ8_CTRL 0x02B80540 293a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ9_CTRL 0x02B80548 294a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ10_CTRL 0x02B80550 295a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ11_CTRL 0x02B80558 296a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ12_CTRL 0x02B80560 297a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ13_CTRL 0x02B80568 298a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ14_CTRL 0x02B80570 299a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ15_CTRL 0x02B80578 300a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ16_CTRL 0x02B80580 301a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ17_CTRL 0x02B80588 302a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ18_CTRL 0x02B80590 303a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ19_CTRL 0x02B80598 304a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ20_CTRL 0x02B805A0 305a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ21_CTRL 0x02B805A8 306a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ22_CTRL 0x02B805B0 307a87d4222SLucas Tanure #define CS35L41_DSP1_IRQ23_CTRL 0x02B805B8 308a87d4222SLucas Tanure #define CS35L41_DSP1_SCRATCH1 0x02B805C0 309a87d4222SLucas Tanure #define CS35L41_DSP1_SCRATCH2 0x02B805C8 310a87d4222SLucas Tanure #define CS35L41_DSP1_SCRATCH3 0x02B805D0 311a87d4222SLucas Tanure #define CS35L41_DSP1_SCRATCH4 0x02B805D8 312a87d4222SLucas Tanure #define CS35L41_DSP1_CCM_CORE_CTRL 0x02BC1000 313a87d4222SLucas Tanure #define CS35L41_DSP1_CCM_CLK_OVERRIDE 0x02BC1008 314a87d4222SLucas Tanure #define CS35L41_DSP1_XM_MSTR_EN 0x02BC2000 315a87d4222SLucas Tanure #define CS35L41_DSP1_XM_CORE_PRI 0x02BC2008 316a87d4222SLucas Tanure #define CS35L41_DSP1_XM_AHB_PACK_PL_PRI 0x02BC2010 317a87d4222SLucas Tanure #define CS35L41_DSP1_XM_AHB_UP_PL_PRI 0x02BC2018 318a87d4222SLucas Tanure #define CS35L41_DSP1_XM_ACCEL_PL0_PRI 0x02BC2020 319a87d4222SLucas Tanure #define CS35L41_DSP1_XM_NPL0_PRI 0x02BC2078 320a87d4222SLucas Tanure #define CS35L41_DSP1_YM_MSTR_EN 0x02BC20C0 321a87d4222SLucas Tanure #define CS35L41_DSP1_YM_CORE_PRI 0x02BC20C8 322a87d4222SLucas Tanure #define CS35L41_DSP1_YM_AHB_PACK_PL_PRI 0x02BC20D0 323a87d4222SLucas Tanure #define CS35L41_DSP1_YM_AHB_UP_PL_PRI 0x02BC20D8 324a87d4222SLucas Tanure #define CS35L41_DSP1_YM_ACCEL_PL0_PRI 0x02BC20E0 325a87d4222SLucas Tanure #define CS35L41_DSP1_YM_NPL0_PRI 0x02BC2138 326a87d4222SLucas Tanure #define CS35L41_DSP1_PM_MSTR_EN 0x02BC2180 327a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH0_ADDR 0x02BC2188 328a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH0_EN 0x02BC218C 329a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH0_DATA_LO 0x02BC2190 330a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH0_DATA_HI 0x02BC2194 331a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH1_ADDR 0x02BC2198 332a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH1_EN 0x02BC219C 333a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH1_DATA_LO 0x02BC21A0 334a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH1_DATA_HI 0x02BC21A4 335a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH2_ADDR 0x02BC21A8 336a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH2_EN 0x02BC21AC 337a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH2_DATA_LO 0x02BC21B0 338a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH2_DATA_HI 0x02BC21B4 339a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH3_ADDR 0x02BC21B8 340a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH3_EN 0x02BC21BC 341a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH3_DATA_LO 0x02BC21C0 342a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH3_DATA_HI 0x02BC21C4 343a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH4_ADDR 0x02BC21C8 344a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH4_EN 0x02BC21CC 345a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH4_DATA_LO 0x02BC21D0 346a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH4_DATA_HI 0x02BC21D4 347a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH5_ADDR 0x02BC21D8 348a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH5_EN 0x02BC21DC 349a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH5_DATA_LO 0x02BC21E0 350a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH5_DATA_HI 0x02BC21E4 351a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH6_ADDR 0x02BC21E8 352a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH6_EN 0x02BC21EC 353a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH6_DATA_LO 0x02BC21F0 354a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH6_DATA_HI 0x02BC21F4 355a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH7_ADDR 0x02BC21F8 356a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH7_EN 0x02BC21FC 357a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH7_DATA_LO 0x02BC2200 358a87d4222SLucas Tanure #define CS35L41_DSP1_PM_PATCH7_DATA_HI 0x02BC2204 359a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_ACCESS0 0x02BC3000 360a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_ACCESS0 0x02BC3004 361a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_WNDW_ACCESS0 0x02BC3008 362a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XREG_ACCESS0 0x02BC300C 363a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YREG_ACCESS0 0x02BC3014 364a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_ACCESS1 0x02BC3018 365a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_ACCESS1 0x02BC301C 366a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_WNDW_ACCESS1 0x02BC3020 367a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XREG_ACCESS1 0x02BC3024 368a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YREG_ACCESS1 0x02BC302C 369a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_ACCESS2 0x02BC3030 370a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_ACCESS2 0x02BC3034 371a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_WNDW_ACCESS2 0x02BC3038 372a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XREG_ACCESS2 0x02BC303C 373a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YREG_ACCESS2 0x02BC3044 374a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_ACCESS3 0x02BC3048 375a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_ACCESS3 0x02BC304C 376a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_WNDW_ACCESS3 0x02BC3050 377a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XREG_ACCESS3 0x02BC3054 378a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YREG_ACCESS3 0x02BC305C 379a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_VIO_ADDR 0x02BC3100 380a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_XM_VIO_STATUS 0x02BC3104 381a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_VIO_ADDR 0x02BC3108 382a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_YM_VIO_STATUS 0x02BC310C 383a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_PM_VIO_ADDR 0x02BC3110 384a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_PM_VIO_STATUS 0x02BC3114 385a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_LOCK_CONFIG 0x02BC3140 386a87d4222SLucas Tanure #define CS35L41_DSP1_MPU_WDT_RST_CTRL 0x02BC3180 387a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR0_CFG0 0x02BC5000 388a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR0_CFG1 0x02BC5004 389a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR0_CFG2 0x02BC5008 390a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR1_CFG0 0x02BC5010 391a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR1_CFG1 0x02BC5014 392a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR1_CFG2 0x02BC5018 393a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR2_CFG0 0x02BC5020 394a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR2_CFG1 0x02BC5024 395a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR2_CFG2 0x02BC5028 396a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR3_CFG0 0x02BC5030 397a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR3_CFG1 0x02BC5034 398a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR3_CFG2 0x02BC5038 399a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR4_CFG0 0x02BC5040 400a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR4_CFG1 0x02BC5044 401a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR4_CFG2 0x02BC5048 402a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR5_CFG0 0x02BC5050 403a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR5_CFG1 0x02BC5054 404a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR5_CFG2 0x02BC5058 405a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR6_CFG0 0x02BC5060 406a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR6_CFG1 0x02BC5064 407a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR6_CFG2 0x02BC5068 408a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR7_CFG0 0x02BC5070 409a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR7_CFG1 0x02BC5074 410a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_MSTR7_CFG2 0x02BC5078 411a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX0_CFG0 0x02BC5200 412a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX0_CFG1 0x02BC5204 413a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX1_CFG0 0x02BC5208 414a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX1_CFG1 0x02BC520C 415a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX2_CFG0 0x02BC5210 416a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX2_CFG1 0x02BC5214 417a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX3_CFG0 0x02BC5218 418a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX3_CFG1 0x02BC521C 419a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX4_CFG0 0x02BC5220 420a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX4_CFG1 0x02BC5224 421a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX5_CFG0 0x02BC5228 422a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX5_CFG1 0x02BC522C 423a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX6_CFG0 0x02BC5230 424a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX6_CFG1 0x02BC5234 425a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX7_CFG0 0x02BC5238 426a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_TX7_CFG1 0x02BC523C 427a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX0_CFG0 0x02BC5400 428a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX0_CFG1 0x02BC5404 429a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX1_CFG0 0x02BC5408 430a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX1_CFG1 0x02BC540C 431a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX2_CFG0 0x02BC5410 432a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX2_CFG1 0x02BC5414 433a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX3_CFG0 0x02BC5418 434a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX3_CFG1 0x02BC541C 435a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX4_CFG0 0x02BC5420 436a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX4_CFG1 0x02BC5424 437a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX5_CFG0 0x02BC5428 438a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX5_CFG1 0x02BC542C 439a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX6_CFG0 0x02BC5430 440a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX6_CFG1 0x02BC5434 441a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX7_CFG0 0x02BC5438 442a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RX7_CFG1 0x02BC543C 443a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ0_CFG0 0x02BC5600 444a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ0_CFG1 0x02BC5604 445a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ0_CFG2 0x02BC5608 446a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ1_CFG0 0x02BC5610 447a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ1_CFG1 0x02BC5614 448a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ1_CFG2 0x02BC5618 449a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ2_CFG0 0x02BC5620 450a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ2_CFG1 0x02BC5624 451a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ2_CFG2 0x02BC5628 452a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ3_CFG0 0x02BC5630 453a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ3_CFG1 0x02BC5634 454a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ3_CFG2 0x02BC5638 455a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ4_CFG0 0x02BC5640 456a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ4_CFG1 0x02BC5644 457a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ4_CFG2 0x02BC5648 458a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ5_CFG0 0x02BC5650 459a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ5_CFG1 0x02BC5654 460a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ5_CFG2 0x02BC5658 461a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ6_CFG0 0x02BC5660 462a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ6_CFG1 0x02BC5664 463a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ6_CFG2 0x02BC5668 464a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ7_CFG0 0x02BC5670 465a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ7_CFG1 0x02BC5674 466a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_IRQ7_CFG2 0x02BC5678 467a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_RESYNC_MSK 0x02BC5A00 468a87d4222SLucas Tanure #define CS35L41_DSP1_STRMARB_ERR_STATUS 0x02BC5A08 469a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_RES_STATIC 0x02BC6000 470a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_RES_DYN 0x02BC6004 471a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_NMI_CTRL 0x02BC6008 472a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_INV 0x02BC6010 473a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_MODE 0x02BC6014 474a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_EN 0x02BC6018 475a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_MSK 0x02BC601C 476a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_FLUSH 0x02BC6020 477a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_MSKCLR 0x02BC6024 478a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_FRC 0x02BC6028 479a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_MSKSET 0x02BC602C 480a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_ERR 0x02BC6030 481a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_PEND 0x02BC6034 482a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_IRQ_GEN 0x02BC6038 483a87d4222SLucas Tanure #define CS35L41_DSP1_INTPCTL_TESTBITS 0x02BC6040 484a87d4222SLucas Tanure #define CS35L41_DSP1_WDT_CONTROL 0x02BC7000 485a87d4222SLucas Tanure #define CS35L41_DSP1_WDT_STATUS 0x02BC7008 486a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_PACK_0 0x02C00000 487a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_PACK_1532 0x02C017F0 488a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_UNPACK32_0 0x03000000 489a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_UNPACK32_1022 0x03000FF8 490a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_UNPACK24_0 0x03400000 491a87d4222SLucas Tanure #define CS35L41_DSP1_YMEM_UNPACK24_2045 0x03401FF4 492a87d4222SLucas Tanure #define CS35L41_DSP1_PMEM_0 0x03800000 493a87d4222SLucas Tanure #define CS35L41_DSP1_PMEM_5114 0x03804FE8 494a87d4222SLucas Tanure 495a87d4222SLucas Tanure /*test regs for emulation bringup*/ 496a87d4222SLucas Tanure #define CS35L41_PLL_OVR 0x00003018 497a87d4222SLucas Tanure #define CS35L41_BST_TEST_DUTY 0x00003900 498a87d4222SLucas Tanure #define CS35L41_DIGPWM_IOCTRL 0x0000706C 499a87d4222SLucas Tanure 500a87d4222SLucas Tanure /*registers populated by OTP*/ 501a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_1 0x0000208c 502a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_2 0x00002090 503a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_3 0x00003010 504a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_4 0x0000300C 505a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_5 0x0000394C 506a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_6 0x00003950 507a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_7 0x00003954 508a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_8 0x00003958 509a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_9 0x0000395C 510a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_10 0x0000416C 511a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_11 0x00004160 512a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_12 0x00004170 513a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_13 0x00004360 514a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_14 0x00004448 515a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_15 0x0000444C 516a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_16 0x00006E30 517a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_17 0x00006E34 518a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_18 0x00006E38 519a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_19 0x00006E3C 520a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_20 0x00006E40 521a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_21 0x00006E44 522a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_22 0x00006E48 523a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_23 0x00006E4C 524a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_24 0x00006E50 525a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_25 0x00006E54 526a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_26 0x00006E58 527a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_27 0x00006E5C 528a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_28 0x00006E60 529a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_29 0x00006E64 530a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_30 0x00007418 531a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_31 0x0000741C 532a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_32 0x00007434 533a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_33 0x00007068 534a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_34 0x0000410C 535a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_35 0x0000400C 536a87d4222SLucas Tanure #define CS35L41_OTP_TRIM_36 0x00002030 537a87d4222SLucas Tanure 538a87d4222SLucas Tanure #define CS35L41_MAX_CACHE_REG 36 539a87d4222SLucas Tanure #define CS35L41_OTP_SIZE_WORDS 32 540a87d4222SLucas Tanure 541a87d4222SLucas Tanure #define CS35L41_NUM_SUPPLIES 2 542a87d4222SLucas Tanure 543a87d4222SLucas Tanure #define CS35L41_SCLK_MSTR_MASK 0x10 544a87d4222SLucas Tanure #define CS35L41_SCLK_MSTR_SHIFT 4 545a87d4222SLucas Tanure #define CS35L41_LRCLK_MSTR_MASK 0x01 546a87d4222SLucas Tanure #define CS35L41_LRCLK_MSTR_SHIFT 0 547a87d4222SLucas Tanure #define CS35L41_SCLK_INV_MASK 0x40 548a87d4222SLucas Tanure #define CS35L41_SCLK_INV_SHIFT 6 549a87d4222SLucas Tanure #define CS35L41_LRCLK_INV_MASK 0x04 550a87d4222SLucas Tanure #define CS35L41_LRCLK_INV_SHIFT 2 551a87d4222SLucas Tanure #define CS35L41_SCLK_FRC_MASK 0x20 552a87d4222SLucas Tanure #define CS35L41_SCLK_FRC_SHIFT 5 553a87d4222SLucas Tanure #define CS35L41_LRCLK_FRC_MASK 0x02 554a87d4222SLucas Tanure #define CS35L41_LRCLK_FRC_SHIFT 1 555a87d4222SLucas Tanure 556a87d4222SLucas Tanure #define CS35L41_AMP_GAIN_PCM_MASK 0x3E0 557a87d4222SLucas Tanure #define CS35L41_AMP_GAIN_ZC_MASK 0x0400 558a87d4222SLucas Tanure #define CS35L41_AMP_GAIN_ZC_SHIFT 10 559a87d4222SLucas Tanure 560a87d4222SLucas Tanure #define CS35L41_BST_CTL_MASK 0xFF 561a87d4222SLucas Tanure #define CS35L41_BST_CTL_SEL_MASK 0x03 562a87d4222SLucas Tanure #define CS35L41_BST_CTL_SEL_REG 0x00 563a87d4222SLucas Tanure #define CS35L41_BST_CTL_SEL_CLASSH 0x01 564a87d4222SLucas Tanure #define CS35L41_BST_IPK_MASK 0x7F 565a87d4222SLucas Tanure #define CS35L41_BST_IPK_SHIFT 0 566a87d4222SLucas Tanure #define CS35L41_BST_LIM_MASK 0x4 567a87d4222SLucas Tanure #define CS35L41_BST_LIM_SHIFT 2 568a87d4222SLucas Tanure #define CS35L41_BST_K1_MASK 0x000000FF 569a87d4222SLucas Tanure #define CS35L41_BST_K1_SHIFT 0 570a87d4222SLucas Tanure #define CS35L41_BST_K2_MASK 0x0000FF00 571a87d4222SLucas Tanure #define CS35L41_BST_K2_SHIFT 8 572a87d4222SLucas Tanure #define CS35L41_BST_SLOPE_MASK 0x0000FF00 573a87d4222SLucas Tanure #define CS35L41_BST_SLOPE_SHIFT 8 574a87d4222SLucas Tanure #define CS35L41_BST_LBST_VAL_MASK 0x00000003 575a87d4222SLucas Tanure #define CS35L41_BST_LBST_VAL_SHIFT 0 576a87d4222SLucas Tanure 577a87d4222SLucas Tanure #define CS35L41_TEMP_THLD_MASK 0x03 578a87d4222SLucas Tanure #define CS35L41_VMON_IMON_VOL_MASK 0x07FF07FF 579a87d4222SLucas Tanure #define CS35L41_PDM_MODE_MASK 0x01 580a87d4222SLucas Tanure #define CS35L41_PDM_MODE_SHIFT 0 581a87d4222SLucas Tanure 582a87d4222SLucas Tanure #define CS35L41_CH_MEM_DEPTH_MASK 0x07 583a87d4222SLucas Tanure #define CS35L41_CH_MEM_DEPTH_SHIFT 0 584a87d4222SLucas Tanure #define CS35L41_CH_HDRM_CTL_MASK 0x007F0000 585a87d4222SLucas Tanure #define CS35L41_CH_HDRM_CTL_SHIFT 16 586a87d4222SLucas Tanure #define CS35L41_CH_REL_RATE_MASK 0xFF00 587a87d4222SLucas Tanure #define CS35L41_CH_REL_RATE_SHIFT 8 588a87d4222SLucas Tanure #define CS35L41_CH_WKFET_DLY_MASK 0x001C 589a87d4222SLucas Tanure #define CS35L41_CH_WKFET_DLY_SHIFT 2 590a87d4222SLucas Tanure #define CS35L41_CH_WKFET_THLD_MASK 0x0F00 591a87d4222SLucas Tanure #define CS35L41_CH_WKFET_THLD_SHIFT 8 592a87d4222SLucas Tanure 593a87d4222SLucas Tanure #define CS35L41_HW_NG_SEL_MASK 0x3F00 594a87d4222SLucas Tanure #define CS35L41_HW_NG_SEL_SHIFT 8 595a87d4222SLucas Tanure #define CS35L41_HW_NG_DLY_MASK 0x0070 596a87d4222SLucas Tanure #define CS35L41_HW_NG_DLY_SHIFT 4 597a87d4222SLucas Tanure #define CS35L41_HW_NG_THLD_MASK 0x0007 598a87d4222SLucas Tanure #define CS35L41_HW_NG_THLD_SHIFT 0 599a87d4222SLucas Tanure 600a87d4222SLucas Tanure #define CS35L41_DSP_NG_ENABLE_MASK 0x00010000 601a87d4222SLucas Tanure #define CS35L41_DSP_NG_ENABLE_SHIFT 16 602a87d4222SLucas Tanure #define CS35L41_DSP_NG_THLD_MASK 0x7 603a87d4222SLucas Tanure #define CS35L41_DSP_NG_THLD_SHIFT 0 604a87d4222SLucas Tanure #define CS35L41_DSP_NG_DELAY_MASK 0x0F00 605a87d4222SLucas Tanure #define CS35L41_DSP_NG_DELAY_SHIFT 8 606a87d4222SLucas Tanure 607a87d4222SLucas Tanure #define CS35L41_ASP_FMT_MASK 0x0700 608a87d4222SLucas Tanure #define CS35L41_ASP_FMT_SHIFT 8 609a87d4222SLucas Tanure #define CS35L41_ASP_DOUT_HIZ_MASK 0x03 610a87d4222SLucas Tanure #define CS35L41_ASP_DOUT_HIZ_SHIFT 0 611a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_16 0x10 612a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_24 0x18 613a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_32 0x20 614a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_TX_MASK 0xFF0000 615a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_TX_SHIFT 16 616a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_RX_MASK 0xFF000000 617a87d4222SLucas Tanure #define CS35L41_ASP_WIDTH_RX_SHIFT 24 618a87d4222SLucas Tanure #define CS35L41_ASP_RX1_SLOT_MASK 0x3F 619a87d4222SLucas Tanure #define CS35L41_ASP_RX1_SLOT_SHIFT 0 620a87d4222SLucas Tanure #define CS35L41_ASP_RX2_SLOT_MASK 0x3F00 621a87d4222SLucas Tanure #define CS35L41_ASP_RX2_SLOT_SHIFT 8 622a87d4222SLucas Tanure #define CS35L41_ASP_RX_WL_MASK 0x3F 623a87d4222SLucas Tanure #define CS35L41_ASP_TX_WL_MASK 0x3F 624a87d4222SLucas Tanure #define CS35L41_ASP_RX_WL_SHIFT 0 625a87d4222SLucas Tanure #define CS35L41_ASP_TX_WL_SHIFT 0 626a87d4222SLucas Tanure #define CS35L41_ASP_SOURCE_MASK 0x7F 627a87d4222SLucas Tanure 628a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_ASPRX1 0x08 629a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_ASPRX2 0x09 630a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_VMON 0x18 631a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_IMON 0x19 632a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_CLASSH 0x21 633a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_VPMON 0x28 634a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_VBSTMON 0x29 635a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_TEMPMON 0x3A 636a87d4222SLucas Tanure #define CS35L41_INPUT_SRC_RSVD 0x3B 637a87d4222SLucas Tanure #define CS35L41_INPUT_DSP_TX1 0x32 638a87d4222SLucas Tanure #define CS35L41_INPUT_DSP_TX2 0x33 639a87d4222SLucas Tanure 640f517ba49SCharles Keepax #define CS35L41_WR_PEND_STS_MASK 0x2 641f517ba49SCharles Keepax 642a87d4222SLucas Tanure #define CS35L41_PLL_CLK_SEL_MASK 0x07 643a87d4222SLucas Tanure #define CS35L41_PLL_CLK_SEL_SHIFT 0 644a87d4222SLucas Tanure #define CS35L41_PLL_CLK_EN_MASK 0x10 645a87d4222SLucas Tanure #define CS35L41_PLL_CLK_EN_SHIFT 4 646a87d4222SLucas Tanure #define CS35L41_PLL_OPENLOOP_MASK 0x0800 647a87d4222SLucas Tanure #define CS35L41_PLL_OPENLOOP_SHIFT 11 648a87d4222SLucas Tanure #define CS35L41_PLLSRC_SCLK 0 649a87d4222SLucas Tanure #define CS35L41_PLLSRC_LRCLK 1 650a87d4222SLucas Tanure #define CS35L41_PLLSRC_SELF 3 651a87d4222SLucas Tanure #define CS35L41_PLLSRC_PDMCLK 4 652a87d4222SLucas Tanure #define CS35L41_PLLSRC_MCLK 5 653a87d4222SLucas Tanure #define CS35L41_PLLSRC_SWIRE 7 654a87d4222SLucas Tanure #define CS35L41_REFCLK_FREQ_MASK 0x7E0 655a87d4222SLucas Tanure #define CS35L41_REFCLK_FREQ_SHIFT 5 656a87d4222SLucas Tanure 657a87d4222SLucas Tanure #define CS35L41_GLOBAL_FS_MASK 0x1F 658a87d4222SLucas Tanure #define CS35L41_GLOBAL_FS_SHIFT 0 659a87d4222SLucas Tanure 660a87d4222SLucas Tanure #define CS35L41_GLOBAL_EN_MASK 0x01 661a87d4222SLucas Tanure #define CS35L41_GLOBAL_EN_SHIFT 0 662a87d4222SLucas Tanure #define CS35L41_BST_EN_MASK 0x0030 663a87d4222SLucas Tanure #define CS35L41_BST_EN_SHIFT 4 6645fdb68a7SLucas Tanure #define CS35L41_BST_DIS_FET_OFF 0x00 665a87d4222SLucas Tanure #define CS35L41_BST_EN_DEFAULT 0x2 666a87d4222SLucas Tanure #define CS35L41_AMP_EN_SHIFT 0 667a87d4222SLucas Tanure #define CS35L41_AMP_EN_MASK 1 6682e81e1ffSVitaly Rodionov #define CS35L41_VMON_EN_MASK 0x1000 6692e81e1ffSVitaly Rodionov #define CS35L41_VMON_EN_SHIFT 12 6702e81e1ffSVitaly Rodionov #define CS35L41_IMON_EN_MASK 0x2000 6712e81e1ffSVitaly Rodionov #define CS35L41_IMON_EN_SHIFT 13 672a87d4222SLucas Tanure 673a87d4222SLucas Tanure #define CS35L41_PDN_DONE_MASK 0x00800000 674a87d4222SLucas Tanure #define CS35L41_PDN_DONE_SHIFT 23 675a87d4222SLucas Tanure #define CS35L41_PUP_DONE_MASK 0x01000000 676a87d4222SLucas Tanure #define CS35L41_PUP_DONE_SHIFT 24 677a87d4222SLucas Tanure 678a87d4222SLucas Tanure #define CS35L36_PUP_DONE_IRQ_UNMASK 0x5F 679a87d4222SLucas Tanure #define CS35L36_PUP_DONE_IRQ_MASK 0xBF 680f5030564SLucas Tanure #define CS35L41_SYNC_EN_MASK BIT(8) 681a87d4222SLucas Tanure 682a87d4222SLucas Tanure #define CS35L41_AMP_SHORT_ERR 0x80000000 683a87d4222SLucas Tanure #define CS35L41_BST_SHORT_ERR 0x0100 684a87d4222SLucas Tanure #define CS35L41_TEMP_WARN 0x8000 685a87d4222SLucas Tanure #define CS35L41_TEMP_ERR 0x00020000 686a87d4222SLucas Tanure #define CS35L41_BST_OVP_ERR 0x40 687a87d4222SLucas Tanure #define CS35L41_BST_DCM_UVP_ERR 0x80 688a87d4222SLucas Tanure #define CS35L41_OTP_BOOT_DONE 0x02 689a87d4222SLucas Tanure #define CS35L41_PLL_UNLOCK 0x10 690f5030564SLucas Tanure #define CS35L41_PLL_LOCK BIT(1) 691a87d4222SLucas Tanure #define CS35L41_OTP_BOOT_ERR 0x80000000 692a87d4222SLucas Tanure 693a87d4222SLucas Tanure #define CS35L41_AMP_SHORT_ERR_RLS 0x02 694a87d4222SLucas Tanure #define CS35L41_BST_SHORT_ERR_RLS 0x04 695a87d4222SLucas Tanure #define CS35L41_BST_OVP_ERR_RLS 0x08 696a87d4222SLucas Tanure #define CS35L41_BST_UVP_ERR_RLS 0x10 697a87d4222SLucas Tanure #define CS35L41_TEMP_WARN_ERR_RLS 0x20 698a87d4222SLucas Tanure #define CS35L41_TEMP_ERR_RLS 0x40 699a87d4222SLucas Tanure 700aa4a38afSStefan Binding #define CS35L41_AMP_SHORT_ERR_RLS_SHIFT 1 701aa4a38afSStefan Binding #define CS35L41_BST_SHORT_ERR_RLS_SHIFT 2 702aa4a38afSStefan Binding #define CS35L41_BST_OVP_ERR_RLS_SHIFT 3 703aa4a38afSStefan Binding #define CS35L41_BST_UVP_ERR_RLS_SHIFT 4 704aa4a38afSStefan Binding #define CS35L41_TEMP_WARN_ERR_RLS_SHIFT 5 705aa4a38afSStefan Binding #define CS35L41_TEMP_ERR_RLS_SHIFT 6 706aa4a38afSStefan Binding 707a87d4222SLucas Tanure #define CS35L41_INT1_MASK_DEFAULT 0x7FFCFE3F 708a87d4222SLucas Tanure #define CS35L41_INT1_UNMASK_PUP 0xFEFFFFFF 709a87d4222SLucas Tanure #define CS35L41_INT1_UNMASK_PDN 0xFF7FFFFF 710f5030564SLucas Tanure #define CS35L41_INT3_PLL_LOCK_SHIFT 1 711f5030564SLucas Tanure #define CS35L41_INT3_PLL_LOCK_MASK BIT(CS35L41_INT3_PLL_LOCK_SHIFT) 712a87d4222SLucas Tanure 713a87d4222SLucas Tanure #define CS35L41_GPIO_DIR_MASK 0x80000000 714a87d4222SLucas Tanure #define CS35L41_GPIO_DIR_SHIFT 31 715a87d4222SLucas Tanure #define CS35L41_GPIO1_CTRL_MASK 0x00030000 716a87d4222SLucas Tanure #define CS35L41_GPIO1_CTRL_SHIFT 16 717a87d4222SLucas Tanure #define CS35L41_GPIO2_CTRL_MASK 0x07000000 718a87d4222SLucas Tanure #define CS35L41_GPIO2_CTRL_SHIFT 24 719bb06c203SLucas Tanure #define CS35L41_GPIO_LVL_SHIFT 15 720bb06c203SLucas Tanure #define CS35L41_GPIO_LVL_MASK BIT(CS35L41_GPIO_LVL_SHIFT) 721a87d4222SLucas Tanure #define CS35L41_GPIO_POL_MASK 0x1000 722a87d4222SLucas Tanure #define CS35L41_GPIO_POL_SHIFT 12 723a87d4222SLucas Tanure 724a87d4222SLucas Tanure #define CS35L41_AMP_INV_PCM_SHIFT 14 725a87d4222SLucas Tanure #define CS35L41_AMP_INV_PCM_MASK BIT(CS35L41_AMP_INV_PCM_SHIFT) 726a87d4222SLucas Tanure #define CS35L41_AMP_PCM_VOL_SHIFT 3 727a87d4222SLucas Tanure #define CS35L41_AMP_PCM_VOL_MASK (0x7FF << 3) 728a87d4222SLucas Tanure #define CS35L41_AMP_PCM_VOL_MUTE 0x4CF 729a87d4222SLucas Tanure 730a87d4222SLucas Tanure #define CS35L41_CHIP_ID 0x35a40 731a87d4222SLucas Tanure #define CS35L41R_CHIP_ID 0x35b40 732a87d4222SLucas Tanure #define CS35L41_MTLREVID_MASK 0x0F 733a87d4222SLucas Tanure #define CS35L41_REVID_A0 0xA0 734a87d4222SLucas Tanure #define CS35L41_REVID_B0 0xB0 735a87d4222SLucas Tanure #define CS35L41_REVID_B2 0xB2 736a87d4222SLucas Tanure 737a87d4222SLucas Tanure #define CS35L41_HALO_CORE_RESET 0x00000200 738a87d4222SLucas Tanure 739a87d4222SLucas Tanure #define CS35L41_FS1_WINDOW_MASK 0x000007FF 740a87d4222SLucas Tanure #define CS35L41_FS2_WINDOW_MASK 0x00FFF800 741a87d4222SLucas Tanure #define CS35L41_FS2_WINDOW_SHIFT 12 742a87d4222SLucas Tanure 743a87d4222SLucas Tanure #define CS35L41_SPI_MAX_FREQ 4000000 744a87d4222SLucas Tanure #define CS35L41_REGSTRIDE 4 745a87d4222SLucas Tanure 746b8388a1aSLucas Tanure enum cs35l41_boost_type { 747b8388a1aSLucas Tanure CS35L41_INT_BOOST, 748b8388a1aSLucas Tanure CS35L41_EXT_BOOST, 749f5030564SLucas Tanure CS35L41_SHD_BOOST_ACTV, 750f5030564SLucas Tanure CS35L41_SHD_BOOST_PASS, 751f5030564SLucas Tanure 752f5030564SLucas Tanure // Not present in Binding Documentation, so no system should use this value. 753f5030564SLucas Tanure // This value is only used in CLSA0100 Laptop 754b8388a1aSLucas Tanure CS35L41_EXT_BOOST_NO_VSPK_SWITCH, 755b8388a1aSLucas Tanure }; 756b8388a1aSLucas Tanure 7576450ef55SDavid Rhodes enum cs35l41_clk_ids { 7586450ef55SDavid Rhodes CS35L41_CLKID_SCLK = 0, 7596450ef55SDavid Rhodes CS35L41_CLKID_LRCLK = 1, 7606450ef55SDavid Rhodes CS35L41_CLKID_MCLK = 4, 7616450ef55SDavid Rhodes }; 7626450ef55SDavid Rhodes 763f7f20737SLucas Tanure enum cs35l41_gpio1_func { 764f7f20737SLucas Tanure CS35L41_GPIO1_HIZ, 765f7f20737SLucas Tanure CS35L41_GPIO1_GPIO, 766f7f20737SLucas Tanure CS35L41_GPIO1_MDSYNC, 767f7f20737SLucas Tanure CS35L41_GPIO1_MCLK, 768f7f20737SLucas Tanure CS35L41_GPIO1_PDM_CLK, 769f7f20737SLucas Tanure CS35L41_GPIO1_PDM_DATA, 7706450ef55SDavid Rhodes }; 7716450ef55SDavid Rhodes 772f7f20737SLucas Tanure enum cs35l41_gpio2_func { 773f7f20737SLucas Tanure CS35L41_GPIO2_HIZ, 774f7f20737SLucas Tanure CS35L41_GPIO2_GPIO, 775f7f20737SLucas Tanure CS35L41_GPIO2_INT_OPEN_DRAIN, 776f7f20737SLucas Tanure CS35L41_GPIO2_MCLK, 777f7f20737SLucas Tanure CS35L41_GPIO2_INT_PUSH_PULL_LOW, 778f7f20737SLucas Tanure CS35L41_GPIO2_INT_PUSH_PULL_HIGH, 779f7f20737SLucas Tanure CS35L41_GPIO2_PDM_CLK, 780f7f20737SLucas Tanure CS35L41_GPIO2_PDM_DATA, 781f7f20737SLucas Tanure }; 782f7f20737SLucas Tanure 783f7f20737SLucas Tanure struct cs35l41_gpio_cfg { 7842603c974SLucas Tanure bool valid; 785f7f20737SLucas Tanure bool pol_inv; 786f7f20737SLucas Tanure bool out_en; 787f7f20737SLucas Tanure unsigned int func; 788f7f20737SLucas Tanure }; 789f7f20737SLucas Tanure 790f7f20737SLucas Tanure struct cs35l41_hw_cfg { 7912603c974SLucas Tanure bool valid; 7926450ef55SDavid Rhodes int bst_ind; 7936450ef55SDavid Rhodes int bst_ipk; 7946450ef55SDavid Rhodes int bst_cap; 7956450ef55SDavid Rhodes int dout_hiz; 796f7f20737SLucas Tanure struct cs35l41_gpio_cfg gpio1; 797f7f20737SLucas Tanure struct cs35l41_gpio_cfg gpio2; 798f7f20737SLucas Tanure unsigned int spk_pos; 799f7f20737SLucas Tanure 800b8388a1aSLucas Tanure enum cs35l41_boost_type bst_type; 8016450ef55SDavid Rhodes }; 8026450ef55SDavid Rhodes 803a87d4222SLucas Tanure struct cs35l41_otp_packed_element_t { 804a87d4222SLucas Tanure u32 reg; 805a87d4222SLucas Tanure u8 shift; 806a87d4222SLucas Tanure u8 size; 807a87d4222SLucas Tanure }; 808a87d4222SLucas Tanure 809a87d4222SLucas Tanure struct cs35l41_otp_map_element_t { 810a87d4222SLucas Tanure u32 id; 811a87d4222SLucas Tanure u32 num_elements; 812a87d4222SLucas Tanure const struct cs35l41_otp_packed_element_t *map; 813a87d4222SLucas Tanure u32 bit_offset; 814a87d4222SLucas Tanure u32 word_offset; 815a87d4222SLucas Tanure }; 816a87d4222SLucas Tanure 817caf7c1f1SStefan Binding enum cs35l41_cspl_mbox_status { 818caf7c1f1SStefan Binding CSPL_MBOX_STS_RUNNING = 0, 819caf7c1f1SStefan Binding CSPL_MBOX_STS_PAUSED = 1, 820caf7c1f1SStefan Binding CSPL_MBOX_STS_RDY_FOR_REINIT = 2, 821caf7c1f1SStefan Binding }; 822caf7c1f1SStefan Binding 823caf7c1f1SStefan Binding enum cs35l41_cspl_mbox_cmd { 824caf7c1f1SStefan Binding CSPL_MBOX_CMD_NONE = 0, 825caf7c1f1SStefan Binding CSPL_MBOX_CMD_PAUSE = 1, 826caf7c1f1SStefan Binding CSPL_MBOX_CMD_RESUME = 2, 827caf7c1f1SStefan Binding CSPL_MBOX_CMD_REINIT = 3, 828caf7c1f1SStefan Binding CSPL_MBOX_CMD_STOP_PRE_REINIT = 4, 829caf7c1f1SStefan Binding CSPL_MBOX_CMD_HIBERNATE = 5, 830caf7c1f1SStefan Binding CSPL_MBOX_CMD_OUT_OF_HIBERNATE = 6, 831fa3efcc3SStefan Binding CSPL_MBOX_CMD_SPK_OUT_ENABLE = 7, 832caf7c1f1SStefan Binding CSPL_MBOX_CMD_UNKNOWN_CMD = -1, 833caf7c1f1SStefan Binding CSPL_MBOX_CMD_INVALID_SEQUENCE = -2, 834caf7c1f1SStefan Binding }; 835caf7c1f1SStefan Binding 836aa4a38afSStefan Binding /* 837aa4a38afSStefan Binding * IRQs 838aa4a38afSStefan Binding */ 839aa4a38afSStefan Binding #define CS35L41_IRQ(_irq, _name, _hand) \ 840aa4a38afSStefan Binding { \ 841aa4a38afSStefan Binding .irq = CS35L41_ ## _irq ## _IRQ,\ 842aa4a38afSStefan Binding .name = _name, \ 843aa4a38afSStefan Binding .handler = _hand, \ 844aa4a38afSStefan Binding } 845aa4a38afSStefan Binding 846aa4a38afSStefan Binding struct cs35l41_irq { 847aa4a38afSStefan Binding int irq; 848aa4a38afSStefan Binding const char *name; 849aa4a38afSStefan Binding irqreturn_t (*handler)(int irq, void *data); 850aa4a38afSStefan Binding }; 851aa4a38afSStefan Binding 852aa4a38afSStefan Binding #define CS35L41_REG_IRQ(_reg, _irq) \ 853aa4a38afSStefan Binding [CS35L41_ ## _irq ## _IRQ] = { \ 854aa4a38afSStefan Binding .reg_offset = (CS35L41_ ## _reg) - CS35L41_IRQ1_STATUS1,\ 855aa4a38afSStefan Binding .mask = CS35L41_ ## _irq ## _MASK \ 856aa4a38afSStefan Binding } 857aa4a38afSStefan Binding 858aa4a38afSStefan Binding /* (0x0000E010) CS35L41_IRQ1_STATUS1 */ 859aa4a38afSStefan Binding #define CS35L41_BST_OVP_ERR_SHIFT 6 860aa4a38afSStefan Binding #define CS35L41_BST_OVP_ERR_MASK BIT(CS35L41_BST_OVP_ERR_SHIFT) 861aa4a38afSStefan Binding #define CS35L41_BST_DCM_UVP_ERR_SHIFT 7 862aa4a38afSStefan Binding #define CS35L41_BST_DCM_UVP_ERR_MASK BIT(CS35L41_BST_DCM_UVP_ERR_SHIFT) 863aa4a38afSStefan Binding #define CS35L41_BST_SHORT_ERR_SHIFT 8 864aa4a38afSStefan Binding #define CS35L41_BST_SHORT_ERR_MASK BIT(CS35L41_BST_SHORT_ERR_SHIFT) 865aa4a38afSStefan Binding #define CS35L41_TEMP_WARN_SHIFT 15 866aa4a38afSStefan Binding #define CS35L41_TEMP_WARN_MASK BIT(CS35L41_TEMP_WARN_SHIFT) 867aa4a38afSStefan Binding #define CS35L41_TEMP_ERR_SHIFT 17 868aa4a38afSStefan Binding #define CS35L41_TEMP_ERR_MASK BIT(CS35L41_TEMP_ERR_SHIFT) 869aa4a38afSStefan Binding #define CS35L41_AMP_SHORT_ERR_SHIFT 31 870aa4a38afSStefan Binding #define CS35L41_AMP_SHORT_ERR_MASK BIT(CS35L41_AMP_SHORT_ERR_SHIFT) 871aa4a38afSStefan Binding 872aa4a38afSStefan Binding enum cs35l41_irq_list { 873aa4a38afSStefan Binding CS35L41_BST_OVP_ERR_IRQ, 874aa4a38afSStefan Binding CS35L41_BST_DCM_UVP_ERR_IRQ, 875aa4a38afSStefan Binding CS35L41_BST_SHORT_ERR_IRQ, 876aa4a38afSStefan Binding CS35L41_TEMP_WARN_IRQ, 877aa4a38afSStefan Binding CS35L41_TEMP_ERR_IRQ, 878aa4a38afSStefan Binding CS35L41_AMP_SHORT_ERR_IRQ, 879aa4a38afSStefan Binding 880aa4a38afSStefan Binding CS35L41_NUM_IRQ 881aa4a38afSStefan Binding }; 882aa4a38afSStefan Binding 883a87d4222SLucas Tanure extern struct regmap_config cs35l41_regmap_i2c; 884a87d4222SLucas Tanure extern struct regmap_config cs35l41_regmap_spi; 885a87d4222SLucas Tanure 886d92321bbSCharles Keepax int cs35l41_test_key_unlock(struct device *dev, struct regmap *regmap); 887d92321bbSCharles Keepax int cs35l41_test_key_lock(struct device *dev, struct regmap *regmap); 888fe120d4cSLucas Tanure int cs35l41_otp_unpack(struct device *dev, struct regmap *regmap); 8898b227860SLucas Tanure int cs35l41_register_errata_patch(struct device *dev, struct regmap *reg, unsigned int reg_revid); 8903bc3e3daSLucas Tanure int cs35l41_set_channels(struct device *dev, struct regmap *reg, 8913bc3e3daSLucas Tanure unsigned int tx_num, unsigned int *tx_slot, 8923bc3e3daSLucas Tanure unsigned int rx_num, unsigned int *rx_slot); 893fcad8950SLucas Tanure int cs35l41_gpio_config(struct regmap *regmap, struct cs35l41_hw_cfg *hw_cfg); 8940db99577SStefan Binding void cs35l41_configure_cs_dsp(struct device *dev, struct regmap *reg, struct cs_dsp *dsp); 895caf7c1f1SStefan Binding int cs35l41_set_cspl_mbox_cmd(struct device *dev, struct regmap *regmap, 896caf7c1f1SStefan Binding enum cs35l41_cspl_mbox_cmd cmd); 897ff8aad07SStefan Binding int cs35l41_write_fs_errata(struct device *dev, struct regmap *regmap); 898e341efc3SStefan Binding int cs35l41_enter_hibernate(struct device *dev, struct regmap *regmap, 899e341efc3SStefan Binding enum cs35l41_boost_type b_type); 90094e0bc31SStefan Binding int cs35l41_exit_hibernate(struct device *dev, struct regmap *regmap); 9015577dd23SLucas Tanure int cs35l41_init_boost(struct device *dev, struct regmap *regmap, 9025577dd23SLucas Tanure struct cs35l41_hw_cfg *hw_cfg); 9035577dd23SLucas Tanure bool cs35l41_safe_reset(struct regmap *regmap, enum cs35l41_boost_type b_type); 904*507032d6SCristian Ciocaltea int cs35l41_mdsync_up(struct regmap *regmap); 905fa3efcc3SStefan Binding int cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l41_boost_type b_type, 906*507032d6SCristian Ciocaltea int enable, bool firmware_running); 907fe120d4cSLucas Tanure 9086450ef55SDavid Rhodes #endif /* __CS35L41_H */ 909