xref: /rk3399_ARM-atf/plat/mediatek/drivers/pmic_wrap/mt8189/pmic_wrap_init.h (revision 52c47c174fadb9e1398af41e9bbf290af314e8ec)
1 /*
2  * Copyright (c) 2025, MediaTek Inc. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef PMIC_WRAP_INIT_H
8 #define PMIC_WRAP_INIT_H
9 
10 #include <platform_def.h>
11 #include <pmic_wrap_init_common.h>
12 
13 #define PWRAP_DEBUG				0
14 
15 /* PMIC_WRAP registers */
16 struct mt8189_pmic_wrap_regs {
17 	uint32_t init_done;
18 	uint32_t reserved[511];
19 	struct {
20 		uint32_t cmd;
21 		uint32_t wdata;
22 		uint32_t reserved1[3];
23 		uint32_t rdata;
24 		uint32_t reserved2[3];
25 		uint32_t vldclr;
26 		uint32_t sta;
27 		uint32_t reserved3[5];
28 	} wacs[4];
29 };
30 
31 static struct mt8189_pmic_wrap_regs *const mtk_pwrap = (void *)PMIC_WRAP_BASE;
32 
33 #define PMIF_SPI_SWINF_NO			2
34 
35 #endif /* PMIC_WRAP_INIT_H */
36