blob: 818c1493a755abbf4e4e35a18b597240e170a5a1 [file] [log] [blame]
developer6f37fd22019-05-02 20:02:05 +08001/*
2 * Copyright (c) 2019, MediaTek Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <pmic_wrap_init.h>
8#include <pmic.h>
9
10void wk_pmic_enable_sdn_delay(void)
11{
12 uint32_t con;
13
14 pwrap_write(PMIC_TMA_KEY, 0x9CA7);
15 pwrap_read(PMIC_PSEQ_ELR11, &con);
16 con &= ~PMIC_RG_SDN_DLY_ENB;
17 pwrap_write(PMIC_PSEQ_ELR11, con);
18 pwrap_write(PMIC_TMA_KEY, 0);
19}
20
21void pmic_power_off(void)
22{
23 pwrap_write(PMIC_PWRHOLD, 0x0);
24}