aboutsummaryrefslogtreecommitdiff
path: root/src/southbridge/intel/lynxpoint/hda_verb.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-06-20 12:40:55 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-12-12 22:11:46 +0100
commit0a7c49efa02b770f9f4f723633f82784be7ae6b8 (patch)
treec6ed66f4e26b554ce24bd833fbf9ad05ad3532a2 /src/southbridge/intel/lynxpoint/hda_verb.h
parent4e3b345d163b1fb7a0ed309f4cf9c24d49bb48aa (diff)
HDA: Enable Mini-HDA and fix up PCH-HDA init
The SystemAgent contains a mini-hd audio controller at PCI 0:3.0 which uses the same verb table init sequence as the southbridge. In order to avoid two copies of the verb table loading code I separated out the HDA verb table functions into a file that can be re-used and then added a minihd driver to the haswell northbridge. The minihd verb table is the same across devices so it can live within the minihd driver rather than needing to be specified in each separate mainboard. I also fixed up the driver for lynxpoint HDA by following the reference code. Without HDMI cable plugged in driver does not find any codec, and it does not seem to re-probe when HDMI is connected. We may be missing kernel patches for this. hda-intel 0000:00:03.0: no codecs found! With a basic kernel patch to add 0x0a0c device ID to HDA driver and with HDMI cable connected it is much happier: snd_hda_intel 0000:00:03.0: irq 60 for MSI/MSI-X input: HDA Intel MID HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input9 snd_hda_intel 0000:00:1b.0: irq 61 for MSI/MSI-X input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input10 input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input11 Change-Id: Ifa587984be4fc2801704a0368b9cdf8379c2450e Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/59336 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/4318 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/southbridge/intel/lynxpoint/hda_verb.h')
-rw-r--r--src/southbridge/intel/lynxpoint/hda_verb.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/southbridge/intel/lynxpoint/hda_verb.h b/src/southbridge/intel/lynxpoint/hda_verb.h
new file mode 100644
index 0000000000..8b3d27e1c2
--- /dev/null
+++ b/src/southbridge/intel/lynxpoint/hda_verb.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Google Inc.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef LYNXPOINT_HDA_VERB_H
+#define LYNXPOINT_HDA_VERB_H
+
+#define HDA_GCAP_REG 0x00
+#define HDA_GCTL_REG 0x08
+#define HDA_GCTL_CRST (1 << 0)
+#define HDA_STATESTS_REG 0x0e
+#define HDA_IC_REG 0x60
+#define HDA_IR_REG 0x64
+#define HDA_ICII_REG 0x68
+#define HDA_ICII_BUSY (1 << 0)
+#define HDA_ICII_VALID (1 << 1)
+
+int hda_codec_detect(u32 base);
+int hda_codec_write(u32 base, u32 size, const u32 *data);
+int hda_codec_init(u32 base, int addr, int verb_size, const u32 *verb_data);
+
+#endif