Patchwork superiotool: Add support to IT85xx series

login
register
about
Submitter Антон Кочков
Date 2010-06-08 08:55:00
Message ID <AANLkTinSlmXnUSbc1NEzXkJhJ_HqO-cIg6y2U6T5hLq7@mail.gmail.com>
Download mbox | patch
Permalink /patch/1487/
State Accepted, archived
Headers show

Comments

Антон Кочков - 2010-06-08 08:55:00
Add support to IT85xx series
Signed-off-by: Anton Kochkov <anton.kochkov@gmail.com>
---
Stefan Reinauer - 2010-06-09 22:37:10
On 6/8/10 10:55 AM, Антон Кочков wrote:
> +static void enter_conf_mode_ite_it8502e(uint16_t port)
> +{
> +	OUTB(0x85, port);
> +	OUTB(0x02, port);
> +	OUTB(0x55, port);
> +	OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
> +}
> +
>   
This one looks kind of weird... Do you have a datasheet somewhere?

Why's the second value different for entering configuration mode
depending on the port?


Stefan

Patch

Index: ite.c
===================================================================
--- ite.c	(revision 5622)
+++ ite.c	(working copy)
@@ -29,11 +29,110 @@ 
 static const struct superio_registers reg_table[] = {
 	{0x8228, "IT8228E", {
 		{EOT}}},
+        {0x8502, "IT8502E/TE/G", {
+                {NOLDN, NULL,
+			{0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
+			 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
+			{0x85,0x02,0x71,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
+			 NANA,NANA,NANA,0x00,NANA,EOT}},
+                {0x1, "UART1",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x00,0x03,0xf8,0x00,0x00,0x04,0x02,0x00,EOT}},
+                {0x4, "System Wake-Up",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,EOT}},
+                {0x5, "Mouse",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x01,0x00,0x00,0x00,0x00,0x0C,0x01,NANA,EOT}},
+                {0x6, "Keyboard",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x01,0x00,0x60,0x00,0x64,0x01,0x01,NANA,EOT}},
+                {0xf, "Shared Memory/Flash",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
+                        0xf6,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+                        0x00,EOT}},
+                {0x10, "BRAM",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4,
+                        0xf5,EOT},
+			{0x00,0x00,0x70,0x00,0x72,0x08,0x01,NANA,NANA,
+                        NANA,EOT}},
+                {0x11, "Power Channel 1",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+
+                        {0x00,0x00,0x62,0x00,0x66,0x01,0x01,EOT}},
+                {0x12, "Power Channel 2",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x68,0x00,0x6c,0x01,0x01,EOT}},
+                {0x17, "Power Channel 3",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x6a,0x00,0x6e,0x01,0x01,EOT}},
+		{EOT}}},
 	{0x8510, "IT8510E/TE/G", {
 		{EOT}}},
 	{0x8511, "IT8511E/TE/G", {
+                {NOLDN, NULL,
+			{0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
+			 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
+			{0x85,0x11,0x10,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
+			 NANA,NANA,NANA,0x00,NANA,EOT}},
+                {0x4, "System Wake-Up",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,EOT}},
+                {0x5, "Mouse",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x01,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}},
+                {0x6, "Keyboard",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x01,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}},
+                {0xf, "Shared Memory/Flash",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
+                        0xf6,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+                        0x00,EOT}},
+                {0x10, "Real-Time Clock",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,0xf1,
+                        0xf2,0xf3,0xf4,0xf5,EOT},
+			{0x00,0x00,0x70,0x00,0x72,0x08,0x00,0x00,0x49,
+                        0x4A,NANA,NANA,NANA,EOT}},
+                {0x11, "Power Channel 1",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}},
+                {0x12, "Power Channel 2",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}},
 		{EOT}}},
 	{0x8512, "IT8512E/F/G", {
+                {NOLDN, NULL,
+			{0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,
+			 0x2A,0x2B,0x2C,0x2D,0x2E,EOT},
+			{0x85,0x12,0x22,0x01,NANA,0x00,0x00,NANA,NANA,NANA,
+			 NANA,NANA,NANA,0x00,NANA,EOT}},
+                {0x4, "System Wake-Up",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x03,EOT}},
+                {0x5, "Mouse",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x0C,0x03,NANA,EOT}},
+                {0x6, "Keyboard",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf0,EOT},
+			{0x00,0x00,0x60,0x00,0x64,0x01,0x03,NANA,EOT}},
+                {0xf, "Shared Memory/Flash",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf4,0xf5,
+                        0xf6,EOT},
+			{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+                        0x00,EOT}},
+                {0x10, "BRAM",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,0xf3,0xf4,
+                        0xf5,EOT},
+			{0x00,0x00,0x70,0x00,0x72,0x08,0x00,NANA,NANA,
+                        NANA,EOT}},
+                {0x11, "Power Channel 1",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x62,0x00,0x66,0x01,0x03,EOT}},
+                {0x12, "Power Channel 2",
+			{0x30,0x60,0x61,0x62,0x63,0x70,0x71,EOT},
+			{0x00,0x00,0x68,0x00,0x6c,0x01,0x03,EOT}},
 		{EOT}}},
 	{0x8513, "IT8513E/F/G", {
 		{EOT}}},
@@ -582,6 +681,14 @@ 
 	OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
 }
 
+static void enter_conf_mode_ite_it8502e(uint16_t port)
+{
+	OUTB(0x85, port);
+	OUTB(0x02, port);
+	OUTB(0x55, port);
+	OUTB((port == 0x2e) ? 0x55 : 0xaa, port);
+}
+
 static void enter_conf_mode_ite_it8761e(uint16_t port)
 {
 	OUTB(0x87, port);
@@ -655,6 +762,10 @@ 
 		probe_idregs_ite_helper("(init=standard) ", port);
 		exit_conf_mode_ite(port);
 
+                enter_conf_mode_ite_it8502e(port);
+		probe_idregs_ite_helper("(init=it8502e) ", port);
+		exit_conf_mode_ite(port);
+
 		enter_conf_mode_ite_it8761e(port);
 		probe_idregs_ite_helper("(init=it8761e) ", port);
 		exit_conf_mode_ite(port);