[coreboot-gerrit] Change in coreboot[master]: mb/intel/coffeelake_rvp: Add HDA controller driver support for coffee...

PraveenX Hodagatta Pranesh (Code Review) gerrit at coreboot.org
Fri Oct 12 11:13:03 CEST 2018


PraveenX Hodagatta Pranesh has uploaded this change for review. ( https://review.coreboot.org/29067


Change subject: mb/intel/coffeelake_rvp: Add HDA controller driver support for coffee lake
......................................................................

mb/intel/coffeelake_rvp: Add HDA controller driver support for coffee lake

this patch adds following changes
- Select common coreboot HDA driver in CNL soc Kconfig.
- Add Audio controller device id to common HDA driver.
- Add audio verb table for coffee lake RVP11 & RVP8.

BUG: None
TEST: boot to yocto linux and windows os on CFL RVP11 & RVP8. verified audio
      playback and record functionality over anolog audio jack & HDMI display.

Change-Id: I567e317c0e9ac9f91e159866c7f896e4c101712b
Signed-off-by: praveen hodagatta pranesh <praveenx.hodagatta.pranesh at intel.com>
---
M src/mainboard/intel/coffeelake_rvp/Kconfig
M src/mainboard/intel/coffeelake_rvp/Makefile.inc
A src/mainboard/intel/coffeelake_rvp/hda_verb.c
A src/mainboard/intel/coffeelake_rvp/variants/cfl_h/include/variant/hda_verb.h
A src/mainboard/intel/coffeelake_rvp/variants/cfl_s/include/variant/hda_verb.h
M src/soc/intel/cannonlake/Kconfig
M src/soc/intel/common/block/hda/hda.c
7 files changed, 422 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/29067/1

diff --git a/src/mainboard/intel/coffeelake_rvp/Kconfig b/src/mainboard/intel/coffeelake_rvp/Kconfig
index 83ab9c5..f69bb71 100644
--- a/src/mainboard/intel/coffeelake_rvp/Kconfig
+++ b/src/mainboard/intel/coffeelake_rvp/Kconfig
@@ -14,6 +14,7 @@
 	select SOC_INTEL_COFFEELAKE
 	select SOC_INTEL_CANNONLAKE_MEMCFG_INIT
 	select SOC_INTEL_CANNONLAKE_PCH_H if BOARD_INTEL_COFFEELAKE_RVP11 || BOARD_INTEL_COFFEELAKE_RVP8
+	select SOC_INTEL_COMMON_BLOCK_HDA_VERB if BOARD_INTEL_COFFEELAKE_RVP11 || BOARD_INTEL_COFFEELAKE_RVP8
 
 config MAINBOARD_DIR
 	string
diff --git a/src/mainboard/intel/coffeelake_rvp/Makefile.inc b/src/mainboard/intel/coffeelake_rvp/Makefile.inc
index 2746453..0b70fdd 100644
--- a/src/mainboard/intel/coffeelake_rvp/Makefile.inc
+++ b/src/mainboard/intel/coffeelake_rvp/Makefile.inc
@@ -24,6 +24,7 @@
 
 ramstage-$(CONFIG_CHROMEOS) += chromeos.c
 ramstage-y += mainboard.c
+ramstage-y += hda_verb.c
 
 subdirs-y += variants/baseboard
 CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
diff --git a/src/mainboard/intel/coffeelake_rvp/hda_verb.c b/src/mainboard/intel/coffeelake_rvp/hda_verb.c
new file mode 100644
index 0000000..077c8ed
--- /dev/null
+++ b/src/mainboard/intel/coffeelake_rvp/hda_verb.c
@@ -0,0 +1,18 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#if IS_ENABLED(CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB)
+#include "variant/hda_verb.h"
+#endif
diff --git a/src/mainboard/intel/coffeelake_rvp/variants/cfl_h/include/variant/hda_verb.h b/src/mainboard/intel/coffeelake_rvp/variants/cfl_h/include/variant/hda_verb.h
new file mode 100644
index 0000000..f921f3f
--- /dev/null
+++ b/src/mainboard/intel/coffeelake_rvp/variants/cfl_h/include/variant/hda_verb.h
@@ -0,0 +1,200 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Damien Zammit <damien at zamaudio.com>
+ * Copyright 2018 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef HDA_VERB_H
+#define HDA_VERB_H
+
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
+
+	/*
+	 * VerbTable: CFL Display Audio Codec
+	 * Revision ID = 0xFF
+	 * Codec Vendor: 0x8086280B
+	 */
+
+	0x8086280B,
+	0xFFFFFFFF,
+	0x00000005,
+
+	/*
+	 * Display Audio Verb Table
+	 * For GEN9, the Vendor Node ID is 08h
+	 * Port to be exposed to the inbox driver in the vanilla mode
+	 * PORT C - BIT[7:6] = 01b
+	 */
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	/* Pin Widget 5 - PORT B - Configuration Default: 0x18560010 */
+	0x00571C10,
+	0x00571D00,
+	0x00571E56,
+	0x00571F18,
+	/* Pin Widget 6 - PORT C - Configuration Default: 0x18560020 */
+	0x00671C20,
+	0x00671D00,
+	0x00671E56,
+	0x00671F18,
+	/* Pin Widget 7 - PORT D - Configuration Default: 0x18560030 */
+	0x00771C30,
+	0x00771D00,
+	0x00771E56,
+	0x00771F18,
+	/* Disable the third converter and third Pin (NID 08h) */
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	0x00878140,
+
+	/* ALC700 */
+	0x10EC0700,
+	0xFFFFFFFF,
+	0x00000015,
+
+	/*
+	 * HDA Codec Subsystem ID Verb-table
+	 * HDA Codec Subsystem ID : 0x10EC112C
+	 */
+	0x0017202C,
+	0x00172111,
+	0x001722EC,
+	0x00172310,
+
+	/*
+	 * Pin Widget Verb-table
+	 * Widget node 0x01
+	 */
+	0x0017FF00,
+	0x0017FF00,
+	0x0017FF00,
+	0x0017FF00,
+	/* Pin widget 0x12 - DMIC */
+	0x01271C00,
+	0x01271D00,
+	0x01271E00,
+	0x01271F40,
+	/* Pin widget 0x13 - DMIC */
+	0x01371CF0,
+	0x01371D11,
+	0x01371E11,
+	0x01371F41,
+	/* Pin widget 0x14 - FRONT (Port-D) */
+	0x01471CF0,
+	0x01471D11,
+	0x01471E11,
+	0x01471F41,
+	/* Pin widget 0x15 - I2S-OUT */
+	0x01571C10,
+	0x01571D01,
+	0x01571E17,
+	0x01571F90,
+	/* Pin widget 0x16 - LINE3 (Port-B) */
+	0x01671C20,
+	0x01671D10,
+	0x01671E01,
+	0x01671F01,
+	/* Pin widget 0x17 - I2S-OUT */
+	0x01771CF0,
+	0x01771D11,
+	0x01771E11,
+	0x01771F41,
+	/* Pin widget 0x18 - I2S-IN */
+	0x01871CF0,
+	0x01871D11,
+	0x01871E11,
+	0x01871F41,
+	/* Pin widget 0x19 - MIC2 (Port-F) */
+	0x01971C30,
+	0x01971D90,
+	0x01971EA1,
+	0x01971F02,
+	/* Pin widget 0x1A - LINE1 (Port-C) */
+	0x01A71CF0,
+	0x01A71D11,
+	0x01A71E11,
+	0x01A71F41,
+	/* Pin widget 0x1B - LINE2 (Port-E) */
+	0x01B71C40,
+	0x01B71D90,
+	0x01B71EA1,
+	0x01B71F01,
+	/* Pin widget 0x1D - PC-BEEP */
+	0x01D71C69,
+	0x01D71D84,
+	0x01D71E45,
+	0x01D71F40,
+	/* Pin widget 0x1E - S/PDIF-OUT */
+	0x01E71CF0,
+	0x01E71D11,
+	0x01E71E11,
+	0x01E71F41,
+	/* Pin widget 0x1F - S/PDIF-IN */
+	0x01F71CF0,
+	0x01F71D11,
+	0x01F71E11,
+	0x01F71F41,
+	/* Pin widget 0x21 - P-OUT (Port-I) */
+	0x02171C2F,
+	0x02171D10,
+	0x02171E21,
+	0x02171F02,
+	/* Pin widget 0x29 - I2S-IN */
+	0x02971CF0,
+	0x02971D11,
+	0x02971E11,
+	0x02971F41,
+	/*
+	 * Widget node 0x20 :  MIC2-Vrefo-R and MIC2-vrefo-L
+	 * to independent control
+	 */
+	0x02050045,
+	0x02045089,
+	0x0205004A,
+	0x0204201B,
+	/* Widget node 0x20 - 1 */
+	0x05850000,
+	0x05843888,
+	0x0205006F,
+	0x02042C0B,
+	/*
+	 * Widget node 0x20 - 2 : Line2-JD gating MIC2-Vrefo-R,
+	 * P-JD gating MIC2-vrefo-L
+	 */
+	0x0205006B,
+	0x02044260,
+	0x05B50010,
+	0x05B45C1D,
+
+	/* Widget node 0X20 for ALC1305 */
+	0x02050024,
+	0x02040010,
+	0x02050026,
+	0x02040000,
+	0x02050028,
+	0x02040000,
+	0x02050029,
+	0x0204B024,
+
+};
+
+const u32 pc_beep_verbs[] = {
+};
+
+AZALIA_ARRAY_SIZES;
+#endif
diff --git a/src/mainboard/intel/coffeelake_rvp/variants/cfl_s/include/variant/hda_verb.h b/src/mainboard/intel/coffeelake_rvp/variants/cfl_s/include/variant/hda_verb.h
new file mode 100644
index 0000000..f921f3f
--- /dev/null
+++ b/src/mainboard/intel/coffeelake_rvp/variants/cfl_s/include/variant/hda_verb.h
@@ -0,0 +1,200 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Damien Zammit <damien at zamaudio.com>
+ * Copyright 2018 Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef HDA_VERB_H
+#define HDA_VERB_H
+
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
+
+	/*
+	 * VerbTable: CFL Display Audio Codec
+	 * Revision ID = 0xFF
+	 * Codec Vendor: 0x8086280B
+	 */
+
+	0x8086280B,
+	0xFFFFFFFF,
+	0x00000005,
+
+	/*
+	 * Display Audio Verb Table
+	 * For GEN9, the Vendor Node ID is 08h
+	 * Port to be exposed to the inbox driver in the vanilla mode
+	 * PORT C - BIT[7:6] = 01b
+	 */
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	/* Pin Widget 5 - PORT B - Configuration Default: 0x18560010 */
+	0x00571C10,
+	0x00571D00,
+	0x00571E56,
+	0x00571F18,
+	/* Pin Widget 6 - PORT C - Configuration Default: 0x18560020 */
+	0x00671C20,
+	0x00671D00,
+	0x00671E56,
+	0x00671F18,
+	/* Pin Widget 7 - PORT D - Configuration Default: 0x18560030 */
+	0x00771C30,
+	0x00771D00,
+	0x00771E56,
+	0x00771F18,
+	/* Disable the third converter and third Pin (NID 08h) */
+	0x00878140,
+	0x00878140,
+	0x00878140,
+	0x00878140,
+
+	/* ALC700 */
+	0x10EC0700,
+	0xFFFFFFFF,
+	0x00000015,
+
+	/*
+	 * HDA Codec Subsystem ID Verb-table
+	 * HDA Codec Subsystem ID : 0x10EC112C
+	 */
+	0x0017202C,
+	0x00172111,
+	0x001722EC,
+	0x00172310,
+
+	/*
+	 * Pin Widget Verb-table
+	 * Widget node 0x01
+	 */
+	0x0017FF00,
+	0x0017FF00,
+	0x0017FF00,
+	0x0017FF00,
+	/* Pin widget 0x12 - DMIC */
+	0x01271C00,
+	0x01271D00,
+	0x01271E00,
+	0x01271F40,
+	/* Pin widget 0x13 - DMIC */
+	0x01371CF0,
+	0x01371D11,
+	0x01371E11,
+	0x01371F41,
+	/* Pin widget 0x14 - FRONT (Port-D) */
+	0x01471CF0,
+	0x01471D11,
+	0x01471E11,
+	0x01471F41,
+	/* Pin widget 0x15 - I2S-OUT */
+	0x01571C10,
+	0x01571D01,
+	0x01571E17,
+	0x01571F90,
+	/* Pin widget 0x16 - LINE3 (Port-B) */
+	0x01671C20,
+	0x01671D10,
+	0x01671E01,
+	0x01671F01,
+	/* Pin widget 0x17 - I2S-OUT */
+	0x01771CF0,
+	0x01771D11,
+	0x01771E11,
+	0x01771F41,
+	/* Pin widget 0x18 - I2S-IN */
+	0x01871CF0,
+	0x01871D11,
+	0x01871E11,
+	0x01871F41,
+	/* Pin widget 0x19 - MIC2 (Port-F) */
+	0x01971C30,
+	0x01971D90,
+	0x01971EA1,
+	0x01971F02,
+	/* Pin widget 0x1A - LINE1 (Port-C) */
+	0x01A71CF0,
+	0x01A71D11,
+	0x01A71E11,
+	0x01A71F41,
+	/* Pin widget 0x1B - LINE2 (Port-E) */
+	0x01B71C40,
+	0x01B71D90,
+	0x01B71EA1,
+	0x01B71F01,
+	/* Pin widget 0x1D - PC-BEEP */
+	0x01D71C69,
+	0x01D71D84,
+	0x01D71E45,
+	0x01D71F40,
+	/* Pin widget 0x1E - S/PDIF-OUT */
+	0x01E71CF0,
+	0x01E71D11,
+	0x01E71E11,
+	0x01E71F41,
+	/* Pin widget 0x1F - S/PDIF-IN */
+	0x01F71CF0,
+	0x01F71D11,
+	0x01F71E11,
+	0x01F71F41,
+	/* Pin widget 0x21 - P-OUT (Port-I) */
+	0x02171C2F,
+	0x02171D10,
+	0x02171E21,
+	0x02171F02,
+	/* Pin widget 0x29 - I2S-IN */
+	0x02971CF0,
+	0x02971D11,
+	0x02971E11,
+	0x02971F41,
+	/*
+	 * Widget node 0x20 :  MIC2-Vrefo-R and MIC2-vrefo-L
+	 * to independent control
+	 */
+	0x02050045,
+	0x02045089,
+	0x0205004A,
+	0x0204201B,
+	/* Widget node 0x20 - 1 */
+	0x05850000,
+	0x05843888,
+	0x0205006F,
+	0x02042C0B,
+	/*
+	 * Widget node 0x20 - 2 : Line2-JD gating MIC2-Vrefo-R,
+	 * P-JD gating MIC2-vrefo-L
+	 */
+	0x0205006B,
+	0x02044260,
+	0x05B50010,
+	0x05B45C1D,
+
+	/* Widget node 0X20 for ALC1305 */
+	0x02050024,
+	0x02040010,
+	0x02050026,
+	0x02040000,
+	0x02050028,
+	0x02040000,
+	0x02050029,
+	0x0204B024,
+
+};
+
+const u32 pc_beep_verbs[] = {
+};
+
+AZALIA_ARRAY_SIZES;
+#endif
diff --git a/src/soc/intel/cannonlake/Kconfig b/src/soc/intel/cannonlake/Kconfig
index 3f5210a..bca3618 100644
--- a/src/soc/intel/cannonlake/Kconfig
+++ b/src/soc/intel/cannonlake/Kconfig
@@ -7,6 +7,7 @@
 	bool
 	default n
 	select SOC_INTEL_CANNONLAKE
+	select SOC_INTEL_COMMON_BLOCK_HDA
 	help
 	  Intel Coffeelake support
 
diff --git a/src/soc/intel/common/block/hda/hda.c b/src/soc/intel/common/block/hda/hda.c
index 2409b75..50f847e 100644
--- a/src/soc/intel/common/block/hda/hda.c
+++ b/src/soc/intel/common/block/hda/hda.c
@@ -75,6 +75,7 @@
 	PCI_DEVICE_ID_INTEL_SKL_AUDIO,
 	PCI_DEVICE_ID_INTEL_KBL_AUDIO,
 	PCI_DEVICE_ID_INTEL_CNL_AUDIO,
+	PCI_DEVICE_ID_INTEL_CNP_H_AUDIO,
 	0
 };
 

-- 
To view, visit https://review.coreboot.org/29067
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I567e317c0e9ac9f91e159866c7f896e4c101712b
Gerrit-Change-Number: 29067
Gerrit-PatchSet: 1
Gerrit-Owner: PraveenX Hodagatta Pranesh <praveenx.hodagatta.pranesh at intel.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181012/a299c089/attachment-0001.html>


More information about the coreboot-gerrit mailing list