blob: 9650f71c27129680fcd342242c13864904ae6a52 [file] [log] [blame]
Yidi Lin6fcf07e2025-04-20 20:56:08 +08001/*
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 */
14enum ufs_mtk_mphy_op {
15 UFS_MPHY_BACKUP = 0,
16 UFS_MPHY_RESTORE,
17};
18
19enum ufs_notify_change_status {
20 PRE_CHANGE,
21 POST_CHANGE,
22};
23
24/* UFS interfaces */
25void ufs_mphy_va09_cg_ctrl(bool enable);
26void ufs_device_reset_ctrl(bool rst_n);
27void ufs_crypto_hie_init(void);
28void ufs_ref_clk_status(uint32_t on, enum ufs_notify_change_status stage);
29void ufs_sram_pwr_ctrl(bool on);
30void ufs_device_pwr_ctrl(bool vcc_on, uint64_t ufs_version);
31void ufs_mphy_ctrl(enum ufs_mtk_mphy_op op);
32void ufs_mtcmos_ctrl(bool on);
33
34#endif /* __MTK_BL31_INTERFACE_H__ */