drivers/mipi: Add support for KD_KD110N11_51IE panel
[coreboot2.git] / src / soc / mediatek / mt8186 / soc.c
blobada794f1e0ea2c19a6360490e038193ee2c4640c
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootmem.h>
4 #include <device/device.h>
5 #include <soc/adsp.h>
6 #include <soc/devapc.h>
7 #include <soc/dfd.h>
8 #include <soc/emi.h>
9 #include <soc/mmu_operations.h>
10 #include <soc/mtcmos.h>
11 #include <soc/sspm.h>
12 #include <symbols.h>
14 void bootmem_platform_add_ranges(void)
16 if (CONFIG(MTK_DFD))
17 bootmem_add_range(DFD_DUMP_ADDRESS, DFD_DUMP_SIZE, BM_MEM_RESERVED);
20 static void soc_read_resources(struct device *dev)
22 ram_range(dev, 0, (uintptr_t)_dram, sdram_size());
25 static void soc_init(struct device *dev)
27 mtk_mmu_disable_l2c_sram();
28 sspm_init();
30 /* ADSP is required for all MT8186 projects, so it's initialized in soc.c */
31 mtcmos_adsp_power_on();
32 mtcmos_protect_adsp_bus();
33 mtk_adsp_init();
35 dapc_init();
37 if (CONFIG(MTK_DFD))
38 dfd_init();
41 static struct device_operations soc_ops = {
42 .read_resources = soc_read_resources,
43 .set_resources = noop_set_resources,
44 .init = soc_init,
47 static void enable_soc_dev(struct device *dev)
49 dev->ops = &soc_ops;
52 struct chip_operations soc_mediatek_mt8186_ops = {
53 .name = "SOC Mediatek MT8186",
54 .enable_dev = enable_soc_dev,