Author: mjones Date: Mon Sep 13 21:24:38 2010 New Revision: 5812 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5812
Log: IEI Kino mainboard support based on Mahogany Fam10. svn copy amd/mahogany iei/kino-780am2-fam10; then apply the patch.
Signed-off-by: Marc Jones marcj303@gmail.com Acked-by: Peter Stuge peter@stuge.se
Added: trunk/src/mainboard/iei/kino-780am2-fam10/ - copied from r5802, trunk/src/mainboard/amd/mahogany_fam10/ Modified: trunk/src/mainboard/iei/kino-780am2-fam10/Kconfig trunk/src/mainboard/iei/kino-780am2-fam10/devicetree.cb trunk/src/mainboard/iei/kino-780am2-fam10/dsdt.asl trunk/src/mainboard/iei/kino-780am2-fam10/mainboard.c trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/Kconfig ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/Kconfig Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/Kconfig Mon Sep 13 21:24:38 2010 (r5812) @@ -1,4 +1,4 @@ -if BOARD_AMD_MAHOGANY_FAM10 +if BOARD_IEI_KINO_FAM10
config BOARD_SPECIFIC_OPTIONS # dummy def_bool y @@ -9,7 +9,7 @@ select NORTHBRIDGE_AMD_AMDFAM10 select SOUTHBRIDGE_AMD_RS780 select SOUTHBRIDGE_AMD_SB700 - select SUPERIO_ITE_IT8718F + select SUPERIO_FINTEK_F71859 select BOARD_HAS_FADT select HAVE_BUS_CONFIG select HAVE_OPTION_TABLE @@ -30,7 +30,7 @@
config MAINBOARD_DIR string - default amd/mahogany_fam10 + default iei/kino-780am2-fam10
config APIC_ID_OFFSET hex @@ -38,7 +38,7 @@
config MAINBOARD_PART_NUMBER string - default "Mahogany (Fam10)" + default "Kino-780AM2(Fam10)"
config HW_MEM_HOLE_SIZEK hex @@ -78,7 +78,7 @@
config AMD_UCODE_PATCH_FILE string - default "mc_patch_01000095.h" + default "mc_patch_01000086.h"
config RAMTOP hex @@ -94,11 +94,11 @@
config MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID hex - default 0x3060 + default 0x0000
config MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID hex - default 0x1022 + default 0x0000
config RAMBASE hex @@ -108,4 +108,8 @@ hex default 0
-endif # BOARD_AMD_MAHOGANY_FAM10 +config FALLBACK_VGA_BIOS_ID + string + default "1002,9615" + +endif #BOARD_IEI_KINO_FAM10
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/devicetree.cb ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/devicetree.cb Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/devicetree.cb Mon Sep 13 21:24:38 2010 (r5812) @@ -1,4 +1,4 @@ -# sample config for amd/mahogany_fam10 +# Config for iei/kino-780am2-fam10 chip northbridge/amd/amdfam10/root_complex device lapic_cluster 0 on chip cpu/amd/socket_AM2r2 #L1 and DDR2 @@ -46,17 +46,11 @@ chip drivers/generic/generic #dimm 0-0-1 device i2c 51 on end end - chip drivers/generic/generic #dimm 0-1-0 - device i2c 52 on end - end - chip drivers/generic/generic #dimm 0-1-1 - device i2c 53 on end - end end # SM device pci 14.1 on end # IDE 0x439c device pci 14.2 on end # HDA 0x4383 device pci 14.3 on # LPC 0x439d - chip superio/ite/it8718f + chip superio/fintek/f71859 device pnp 2e.0 off # Floppy io 0x60 = 0x3f0 irq 0x70 = 6 @@ -83,60 +77,17 @@ device pnp 2e.6 on # Mouse irq 0x70 = 12 end - device pnp 2e.7 off # GPIO, must be closed for unresolved reason. - end - device pnp 2e.8 off # MIDI - io 0x60 = 0x300 - irq 0x70 = 9 - end - device pnp 2e.9 off # GAME - io 0x60 = 0x220 - end - device pnp 2e.a off end # CIR - end #superio/ite/it8718f + end #SIO end #LPC device pci 14.4 on end # PCI 0x4384 device pci 14.5 on end # USB 2 register "boot_switch_sata_ide" = "0" # 0: boot from SATA. 1: IDE end #southbridge/amd/sb700 end # device pci 18.0 - - device pci 18.0 on end - device pci 18.0 on end device pci 18.1 on end device pci 18.2 on end device pci 18.3 on end - device pci 18.4 on end -# device pci 00.5 on end end end #pci_domain - #for node 32 to node 63 -# device pci_domain 0 on -# chip northbridge/amd/amdfam10 -# device pci 00.0 on end# northbridge -# device pci 00.0 on end -# device pci 00.0 on end -# device pci 00.0 on end -# device pci 00.1 on end -# device pci 00.2 on end -# device pci 00.3 on end -# device pci 00.4 on end -# device pci 00.5 on end -# end -# end #pci_domain - -# chip drivers/generic/debug -# device pnp 0.0 off end # chip name -# device pnp 0.1 on end # pci_regs_all -# device pnp 0.2 off end # mem -# device pnp 0.3 off end # cpuid -# device pnp 0.4 off end # smbus_regs_all -# device pnp 0.5 off end # dual core msr -# device pnp 0.6 off end # cache size -# device pnp 0.7 off end # tsc -# device pnp 0.8 off end # hard reset -# device pnp 0.9 off end # mcp55 -# device pnp 0.a on end # GH ext table -# end +end #root_complex
-end
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/dsdt.asl ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/dsdt.asl Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/dsdt.asl Mon Sep 13 21:24:38 2010 (r5812) @@ -22,8 +22,8 @@ "DSDT.AML", /* Output filename */ "DSDT", /* Signature */ 0x02, /* DSDT Revision, needs to be 2 for 64bit */ - "AMD ", /* OEMID */ - "MAHOGANY", /* TABLE ID */ + "IEI ", /* OEMID */ + "KINO ", /* TABLE ID */ 0x00010001 /* OEM Revision */ ) { /* Start of ASL file */ @@ -1450,7 +1450,7 @@ Name(_ADR, 0x00140006) } /* end Ac97modem */
- /* ITE8718 Support */ + /* SIO Support */ OperationRegion (IOID, SystemIO, 0x2E, 0x02) /* sometimes it is 0x4E */ Field (IOID, ByteAcc, NoLock, Preserve) {
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/mainboard.c ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/mainboard.c Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/mainboard.c Mon Sep 13 21:24:38 2010 (r5812) @@ -35,77 +35,32 @@ void set_pcie_dereset(void); void set_pcie_reset(void); u8 is_dev3_present(void); -/* - * Mahogany uses GPIO 6 as PCIe slot reset, GPIO4 as GFX slot reset. We need to +/* TODO - Need to find GPIO for PCIE slot. + * Kino uses GPIO ? as PCIe slot reset, GPIO? as GFX slot reset. We need to * pull it up before training the slot. ***/ void set_pcie_dereset() { - u16 word; - device_t sm_dev; - /* GPIO 6 reset PCIe slot, GPIO 4 reset GFX PCIe */ - sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0)); - - word = pci_read_config16(sm_dev, 0xA8); - word |= (1 << 0) | (1 << 2); /* Set Gpio6,4 as output */ - word &= ~((1 << 8) | (1 << 10)); - pci_write_config16(sm_dev, 0xA8, word); + /* PCIE slot not yet supported.*/ }
void set_pcie_reset() { - u16 word; - device_t sm_dev; - /* GPIO 6 reset PCIe slot, GPIO 4 reset GFX PCIe */ - sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0)); - - word = pci_read_config16(sm_dev, 0xA8); - word &= ~((1 << 0) | (1 << 2)); /* Set Gpio6,4 as output */ - word &= ~((1 << 8) | (1 << 10)); - pci_write_config16(sm_dev, 0xA8, word); + /* PCIE slot not yet supported.*/ }
-#if 0 /* not tested yet. */ -/******************************************************** -* mahogany uses SB700 GPIO9 to detect IDE_DMA66. -* IDE_DMA66 is routed to GPIO 9. So we read Gpio 9 to -* get the cable type, 40 pin or 80 pin? -********************************************************/ -static void get_ide_dma66(void) -{ - u8 byte; - /*u32 sm_dev, ide_dev; */ - device_t sm_dev, ide_dev; - - sm_dev = dev_find_slot(0, PCI_DEVFN(0x14, 0)); - - byte = pci_read_config8(sm_dev, 0xA9); - byte |= (1 << 5); /* Set Gpio9 as input */ - pci_write_config8(sm_dev, 0xA9, byte); - - ide_dev = dev_find_slot(0, PCI_DEVFN(0x14, 1)); - byte = pci_read_config8(ide_dev, 0x56); - byte &= ~(7 << 0); - if ((1 << 5) & pci_read_config8(sm_dev, 0xAA)) - byte |= 2 << 0; /* mode 2 */ - else - byte |= 5 << 0; /* mode 5 */ - pci_write_config8(ide_dev, 0x56, byte); -} -#endif /* get_ide_dma66() */ - u8 is_dev3_present(void) { return 0; }
/************************************************* -* enable the dedicated function in mahogany board. +* enable the dedicated function in kino board. * This function called early than rs780_enable. *************************************************/ -static void mahogany_enable(device_t dev) +static void kino_enable(device_t dev) { - printk(BIOS_INFO, "Mainboard MAHOGANY Enable. dev=0x%p\n", dev); + printk(BIOS_INFO, "Mainboard Kino Enable. dev=0x%p\n", dev);
#if (CONFIG_GFXUMA == 1) msr_t msr, msr2; @@ -166,6 +121,6 @@ }
struct chip_operations mainboard_ops = { - CHIP_NAME("AMD MAHOGANY Mainboard") - .enable_dev = mahogany_enable, + CHIP_NAME("IEI Kino-780AM2 Mainboard") + .enable_dev = kino_enable, };
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/mptable.c Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/mptable.c Mon Sep 13 21:24:38 2010 (r5812) @@ -43,7 +43,7 @@ { static const char sig[4] = "PCMP"; static const char oem[8] = "COREBOOT"; - static const char productid[12] = "MAHOGANY "; + static const char productid[12] = "KINO "; struct mp_config_table *mc; int j;
Modified: trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c ============================================================================== --- trunk/src/mainboard/amd/mahogany_fam10/romstage.c Sat Sep 11 00:13:34 2010 (r5802) +++ trunk/src/mainboard/iei/kino-780am2-fam10/romstage.c Mon Sep 13 21:24:38 2010 (r5812) @@ -37,6 +37,9 @@ #define SET_FIDVID 1 #define SET_FIDVID_CORE_RANGE 0
+/* UART address and device number */ +#define SERIAL_DEV PNP_DEV(0x2e, F71859_SP1) + #include <stdint.h> #include <string.h> #include <device/pci_def.h> @@ -59,7 +62,7 @@
static int smbus_read_byte(u32 device, u32 address);
-#include "superio/ite/it8718f/it8718f_early_serial.c" +#include "superio/fintek/f71859/f71859_early_serial.c" #include "cpu/x86/mtrr/earlymtrr.c" #include <cpu/amd/mtrr.h> #include "northbridge/amd/amdfam10/setup_resource_map.c" @@ -136,7 +139,7 @@ enable_rs780_dev8(); sb700_lpc_init();
- it8718f_enable_serial(0, CONFIG_TTYS0_BASE); + f71859_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); uart_init(); console_init(); printk(BIOS_DEBUG, "\n");