blob: 4f7ab13c9a85ba9d16cf33f213a4c7694c0c24cb [file] [log] [blame]
James Lo4ac7a412021-10-06 18:12:30 +08001/*
2 * Copyright (c) 2021, MediaTek Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <common/debug.h>
8#include <pmic.h>
9#include <pmic_wrap_init.h>
10
11uint32_t pmic_get_hwcid(void)
12{
13 uint32_t val = 0;
14
15 pwrap_read(PMIC_RG_HWCID_ADDR, &val);
16
17 return val;
18}
19
20void pmic_power_off(void)
21{
22 pwrap_write(PMIC_PWRHOLD, 0x0);
23}