Add dump support for NSC PC87317.
[coreboot.git] / util / superiotool / nsc.c
index 121814c7f7b97a3f8a3697dcbfa71a8aec50d2da..9b87aa01a7f0e698b45d54bdbd66850782b2b17e 100644 (file)
 #define CHIP_REV_REG   0x27    /* Super I/O revision ID (SRID) */
 
 static const struct superio_registers reg_table[] = {
-       {0xd0, "PC87371", {     /* From sensors-detect */
+       {0xcf, "PC97307", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x27,EOT},
+                       {0xcf,MISC,MISC,0x00,0x00,NANA,EOT}},
+               {0x0, "Keyboard",
+                       {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,
+                        0xf0,EOT},
+                       {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,
+                        0x40,EOT}},
+               {0x1, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x2, "Real-time clock (RTC), advanced power control (APC)",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}},
+               {0x3, "Floppy",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,
+                        EOT},
+                       {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00,
+                        EOT}},
+               {0x4, "Parallel port",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}},
+               {0x5, "COM2 / IR",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x6, "COM1",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {0x8, "Power management",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
                {EOT}}},
-       {0xdf, "PC97371", {     /* From sensors-detect */
+       {0xd0, "PC87317", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x25,EOT},
+                       {0xd0,MISC,MISC,0x00,0x00,0x00,EOT}},
+               {0x0, "Keyboard",
+                       {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,
+                        0xf0,EOT},
+                       {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,
+                        0x40,EOT}},
+               {0x1, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x2, "Real-time clock (RTC), advanced power control (APC)",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}},
+               {0x3, "Floppy",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,
+                        EOT},
+                       {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00,
+                        EOT}},
+               {0x4, "Parallel port",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}},
+               {0x5, "COM2 / IR",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x6, "COM1",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {0x8, "Power management",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {EOT}}},
+       {0xdf, "PC97317", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x25,0x27,EOT},
+                       {0xdf,MISC,MISC,0x00,0x00,0x00,NANA,EOT}},
+               {0x0, "Keyboard",
+                       {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,
+                        0xf0,EOT},
+                       {MISC,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,
+                        0x40,EOT}},
+               {0x1, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x2, "Real-time clock (RTC), advanced power control (APC)",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {MISC,0x00,0x00,0x70,0x08,0x00,0x04,0x04,EOT}},
+               {0x3, "Floppy",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,
+                        EOT},
+                       {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00,
+                        EOT}},
+               {0x4, "Parallel port",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}},
+               {0x5, "COM2 / IR",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x6, "COM1",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {0x8, "Power management",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {EOT}}},
+       {0xe0, "PC87309", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x27,0x2e,EOT},
+                       {0xe0,MISC,0x00,NANA,RSVD,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,
+                        EOT},
+                       {MISC,0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x20,0x00,
+                        EOT}},
+               {0x1, "Parallel port",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0x78,0x07,0x00,0x04,0x04,0xf2,EOT}},
+               {0x2, "COM2 / IR",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x3, "COM1",
+                       {0x30,0x31,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x4, "Power management",
+                       {0x30,0x31,0x60,0x61,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x04,0x04,EOT}},
+               {0x5, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x6, "Keyboard",
+                       {0x30,0x31,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,
+                        0xf0,EOT},
+                       {0x01,0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,
+                        0x40,EOT}},
                {EOT}}},
        {0xe1, "PC87360", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2a,
+                        0x2b,0x2c,0x2d,0x2e,EOT},
+                       {0xe1,0x11,0x00,0x03,0x00,0x00,0x00,NANA,0x00,MISC,
+                        0x00,0x00,0x00,RSVD,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT},
+                       {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}},
+               {0x1, "Parallel port",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}},
+               {0x2, "COM2",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x3, "COM1",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x4, "System wake-up control (SWC)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
+               {0x5, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x6, "Keyboard",
+                       {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0,
+                        EOT},
+                       {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40,
+                        EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
+                        EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00,
+                        EOT}},
+               {0x8, "ACCESS.bus (ACB)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}},
+               {0x9, "Fan speed control and monitor (FSCM)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}},
+               {0xa, "Watchdog timer",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}},
                {EOT}}},
        {0xe2, "PC87351", {
                {NOLDN, NULL,
@@ -72,6 +248,62 @@ static const struct superio_registers reg_table[] = {
        {0xe8, "PC87363", {
                {EOT}}},
        {0xe9, "PC87366", {
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x25,0x27,0x28,0x2a,0x2b,
+                        0x2c,0x2d,0x2e,EOT},
+                       {0xe9,0x11,0x00,0x03,0x00,0x00,NANA,0x00,MISC,MISC,
+                        0x00,MISC,RSVD,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT},
+                       {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}},
+               {0x1, "Parallel port",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}},
+               {0x2, "COM2",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x3, "COM1",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x4, "System wake-up control (SWC)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
+               {0x5, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x6, "Keyboard",
+                       {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0,
+                        EOT},
+                       {0x01,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40,
+                        EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
+                        EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00,
+                        EOT}},
+               {0x8, "ACCESS.bus (ACB)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,EOT}},
+               {0x9, "Fan speed control and monitor (FSCM)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
+                        EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,0x00,0x00,
+                        EOT}},
+               {0xa, "Watchdog timer (WDT)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x02,EOT}},
+               {0xb, "Game port",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0x00,0x00,0x03,0x04,0x04,0x00,EOT}},
+               {0xc, "MIDI port",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x03,0x30,0x00,0x03,0x04,0x04,0x00,EOT}},
+               {0xd, "Voltage level monitor (VLM)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
+               {0xe, "Temperature sensor (TMS)",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,EOT}},
                {EOT}}},
 
        /* SID[7..0]: family, SRID[7..5]: ID, SRID[4..0]: rev. */
@@ -82,6 +314,53 @@ static const struct superio_registers reg_table[] = {
                {EOT}}},
        {0xee, "PC8741x", {
                /* SRID[7..5] is marked as "not applicable for the PC8741x". */
+               {NOLDN, NULL,
+                       {0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
+                        0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,EOT},
+                       {0xee,0x11,0x20,MISC,MISC,MISC,0x00,NANA,0x00,MISC,
+                        0x00,RSVD,RSVD,RSVD,RSVD,RSVD,EOT}},
+               {0x0, "Floppy",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,EOT},
+                       {0x00,0x03,0xf2,0x06,0x03,0x02,0x04,0x24,0x00,EOT}},
+               {0x1, "Parallel port",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0x78,0x07,0x02,0x04,0x04,0xf2,EOT}},
+               {0x2, "COM2",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x02,0xf8,0x03,0x03,0x04,0x04,0x02,EOT}},
+               {0x3, "COM1",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,EOT},
+                       {0x00,0x03,0xf8,0x04,0x03,0x04,0x04,0x02,EOT}},
+               {0x4, "System wake-up control (SWC)",
+                       {0x30,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x70,
+                        0x71,0x74,0x75,EOT},
+                       {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+                        0x03,0x04,0x04,EOT}},
+               {0x5, "Mouse",
+                       {0x30,0x70,0x71,0x74,0x75,EOT},
+                       {0x00,0x0c,0x02,0x04,0x04,EOT}},
+               {0x6, "Keyboard",
+                       {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0,
+                        EOT},
+                       {0x00,0x00,0x60,0x00,0x64,0x01,0x02,0x04,0x04,0x40,
+                        EOT}},
+               {0x7, "GPIO",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
+                        0xf3,EOT},
+                       {0x00,0x00,0x00,0x00,0x03,0x04,0x04,0x00,MISC,0x01,
+                        0x00,EOT}},
+               {0xf, "X-Bus",
+                       {0x30,0x60,0x61,0x70,0x71,0x74,0x75,0xf0,0xf1,0xf2,
+                        0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,
+                        EOT},
+                       {0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x00,0x00,0x00,
+                        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+                        EOT}},
+               {0x10, "Real-time clock (RTC)",
+                       {0x30,0x60,0x61,0x62,0x63,0x70,0x71,0x74,0x75,0xf0,
+                        0xf1,0xf2,0xf3,EOT},
+                       {0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x04,0x04,0x00,
+                        0x00,0x00,0x00,EOT}},
                {EOT}}},
        {0xf0, "PC87372", {
                {EOT}}},