From feb573e395ea6e82088fe15b4c34afb974a15249 Mon Sep 17 00:00:00 2001 From: Hui Liu Date: Mon, 25 Jul 2022 14:51:36 +0800 Subject: 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 Change-Id: Idd1edcce6cb62fcf6991bb9342c409150989c5ca Reviewed-on: https://review.coreboot.org/c/coreboot/+/66121 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/soc/mediatek/mt8188/include/soc/auxadc.h | 17 +++++++++++++++++ src/soc/mediatek/mt8188/include/soc/efuse.h | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/soc/mediatek/mt8188/include/soc/auxadc.h create mode 100644 src/soc/mediatek/mt8188/include/soc/efuse.h (limited to 'src/soc/mediatek/mt8188/include') diff --git a/src/soc/mediatek/mt8188/include/soc/auxadc.h b/src/soc/mediatek/mt8188/include/soc/auxadc.h new file mode 100644 index 0000000000..b8f0234b95 --- /dev/null +++ b/src/soc/mediatek/mt8188/include/soc/auxadc.h @@ -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 +#include +#include + +static struct mt8188_infracfg_ao_regs *const mtk_infracfg = mt8188_infracfg_ao; + +#endif diff --git a/src/soc/mediatek/mt8188/include/soc/efuse.h b/src/soc/mediatek/mt8188/include/soc/efuse.h new file mode 100644 index 0000000000..3b693f7fe2 --- /dev/null +++ b/src/soc/mediatek/mt8188/include/soc/efuse.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8188_EFUSE_H +#define SOC_MEDIATEK_MT8188_EFUSE_H + +#include +#include + +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 -- cgit v1.2.3