diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-03-03 00:44:38 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-08-18 00:05:53 +0200 |
commit | 7aa704b822008efbbd540e97ae73f1c7d95e2c7d (patch) | |
tree | bce64bf77e7f0790795caa47c5081e90863fedca | |
parent | 66476ddd99b65711989847eba5f4ef1f35b7670e (diff) | |
download | coreboot-7aa704b822008efbbd540e97ae73f1c7d95e2c7d.tar.xz |
apple/macbook21: Fix audio.
Change-Id: I0bb939ac377f84431d871b702fdb42651e9a2e96
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/5324
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
-rw-r--r-- | src/mainboard/apple/macbook21/devicetree.cb | 2 | ||||
-rw-r--r-- | src/mainboard/apple/macbook21/hda_verb.h | 93 | ||||
-rw-r--r-- | src/mainboard/apple/macbook21/mainboard.c | 6 |
3 files changed, 100 insertions, 1 deletions
diff --git a/src/mainboard/apple/macbook21/devicetree.cb b/src/mainboard/apple/macbook21/devicetree.cb index 258a329c8c..a3dfe3a547 100644 --- a/src/mainboard/apple/macbook21/devicetree.cb +++ b/src/mainboard/apple/macbook21/devicetree.cb @@ -71,7 +71,7 @@ chip northbridge/intel/i945 register "c4onc3_enable" = "1" device pci 1b.0 on # Audio Controller - subsystemid 0x17aa 0x2010 + subsystemid 0x8384 0x7680 end device pci 1c.0 on end # Ethernet device pci 1c.1 on end # Atheros WLAN diff --git a/src/mainboard/apple/macbook21/hda_verb.h b/src/mainboard/apple/macbook21/hda_verb.h new file mode 100644 index 0000000000..4e1687d3d1 --- /dev/null +++ b/src/mainboard/apple/macbook21/hda_verb.h @@ -0,0 +1,93 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2014 Vladimir Serbinenko. + * + * 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, + * or (at your option) any later version. + * + * 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 + */ + +static const u32 mainboard_cim_verb_data[] = { + /* coreboot specific header */ + 0x83847680, /* Codec Vendor / Device ID: SigmaTel STAC9221 A1 */ + 0x106b2200, /* Subsystem ID */ + 0x0000000B, /* Number of 4 dword sets */ + + /* NID 0x01: Subsystem ID. */ + 0x00172000, + 0x00172122, + 0x0017226B, + 0x00172310, + + /* NID 0x0A. */ + 0x00A71C1F, + 0x00A71DE2, + 0x00A71E21, + 0x00A71F03, + + /* NID 0x0B. */ + 0x00B71C2E, + 0x00B71DE0, + 0x00B71EA1, + 0x00B71F03, + + /* NID 0x0C. */ + 0x00C71C10, + 0x00C71DE1, + 0x00C71E17, + 0x00C71F90, + + /* NID 0x0D. */ + 0x00D71C1F, + 0x00D71DE1, + 0x00D71E17, + 0x00D71F90, + + /* NID 0x0E. */ + 0x00E71CFE, + 0x00E71D00, + 0x00E71E00, + 0x00E71F40, + + /* NID 0x0F */ + 0x00F71C20, + 0x00F71DE0, + 0x00F71E81, + 0x00F71F03, + + /* NID 0x10 */ + 0x01071C30, + 0x01071DE2, + 0x01071E45, + 0x01071F13, + + /* NID 0x11 */ + 0x01171C40, + 0x01171DE2, + 0x01171EC5, + 0x01171F13, + + /* NID 0x15 */ + 0x01571CFC, + 0x01571D00, + 0x01571E00, + 0x01571F40, + + /* NID 0x1B. */ + 0x01B71CFB, + 0x01B71D00, + 0x01B71E00, + 0x01B71F40, + +}; diff --git a/src/mainboard/apple/macbook21/mainboard.c b/src/mainboard/apple/macbook21/mainboard.c index 6bd3aec083..9a025ddf98 100644 --- a/src/mainboard/apple/macbook21/mainboard.c +++ b/src/mainboard/apple/macbook21/mainboard.c @@ -34,8 +34,12 @@ #include <arch/x86/include/arch/acpigen.h> #include <smbios.h> #include <x86emu/x86emu.h> +#include "hda_verb.h" #define PANEL INT15_5F35_CL_DISPLAY_DEFAULT +extern const u32 *cim_verb_data; +extern u32 cim_verb_data_size; + #if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE static int int15_handler(void) { @@ -83,6 +87,8 @@ static void mainboard_init(device_t dev) static void mainboard_enable(device_t dev) { dev->ops->init = mainboard_init; + cim_verb_data = mainboard_cim_verb_data; + cim_verb_data_size = sizeof(mainboard_cim_verb_data); } struct chip_operations mainboard_ops = { |