diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2010-08-17 08:24:01 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2010-08-17 08:24:01 +0000 |
commit | e7b7ae23e688fb883003aed42f614bcfa977894e (patch) | |
tree | d1d81cd788d441cb83a6e9d9db41d17cc7ccf5f6 /util/superiotool | |
parent | 0e480ca6779a1fdce8808471c00c368faf37d4e4 (diff) | |
download | coreboot-e7b7ae23e688fb883003aed42f614bcfa977894e.tar.xz |
Add support for Fintek F81216D/DG/AD
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5708 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/superiotool')
-rw-r--r-- | util/superiotool/fintek.c | 71 | ||||
-rw-r--r-- | util/superiotool/superiotool.c | 12 | ||||
-rw-r--r-- | util/superiotool/superiotool.h | 4 |
3 files changed, 87 insertions, 0 deletions
diff --git a/util/superiotool/fintek.c b/util/superiotool/fintek.c index 013d78de74..91acb43e7b 100644 --- a/util/superiotool/fintek.c +++ b/util/superiotool/fintek.c @@ -153,6 +153,46 @@ static const struct superio_registers reg_table[] = { {EOT}}}, {0x0581, "F8000", { /* Fintek/ASUS F8000 */ {EOT}}}, + {0x0802, "F81216D/DG", { + {NOLDN, NULL, + {0x25,0x2f,EOT}, + {0x00,RSVD,EOT}}, + {0x0, "UART1", + {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, + {NANA,NANA,NANA,NANA,0x00,0x40,EOT}}, + {0x1, "UART2", + {0x30,0x60,0x61,0x70,0xf0,EOT}, + {NANA,NANA,NANA,NANA,0x00,EOT}}, + {0x2, "UART3", + {0x30,0x60,0x61,0x70,0xf0,EOT}, + {NANA,NANA,NANA,NANA,0x00,EOT}}, + {0x3, "UART4", + {0x30,0x60,0x61,0x70,0xf0,EOT}, + {NANA,NANA,NANA,NANA,0x00,EOT}}, + {0x8, "WDT", + {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, + {0x00,NANA,NANA,NANA,NANA,NANA,EOT}}, + {EOT}}}, + {0x1602, "F81216AD", { + {NOLDN, NULL, + {0x25,0x27,EOT}, + {0x00,NANA,EOT}}, + {0x0, "UART1", + {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf4,0xf5,EOT}, + {NANA,NANA,NANA,NANA,0x00,0x40,0x00,0x00,EOT}}, + {0x1, "UART2", + {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, + {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, + {0x2, "UART3", + {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, + {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, + {0x3, "UART4", + {0x30,0x60,0x61,0x70,0xf0,0xf4,0xf5,EOT}, + {NANA,NANA,NANA,NANA,0x00,0x00,0x00,EOT}}, + {0x8, "WDT", + {0x30,0x60,0x61,0x70,0xf0,0xf1,EOT}, + {0x00,NANA,NANA,NANA,NANA,NANA,EOT}}, + {EOT}}}, {EOT} }; @@ -186,6 +226,37 @@ void probe_idregs_fintek(uint16_t port) exit_conf_mode_winbond_fintek_ite_8787(port); } + +void probe_idregs_fintek_alternative(uint16_t port) +{ + uint16_t vid, did; + + probing_for("Fintek", "", port); + + enter_conf_mode_fintek_7777(port); + + did = regval(port, DEVICE_ID_BYTE1_REG); + did |= (regval(port, DEVICE_ID_BYTE2_REG) << 8); + + vid = regval(port, VENDOR_ID_BYTE1_REG); + vid |= (regval(port, VENDOR_ID_BYTE2_REG) << 8); + + if (vid != FINTEK_VENDOR_ID || superio_unknown(reg_table, did)) { + if (verbose) + printf(NOTFOUND "vid=0x%04x, id=0x%04x\n", vid, did); + exit_conf_mode_fintek_7777(port); + return; + } + + printf("Found Fintek %s (vid=0x%04x, id=0x%04x) at 0x%x\n", + get_superio_name(reg_table, did), vid, did, port); + chip_found = 1; + + dump_superio("Fintek", reg_table, port, did, LDN_SEL); + + exit_conf_mode_fintek_7777(port); +} + void print_fintek_chips(void) { print_vendor_chips("Fintek", reg_table); diff --git a/util/superiotool/superiotool.c b/util/superiotool/superiotool.c index 2afc2bfa62..2defad1d5c 100644 --- a/util/superiotool/superiotool.c +++ b/util/superiotool/superiotool.c @@ -58,11 +58,23 @@ void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port) regwrite(port, 0x02, 0x02); /* ITE */ } +void enter_conf_mode_fintek_7777(uint16_t port) +{ + OUTB(0x77, port); + OUTB(0x77, port); +} + +void exit_conf_mode_fintek_7777(uint16_t port) +{ + OUTB(0xaa, port); /* Fintek */ +} + int superio_unknown(const struct superio_registers reg_table[], uint16_t id) { return !strncmp(get_superio_name(reg_table, id), "<unknown>", 9); } + const char *get_superio_name(const struct superio_registers reg_table[], uint16_t id) { diff --git a/util/superiotool/superiotool.h b/util/superiotool/superiotool.h index d465115d1e..8a97d7bf3c 100644 --- a/util/superiotool/superiotool.h +++ b/util/superiotool/superiotool.h @@ -117,6 +117,8 @@ uint8_t regval(uint16_t port, uint8_t reg); void regwrite(uint16_t port, uint8_t reg, uint8_t val); void enter_conf_mode_winbond_fintek_ite_8787(uint16_t port); void exit_conf_mode_winbond_fintek_ite_8787(uint16_t port); +void enter_conf_mode_fintek_7777(uint16_t port); +void exit_conf_mode_fintek_7777(uint16_t port); int superio_unknown(const struct superio_registers reg_table[], uint16_t id); const char *get_superio_name(const struct superio_registers reg_table[], uint16_t id); @@ -133,6 +135,7 @@ void print_ali_chips(void); /* fintek.c */ void probe_idregs_fintek(uint16_t port); +void probe_idregs_fintek_alternative(uint16_t port); void print_fintek_chips(void); /* ite.c */ @@ -168,6 +171,7 @@ static const struct { } superio_ports_table[] = { {probe_idregs_ali, {0x3f0, 0x370, EOT}}, {probe_idregs_fintek, {0x2e, 0x4e, EOT}}, + {probe_idregs_fintek_alternative, {0x2e, 0x4e, EOT}}, /* Only use 0x370 for ITE, but 0x3f0 or 0x3bd would also be valid. */ {probe_idregs_ite, {0x2e, 0x4e, 0x370, EOT}}, {probe_idregs_nsc, {0x2e, 0x4e, 0x15c, EOT}}, |