aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/poppy/variants/nami/mainboard.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2018-05-23 21:27:33 -0700
committerFurquan Shaikh <furquan@google.com>2018-05-25 22:54:19 +0000
commite3011451cccece7668f95e59dfb6f61c878b7e0a (patch)
treea0d5df1c065332e41554a087996a8c6381e821bc /src/mainboard/google/poppy/variants/nami/mainboard.c
parente8620146d964df8e5adfb084ed503bef2d877321 (diff)
mb/google/poppy/variants/nami: Perform PL2 setting in variant_devtree_udpate
This change moves PL2 override to variant_devtree_update for two reasons: 1. This function was added to basically override devtree settings in variant specific code. So, it would be a good idea to perform all the overrides in a single place. 2. Adding a device for performing nami_enable would require changes to devicetree and special handling for calling this device enable. Thus, nami_enable was never getting called. BUG=b:80148703 Change-Id: Ifa24a7b6e99cad2368b3d656a757f26297373121 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/26499 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/mainboard/google/poppy/variants/nami/mainboard.c')
-rw-r--r--src/mainboard/google/poppy/variants/nami/mainboard.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c
index 6ff296022b..492167946f 100644
--- a/src/mainboard/google/poppy/variants/nami/mainboard.c
+++ b/src/mainboard/google/poppy/variants/nami/mainboard.c
@@ -23,11 +23,23 @@
#include <device/device.h>
#include <drivers/intel/gma/opregion.h>
#include <ec/google/chromeec/ec.h>
+#include <intelblocks/mp_init.h>
#include <smbios.h>
#include <soc/ramstage.h>
#include <string.h>
#include <variant/sku.h>
+#define PL2_I7_SKU 44
+#define PL2_DEFAULT 29
+
+static uint32_t get_pl2(void)
+{
+ if (cpuid_eax(1) == CPUID_KABYLAKE_Y0)
+ return PL2_I7_SKU;
+
+ return PL2_DEFAULT;
+}
+
uint32_t variant_board_sku(void)
{
static uint32_t sku_id = SKU_UNKNOWN;
@@ -42,16 +54,21 @@ uint32_t variant_board_sku(void)
return sku_id;
}
+/* Override dev tree settings per board */
void variant_devtree_update(void)
{
- /* Override dev tree settings per board */
uint32_t sku_id = variant_board_sku();
struct device *root = SA_DEV_ROOT;
config_t *cfg = root->chip_info;
+
+ /* Update PL2 based on SKU. */
+ cfg->tdp_pl2_override = get_pl2();
+
switch (sku_id) {
case SKU_1_VAYNE:
case SKU_2_VAYNE:
- cfg->usb2_ports[5].enable = 0;//rear camera
+ /* Disable unused port USB port */
+ cfg->usb2_ports[5].enable = 0;
break;
default:
break;