Browse Source

feat(mt8188): add RTC support

TEST=build pass.
BUG=b:233720142

Signed-off-by: Song Fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: I348eff0f53341593f74a63780e2e8298cbc3ec88
pull/1988/head
Song Fan 2 years ago
committed by Bo-Chen Chen
parent
commit
af5d8e0795
  1. 12
      plat/mediatek/drivers/rtc/mt8188/rtc.h
  2. 20
      plat/mediatek/drivers/rtc/rules.mk
  3. 1
      plat/mediatek/mt8188/plat_config.mk
  4. 1
      plat/mediatek/mt8188/platform.mk

12
plat/mediatek/drivers/rtc/mt8188/rtc.h

@ -0,0 +1,12 @@
/*
* Copyright (c) 2022, MediaTek Inc. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef RTC_H
#define RTC_H
#include <rtc_mt6359p.h>
#endif /* RTC_H */

20
plat/mediatek/drivers/rtc/rules.mk

@ -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 := rtc
LOCAL_SRCS-y := ${LOCAL_DIR}/rtc_common.c
ifeq (${USE_RTC_MT6359P}, 1)
LOCAL_SRCS-y += ${LOCAL_DIR}/rtc_mt6359p.c
PLAT_INCLUDES += -I${LOCAL_DIR}
endif
PLAT_INCLUDES += -I${LOCAL_DIR}/${MTK_SOC}
$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL)))

1
plat/mediatek/mt8188/plat_config.mk

@ -17,6 +17,7 @@ GICV3_SUPPORT_GIC600 := 1
#
PLAT_EXTRA_RODATA_INCLUDES := 1
USE_PMIC_WRAP_INIT_V2 := 1
USE_RTC_MT6359P := 1
# Configs for A78 and A55
CTX_INCLUDE_AARCH32_REGS := 0

1
plat/mediatek/mt8188/platform.mk

@ -28,6 +28,7 @@ MODULES-y += $(MTK_PLAT)/drivers/gic600
MODULES-y += $(MTK_PLAT)/drivers/iommu
MODULES-y += $(MTK_PLAT)/drivers/pmic
MODULES-y += $(MTK_PLAT)/drivers/pmic_wrap
MODULES-y += $(MTK_PLAT)/drivers/rtc
MODULES-y += $(MTK_PLAT)/drivers/timer
PLAT_BL_COMMON_SOURCES := common/desc_image_load.c \

Loading…
Cancel
Save