1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <console/console.h>
5 #include <reg_script.h>
8 static const struct reg_script dptf_init_settings
[] = {
10 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_PTMC
, 0x00030708),
11 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_GFXT
, 0x0000C000),
12 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_VEDT
, 0x00000004),
13 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_ISPT
, 0x00000004),
14 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_PTPS
, 0x00000000),
15 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TE_AUX3
, 0x00061029),
16 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TTE_VRIccMax
, 0x00061029),
17 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TTE_VRHot
, 0x00061029),
18 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TTE_XXPROCHOT
, 0x00061029),
19 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TTE_SLM0
, 0x00001029),
20 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_TTE_SLM1
, 0x00001029),
21 /* ratio 11 = 1466mhz for mid and entry celeron */
22 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_SOC_POWER_BUDGET
, 0x00000B00),
23 REG_IOSF_WRITE(IOSF_PORT_PMC
, PUNIT_SOC_ENERGY_CREDIT
, 0x00000002),
27 static void dptf_init(void *unused
)
29 printk(BIOS_DEBUG
, "Applying SOC Thermal settings for DPTF.\n");
30 reg_script_run(dptf_init_settings
);
33 BOOT_STATE_INIT_ENTRY(BS_DEV_INIT
, BS_ON_ENTRY
, dptf_init
, NULL
);