Browse Source
Add PWRAP and PMIC driver to support power-off. TEST=build pass. BUG=b:233720142 Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com> Change-Id: Id9951134925f6cb5f8d304a7b8e7901837809bd9pull/1988/head
Hui Liu
2 years ago
committed by
Bo-Chen Chen
6 changed files with 73 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
#
|
|||
# Copyright (c) 2022, MediaTek Inc. All rights reserved.
|
|||
#
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
|||
#
|
|||
|
|||
LOCAL_DIR := $(call GET_LOCAL_DIR) |
|||
|
|||
MODULE := pmic |
|||
|
|||
LOCAL_SRCS-y += ${LOCAL_DIR}/pmic.c |
|||
|
|||
PLAT_INCLUDES += -I${LOCAL_DIR}/ |
|||
|
|||
$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL))) |
@ -0,0 +1,30 @@ |
|||
/*
|
|||
* Copyright (c) 2022, MediaTek Inc. All rights reserved. |
|||
* |
|||
* SPDX-License-Identifier: BSD-3-Clause |
|||
*/ |
|||
|
|||
#ifndef PMIC_WRAP_INIT_H |
|||
#define PMIC_WRAP_INIT_H |
|||
|
|||
#include <stdint.h> |
|||
|
|||
#include "platform_def.h" |
|||
#include <pmic_wrap_init_common.h> |
|||
|
|||
static struct mt8188_pmic_wrap_regs *const mtk_pwrap = (void *)PMIC_WRAP_BASE; |
|||
|
|||
/* PMIC_WRAP registers */ |
|||
struct mt8188_pmic_wrap_regs { |
|||
uint32_t init_done; |
|||
uint32_t reserved[543]; |
|||
uint32_t wacs2_cmd; |
|||
uint32_t wacs2_wdata; |
|||
uint32_t reserved1[3]; |
|||
uint32_t wacs2_rdata; |
|||
uint32_t reserved2[3]; |
|||
uint32_t wacs2_vldclr; |
|||
uint32_t wacs2_sta; |
|||
}; |
|||
|
|||
#endif /* PMIC_WRAP_INIT_H */ |
@ -0,0 +1,20 @@ |
|||
#
|
|||
# Copyright (c) 2022, MediaTek Inc. All rights reserved.
|
|||
#
|
|||
# SPDX-License-Identifier: BSD-3-Clause
|
|||
#
|
|||
|
|||
LOCAL_DIR := $(call GET_LOCAL_DIR) |
|||
|
|||
MODULE := pmic_wrap |
|||
|
|||
ifeq (${USE_PMIC_WRAP_INIT_V2}, 1) |
|||
LOCAL_SRCS-y += ${LOCAL_DIR}/pmic_wrap_init_v2.c |
|||
else |
|||
LOCAL_SRCS-y += ${LOCAL_DIR}/pmic_wrap_init.c |
|||
endif |
|||
|
|||
PLAT_INCLUDES += -I${LOCAL_DIR}/ |
|||
PLAT_INCLUDES += -I${LOCAL_DIR}/${MTK_SOC} |
|||
|
|||
$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL))) |
Loading…
Reference in new issue