summaryrefslogtreecommitdiff
path: root/src/soc/intel/jasperlake
diff options
context:
space:
mode:
authorSimon Yang <simon1.yang@intel.com>2021-12-09 19:42:24 +0800
committerNico Huber <nico.h@gmx.de>2022-01-01 14:19:53 +0000
commit355fb2fb984cc264f4452d4bbffbd3666c71906e (patch)
tree3ca8e38881caaf361ab93b9cecd8f0bd073102bb /src/soc/intel/jasperlake
parente7f1f6be867dd043ca05bf24d2b7e0cfa56f80f0 (diff)
soc/intel/jasperlake: Add CdClock frequency config
Add a devicetree setting to configure the CdClock (Core Display Clock) frequency through a FSP UPD. Because the value for this UPD's default setting is non-zero and devicetree settings default to 0 if not set, adapt the devicetree values so that the value for the UPD's default setting is used when the devicetree setting is zero. Also update the comment describing the FSP UPD in the header file FspsUpd.h to match the correct CdClock definition. BUG=b:206557434 BRANCH=dedede TEST=Build fw and confirm FSP setting are set properly by log Signed-off-by: Simon Yang <simon1.yang@intel.com> Change-Id: I917c2f10b130b0cd54f60e2ba98eb971d5ec3c97 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60009 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/jasperlake')
-rw-r--r--src/soc/intel/jasperlake/chip.h20
-rw-r--r--src/soc/intel/jasperlake/fsp_params.c9
2 files changed, 29 insertions, 0 deletions
diff --git a/src/soc/intel/jasperlake/chip.h b/src/soc/intel/jasperlake/chip.h
index 87a98fb351..256fa06d8d 100644
--- a/src/soc/intel/jasperlake/chip.h
+++ b/src/soc/intel/jasperlake/chip.h
@@ -405,6 +405,26 @@ struct soc_intel_jasperlake_config {
*/
bool disable_external_bypass_vr;
+ /*
+ * Core Display Clock Frequency selection, FSP UPD CdClock values + 1
+ *
+ * FSP will use the value to program clock frequency for core display if GOP
+ * is not run. Ex: the Chromebook normal mode.
+ * For the cases GOP is run, GOP will be in charge of the related register
+ * settings.
+ */
+ enum {
+ CD_CLOCK_172_8_MHZ = 1,
+ CD_CLOCK_180_MHZ = 2,
+ CD_CLOCK_192_MHZ = 3,
+ CD_CLOCK_307_MHZ = 4,
+ CD_CLOCK_312_MHZ = 5,
+ CD_CLOCK_552_MHZ = 6,
+ CD_CLOCK_556_8_MHZ = 7,
+ CD_CLOCK_648_MHZ = 8,
+ CD_CLOCK_652_8_MHZ = 9,
+ } cd_clock;
+
};
typedef struct soc_intel_jasperlake_config config_t;
diff --git a/src/soc/intel/jasperlake/fsp_params.c b/src/soc/intel/jasperlake/fsp_params.c
index 085148f7b3..a5bcd55c8f 100644
--- a/src/soc/intel/jasperlake/fsp_params.c
+++ b/src/soc/intel/jasperlake/fsp_params.c
@@ -209,6 +209,15 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
params->PchFivrExtVnnRailEnabledStates = 0;
}
+ /*
+ * We intentionally want the default to be maximum value(0xff) to align with
+ * FSP, so we reserve the `0` value here to mean auto instead, and shift the
+ * other values by 1.
+ *
+ * Please refer to src/soc/intel/jasperlake/chip.h for the detail definition.
+ */
+ params->CdClock = config->cd_clock ? config->cd_clock - 1 : 0xff;
+
/* Override/Fill FSP Silicon Param for mainboard */
mainboard_silicon_init_params(params);
}