docs: Add 24.12 release notes
[coreboot2.git] / src / soc / rockchip / rk3399 / soc.c
blob0937e8f6f980dcafe09ff637f14339918c973941
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <bootmem.h>
4 #include <bootmode.h>
5 #include <console/console.h>
6 #include <device/device.h>
7 #include <soc/addressmap.h>
8 #include <soc/clock.h>
9 #include <soc/display.h>
10 #include <soc/sdram.h>
11 #include <soc/symbols.h>
12 #include <symbols.h>
14 void bootmem_platform_add_ranges(void)
16 bootmem_add_range((uintptr_t)_pmu_sram, REGION_SIZE(pmu_sram),
17 BM_MEM_BL31);
18 bootmem_add_range((uintptr_t)_bl31_sram, REGION_SIZE(bl31_sram),
19 BM_MEM_BL31);
22 static void soc_read_resources(struct device *dev)
24 ram_range(dev, 0, (uintptr_t)_dram, sdram_size_mb() * MiB);
27 static void soc_init(struct device *dev)
29 if (CONFIG(MAINBOARD_DO_NATIVE_VGA_INIT) && display_init_required())
30 rk_display_init(dev);
31 else
32 printk(BIOS_INFO, "Display initialization disabled.\n");
34 /* We don't need big CPUs, but bring them up as a courtesy to Linux. */
35 rkclk_configure_cpu(APLL_600_MHZ, CPU_CLUSTER_BIG);
38 static struct device_operations soc_ops = {
39 .read_resources = soc_read_resources,
40 .init = soc_init,
43 static void enable_soc_dev(struct device *dev)
45 dev->ops = &soc_ops;
48 struct chip_operations soc_rockchip_rk3399_ops = {
49 .name = "SOC Rockchip RK3399",
50 .enable_dev = enable_soc_dev,