Add detection support for quite a number of SMSC Super I/Os. Also, add
authorUwe Hermann <uwe@hermann-uwe.de>
Mon, 24 Sep 2007 01:40:09 +0000 (01:40 +0000)
committerUwe Hermann <uwe@hermann-uwe.de>
Mon, 24 Sep 2007 01:40:09 +0000 (01:40 +0000)
dump support for the SMSC DME1737 and the ASUS A8000. Random minor fixes.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2803 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

util/superiotool/ite.c
util/superiotool/smsc.c
util/superiotool/superiotool.h

index 1cfc3ee5380edf024d54c7c2d5716cceb36e562c..3fe7190207d346840d42b1d84d6edf87e388a3a9 100644 (file)
@@ -239,10 +239,7 @@ const static struct superio_registers reg_table[] = {
 };
 
 /**
- * Enable configuration sequence (ITE uses this for newer IT87[012]xF).
- *
- * IT871[01]F uses 0x87, 0x87 -> Fintek detection should handle it
- * IT8708F uses 0x87, 0x87 -> Fintek detection should handle it
+ * IT871[01]F and IT8708F use 0x87, 0x87
  * IT8761F uses 0x87, 0x61, 0x55, 0x55/0xaa
  * IT86xxF series uses different ports
  * IT8661F uses 0x86, 0x61, 0x55/0xaa, 0x55/0xaa and 32 more writes
index cd612e87f1f01c27fa352c9d7b4ba6c9921a4d28..c2fed311933a879496a4f14b500aebc0302a79f9 100644 (file)
 
 #include "superiotool.h"
 
-#define DEVICE_ID_REG  0x0d
-#define DEVICE_REV_REG 0x0e
+#define DEVICE_ID_REG_OLD      0x0d
+#define DEVICE_REV_REG_OLD     0x0e
+
+#define DEVICE_ID_REG          0x20
+#define DEVICE_REV_REG         0x21
 
 const static struct superio_registers reg_table[] = {
        {0x28, "FDC37N769", {
@@ -37,6 +40,82 @@ const static struct superio_registers reg_table[] = {
                         0x80,0x00,0x3c,RSVD,RSVD,0x00,0x00,0x00,0x00,0x00,
                         0x00,0x00,RSVD,0x00,0x00,0x03,0x00,0x00,EOT}},
                {EOT}}},
+       {0x42, "FDC37B80x", {
+               {EOT}}},
+       {0x44, "FDC37B78x", {
+               {EOT}}},
+       {0x4c, "FDC37B72x", {
+               {EOT}}},
+       {0x4d, "FDC37M81x", {
+               {EOT}}},
+       {0x47, "FDC37M60x", {
+               {EOT}}},
+       {0x51, "LPC47B27x", {
+               {EOT}}},
+       {0x59, "LPC47M10x", {
+               {EOT}}},
+       {0x60, "LPC47M15x", {
+               {EOT}}},
+       {0x62, "LPC47S45x", {
+               {EOT}}},
+       {0x6f, "LPC47B397", {
+               {EOT}}},
+       {0x77, "A8000", {       /* ASUS A8000, a rebranded DME1737(?) */
+               {NOLDN, NULL,
+                       {0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
+                        0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
+                       {RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,
+                        NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
+                        0xf5,EOT},
+                       {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
+                        0x00,EOT}},
+               {0x3, "Parallel port",
+                       {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
+               {0x4, "COM1",
+                       {0x30,0x60,0x61,0x70,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,EOT}},
+               {0x5, "COM2",
+                       {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
+               {0x7, "Keyboard",
+                       {0x30,0x70,0x72,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,EOT}},
+               {0xa, "Runtime registers",
+                       {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
+               {EOT}}},
+       {0x78, "DME1737", {
+               {NOLDN, NULL,
+                       {0x03,0x07,0x20,0x21,0x22,0x23,0x24,0x26,0x27,0x28,
+                        0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
+                       {RSVD,0x00,0x77,NANA,0x00,RSVD,0x44,MISC,MISC,RSVD,
+                        NANA,NANA,NANA,NANA,NANA,NANA,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,0xf2,0xf4,
+                        0xf5,EOT},
+                       {0x00,0x03,0xf0,0x06,0x02,0x0e,0x00,0xff,0x00,
+                        0x00,EOT}},
+               {0x3, "Parallel port",
+                       {0x30,0x60,0x61,0x70,0x74,0xf0,0xf1,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x3c,0x00,EOT}},
+               {0x4, "COM1",
+                       {0x30,0x60,0x61,0x70,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,EOT}},
+               {0x5, "COM2",
+                       {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,0x02,0x03,EOT}},
+               {0x7, "Keyboard",
+                       {0x30,0x70,0x72,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,EOT}},
+               {0xa, "Runtime registers",
+                       {0x30,0x60,0x61,0x62,0x63,0xf0,0xf1,0xf2,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,NANA,RSVD,0x04,EOT}},
+               {EOT}}},
+       {0x81, "SCH5307", {
+               {EOT}}},
        {EOT}
 };
 
@@ -56,6 +135,14 @@ void probe_idregs_smsc(uint16_t port)
 
        enter_conf_mode_smsc(port);
 
+       /* Check for older SMSC Super I/Os. */
+       id = regval(port, DEVICE_ID_REG_OLD);
+       rev = regval(port, DEVICE_REV_REG_OLD);
+
+       if (superio_unknown(reg_table, id))
+               no_superio_found(port);
+
+       /* Check for newer SMSC Super I/Os. */
        id = regval(port, DEVICE_ID_REG);
        rev = regval(port, DEVICE_REV_REG);
 
@@ -65,10 +152,11 @@ void probe_idregs_smsc(uint16_t port)
                return;
        }
 
-       printf("Found SMSC %s (id=0x%02x, rev=0x%02x) at port=0x%x\n",
-              get_superio_name(reg_table, id), id, rev, port);
+       printf("Found %s %s (id=0x%02x, rev=0x%02x) at port=0x%x\n",
+              (id == 0x77 ? "ASUS" : "SMSC"), get_superio_name(reg_table, id),
+              id, rev, port);
 
-       dump_superio("SMSC", reg_table, port, id);
+       dump_superio((id == 0x77 ? "ASUS" : "SMSC"), reg_table, port, id);
        dump_superio_readable(port); /* TODO */
 
        exit_conf_mode_smsc(port);
index 493c841058c1fee059217ff9a914695070b8b331..f7b4409439815f209f207a445d65e2a36034e6fb 100644 (file)
@@ -52,7 +52,7 @@ and print its vendor, name, ID, version, and config port.\n"
 #define LDNSIZE                (MAXLDN + 3)    /* Biggest LDN + 0 + NOLDN + EOT */
 #define MAXNUMIDX      70              /* Maximum number of indexes */
 #define IDXSIZE        (MAXNUMIDX + 1)
-#define MAXNUMPORTS    (2 + 1)         /* Maximum number of Super I/O ports */
+#define MAXNUMPORTS    (4 + 1)         /* Maximum number of Super I/O ports */
 
 /* Command line parameters. */
 extern int dump, dump_readable, verbose;
@@ -101,11 +101,11 @@ const static struct {
        void (*probe_idregs) (uint16_t port);
        int ports[MAXNUMPORTS]; /* Signed, as we need EOT. */
 } superio_ports_table[] = {
-       {probe_idregs_simple,   {0x2e,  0x4e,   EOT}},
-       {probe_idregs_fintek,   {0x2e,  0x4e,   EOT}},
-       {probe_idregs_ite,      {0x2e,  0x4e,   EOT}},
-       {probe_idregs_smsc,     {0x3f0, 0x370,  EOT}},
-       {probe_idregs_winbond,  {0x2e,  0x4e,   EOT}},
+       {probe_idregs_simple,   {0x2e, 0x4e, EOT}},
+       {probe_idregs_fintek,   {0x2e, 0x4e, EOT}},
+       {probe_idregs_ite,      {0x2e, 0x4e, EOT}},
+       {probe_idregs_smsc,     {0x2e, 0x4e, 0x3f0, 0x370, EOT}},
+       {probe_idregs_winbond,  {0x2e, 0x4e, EOT}},
 };
 
 #endif