I would like to add my Nuvoton NCT6797D superio chip to the coreboot utility superiotool. With the help of several nice folks on the freenode #coreboot irc channel, I have modified my local superiotool and it works well. I have never made a commit to Gerrit, but I have established Gerrit & Github accounts. I see the page to start a change request at: https://review.coreboot.org/dashboard/self However, I am not so sure of myself yet, so I'm writing to get advice. Feel free to respond , even if all you have to say is that it's not my place to propose a patch. Here are the details:
coreboot/util/superiotool: Add Nuvoton NCT6797D to coreboot/util/superiotool/nuvoton.c
# diff -u a/nuvoton.c b/nuvoton.c --- a/nuvoton.c 2020-12-27 22:31:01.116775121 -0600 +++ b/nuvoton.c 2020-12-27 22:31:55.900532400 -0600 @@ -567,6 +567,56 @@ {0x30,0xe0,0xe1,0xe2,0xe3,EOT}, {0x20,0x20,0x04,0x05,0x01,EOT}}, {EOT}}}, + {0xD451, "NCT6797D", { + {NOLDN, NULL, + {0x07,0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x20,0x21,0x22,0x24,0x25,0x26,0x27,0x28,0x2a,0x2b,0x2c,0x2d,0x2f,EOT}, + {0x00,0xff,0xff,0x00,0x00,0x30,0x70,0x10,0x00,0xc8,0x03,0xff,0x04,0x00,MISC,0x00,0x00,0xc0,0x00,0x01,0x00,MISC,EOT}}, + {0x01, "Parallel Port", + {0x30,0x60,0x61,0x70,0x74,0xf0,EOT}, + {0x01,0x03,0x78,0x07,0x04,0x3f,EOT}}, + {0x02, "UART A", + {0x30,0x60,0x61,0x70,0xf0,0xf2,EOT}, + {0x01,0x03,0xf8,0x04,0x00,0x00,EOT}}, + {0x03, "UART B, IR", + {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,EOT}, + {0x01,0x02,0xf8,0x03,0x00,0x00,0x00,EOT}}, + {0x05, "Keyboard Controller", + {0x30,0x60,0x61,0x62,0x63,0x70,0x72,0xf0,EOT}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,EOT}}, + {0x06, "Consumer IR", + {0x30,0x60,0x61,0x70,0xf0,0xf1,0xf2,0xf3,EOT}, + {0x00,0x00,0x00,0x00,0x08,0x09,0x32,0x00,EOT}}, + {0x07, "GPIO 6, GPIO 7, GPIO 8", + {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xec,0xed,0xf4,0xf5,0xf6,0xf7,0xf8,EOT}, + {0x00,0x7f,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,EOT}}, + {0x08, "WDT1, WDT_MEM, GPIO 0, GPIO 1", + {0x30,0x60,0x61,0xe0,0xe1,0xe2,0xe3,0xe4,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfe,0xff,EOT}, + {0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,EOT}}, + {0x09, "GPIO 2, GPIO 3, GPIO 4, GPIO 5", + {0x30,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xee,0xf0,0xf1,0xf2,0xf4,0xf5,0xf6,0xf7,0xfe,EOT}, + {0x00,0xff,0x00,0x00,0x00,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x00,0x00,0xff,0x00,0x00,0x00,0x00,EOT}}, + {0x0a, "ACPI", + {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xec,0xed,0xee,0xf0,0xf2,0xf3,0xf4,0xf6,0xf7,0xfc,0xfe,EOT}, + {0x01,0x00,0x00,0x00,0x00,0x02,0x1a,0x00,0x00,0x00,0x00,0x00,0x10,0x5c,0x00,0x00,0x00,0xc0,0x00,0x00,EOT}}, + {0x0b, "Hardware Monitor, Front Panel LED", + {0x30,0x60,0x61,0x62,0x63,0x70,0xe0,0xe1,0xe2,0xe3,0xe4,0xe6,0xe7,0xf0,0xf1,0xf2,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,EOT}, + {0x00,0x00,0x00,0x00,0x00,0x00,0x7f,0x7f,0xff,0xff,0xff,0x08,0xff,0x00,0x00,0x00,0x10,0x00,0x87,0x47,0x00,0x00,0x00,EOT}}, + {0x0d, "BCLK, WDT2, WDT_MEM", + {0xe0,0xe1,0xe7,0xe8,0xeb,0xed,0xf0,0xf3,EOT}, + {0x00,MISC,0x00,0x32,0x14,0x00,0x00,0x00,EOT}}, + {0x0e, "CIR Wake-Up", + {0x30,0x60,0x61,0x70,EOT}, + {0x00,0x00,0x00,0x00,EOT}}, + {0x0f, "GPIO Push-Pull or Open-Drain selection", + {0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe9,0xf0,0xf1,0xf2,EOT}, + {0xff,0xff,0x7f,0xff,0xff,0xff,0x0f,0xff,0xff,0x9d,0x00,0x00,EOT}}, + {0x14, "Port 80 UART", + {0xe0,0xe1,0xe2,0xe3,0xe4,EOT}, + {0x80,0x00,0x00,0x10,0x00,EOT}}, + {0x16, "Deep Sleep", + {0x30,0xe0,0xe1,0xe2,0xe3,EOT}, + {0x20,0x20,0x04,0x05,0x01,EOT}}, + {EOT}}}, {0xd121, "NCT5539D", { {NOLDN, NULL, {0x10,0x11,0x13,0x14,0x1a,0x1b,0x1c,0x1d,0x22,0x24,
root@MSI-7C37:~/coreboot/util/superiotool# superiotool -d superiotool r4.13-726-g7e3126dbc5 Found Nuvoton NCT6797D (id=0xd451) at 0x4e Register dump: idx 07 10 11 13 14 1a 1b 1c 1d 20 21 22 24 25 26 27 28 2a 2b 2c 2d 2f val 0b ff ff ff ff 72 80 10 10 d4 51 ff 00 00 40 00 00 58 00 01 00 02 def 00 ff ff 00 00 30 70 10 00 c8 03 ff 04 00 MM 00 00 c0 00 01 00 MM LDN 0x01 (Parallel Port) idx 30 60 61 70 74 f0 val 00 03 78 07 04 3f def 01 03 78 07 04 3f LDN 0x02 (UART A) idx 30 60 61 70 f0 f2 val 01 03 f8 04 00 00 def 01 03 f8 04 00 00 LDN 0x03 (UART B, IR) idx 30 60 61 70 f0 f1 f2 val 01 02 f8 03 00 00 00 def 01 02 f8 03 00 00 00 LDN 0x05 (Keyboard Controller) idx 30 60 61 62 63 70 72 f0 val 01 00 60 00 64 01 0c 83 def 00 00 00 00 00 00 00 83 LDN 0x06 (Consumer IR) idx 30 60 61 70 f0 f1 f2 f3 val 00 00 00 00 ff ff ff ff def 00 00 00 00 08 09 32 00 LDN 0x07 (GPIO 6, GPIO 7, GPIO 8) idx 30 e0 e1 e2 e3 e4 e5 e6 e7 ec ed f4 f5 f6 f7 f8 val 02 ff 00 00 00 ff ff ff ff 00 ff ff ff ff ff ff def 00 7f 00 00 00 ff 00 00 00 00 00 ff 00 00 00 00 LDN 0x08 (WDT1, WDT_MEM, GPIO 0, GPIO 1) idx 30 60 61 e0 e1 e2 e3 e4 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fe ff val 01 0a 10 ff ff ff ff ff ff ff ff ff ff 00 00 00 ff 00 ff 00 00 def 00 00 00 ff 00 00 00 00 ff 00 00 00 00 00 00 00 00 00 00 00 00 LDN 0x09 (GPIO 2, GPIO 3, GPIO 4, GPIO 5) idx 30 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ee f0 f1 f2 f4 f5 f6 f7 fe val 0f 4f 90 00 00 fa 76 00 00 20 00 01 01 80 3f f0 00 fe e4 00 01 ff def 00 ff 00 00 00 7f 00 00 00 00 00 00 00 00 ff 00 00 ff 00 00 00 00 LDN 0x0a (ACPI) idx e0 e1 e2 e3 e4 e5 e6 e7 e9 ec ed ee f0 f2 f3 f4 f6 f7 fc fe val 01 00 00 04 00 02 9a 00 00 81 01 00 10 5f 00 00 00 c0 a0 00 def 01 00 00 00 00 02 1a 00 00 00 00 00 10 5c 00 00 00 c0 00 00 LDN 0x0b (Hardware Monitor, Front Panel LED) idx 30 60 61 62 63 70 e0 e1 e2 e3 e4 e6 e7 f0 f1 f2 f5 f6 f7 f8 f9 fa fb val 01 0a 20 0a 40 00 7f 7f 7f 7f 7f 00 7f 00 00 00 00 00 87 47 00 00 ff def 00 00 00 00 00 00 7f 7f ff ff ff 08 ff 00 00 00 10 00 87 47 00 00 00 LDN 0x0d (BCLK, WDT2, WDT_MEM) idx e0 e1 e7 e8 eb ed f0 f3 val 00 20 10 00 00 00 00 00 def 00 MM 00 32 14 00 00 00 LDN 0x0e (CIR Wake-Up) idx 30 60 61 70 val 00 00 00 00 def 00 00 00 00 LDN 0x0f (GPIO Push-Pull or Open-Drain selection) idx e0 e1 e2 e3 e4 e5 e6 e7 e9 f0 f1 f2 val f6 cf ff 7f ff ff ff ff ff 9d 04 00 def ff ff 7f ff ff ff 0f ff ff 9d 00 00 LDN 0x14 (Port 80 UART) idx e0 e1 e2 e3 e4 val 80 00 00 10 aa def 80 00 00 10 00 LDN 0x16 (Deep Sleep) idx 30 e0 e1 e2 e3 val a0 20 04 05 01 def 20 20 04 05 01 root@MSI-7C37:~/coreboot/util/superiotool#
Thanks, Clay Daniels Boot_Dawg on freenode irc channels #coreboot & #flashrom