summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8186/soc.c
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2021-11-02 10:31:53 +0800
committerPatrick Georgi <pgeorgi@google.com>2021-11-03 08:26:17 +0000
commit73e6b8e3eb085110dad1d57e148ed78534b31fad (patch)
treeee9b17eb399b50d13395f4e9df1253837dc6ee3a /src/soc/mediatek/mt8186/soc.c
parentf50bf60bff9c73edc46e8ea19334c418aa477754 (diff)
soc/mediatek/mt8186: Add a stub implementation of the MT8186 SoC
Add new folder and basic drivers for Mediatek SoC 'MT8186'. Difference of modules including in this patch between MT8186 and existing SoCs: Timer: Similar to MT8195, MT8186 uses v2 timer. EMI/PLL/SPI: Different from existing SoCs. TEST=boot from SPI-NOR and show uart log on MT8186 EVB BUG=b:200134633 Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I579f79c15f4bf5e1daf6b35c70cfd00a985a0b81 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58640 Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/mediatek/mt8186/soc.c')
-rw-r--r--src/soc/mediatek/mt8186/soc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8186/soc.c b/src/soc/mediatek/mt8186/soc.c
new file mode 100644
index 0000000000..360893ceee
--- /dev/null
+++ b/src/soc/mediatek/mt8186/soc.c
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <device/device.h>
+#include <soc/emi.h>
+#include <symbols.h>
+
+static void soc_read_resources(struct device *dev)
+{
+ ram_resource(dev, 0, (uintptr_t)_dram / KiB, sdram_size() / KiB);
+}
+
+static void soc_init(struct device *dev)
+{
+}
+
+static struct device_operations soc_ops = {
+ .read_resources = soc_read_resources,
+ .init = soc_init,
+};
+
+static void enable_soc_dev(struct device *dev)
+{
+ dev->ops = &soc_ops;
+}
+
+struct chip_operations soc_mediatek_mt8186_ops = {
+ CHIP_NAME("SOC Mediatek MT8186")
+ .enable_dev = enable_soc_dev,
+};