soc/intel/cannonlake: Enable CNVi based on devicetree

Set PchCnvimode to Auto if CNVi is enabled in device tree. This will
allow FSP to configure CNVi.

Change-Id: I4f77fe5e9f561d3b498403e42dfc7afdcfaedf6f
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/30516
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c
index 78b27e9..8166dea 100644
--- a/src/soc/intel/cannonlake/fsp_params.c
+++ b/src/soc/intel/cannonlake/fsp_params.c
@@ -162,6 +162,10 @@
 		dev->enabled = 0;
 	params->XdciEnable = dev->enabled;
 
+	/* Enable CNVi Wifi if enabled in device tree */
+	dev = dev_find_slot(0, PCH_DEVFN_CNViWIFI);
+	params->PchCnviMode = dev->enabled;
+
 	/* PCI Express */
 	for (i = 0; i < ARRAY_SIZE(config->PcieClkSrcUsage); i++) {
 		if (config->PcieClkSrcUsage[i] == 0)