xref: /rk3399_ARM-atf/plat/mediatek/include/mtk_bl31_interface.h (revision 055c97afb2427092766687253d6ff851ee77455e)
1 /*
2  * Copyright (c) 2025, MediaTek Inc. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef __MTK_BL31_INTERFACE_H__
8 #define __MTK_BL31_INTERFACE_H__
9 
10 #include <stdbool.h>
11 #include <stdint.h>
12 
13 /* UFS definitions */
14 enum ufs_mtk_mphy_op {
15 	UFS_MPHY_BACKUP = 0,
16 	UFS_MPHY_RESTORE,
17 };
18 
19 enum ufs_notify_change_status {
20 	PRE_CHANGE,
21 	POST_CHANGE,
22 };
23 
24 /* UFS interfaces */
25 void ufs_mphy_va09_cg_ctrl(bool enable);
26 void ufs_device_reset_ctrl(bool rst_n);
27 void ufs_crypto_hie_init(void);
28 void ufs_ref_clk_status(uint32_t on, enum ufs_notify_change_status stage);
29 void ufs_sram_pwr_ctrl(bool on);
30 void ufs_device_pwr_ctrl(bool vcc_on, uint64_t ufs_version);
31 void ufs_mphy_ctrl(enum ufs_mtk_mphy_op op);
32 void ufs_mtcmos_ctrl(bool on);
33 
34 #endif /* __MTK_BL31_INTERFACE_H__ */
35