162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci *
362306a36Sopenharmony_ci * linux/sound/cs35l41.h -- Platform data for CS35L41
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (c) 2017-2021 Cirrus Logic Inc.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Author: David Rhodes	<david.rhodes@cirrus.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#ifndef __CS35L41_H
1162306a36Sopenharmony_ci#define __CS35L41_H
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include <linux/regmap.h>
1462306a36Sopenharmony_ci#include <linux/firmware/cirrus/cs_dsp.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define CS35L41_FIRSTREG		0x00000000
1762306a36Sopenharmony_ci#define CS35L41_LASTREG			0x03804FE8
1862306a36Sopenharmony_ci#define CS35L41_DEVID			0x00000000
1962306a36Sopenharmony_ci#define CS35L41_REVID			0x00000004
2062306a36Sopenharmony_ci#define CS35L41_FABID			0x00000008
2162306a36Sopenharmony_ci#define CS35L41_RELID			0x0000000C
2262306a36Sopenharmony_ci#define CS35L41_OTPID			0x00000010
2362306a36Sopenharmony_ci#define CS35L41_SFT_RESET		0x00000020
2462306a36Sopenharmony_ci#define CS35L41_TEST_KEY_CTL		0x00000040
2562306a36Sopenharmony_ci#define CS35L41_USER_KEY_CTL		0x00000044
2662306a36Sopenharmony_ci#define CS35L41_OTP_MEM0		0x00000400
2762306a36Sopenharmony_ci#define CS35L41_OTP_MEM31		0x0000047C
2862306a36Sopenharmony_ci#define CS35L41_OTP_CTRL0		0x00000500
2962306a36Sopenharmony_ci#define CS35L41_OTP_CTRL1		0x00000504
3062306a36Sopenharmony_ci#define CS35L41_OTP_CTRL3		0x00000508
3162306a36Sopenharmony_ci#define CS35L41_OTP_CTRL4		0x0000050C
3262306a36Sopenharmony_ci#define CS35L41_OTP_CTRL5		0x00000510
3362306a36Sopenharmony_ci#define CS35L41_OTP_CTRL6		0x00000514
3462306a36Sopenharmony_ci#define CS35L41_OTP_CTRL7		0x00000518
3562306a36Sopenharmony_ci#define CS35L41_OTP_CTRL8		0x0000051C
3662306a36Sopenharmony_ci#define CS35L41_PWR_CTRL1		0x00002014
3762306a36Sopenharmony_ci#define CS35L41_PWR_CTRL2		0x00002018
3862306a36Sopenharmony_ci#define CS35L41_PWR_CTRL3		0x0000201C
3962306a36Sopenharmony_ci#define CS35L41_CTRL_OVRRIDE		0x00002020
4062306a36Sopenharmony_ci#define CS35L41_AMP_OUT_MUTE		0x00002024
4162306a36Sopenharmony_ci#define CS35L41_PROTECT_REL_ERR_IGN	0x00002034
4262306a36Sopenharmony_ci#define CS35L41_GPIO_PAD_CONTROL	0x0000242C
4362306a36Sopenharmony_ci#define CS35L41_JTAG_CONTROL		0x00002438
4462306a36Sopenharmony_ci#define CS35L41_PWRMGT_CTL		0x00002900
4562306a36Sopenharmony_ci#define CS35L41_WAKESRC_CTL		0x00002904
4662306a36Sopenharmony_ci#define CS35L41_PWRMGT_STS		0x00002908
4762306a36Sopenharmony_ci#define CS35L41_PLL_CLK_CTRL		0x00002C04
4862306a36Sopenharmony_ci#define CS35L41_DSP_CLK_CTRL		0x00002C08
4962306a36Sopenharmony_ci#define CS35L41_GLOBAL_CLK_CTRL		0x00002C0C
5062306a36Sopenharmony_ci#define CS35L41_DATA_FS_SEL		0x00002C10
5162306a36Sopenharmony_ci#define CS35L41_TST_FS_MON0		0x00002D10
5262306a36Sopenharmony_ci#define CS35L41_MDSYNC_EN		0x00003400
5362306a36Sopenharmony_ci#define CS35L41_MDSYNC_TX_ID		0x00003408
5462306a36Sopenharmony_ci#define CS35L41_MDSYNC_PWR_CTRL		0x0000340C
5562306a36Sopenharmony_ci#define CS35L41_MDSYNC_DATA_TX		0x00003410
5662306a36Sopenharmony_ci#define CS35L41_MDSYNC_TX_STATUS	0x00003414
5762306a36Sopenharmony_ci#define CS35L41_MDSYNC_DATA_RX		0x0000341C
5862306a36Sopenharmony_ci#define CS35L41_MDSYNC_RX_STATUS	0x00003420
5962306a36Sopenharmony_ci#define CS35L41_MDSYNC_ERR_STATUS	0x00003424
6062306a36Sopenharmony_ci#define CS35L41_MDSYNC_SYNC_PTE2	0x00003528
6162306a36Sopenharmony_ci#define CS35L41_MDSYNC_SYNC_PTE3	0x0000352C
6262306a36Sopenharmony_ci#define CS35L41_MDSYNC_SYNC_MSM_STATUS	0x0000353C
6362306a36Sopenharmony_ci#define CS35L41_BSTCVRT_VCTRL1		0x00003800
6462306a36Sopenharmony_ci#define CS35L41_BSTCVRT_VCTRL2		0x00003804
6562306a36Sopenharmony_ci#define CS35L41_BSTCVRT_PEAK_CUR	0x00003808
6662306a36Sopenharmony_ci#define CS35L41_BSTCVRT_SFT_RAMP	0x0000380C
6762306a36Sopenharmony_ci#define CS35L41_BSTCVRT_COEFF		0x00003810
6862306a36Sopenharmony_ci#define CS35L41_BSTCVRT_SLOPE_LBST	0x00003814
6962306a36Sopenharmony_ci#define CS35L41_BSTCVRT_SW_FREQ		0x00003818
7062306a36Sopenharmony_ci#define CS35L41_BSTCVRT_DCM_CTRL	0x0000381C
7162306a36Sopenharmony_ci#define CS35L41_BSTCVRT_DCM_MODE_FORCE	0x00003820
7262306a36Sopenharmony_ci#define CS35L41_BSTCVRT_OVERVOLT_CTRL	0x00003830
7362306a36Sopenharmony_ci#define CS35L41_VI_VOL_POL		0x00004000
7462306a36Sopenharmony_ci#define CS35L41_VIMON_SPKMON_RESYNC	0x00004100
7562306a36Sopenharmony_ci#define CS35L41_DTEMP_WARN_THLD		0x00004220
7662306a36Sopenharmony_ci#define CS35L41_DTEMP_CFG		0x00004224
7762306a36Sopenharmony_ci#define CS35L41_DTEMP_EN		0x00004308
7862306a36Sopenharmony_ci#define CS35L41_VPVBST_FS_SEL		0x00004400
7962306a36Sopenharmony_ci#define CS35L41_SP_ENABLES		0x00004800
8062306a36Sopenharmony_ci#define CS35L41_SP_RATE_CTRL		0x00004804
8162306a36Sopenharmony_ci#define CS35L41_SP_FORMAT		0x00004808
8262306a36Sopenharmony_ci#define CS35L41_SP_HIZ_CTRL		0x0000480C
8362306a36Sopenharmony_ci#define CS35L41_SP_FRAME_TX_SLOT	0x00004810
8462306a36Sopenharmony_ci#define CS35L41_SP_FRAME_RX_SLOT	0x00004820
8562306a36Sopenharmony_ci#define CS35L41_SP_TX_WL		0x00004830
8662306a36Sopenharmony_ci#define CS35L41_SP_RX_WL		0x00004840
8762306a36Sopenharmony_ci#define CS35L41_ASP_CONTROL4		0x00004854
8862306a36Sopenharmony_ci#define CS35L41_DAC_PCM1_SRC		0x00004C00
8962306a36Sopenharmony_ci#define CS35L41_ASP_TX1_SRC		0x00004C20
9062306a36Sopenharmony_ci#define CS35L41_ASP_TX2_SRC		0x00004C24
9162306a36Sopenharmony_ci#define CS35L41_ASP_TX3_SRC		0x00004C28
9262306a36Sopenharmony_ci#define CS35L41_ASP_TX4_SRC		0x00004C2C
9362306a36Sopenharmony_ci#define CS35L41_DSP1_RX1_SRC		0x00004C40
9462306a36Sopenharmony_ci#define CS35L41_DSP1_RX2_SRC		0x00004C44
9562306a36Sopenharmony_ci#define CS35L41_DSP1_RX3_SRC		0x00004C48
9662306a36Sopenharmony_ci#define CS35L41_DSP1_RX4_SRC		0x00004C4C
9762306a36Sopenharmony_ci#define CS35L41_DSP1_RX5_SRC		0x00004C50
9862306a36Sopenharmony_ci#define CS35L41_DSP1_RX6_SRC		0x00004C54
9962306a36Sopenharmony_ci#define CS35L41_DSP1_RX7_SRC		0x00004C58
10062306a36Sopenharmony_ci#define CS35L41_DSP1_RX8_SRC		0x00004C5C
10162306a36Sopenharmony_ci#define CS35L41_NGATE1_SRC		0x00004C60
10262306a36Sopenharmony_ci#define CS35L41_NGATE2_SRC		0x00004C64
10362306a36Sopenharmony_ci#define CS35L41_AMP_DIG_VOL_CTRL	0x00006000
10462306a36Sopenharmony_ci#define CS35L41_VPBR_CFG		0x00006404
10562306a36Sopenharmony_ci#define CS35L41_VBBR_CFG		0x00006408
10662306a36Sopenharmony_ci#define CS35L41_VPBR_STATUS		0x0000640C
10762306a36Sopenharmony_ci#define CS35L41_VBBR_STATUS		0x00006410
10862306a36Sopenharmony_ci#define CS35L41_OVERTEMP_CFG		0x00006414
10962306a36Sopenharmony_ci#define CS35L41_AMP_ERR_VOL		0x00006418
11062306a36Sopenharmony_ci#define CS35L41_VOL_STATUS_TO_DSP	0x00006450
11162306a36Sopenharmony_ci#define CS35L41_CLASSH_CFG		0x00006800
11262306a36Sopenharmony_ci#define CS35L41_WKFET_CFG		0x00006804
11362306a36Sopenharmony_ci#define CS35L41_NG_CFG			0x00006808
11462306a36Sopenharmony_ci#define CS35L41_AMP_GAIN_CTRL		0x00006C04
11562306a36Sopenharmony_ci#define CS35L41_DAC_MSM_CFG		0x00007400
11662306a36Sopenharmony_ci#define CS35L41_IRQ1_CFG		0x00010000
11762306a36Sopenharmony_ci#define CS35L41_IRQ1_STATUS		0x00010004
11862306a36Sopenharmony_ci#define CS35L41_IRQ1_STATUS1		0x00010010
11962306a36Sopenharmony_ci#define CS35L41_IRQ1_STATUS2		0x00010014
12062306a36Sopenharmony_ci#define CS35L41_IRQ1_STATUS3		0x00010018
12162306a36Sopenharmony_ci#define CS35L41_IRQ1_STATUS4		0x0001001C
12262306a36Sopenharmony_ci#define CS35L41_IRQ1_RAW_STATUS1	0x00010090
12362306a36Sopenharmony_ci#define CS35L41_IRQ1_RAW_STATUS2	0x00010094
12462306a36Sopenharmony_ci#define CS35L41_IRQ1_RAW_STATUS3	0x00010098
12562306a36Sopenharmony_ci#define CS35L41_IRQ1_RAW_STATUS4	0x0001009C
12662306a36Sopenharmony_ci#define CS35L41_IRQ1_MASK1		0x00010110
12762306a36Sopenharmony_ci#define CS35L41_IRQ1_MASK2		0x00010114
12862306a36Sopenharmony_ci#define CS35L41_IRQ1_MASK3		0x00010118
12962306a36Sopenharmony_ci#define CS35L41_IRQ1_MASK4		0x0001011C
13062306a36Sopenharmony_ci#define CS35L41_IRQ1_FRC1		0x00010190
13162306a36Sopenharmony_ci#define CS35L41_IRQ1_FRC2		0x00010194
13262306a36Sopenharmony_ci#define CS35L41_IRQ1_FRC3		0x00010198
13362306a36Sopenharmony_ci#define CS35L41_IRQ1_FRC4		0x0001019C
13462306a36Sopenharmony_ci#define CS35L41_IRQ1_EDGE1		0x00010210
13562306a36Sopenharmony_ci#define CS35L41_IRQ1_EDGE4		0x0001021C
13662306a36Sopenharmony_ci#define CS35L41_IRQ1_POL1		0x00010290
13762306a36Sopenharmony_ci#define CS35L41_IRQ1_POL2		0x00010294
13862306a36Sopenharmony_ci#define CS35L41_IRQ1_POL3		0x00010298
13962306a36Sopenharmony_ci#define CS35L41_IRQ1_POL4		0x0001029C
14062306a36Sopenharmony_ci#define CS35L41_IRQ1_DB3		0x00010318
14162306a36Sopenharmony_ci#define CS35L41_IRQ2_CFG		0x00010800
14262306a36Sopenharmony_ci#define CS35L41_IRQ2_STATUS		0x00010804
14362306a36Sopenharmony_ci#define CS35L41_IRQ2_STATUS1		0x00010810
14462306a36Sopenharmony_ci#define CS35L41_IRQ2_STATUS2		0x00010814
14562306a36Sopenharmony_ci#define CS35L41_IRQ2_STATUS3		0x00010818
14662306a36Sopenharmony_ci#define CS35L41_IRQ2_STATUS4		0x0001081C
14762306a36Sopenharmony_ci#define CS35L41_IRQ2_RAW_STATUS1	0x00010890
14862306a36Sopenharmony_ci#define CS35L41_IRQ2_RAW_STATUS2	0x00010894
14962306a36Sopenharmony_ci#define CS35L41_IRQ2_RAW_STATUS3	0x00010898
15062306a36Sopenharmony_ci#define CS35L41_IRQ2_RAW_STATUS4	0x0001089C
15162306a36Sopenharmony_ci#define CS35L41_IRQ2_MASK1		0x00010910
15262306a36Sopenharmony_ci#define CS35L41_IRQ2_MASK2		0x00010914
15362306a36Sopenharmony_ci#define CS35L41_IRQ2_MASK3		0x00010918
15462306a36Sopenharmony_ci#define CS35L41_IRQ2_MASK4		0x0001091C
15562306a36Sopenharmony_ci#define CS35L41_IRQ2_FRC1		0x00010990
15662306a36Sopenharmony_ci#define CS35L41_IRQ2_FRC2		0x00010994
15762306a36Sopenharmony_ci#define CS35L41_IRQ2_FRC3		0x00010998
15862306a36Sopenharmony_ci#define CS35L41_IRQ2_FRC4		0x0001099C
15962306a36Sopenharmony_ci#define CS35L41_IRQ2_EDGE1		0x00010A10
16062306a36Sopenharmony_ci#define CS35L41_IRQ2_EDGE4		0x00010A1C
16162306a36Sopenharmony_ci#define CS35L41_IRQ2_POL1		0x00010A90
16262306a36Sopenharmony_ci#define CS35L41_IRQ2_POL2		0x00010A94
16362306a36Sopenharmony_ci#define CS35L41_IRQ2_POL3		0x00010A98
16462306a36Sopenharmony_ci#define CS35L41_IRQ2_POL4		0x00010A9C
16562306a36Sopenharmony_ci#define CS35L41_IRQ2_DB3		0x00010B18
16662306a36Sopenharmony_ci#define CS35L41_GPIO_STATUS1		0x00011000
16762306a36Sopenharmony_ci#define CS35L41_GPIO1_CTRL1		0x00011008
16862306a36Sopenharmony_ci#define CS35L41_GPIO2_CTRL1		0x0001100C
16962306a36Sopenharmony_ci#define CS35L41_MIXER_NGATE_CFG		0x00012000
17062306a36Sopenharmony_ci#define CS35L41_MIXER_NGATE_CH1_CFG	0x00012004
17162306a36Sopenharmony_ci#define CS35L41_MIXER_NGATE_CH2_CFG	0x00012008
17262306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_1		0x00013000
17362306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_2		0x00013004
17462306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_3		0x00013008
17562306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_4		0x0001300C
17662306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_5		0x00013010
17762306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_6		0x00013014
17862306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_7		0x00013018
17962306a36Sopenharmony_ci#define CS35L41_DSP_MBOX_8		0x0001301C
18062306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_1	0x00013020
18162306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_2	0x00013024
18262306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_3	0x00013028
18362306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_4	0x0001302C
18462306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_5	0x00013030
18562306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_6	0x00013034
18662306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_7	0x00013038
18762306a36Sopenharmony_ci#define CS35L41_DSP_VIRT1_MBOX_8	0x0001303C
18862306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_1	0x00013040
18962306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_2	0x00013044
19062306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_3	0x00013048
19162306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_4	0x0001304C
19262306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_5	0x00013050
19362306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_6	0x00013054
19462306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_7	0x00013058
19562306a36Sopenharmony_ci#define CS35L41_DSP_VIRT2_MBOX_8	0x0001305C
19662306a36Sopenharmony_ci#define CS35L41_CLOCK_DETECT_1		0x00014000
19762306a36Sopenharmony_ci#define CS35L41_TIMER1_CONTROL		0x00015000
19862306a36Sopenharmony_ci#define CS35L41_TIMER1_COUNT_PRESET	0x00015004
19962306a36Sopenharmony_ci#define CS35L41_TIMER1_START_STOP	0x0001500C
20062306a36Sopenharmony_ci#define CS35L41_TIMER1_STATUS		0x00015010
20162306a36Sopenharmony_ci#define CS35L41_TIMER1_COUNT_READBACK	0x00015014
20262306a36Sopenharmony_ci#define CS35L41_TIMER1_DSP_CLK_CFG	0x00015018
20362306a36Sopenharmony_ci#define CS35L41_TIMER1_DSP_CLK_STATUS	0x0001501C
20462306a36Sopenharmony_ci#define CS35L41_TIMER2_CONTROL		0x00015100
20562306a36Sopenharmony_ci#define CS35L41_TIMER2_COUNT_PRESET	0x00015104
20662306a36Sopenharmony_ci#define CS35L41_TIMER2_START_STOP	0x0001510C
20762306a36Sopenharmony_ci#define CS35L41_TIMER2_STATUS		0x00015110
20862306a36Sopenharmony_ci#define CS35L41_TIMER2_COUNT_READBACK	0x00015114
20962306a36Sopenharmony_ci#define CS35L41_TIMER2_DSP_CLK_CFG	0x00015118
21062306a36Sopenharmony_ci#define CS35L41_TIMER2_DSP_CLK_STATUS	0x0001511C
21162306a36Sopenharmony_ci#define CS35L41_DFT_JTAG_CONTROL	0x00016000
21262306a36Sopenharmony_ci#define CS35L41_DIE_STS1		0x00017040
21362306a36Sopenharmony_ci#define CS35L41_DIE_STS2		0x00017044
21462306a36Sopenharmony_ci#define CS35L41_TEMP_CAL1		0x00017048
21562306a36Sopenharmony_ci#define CS35L41_TEMP_CAL2		0x0001704C
21662306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_PACK_0	0x02000000
21762306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_PACK_3068	0x02002FF0
21862306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_UNPACK32_0	0x02400000
21962306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_UNPACK32_2046	0x02401FF8
22062306a36Sopenharmony_ci#define CS35L41_DSP1_TIMESTAMP_COUNT	0x025C0800
22162306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_ID		0x025E0000
22262306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_VERSION	0x025E0004
22362306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_CORE_ID	0x025E0008
22462306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_AHB_ADDR	0x025E000C
22562306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_XSRAM_SIZE	0x025E0010
22662306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_YSRAM_SIZE	0x025E0018
22762306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_PSRAM_SIZE	0x025E0020
22862306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_PM_BOOT_SIZE	0x025E0028
22962306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_FEATURES	0x025E002C
23062306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_FIR_FILTERS	0x025E0030
23162306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_LMS_FILTERS	0x025E0034
23262306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_XM_BANK_SIZE	0x025E0038
23362306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_YM_BANK_SIZE	0x025E003C
23462306a36Sopenharmony_ci#define CS35L41_DSP1_SYS_PM_BANK_SIZE	0x025E0040
23562306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN0_CTRL0	0x025E2000
23662306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN0_CTRL1	0x025E2004
23762306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN1_CTRL0	0x025E2008
23862306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN1_CTRL1	0x025E200C
23962306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN2_CTRL0	0x025E2010
24062306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN2_CTRL1	0x025E2014
24162306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN3_CTRL0	0x025E2018
24262306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN3_CTRL1	0x025E201C
24362306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN4_CTRL0	0x025E2020
24462306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN4_CTRL1	0x025E2024
24562306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN5_CTRL0	0x025E2028
24662306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN5_CTRL1	0x025E202C
24762306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN6_CTRL0	0x025E2030
24862306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN6_CTRL1	0x025E2034
24962306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN7_CTRL0	0x025E2038
25062306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN7_CTRL1	0x025E203C
25162306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN_DBG_CTRL0	0x025E2040
25262306a36Sopenharmony_ci#define CS35L41_DSP1_AHBM_WIN_DBG_CTRL1	0x025E2044
25362306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_UNPACK24_0	0x02800000
25462306a36Sopenharmony_ci#define CS35L41_DSP1_XMEM_UNPACK24_4093	0x02803FF4
25562306a36Sopenharmony_ci#define CS35L41_DSP1_CTRL_BASE		0x02B80000
25662306a36Sopenharmony_ci#define CS35L41_DSP1_CORE_SOFT_RESET	0x02B80010
25762306a36Sopenharmony_ci#define CS35L41_DSP1_DEBUG		0x02B80040
25862306a36Sopenharmony_ci#define CS35L41_DSP1_TIMER_CTRL		0x02B80048
25962306a36Sopenharmony_ci#define CS35L41_DSP1_STREAM_ARB_CTRL	0x02B80050
26062306a36Sopenharmony_ci#define CS35L41_DSP1_RX1_RATE		0x02B80080
26162306a36Sopenharmony_ci#define CS35L41_DSP1_RX2_RATE		0x02B80088
26262306a36Sopenharmony_ci#define CS35L41_DSP1_RX3_RATE		0x02B80090
26362306a36Sopenharmony_ci#define CS35L41_DSP1_RX4_RATE		0x02B80098
26462306a36Sopenharmony_ci#define CS35L41_DSP1_RX5_RATE		0x02B800A0
26562306a36Sopenharmony_ci#define CS35L41_DSP1_RX6_RATE		0x02B800A8
26662306a36Sopenharmony_ci#define CS35L41_DSP1_RX7_RATE		0x02B800B0
26762306a36Sopenharmony_ci#define CS35L41_DSP1_RX8_RATE		0x02B800B8
26862306a36Sopenharmony_ci#define CS35L41_DSP1_TX1_RATE		0x02B80280
26962306a36Sopenharmony_ci#define CS35L41_DSP1_TX2_RATE		0x02B80288
27062306a36Sopenharmony_ci#define CS35L41_DSP1_TX3_RATE		0x02B80290
27162306a36Sopenharmony_ci#define CS35L41_DSP1_TX4_RATE		0x02B80298
27262306a36Sopenharmony_ci#define CS35L41_DSP1_TX5_RATE		0x02B802A0
27362306a36Sopenharmony_ci#define CS35L41_DSP1_TX6_RATE		0x02B802A8
27462306a36Sopenharmony_ci#define CS35L41_DSP1_TX7_RATE		0x02B802B0
27562306a36Sopenharmony_ci#define CS35L41_DSP1_TX8_RATE		0x02B802B8
27662306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL1		0x02B80480
27762306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL2		0x02B80488
27862306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL3		0x02B80490
27962306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL4		0x02B80498
28062306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL5		0x02B804A0
28162306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL6		0x02B804A8
28262306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL7		0x02B804B0
28362306a36Sopenharmony_ci#define CS35L41_DSP1_NMI_CTRL8		0x02B804B8
28462306a36Sopenharmony_ci#define CS35L41_DSP1_RESUME_CTRL	0x02B80500
28562306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ1_CTRL		0x02B80508
28662306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ2_CTRL		0x02B80510
28762306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ3_CTRL		0x02B80518
28862306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ4_CTRL		0x02B80520
28962306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ5_CTRL		0x02B80528
29062306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ6_CTRL		0x02B80530
29162306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ7_CTRL		0x02B80538
29262306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ8_CTRL		0x02B80540
29362306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ9_CTRL		0x02B80548
29462306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ10_CTRL		0x02B80550
29562306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ11_CTRL		0x02B80558
29662306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ12_CTRL		0x02B80560
29762306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ13_CTRL		0x02B80568
29862306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ14_CTRL		0x02B80570
29962306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ15_CTRL		0x02B80578
30062306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ16_CTRL		0x02B80580
30162306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ17_CTRL		0x02B80588
30262306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ18_CTRL		0x02B80590
30362306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ19_CTRL		0x02B80598
30462306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ20_CTRL		0x02B805A0
30562306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ21_CTRL		0x02B805A8
30662306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ22_CTRL		0x02B805B0
30762306a36Sopenharmony_ci#define CS35L41_DSP1_IRQ23_CTRL		0x02B805B8
30862306a36Sopenharmony_ci#define CS35L41_DSP1_SCRATCH1		0x02B805C0
30962306a36Sopenharmony_ci#define CS35L41_DSP1_SCRATCH2		0x02B805C8
31062306a36Sopenharmony_ci#define CS35L41_DSP1_SCRATCH3		0x02B805D0
31162306a36Sopenharmony_ci#define CS35L41_DSP1_SCRATCH4		0x02B805D8
31262306a36Sopenharmony_ci#define CS35L41_DSP1_CCM_CORE_CTRL	0x02BC1000
31362306a36Sopenharmony_ci#define CS35L41_DSP1_CCM_CLK_OVERRIDE	0x02BC1008
31462306a36Sopenharmony_ci#define CS35L41_DSP1_XM_MSTR_EN		0x02BC2000
31562306a36Sopenharmony_ci#define CS35L41_DSP1_XM_CORE_PRI	0x02BC2008
31662306a36Sopenharmony_ci#define CS35L41_DSP1_XM_AHB_PACK_PL_PRI	0x02BC2010
31762306a36Sopenharmony_ci#define CS35L41_DSP1_XM_AHB_UP_PL_PRI	0x02BC2018
31862306a36Sopenharmony_ci#define CS35L41_DSP1_XM_ACCEL_PL0_PRI	0x02BC2020
31962306a36Sopenharmony_ci#define CS35L41_DSP1_XM_NPL0_PRI	0x02BC2078
32062306a36Sopenharmony_ci#define CS35L41_DSP1_YM_MSTR_EN		0x02BC20C0
32162306a36Sopenharmony_ci#define CS35L41_DSP1_YM_CORE_PRI	0x02BC20C8
32262306a36Sopenharmony_ci#define CS35L41_DSP1_YM_AHB_PACK_PL_PRI	0x02BC20D0
32362306a36Sopenharmony_ci#define CS35L41_DSP1_YM_AHB_UP_PL_PRI	0x02BC20D8
32462306a36Sopenharmony_ci#define CS35L41_DSP1_YM_ACCEL_PL0_PRI	0x02BC20E0
32562306a36Sopenharmony_ci#define CS35L41_DSP1_YM_NPL0_PRI	0x02BC2138
32662306a36Sopenharmony_ci#define CS35L41_DSP1_PM_MSTR_EN		0x02BC2180
32762306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH0_ADDR	0x02BC2188
32862306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH0_EN	0x02BC218C
32962306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH0_DATA_LO	0x02BC2190
33062306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH0_DATA_HI	0x02BC2194
33162306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH1_ADDR	0x02BC2198
33262306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH1_EN	0x02BC219C
33362306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH1_DATA_LO	0x02BC21A0
33462306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH1_DATA_HI	0x02BC21A4
33562306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH2_ADDR	0x02BC21A8
33662306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH2_EN	0x02BC21AC
33762306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH2_DATA_LO	0x02BC21B0
33862306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH2_DATA_HI	0x02BC21B4
33962306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH3_ADDR	0x02BC21B8
34062306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH3_EN	0x02BC21BC
34162306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH3_DATA_LO	0x02BC21C0
34262306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH3_DATA_HI	0x02BC21C4
34362306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH4_ADDR	0x02BC21C8
34462306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH4_EN	0x02BC21CC
34562306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH4_DATA_LO	0x02BC21D0
34662306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH4_DATA_HI	0x02BC21D4
34762306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH5_ADDR	0x02BC21D8
34862306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH5_EN	0x02BC21DC
34962306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH5_DATA_LO	0x02BC21E0
35062306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH5_DATA_HI	0x02BC21E4
35162306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH6_ADDR	0x02BC21E8
35262306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH6_EN	0x02BC21EC
35362306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH6_DATA_LO	0x02BC21F0
35462306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH6_DATA_HI	0x02BC21F4
35562306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH7_ADDR	0x02BC21F8
35662306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH7_EN	0x02BC21FC
35762306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH7_DATA_LO	0x02BC2200
35862306a36Sopenharmony_ci#define CS35L41_DSP1_PM_PATCH7_DATA_HI	0x02BC2204
35962306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_ACCESS0	0x02BC3000
36062306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_ACCESS0	0x02BC3004
36162306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_WNDW_ACCESS0	0x02BC3008
36262306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XREG_ACCESS0	0x02BC300C
36362306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YREG_ACCESS0	0x02BC3014
36462306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_ACCESS1	0x02BC3018
36562306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_ACCESS1	0x02BC301C
36662306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_WNDW_ACCESS1	0x02BC3020
36762306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XREG_ACCESS1	0x02BC3024
36862306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YREG_ACCESS1	0x02BC302C
36962306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_ACCESS2	0x02BC3030
37062306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_ACCESS2	0x02BC3034
37162306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_WNDW_ACCESS2	0x02BC3038
37262306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XREG_ACCESS2	0x02BC303C
37362306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YREG_ACCESS2	0x02BC3044
37462306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_ACCESS3	0x02BC3048
37562306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_ACCESS3	0x02BC304C
37662306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_WNDW_ACCESS3	0x02BC3050
37762306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XREG_ACCESS3	0x02BC3054
37862306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YREG_ACCESS3	0x02BC305C
37962306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_VIO_ADDR	0x02BC3100
38062306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_XM_VIO_STATUS	0x02BC3104
38162306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_VIO_ADDR	0x02BC3108
38262306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_YM_VIO_STATUS	0x02BC310C
38362306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_PM_VIO_ADDR	0x02BC3110
38462306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_PM_VIO_STATUS	0x02BC3114
38562306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_LOCK_CONFIG	0x02BC3140
38662306a36Sopenharmony_ci#define CS35L41_DSP1_MPU_WDT_RST_CTRL	0x02BC3180
38762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR0_CFG0	0x02BC5000
38862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR0_CFG1	0x02BC5004
38962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR0_CFG2	0x02BC5008
39062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR1_CFG0	0x02BC5010
39162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR1_CFG1	0x02BC5014
39262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR1_CFG2	0x02BC5018
39362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR2_CFG0	0x02BC5020
39462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR2_CFG1	0x02BC5024
39562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR2_CFG2	0x02BC5028
39662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR3_CFG0	0x02BC5030
39762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR3_CFG1	0x02BC5034
39862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR3_CFG2	0x02BC5038
39962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR4_CFG0	0x02BC5040
40062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR4_CFG1	0x02BC5044
40162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR4_CFG2	0x02BC5048
40262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR5_CFG0	0x02BC5050
40362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR5_CFG1	0x02BC5054
40462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR5_CFG2	0x02BC5058
40562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR6_CFG0	0x02BC5060
40662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR6_CFG1	0x02BC5064
40762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR6_CFG2	0x02BC5068
40862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR7_CFG0	0x02BC5070
40962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR7_CFG1	0x02BC5074
41062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_MSTR7_CFG2	0x02BC5078
41162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX0_CFG0	0x02BC5200
41262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX0_CFG1	0x02BC5204
41362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX1_CFG0	0x02BC5208
41462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX1_CFG1	0x02BC520C
41562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX2_CFG0	0x02BC5210
41662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX2_CFG1	0x02BC5214
41762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX3_CFG0	0x02BC5218
41862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX3_CFG1	0x02BC521C
41962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX4_CFG0	0x02BC5220
42062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX4_CFG1	0x02BC5224
42162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX5_CFG0	0x02BC5228
42262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX5_CFG1	0x02BC522C
42362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX6_CFG0	0x02BC5230
42462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX6_CFG1	0x02BC5234
42562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX7_CFG0	0x02BC5238
42662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_TX7_CFG1	0x02BC523C
42762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX0_CFG0	0x02BC5400
42862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX0_CFG1	0x02BC5404
42962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX1_CFG0	0x02BC5408
43062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX1_CFG1	0x02BC540C
43162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX2_CFG0	0x02BC5410
43262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX2_CFG1	0x02BC5414
43362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX3_CFG0	0x02BC5418
43462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX3_CFG1	0x02BC541C
43562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX4_CFG0	0x02BC5420
43662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX4_CFG1	0x02BC5424
43762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX5_CFG0	0x02BC5428
43862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX5_CFG1	0x02BC542C
43962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX6_CFG0	0x02BC5430
44062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX6_CFG1	0x02BC5434
44162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX7_CFG0	0x02BC5438
44262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RX7_CFG1	0x02BC543C
44362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ0_CFG0	0x02BC5600
44462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ0_CFG1	0x02BC5604
44562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ0_CFG2	0x02BC5608
44662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ1_CFG0	0x02BC5610
44762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ1_CFG1	0x02BC5614
44862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ1_CFG2	0x02BC5618
44962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ2_CFG0	0x02BC5620
45062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ2_CFG1	0x02BC5624
45162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ2_CFG2	0x02BC5628
45262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ3_CFG0	0x02BC5630
45362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ3_CFG1	0x02BC5634
45462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ3_CFG2	0x02BC5638
45562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ4_CFG0	0x02BC5640
45662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ4_CFG1	0x02BC5644
45762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ4_CFG2	0x02BC5648
45862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ5_CFG0	0x02BC5650
45962306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ5_CFG1	0x02BC5654
46062306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ5_CFG2	0x02BC5658
46162306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ6_CFG0	0x02BC5660
46262306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ6_CFG1	0x02BC5664
46362306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ6_CFG2	0x02BC5668
46462306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ7_CFG0	0x02BC5670
46562306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ7_CFG1	0x02BC5674
46662306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_IRQ7_CFG2	0x02BC5678
46762306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_RESYNC_MSK	0x02BC5A00
46862306a36Sopenharmony_ci#define CS35L41_DSP1_STRMARB_ERR_STATUS	0x02BC5A08
46962306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_RES_STATIC	0x02BC6000
47062306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_RES_DYN	0x02BC6004
47162306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_NMI_CTRL	0x02BC6008
47262306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_INV	0x02BC6010
47362306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_MODE	0x02BC6014
47462306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_EN	0x02BC6018
47562306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_MSK	0x02BC601C
47662306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_FLUSH	0x02BC6020
47762306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_MSKCLR	0x02BC6024
47862306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_FRC	0x02BC6028
47962306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_MSKSET	0x02BC602C
48062306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_ERR	0x02BC6030
48162306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_PEND	0x02BC6034
48262306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_IRQ_GEN	0x02BC6038
48362306a36Sopenharmony_ci#define CS35L41_DSP1_INTPCTL_TESTBITS	0x02BC6040
48462306a36Sopenharmony_ci#define CS35L41_DSP1_WDT_CONTROL	0x02BC7000
48562306a36Sopenharmony_ci#define CS35L41_DSP1_WDT_STATUS		0x02BC7008
48662306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_PACK_0	0x02C00000
48762306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_PACK_1532	0x02C017F0
48862306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_UNPACK32_0	0x03000000
48962306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_UNPACK32_1022	0x03000FF8
49062306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_UNPACK24_0	0x03400000
49162306a36Sopenharmony_ci#define CS35L41_DSP1_YMEM_UNPACK24_2045	0x03401FF4
49262306a36Sopenharmony_ci#define CS35L41_DSP1_PMEM_0		0x03800000
49362306a36Sopenharmony_ci#define CS35L41_DSP1_PMEM_5114		0x03804FE8
49462306a36Sopenharmony_ci
49562306a36Sopenharmony_ci/*test regs for emulation bringup*/
49662306a36Sopenharmony_ci#define CS35L41_PLL_OVR			0x00003018
49762306a36Sopenharmony_ci#define CS35L41_BST_TEST_DUTY		0x00003900
49862306a36Sopenharmony_ci#define CS35L41_DIGPWM_IOCTRL		0x0000706C
49962306a36Sopenharmony_ci
50062306a36Sopenharmony_ci/*registers populated by OTP*/
50162306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_1		0x0000208c
50262306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_2		0x00002090
50362306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_3		0x00003010
50462306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_4		0x0000300C
50562306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_5		0x0000394C
50662306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_6		0x00003950
50762306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_7		0x00003954
50862306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_8		0x00003958
50962306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_9		0x0000395C
51062306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_10		0x0000416C
51162306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_11		0x00004160
51262306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_12		0x00004170
51362306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_13		0x00004360
51462306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_14		0x00004448
51562306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_15		0x0000444C
51662306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_16		0x00006E30
51762306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_17		0x00006E34
51862306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_18		0x00006E38
51962306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_19		0x00006E3C
52062306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_20		0x00006E40
52162306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_21		0x00006E44
52262306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_22		0x00006E48
52362306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_23		0x00006E4C
52462306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_24		0x00006E50
52562306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_25		0x00006E54
52662306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_26		0x00006E58
52762306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_27		0x00006E5C
52862306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_28		0x00006E60
52962306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_29		0x00006E64
53062306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_30		0x00007418
53162306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_31		0x0000741C
53262306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_32		0x00007434
53362306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_33		0x00007068
53462306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_34		0x0000410C
53562306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_35		0x0000400C
53662306a36Sopenharmony_ci#define CS35L41_OTP_TRIM_36		0x00002030
53762306a36Sopenharmony_ci
53862306a36Sopenharmony_ci#define CS35L41_MAX_CACHE_REG		36
53962306a36Sopenharmony_ci#define CS35L41_OTP_SIZE_WORDS		32
54062306a36Sopenharmony_ci
54162306a36Sopenharmony_ci#define CS35L41_NUM_SUPPLIES            2
54262306a36Sopenharmony_ci
54362306a36Sopenharmony_ci#define CS35L41_SCLK_MSTR_MASK		0x10
54462306a36Sopenharmony_ci#define CS35L41_SCLK_MSTR_SHIFT		4
54562306a36Sopenharmony_ci#define CS35L41_LRCLK_MSTR_MASK		0x01
54662306a36Sopenharmony_ci#define CS35L41_LRCLK_MSTR_SHIFT	0
54762306a36Sopenharmony_ci#define CS35L41_SCLK_INV_MASK		0x40
54862306a36Sopenharmony_ci#define CS35L41_SCLK_INV_SHIFT		6
54962306a36Sopenharmony_ci#define CS35L41_LRCLK_INV_MASK		0x04
55062306a36Sopenharmony_ci#define CS35L41_LRCLK_INV_SHIFT		2
55162306a36Sopenharmony_ci#define CS35L41_SCLK_FRC_MASK		0x20
55262306a36Sopenharmony_ci#define CS35L41_SCLK_FRC_SHIFT		5
55362306a36Sopenharmony_ci#define CS35L41_LRCLK_FRC_MASK		0x02
55462306a36Sopenharmony_ci#define CS35L41_LRCLK_FRC_SHIFT		1
55562306a36Sopenharmony_ci
55662306a36Sopenharmony_ci#define CS35L41_AMP_GAIN_PCM_MASK	0x3E0
55762306a36Sopenharmony_ci#define CS35L41_AMP_GAIN_ZC_MASK	0x0400
55862306a36Sopenharmony_ci#define CS35L41_AMP_GAIN_ZC_SHIFT	10
55962306a36Sopenharmony_ci
56062306a36Sopenharmony_ci#define CS35L41_BST_CTL_MASK		0xFF
56162306a36Sopenharmony_ci#define CS35L41_BST_CTL_SEL_MASK	0x03
56262306a36Sopenharmony_ci#define CS35L41_BST_CTL_SEL_REG		0x00
56362306a36Sopenharmony_ci#define CS35L41_BST_CTL_SEL_CLASSH	0x01
56462306a36Sopenharmony_ci#define CS35L41_BST_IPK_MASK		0x7F
56562306a36Sopenharmony_ci#define CS35L41_BST_IPK_SHIFT		0
56662306a36Sopenharmony_ci#define CS35L41_BST_LIM_MASK		0x4
56762306a36Sopenharmony_ci#define CS35L41_BST_LIM_SHIFT		2
56862306a36Sopenharmony_ci#define CS35L41_BST_K1_MASK		0x000000FF
56962306a36Sopenharmony_ci#define CS35L41_BST_K1_SHIFT		0
57062306a36Sopenharmony_ci#define CS35L41_BST_K2_MASK		0x0000FF00
57162306a36Sopenharmony_ci#define CS35L41_BST_K2_SHIFT		8
57262306a36Sopenharmony_ci#define CS35L41_BST_SLOPE_MASK		0x0000FF00
57362306a36Sopenharmony_ci#define CS35L41_BST_SLOPE_SHIFT		8
57462306a36Sopenharmony_ci#define CS35L41_BST_LBST_VAL_MASK	0x00000003
57562306a36Sopenharmony_ci#define CS35L41_BST_LBST_VAL_SHIFT	0
57662306a36Sopenharmony_ci
57762306a36Sopenharmony_ci#define CS35L41_TEMP_THLD_MASK		0x03
57862306a36Sopenharmony_ci#define CS35L41_VMON_IMON_VOL_MASK	0x07FF07FF
57962306a36Sopenharmony_ci#define CS35L41_PDM_MODE_MASK		0x01
58062306a36Sopenharmony_ci#define CS35L41_PDM_MODE_SHIFT		0
58162306a36Sopenharmony_ci
58262306a36Sopenharmony_ci#define CS35L41_CH_MEM_DEPTH_MASK	0x07
58362306a36Sopenharmony_ci#define CS35L41_CH_MEM_DEPTH_SHIFT	0
58462306a36Sopenharmony_ci#define CS35L41_CH_HDRM_CTL_MASK	0x007F0000
58562306a36Sopenharmony_ci#define CS35L41_CH_HDRM_CTL_SHIFT	16
58662306a36Sopenharmony_ci#define CS35L41_CH_REL_RATE_MASK	0xFF00
58762306a36Sopenharmony_ci#define CS35L41_CH_REL_RATE_SHIFT	8
58862306a36Sopenharmony_ci#define CS35L41_CH_WKFET_DLY_MASK	0x001C
58962306a36Sopenharmony_ci#define CS35L41_CH_WKFET_DLY_SHIFT	2
59062306a36Sopenharmony_ci#define CS35L41_CH_WKFET_THLD_MASK	0x0F00
59162306a36Sopenharmony_ci#define CS35L41_CH_WKFET_THLD_SHIFT	8
59262306a36Sopenharmony_ci
59362306a36Sopenharmony_ci#define CS35L41_HW_NG_SEL_MASK		0x3F00
59462306a36Sopenharmony_ci#define CS35L41_HW_NG_SEL_SHIFT		8
59562306a36Sopenharmony_ci#define CS35L41_HW_NG_DLY_MASK		0x0070
59662306a36Sopenharmony_ci#define CS35L41_HW_NG_DLY_SHIFT		4
59762306a36Sopenharmony_ci#define CS35L41_HW_NG_THLD_MASK		0x0007
59862306a36Sopenharmony_ci#define CS35L41_HW_NG_THLD_SHIFT	0
59962306a36Sopenharmony_ci
60062306a36Sopenharmony_ci#define CS35L41_DSP_NG_ENABLE_MASK	0x00010000
60162306a36Sopenharmony_ci#define CS35L41_DSP_NG_ENABLE_SHIFT	16
60262306a36Sopenharmony_ci#define CS35L41_DSP_NG_THLD_MASK	0x7
60362306a36Sopenharmony_ci#define CS35L41_DSP_NG_THLD_SHIFT	0
60462306a36Sopenharmony_ci#define CS35L41_DSP_NG_DELAY_MASK	0x0F00
60562306a36Sopenharmony_ci#define CS35L41_DSP_NG_DELAY_SHIFT	8
60662306a36Sopenharmony_ci
60762306a36Sopenharmony_ci#define CS35L41_ASP_FMT_MASK		0x0700
60862306a36Sopenharmony_ci#define CS35L41_ASP_FMT_SHIFT		8
60962306a36Sopenharmony_ci#define CS35L41_ASP_DOUT_HIZ_MASK	0x03
61062306a36Sopenharmony_ci#define CS35L41_ASP_DOUT_HIZ_SHIFT	0
61162306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_16		0x10
61262306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_24		0x18
61362306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_32		0x20
61462306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_TX_MASK	0xFF0000
61562306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_TX_SHIFT	16
61662306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_RX_MASK	0xFF000000
61762306a36Sopenharmony_ci#define CS35L41_ASP_WIDTH_RX_SHIFT	24
61862306a36Sopenharmony_ci#define CS35L41_ASP_RX1_SLOT_MASK	0x3F
61962306a36Sopenharmony_ci#define CS35L41_ASP_RX1_SLOT_SHIFT	0
62062306a36Sopenharmony_ci#define CS35L41_ASP_RX2_SLOT_MASK	0x3F00
62162306a36Sopenharmony_ci#define CS35L41_ASP_RX2_SLOT_SHIFT	8
62262306a36Sopenharmony_ci#define CS35L41_ASP_RX_WL_MASK		0x3F
62362306a36Sopenharmony_ci#define CS35L41_ASP_TX_WL_MASK		0x3F
62462306a36Sopenharmony_ci#define CS35L41_ASP_RX_WL_SHIFT		0
62562306a36Sopenharmony_ci#define CS35L41_ASP_TX_WL_SHIFT		0
62662306a36Sopenharmony_ci#define CS35L41_ASP_SOURCE_MASK		0x7F
62762306a36Sopenharmony_ci
62862306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_ASPRX1	0x08
62962306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_ASPRX2	0x09
63062306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_VMON		0x18
63162306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_IMON		0x19
63262306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_CLASSH	0x21
63362306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_VPMON		0x28
63462306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_VBSTMON	0x29
63562306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_TEMPMON	0x3A
63662306a36Sopenharmony_ci#define CS35L41_INPUT_SRC_RSVD		0x3B
63762306a36Sopenharmony_ci#define CS35L41_INPUT_DSP_TX1		0x32
63862306a36Sopenharmony_ci#define CS35L41_INPUT_DSP_TX2		0x33
63962306a36Sopenharmony_ci
64062306a36Sopenharmony_ci#define CS35L41_WR_PEND_STS_MASK	0x2
64162306a36Sopenharmony_ci
64262306a36Sopenharmony_ci#define CS35L41_PLL_CLK_SEL_MASK	0x07
64362306a36Sopenharmony_ci#define CS35L41_PLL_CLK_SEL_SHIFT	0
64462306a36Sopenharmony_ci#define CS35L41_PLL_CLK_EN_MASK		0x10
64562306a36Sopenharmony_ci#define CS35L41_PLL_CLK_EN_SHIFT	4
64662306a36Sopenharmony_ci#define CS35L41_PLL_OPENLOOP_MASK	0x0800
64762306a36Sopenharmony_ci#define CS35L41_PLL_OPENLOOP_SHIFT	11
64862306a36Sopenharmony_ci#define CS35L41_PLLSRC_SCLK		0
64962306a36Sopenharmony_ci#define CS35L41_PLLSRC_LRCLK		1
65062306a36Sopenharmony_ci#define CS35L41_PLLSRC_SELF		3
65162306a36Sopenharmony_ci#define CS35L41_PLLSRC_PDMCLK		4
65262306a36Sopenharmony_ci#define CS35L41_PLLSRC_MCLK		5
65362306a36Sopenharmony_ci#define CS35L41_PLLSRC_SWIRE		7
65462306a36Sopenharmony_ci#define CS35L41_REFCLK_FREQ_MASK	0x7E0
65562306a36Sopenharmony_ci#define CS35L41_REFCLK_FREQ_SHIFT	5
65662306a36Sopenharmony_ci
65762306a36Sopenharmony_ci#define CS35L41_GLOBAL_FS_MASK		0x1F
65862306a36Sopenharmony_ci#define CS35L41_GLOBAL_FS_SHIFT		0
65962306a36Sopenharmony_ci
66062306a36Sopenharmony_ci#define CS35L41_GLOBAL_EN_MASK		0x01
66162306a36Sopenharmony_ci#define CS35L41_GLOBAL_EN_SHIFT		0
66262306a36Sopenharmony_ci#define CS35L41_BST_EN_MASK		0x0030
66362306a36Sopenharmony_ci#define CS35L41_BST_EN_SHIFT		4
66462306a36Sopenharmony_ci#define CS35L41_BST_DIS_FET_OFF		0x00
66562306a36Sopenharmony_ci#define CS35L41_BST_EN_DEFAULT		0x2
66662306a36Sopenharmony_ci#define CS35L41_AMP_EN_SHIFT		0
66762306a36Sopenharmony_ci#define CS35L41_AMP_EN_MASK		1
66862306a36Sopenharmony_ci#define CS35L41_VMON_EN_MASK		0x1000
66962306a36Sopenharmony_ci#define CS35L41_VMON_EN_SHIFT		12
67062306a36Sopenharmony_ci#define CS35L41_IMON_EN_MASK		0x2000
67162306a36Sopenharmony_ci#define CS35L41_IMON_EN_SHIFT		13
67262306a36Sopenharmony_ci
67362306a36Sopenharmony_ci#define CS35L41_PDN_DONE_MASK		0x00800000
67462306a36Sopenharmony_ci#define CS35L41_PDN_DONE_SHIFT		23
67562306a36Sopenharmony_ci#define CS35L41_PUP_DONE_MASK		0x01000000
67662306a36Sopenharmony_ci#define CS35L41_PUP_DONE_SHIFT		24
67762306a36Sopenharmony_ci
67862306a36Sopenharmony_ci#define CS35L36_PUP_DONE_IRQ_UNMASK	0x5F
67962306a36Sopenharmony_ci#define CS35L36_PUP_DONE_IRQ_MASK	0xBF
68062306a36Sopenharmony_ci#define CS35L41_SYNC_EN_MASK		BIT(8)
68162306a36Sopenharmony_ci
68262306a36Sopenharmony_ci#define CS35L41_AMP_SHORT_ERR		0x80000000
68362306a36Sopenharmony_ci#define CS35L41_BST_SHORT_ERR		0x0100
68462306a36Sopenharmony_ci#define CS35L41_TEMP_WARN		0x8000
68562306a36Sopenharmony_ci#define CS35L41_TEMP_ERR		0x00020000
68662306a36Sopenharmony_ci#define CS35L41_BST_OVP_ERR		0x40
68762306a36Sopenharmony_ci#define CS35L41_BST_DCM_UVP_ERR		0x80
68862306a36Sopenharmony_ci#define CS35L41_OTP_BOOT_DONE		0x02
68962306a36Sopenharmony_ci#define CS35L41_PLL_UNLOCK		0x10
69062306a36Sopenharmony_ci#define CS35L41_PLL_LOCK		BIT(1)
69162306a36Sopenharmony_ci#define CS35L41_OTP_BOOT_ERR		0x80000000
69262306a36Sopenharmony_ci
69362306a36Sopenharmony_ci#define CS35L41_AMP_SHORT_ERR_RLS	0x02
69462306a36Sopenharmony_ci#define CS35L41_BST_SHORT_ERR_RLS	0x04
69562306a36Sopenharmony_ci#define CS35L41_BST_OVP_ERR_RLS		0x08
69662306a36Sopenharmony_ci#define CS35L41_BST_UVP_ERR_RLS		0x10
69762306a36Sopenharmony_ci#define CS35L41_TEMP_WARN_ERR_RLS	0x20
69862306a36Sopenharmony_ci#define CS35L41_TEMP_ERR_RLS		0x40
69962306a36Sopenharmony_ci
70062306a36Sopenharmony_ci#define CS35L41_AMP_SHORT_ERR_RLS_SHIFT	1
70162306a36Sopenharmony_ci#define CS35L41_BST_SHORT_ERR_RLS_SHIFT	2
70262306a36Sopenharmony_ci#define CS35L41_BST_OVP_ERR_RLS_SHIFT	3
70362306a36Sopenharmony_ci#define CS35L41_BST_UVP_ERR_RLS_SHIFT	4
70462306a36Sopenharmony_ci#define CS35L41_TEMP_WARN_ERR_RLS_SHIFT	5
70562306a36Sopenharmony_ci#define CS35L41_TEMP_ERR_RLS_SHIFT	6
70662306a36Sopenharmony_ci
70762306a36Sopenharmony_ci#define CS35L41_INT1_MASK_DEFAULT	0x7FFCFE3F
70862306a36Sopenharmony_ci#define CS35L41_INT1_UNMASK_PUP		0xFEFFFFFF
70962306a36Sopenharmony_ci#define CS35L41_INT1_UNMASK_PDN		0xFF7FFFFF
71062306a36Sopenharmony_ci#define CS35L41_INT3_PLL_LOCK_SHIFT	1
71162306a36Sopenharmony_ci#define CS35L41_INT3_PLL_LOCK_MASK	BIT(CS35L41_INT3_PLL_LOCK_SHIFT)
71262306a36Sopenharmony_ci
71362306a36Sopenharmony_ci#define CS35L41_GPIO_DIR_MASK		0x80000000
71462306a36Sopenharmony_ci#define CS35L41_GPIO_DIR_SHIFT		31
71562306a36Sopenharmony_ci#define CS35L41_GPIO1_CTRL_MASK		0x00030000
71662306a36Sopenharmony_ci#define CS35L41_GPIO1_CTRL_SHIFT	16
71762306a36Sopenharmony_ci#define CS35L41_GPIO2_CTRL_MASK		0x07000000
71862306a36Sopenharmony_ci#define CS35L41_GPIO2_CTRL_SHIFT	24
71962306a36Sopenharmony_ci#define CS35L41_GPIO_LVL_SHIFT		15
72062306a36Sopenharmony_ci#define CS35L41_GPIO_LVL_MASK		BIT(CS35L41_GPIO_LVL_SHIFT)
72162306a36Sopenharmony_ci#define CS35L41_GPIO_POL_MASK		0x1000
72262306a36Sopenharmony_ci#define CS35L41_GPIO_POL_SHIFT		12
72362306a36Sopenharmony_ci
72462306a36Sopenharmony_ci#define CS35L41_AMP_INV_PCM_SHIFT	14
72562306a36Sopenharmony_ci#define CS35L41_AMP_INV_PCM_MASK	BIT(CS35L41_AMP_INV_PCM_SHIFT)
72662306a36Sopenharmony_ci#define CS35L41_AMP_PCM_VOL_SHIFT	3
72762306a36Sopenharmony_ci#define CS35L41_AMP_PCM_VOL_MASK	(0x7FF << 3)
72862306a36Sopenharmony_ci#define CS35L41_AMP_PCM_VOL_MUTE	0x4CF
72962306a36Sopenharmony_ci
73062306a36Sopenharmony_ci#define CS35L41_CHIP_ID			0x35a40
73162306a36Sopenharmony_ci#define CS35L41R_CHIP_ID		0x35b40
73262306a36Sopenharmony_ci#define CS35L41_MTLREVID_MASK		0x0F
73362306a36Sopenharmony_ci#define CS35L41_REVID_A0		0xA0
73462306a36Sopenharmony_ci#define CS35L41_REVID_B0		0xB0
73562306a36Sopenharmony_ci#define CS35L41_REVID_B2		0xB2
73662306a36Sopenharmony_ci
73762306a36Sopenharmony_ci#define CS35L41_HALO_CORE_RESET		0x00000200
73862306a36Sopenharmony_ci
73962306a36Sopenharmony_ci#define CS35L41_FS1_WINDOW_MASK		0x000007FF
74062306a36Sopenharmony_ci#define CS35L41_FS2_WINDOW_MASK		0x00FFF800
74162306a36Sopenharmony_ci#define CS35L41_FS2_WINDOW_SHIFT	12
74262306a36Sopenharmony_ci
74362306a36Sopenharmony_ci#define CS35L41_SPI_MAX_FREQ		4000000
74462306a36Sopenharmony_ci#define CS35L41_REGSTRIDE		4
74562306a36Sopenharmony_ci
74662306a36Sopenharmony_cienum cs35l41_boost_type {
74762306a36Sopenharmony_ci	CS35L41_INT_BOOST,
74862306a36Sopenharmony_ci	CS35L41_EXT_BOOST,
74962306a36Sopenharmony_ci	CS35L41_SHD_BOOST_ACTV,
75062306a36Sopenharmony_ci	CS35L41_SHD_BOOST_PASS,
75162306a36Sopenharmony_ci
75262306a36Sopenharmony_ci	// Not present in Binding Documentation, so no system should use this value.
75362306a36Sopenharmony_ci	// This value is only used in CLSA0100 Laptop
75462306a36Sopenharmony_ci	CS35L41_EXT_BOOST_NO_VSPK_SWITCH,
75562306a36Sopenharmony_ci};
75662306a36Sopenharmony_ci
75762306a36Sopenharmony_cienum cs35l41_clk_ids {
75862306a36Sopenharmony_ci	CS35L41_CLKID_SCLK = 0,
75962306a36Sopenharmony_ci	CS35L41_CLKID_LRCLK = 1,
76062306a36Sopenharmony_ci	CS35L41_CLKID_MCLK = 4,
76162306a36Sopenharmony_ci};
76262306a36Sopenharmony_ci
76362306a36Sopenharmony_cienum cs35l41_gpio1_func {
76462306a36Sopenharmony_ci	CS35L41_GPIO1_HIZ,
76562306a36Sopenharmony_ci	CS35L41_GPIO1_GPIO,
76662306a36Sopenharmony_ci	CS35L41_GPIO1_MDSYNC,
76762306a36Sopenharmony_ci	CS35L41_GPIO1_MCLK,
76862306a36Sopenharmony_ci	CS35L41_GPIO1_PDM_CLK,
76962306a36Sopenharmony_ci	CS35L41_GPIO1_PDM_DATA,
77062306a36Sopenharmony_ci};
77162306a36Sopenharmony_ci
77262306a36Sopenharmony_cienum cs35l41_gpio2_func {
77362306a36Sopenharmony_ci	CS35L41_GPIO2_HIZ,
77462306a36Sopenharmony_ci	CS35L41_GPIO2_GPIO,
77562306a36Sopenharmony_ci	CS35L41_GPIO2_INT_OPEN_DRAIN,
77662306a36Sopenharmony_ci	CS35L41_GPIO2_MCLK,
77762306a36Sopenharmony_ci	CS35L41_GPIO2_INT_PUSH_PULL_LOW,
77862306a36Sopenharmony_ci	CS35L41_GPIO2_INT_PUSH_PULL_HIGH,
77962306a36Sopenharmony_ci	CS35L41_GPIO2_PDM_CLK,
78062306a36Sopenharmony_ci	CS35L41_GPIO2_PDM_DATA,
78162306a36Sopenharmony_ci};
78262306a36Sopenharmony_ci
78362306a36Sopenharmony_cistruct cs35l41_gpio_cfg {
78462306a36Sopenharmony_ci	bool valid;
78562306a36Sopenharmony_ci	bool pol_inv;
78662306a36Sopenharmony_ci	bool out_en;
78762306a36Sopenharmony_ci	unsigned int func;
78862306a36Sopenharmony_ci};
78962306a36Sopenharmony_ci
79062306a36Sopenharmony_cistruct cs35l41_hw_cfg {
79162306a36Sopenharmony_ci	bool valid;
79262306a36Sopenharmony_ci	int bst_ind;
79362306a36Sopenharmony_ci	int bst_ipk;
79462306a36Sopenharmony_ci	int bst_cap;
79562306a36Sopenharmony_ci	int dout_hiz;
79662306a36Sopenharmony_ci	struct cs35l41_gpio_cfg gpio1;
79762306a36Sopenharmony_ci	struct cs35l41_gpio_cfg gpio2;
79862306a36Sopenharmony_ci	unsigned int spk_pos;
79962306a36Sopenharmony_ci
80062306a36Sopenharmony_ci	enum cs35l41_boost_type bst_type;
80162306a36Sopenharmony_ci};
80262306a36Sopenharmony_ci
80362306a36Sopenharmony_cistruct cs35l41_otp_packed_element_t {
80462306a36Sopenharmony_ci	u32 reg;
80562306a36Sopenharmony_ci	u8 shift;
80662306a36Sopenharmony_ci	u8 size;
80762306a36Sopenharmony_ci};
80862306a36Sopenharmony_ci
80962306a36Sopenharmony_cistruct cs35l41_otp_map_element_t {
81062306a36Sopenharmony_ci	u32 id;
81162306a36Sopenharmony_ci	u32 num_elements;
81262306a36Sopenharmony_ci	const struct cs35l41_otp_packed_element_t *map;
81362306a36Sopenharmony_ci	u32 bit_offset;
81462306a36Sopenharmony_ci	u32 word_offset;
81562306a36Sopenharmony_ci};
81662306a36Sopenharmony_ci
81762306a36Sopenharmony_cienum cs35l41_cspl_mbox_status {
81862306a36Sopenharmony_ci	CSPL_MBOX_STS_RUNNING = 0,
81962306a36Sopenharmony_ci	CSPL_MBOX_STS_PAUSED = 1,
82062306a36Sopenharmony_ci	CSPL_MBOX_STS_RDY_FOR_REINIT = 2,
82162306a36Sopenharmony_ci};
82262306a36Sopenharmony_ci
82362306a36Sopenharmony_cienum cs35l41_cspl_mbox_cmd {
82462306a36Sopenharmony_ci	CSPL_MBOX_CMD_NONE = 0,
82562306a36Sopenharmony_ci	CSPL_MBOX_CMD_PAUSE = 1,
82662306a36Sopenharmony_ci	CSPL_MBOX_CMD_RESUME = 2,
82762306a36Sopenharmony_ci	CSPL_MBOX_CMD_REINIT = 3,
82862306a36Sopenharmony_ci	CSPL_MBOX_CMD_STOP_PRE_REINIT = 4,
82962306a36Sopenharmony_ci	CSPL_MBOX_CMD_HIBERNATE = 5,
83062306a36Sopenharmony_ci	CSPL_MBOX_CMD_OUT_OF_HIBERNATE = 6,
83162306a36Sopenharmony_ci	CSPL_MBOX_CMD_SPK_OUT_ENABLE = 7,
83262306a36Sopenharmony_ci	CSPL_MBOX_CMD_UNKNOWN_CMD = -1,
83362306a36Sopenharmony_ci	CSPL_MBOX_CMD_INVALID_SEQUENCE = -2,
83462306a36Sopenharmony_ci};
83562306a36Sopenharmony_ci
83662306a36Sopenharmony_ci/*
83762306a36Sopenharmony_ci * IRQs
83862306a36Sopenharmony_ci */
83962306a36Sopenharmony_ci#define CS35L41_IRQ(_irq, _name, _hand)		\
84062306a36Sopenharmony_ci	{					\
84162306a36Sopenharmony_ci		.irq = CS35L41_ ## _irq ## _IRQ,\
84262306a36Sopenharmony_ci		.name = _name,			\
84362306a36Sopenharmony_ci		.handler = _hand,		\
84462306a36Sopenharmony_ci	}
84562306a36Sopenharmony_ci
84662306a36Sopenharmony_cistruct cs35l41_irq {
84762306a36Sopenharmony_ci	int irq;
84862306a36Sopenharmony_ci	const char *name;
84962306a36Sopenharmony_ci	irqreturn_t (*handler)(int irq, void *data);
85062306a36Sopenharmony_ci};
85162306a36Sopenharmony_ci
85262306a36Sopenharmony_ci#define CS35L41_REG_IRQ(_reg, _irq)					\
85362306a36Sopenharmony_ci	[CS35L41_ ## _irq ## _IRQ] = {					\
85462306a36Sopenharmony_ci		.reg_offset = (CS35L41_ ## _reg) - CS35L41_IRQ1_STATUS1,\
85562306a36Sopenharmony_ci		.mask = CS35L41_ ## _irq ## _MASK			\
85662306a36Sopenharmony_ci	}
85762306a36Sopenharmony_ci
85862306a36Sopenharmony_ci/* (0x0000E010) CS35L41_IRQ1_STATUS1 */
85962306a36Sopenharmony_ci#define CS35L41_BST_OVP_ERR_SHIFT		6
86062306a36Sopenharmony_ci#define CS35L41_BST_OVP_ERR_MASK		BIT(CS35L41_BST_OVP_ERR_SHIFT)
86162306a36Sopenharmony_ci#define CS35L41_BST_DCM_UVP_ERR_SHIFT		7
86262306a36Sopenharmony_ci#define CS35L41_BST_DCM_UVP_ERR_MASK		BIT(CS35L41_BST_DCM_UVP_ERR_SHIFT)
86362306a36Sopenharmony_ci#define CS35L41_BST_SHORT_ERR_SHIFT		8
86462306a36Sopenharmony_ci#define CS35L41_BST_SHORT_ERR_MASK		BIT(CS35L41_BST_SHORT_ERR_SHIFT)
86562306a36Sopenharmony_ci#define CS35L41_TEMP_WARN_SHIFT			15
86662306a36Sopenharmony_ci#define CS35L41_TEMP_WARN_MASK			BIT(CS35L41_TEMP_WARN_SHIFT)
86762306a36Sopenharmony_ci#define CS35L41_TEMP_ERR_SHIFT			17
86862306a36Sopenharmony_ci#define CS35L41_TEMP_ERR_MASK			BIT(CS35L41_TEMP_ERR_SHIFT)
86962306a36Sopenharmony_ci#define CS35L41_AMP_SHORT_ERR_SHIFT		31
87062306a36Sopenharmony_ci#define CS35L41_AMP_SHORT_ERR_MASK		BIT(CS35L41_AMP_SHORT_ERR_SHIFT)
87162306a36Sopenharmony_ci
87262306a36Sopenharmony_cienum cs35l41_irq_list {
87362306a36Sopenharmony_ci	CS35L41_BST_OVP_ERR_IRQ,
87462306a36Sopenharmony_ci	CS35L41_BST_DCM_UVP_ERR_IRQ,
87562306a36Sopenharmony_ci	CS35L41_BST_SHORT_ERR_IRQ,
87662306a36Sopenharmony_ci	CS35L41_TEMP_WARN_IRQ,
87762306a36Sopenharmony_ci	CS35L41_TEMP_ERR_IRQ,
87862306a36Sopenharmony_ci	CS35L41_AMP_SHORT_ERR_IRQ,
87962306a36Sopenharmony_ci
88062306a36Sopenharmony_ci	CS35L41_NUM_IRQ
88162306a36Sopenharmony_ci};
88262306a36Sopenharmony_ci
88362306a36Sopenharmony_ciextern struct regmap_config cs35l41_regmap_i2c;
88462306a36Sopenharmony_ciextern struct regmap_config cs35l41_regmap_spi;
88562306a36Sopenharmony_ci
88662306a36Sopenharmony_ciint cs35l41_test_key_unlock(struct device *dev, struct regmap *regmap);
88762306a36Sopenharmony_ciint cs35l41_test_key_lock(struct device *dev, struct regmap *regmap);
88862306a36Sopenharmony_ciint cs35l41_otp_unpack(struct device *dev, struct regmap *regmap);
88962306a36Sopenharmony_ciint cs35l41_register_errata_patch(struct device *dev, struct regmap *reg, unsigned int reg_revid);
89062306a36Sopenharmony_ciint cs35l41_set_channels(struct device *dev, struct regmap *reg,
89162306a36Sopenharmony_ci			 unsigned int tx_num, unsigned int *tx_slot,
89262306a36Sopenharmony_ci			 unsigned int rx_num, unsigned int *rx_slot);
89362306a36Sopenharmony_ciint cs35l41_gpio_config(struct regmap *regmap, struct cs35l41_hw_cfg *hw_cfg);
89462306a36Sopenharmony_civoid cs35l41_configure_cs_dsp(struct device *dev, struct regmap *reg, struct cs_dsp *dsp);
89562306a36Sopenharmony_ciint cs35l41_set_cspl_mbox_cmd(struct device *dev, struct regmap *regmap,
89662306a36Sopenharmony_ci			      enum cs35l41_cspl_mbox_cmd cmd);
89762306a36Sopenharmony_ciint cs35l41_write_fs_errata(struct device *dev, struct regmap *regmap);
89862306a36Sopenharmony_ciint cs35l41_enter_hibernate(struct device *dev, struct regmap *regmap,
89962306a36Sopenharmony_ci			    enum cs35l41_boost_type b_type);
90062306a36Sopenharmony_ciint cs35l41_exit_hibernate(struct device *dev, struct regmap *regmap);
90162306a36Sopenharmony_ciint cs35l41_init_boost(struct device *dev, struct regmap *regmap,
90262306a36Sopenharmony_ci		       struct cs35l41_hw_cfg *hw_cfg);
90362306a36Sopenharmony_cibool cs35l41_safe_reset(struct regmap *regmap, enum cs35l41_boost_type b_type);
90462306a36Sopenharmony_ciint cs35l41_mdsync_up(struct regmap *regmap);
90562306a36Sopenharmony_ciint cs35l41_global_enable(struct device *dev, struct regmap *regmap, enum cs35l41_boost_type b_type,
90662306a36Sopenharmony_ci			  int enable, bool firmware_running);
90762306a36Sopenharmony_ci
90862306a36Sopenharmony_ci#endif /* __CS35L41_H */
909