soc/mediatek/mt8188: Add AUXADC support
TEST=get voltage as 340mV for channel 0 in MTK EVB. BUG=b:233720142 Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com> Change-Id: Idd1edcce6cb62fcf6991bb9342c409150989c5ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/66121 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
parent
a8c9674c42
commit
feb573e395
|
@ -21,6 +21,7 @@ romstage-y += ../common/pmif.c ../common/pmif_clk.c pmif_clk.c
|
|||
romstage-y += ../common/pmif_spi.c pmif_spi.c
|
||||
romstage-y += ../common/pmif_spmi.c pmif_spmi.c
|
||||
|
||||
ramstage-y += ../common/auxadc.c
|
||||
ramstage-y += emi.c
|
||||
ramstage-y += ../common/mcu.c
|
||||
ramstage-y += ../common/mcupm.c
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
/*
|
||||
* This file is created based on MT8188 Functional Specification
|
||||
* Chapter number: 5.10
|
||||
*/
|
||||
|
||||
#ifndef SOC_MEDIATEK_MT8188_AUXADC_H
|
||||
#define SOC_MEDIATEK_MT8188_AUXADC_H
|
||||
|
||||
#include <soc/auxadc_common.h>
|
||||
#include <soc/infracfg.h>
|
||||
#include <stdint.h>
|
||||
|
||||
static struct mt8188_infracfg_ao_regs *const mtk_infracfg = mt8188_infracfg_ao;
|
||||
|
||||
#endif
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef SOC_MEDIATEK_MT8188_EFUSE_H
|
||||
#define SOC_MEDIATEK_MT8188_EFUSE_H
|
||||
|
||||
#include <soc/addressmap.h>
|
||||
#include <types.h>
|
||||
|
||||
struct efuse_regs {
|
||||
uint32_t reserved[107];
|
||||
uint32_t adc_cali_reg;
|
||||
};
|
||||
|
||||
check_member(efuse_regs, adc_cali_reg, 0x1AC);
|
||||
static struct efuse_regs *const mtk_efuse = (void *)EFUSE_BASE;
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue