pmic.c 354 B

1234567891011121314151617181920212223
  1. /*
  2. * Copyright (c) 2021, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <common/debug.h>
  7. #include <pmic.h>
  8. #include <pmic_wrap_init.h>
  9. uint32_t pmic_get_hwcid(void)
  10. {
  11. uint32_t val = 0;
  12. pwrap_read(PMIC_RG_HWCID_ADDR, &val);
  13. return val;
  14. }
  15. void pmic_power_off(void)
  16. {
  17. pwrap_write(PMIC_PWRHOLD, 0x0);
  18. }