Angel Pons | c3f58f6 | 2020-04-05 15:46:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Duncan Laurie | 9fd7c0f | 2014-01-16 09:47:39 -0800 | [diff] [blame] | 2 | |
Duncan Laurie | 9fd7c0f | 2014-01-16 09:47:39 -0800 | [diff] [blame] | 3 | #include <bootstate.h> |
| 4 | #include <console/console.h> |
| 5 | #include <reg_script.h> |
Julius Werner | 18ea2d3 | 2014-10-07 16:42:17 -0700 | [diff] [blame] | 6 | #include <soc/iosf.h> |
Duncan Laurie | 9fd7c0f | 2014-01-16 09:47:39 -0800 | [diff] [blame] | 7 | |
| 8 | static const struct reg_script dptf_init_settings[] = { |
| 9 | /* SocThermInit */ |
| 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), |
Shawn Nematbakhsh | 51d787a | 2014-01-16 17:52:21 -0800 | [diff] [blame] | 14 | REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_PTPS, 0x00000000), |
Duncan Laurie | 9fd7c0f | 2014-01-16 09:47:39 -0800 | [diff] [blame] | 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), |
Shawn Nematbakhsh | 51d787a | 2014-01-16 17:52:21 -0800 | [diff] [blame] | 21 | /* ratio 11 = 1466mhz for mid and entry celeron */ |
| 22 | REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_SOC_POWER_BUDGET, 0x00000B00), |
Duncan Laurie | 9fd7c0f | 2014-01-16 09:47:39 -0800 | [diff] [blame] | 23 | REG_IOSF_WRITE(IOSF_PORT_PMC, PUNIT_SOC_ENERGY_CREDIT, 0x00000002), |
| 24 | REG_SCRIPT_END, |
| 25 | }; |
| 26 | |
| 27 | static void dptf_init(void *unused) |
| 28 | { |
| 29 | printk(BIOS_DEBUG, "Applying SOC Thermal settings for DPTF.\n"); |
| 30 | reg_script_run(dptf_init_settings); |
| 31 | } |
| 32 | |
Aaron Durbin | 9ef9d85 | 2015-03-16 17:30:09 -0500 | [diff] [blame] | 33 | BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_ENTRY, dptf_init, NULL); |