On Wed, Dec 12, 2012 at 7:45 AM, Jean Delvare <khali@xxxxxxxxxxxx> wrote:
After applying the patch you sent cpu0_vid reads as 1550. Thanks much, that was very helpful.
Hopefully here is an updated patch ready to add IT8603E support in the it87 driver. There is one question maybe still worth asking, namely: temp3_input - should this be disabled because the chip only has 2 analog temperature inputs?
Is the SST/PECI/AMDSTI/PCH SM-Link read using temp3_input? Otherwise I assume it is outside the scope of the it87 driver?
* * * * *
Add experimental support for the it8603e chip (Asus f2a85-m motherboard)
Write only tested for pwmN and pwmN_enable.
Read tested, but the following appear broken:
alarms
fanN_alarm
inN_alarm
inN_max
inN_min
intrusionN_alarm
pwmN_auto_channels_temp
pwmN_freq
temp3_input (there is no 3rd analog temp input to the chip)
--- a/drivers/hwmon/it87.c 2012-12-10 02:51:13.680000001 -0700
+++ b/drivers/hwmon/it87.c 2012-12-13 08:42:54.195515406 -0700
@@ -21,10 +21,12 @@
* IT8758E Super I/O chip w/LPC interface
* IT8782F Super I/O chip w/LPC interface
* IT8783E/F Super I/O chip w/LPC interface
+ * IT8603E Super I/O chip w/LPC interface
* Sis950 A clone of the IT8705F
*
* Copyright (C) 2001 Chris Gauthron
* Copyright (C) 2005-2010 Jean Delvare <khali@xxxxxxxxxxxx>
+ * Copyright (C) 2012 David Hubbard <david.c.hubbard@xxxxxxxxx>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,7 +64,7 @@
#define DRVNAME "it87"
enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8782,
- it8783 };
+ it8783, it8603 };
static unsigned short force_id;
module_param(force_id, ushort, 0);
@@ -142,6 +144,7 @@
#define IT8728F_DEVID 0x8728
#define IT8782F_DEVID 0x8782
#define IT8783E_DEVID 0x8783
+#define IT8603E_DEVID 0x8603
#define IT87_ACT_REG 0x30
#define IT87_BASE_REG 0x60
@@ -303,7 +306,8 @@
* on selected inputs.
*/
return data->type == it8721
- || data->type == it8728;
+ || data->type == it8728
+ || data->type == it8603;
}
static inline int has_newer_autopwm(const struct it87_data *data)
@@ -313,7 +317,8 @@
* mapping and the manual duty cycle.
*/
return data->type == it8721
- || data->type == it8728;
+ || data->type == it8728
+ || data->type == it8603;
}
static int adc_lsb(const struct it87_data *data, int nr)
@@ -413,7 +418,8 @@
|| data->type == it8721
|| data->type == it8728
|| data->type == it8782
- || data->type == it8783;
+ || data->type == it8783
+ || data->type == it8603;
}
static inline int has_old_autopwm(const struct it87_data *data)
@@ -1707,6 +1713,9 @@
case IT8783E_DEVID:
sio_data->type = it8783;
break;
+ case IT8603E_DEVID:
+ sio_data->type = it8603;
+ break;
case 0xffff: /* No device at all */
goto exit;
default:
@@ -1728,8 +1737,8 @@
err = 0;
sio_data->revision = superio_inb(DEVREV) & 0x0f;
- pr_info("Found IT%04xF chip at 0x%x, revision %d\n",
- chip_type, *address, sio_data->revision);
+ pr_info("Found IT%04x%c chip at 0x%x, revision %d\n",
+ chip_type, (chip_type == 0x8603) ? 'E' : 'F', *address, sio_data->revision);
/* in8 (Vbat) is always internal */
sio_data->internal = (1 << 2);
@@ -1986,6 +1995,7 @@
"it8728",
"it8782",
"it8783",
+ "it8603",
};
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
> >> + * at all, not sure about the IT8728F or IT8603E> >> + * (IT8603E - "hwmon_vid: Unknown VRM version of your x86 CPU"We do not support any VID decoding since family 10h CPUs for AMD:
> >> + * and cpu0_vid reads as 0)
> >
> > This has nothing to do with the IT8603E but only with your CPU. Which
> > kernel version are you running, and can we see (one entry in)
> > your /proc/cpuinfo?
> $ cat /proc/cpuinfo
> processor : 0
> vendor_id : AuthenticAMD
> cpu family : 21
> model : 16
> model name : AMD A10-5800K APU with Radeon(tm) HD Graphics
> stepping : 1
{X86_VENDOR_AMD, 0x10, 0x0, ANY, ANY, 25}, /* NPT family 10h */
Starting with family 11h CPUs, AMD has given up on parallel VID in
favor of serial VID which uses only 2 pins. I know that the IT8720F has
support for this, but I did not find any trace in other ITE datasheets.
The serial VID uses 7-bit codes which are incompatible with the
previous 6-bit parallel VID codes used by family 10h CPUs. BTW the
family 10h CPUs already supported serial VID, and I have no idea how to
support that properly as hwmon-vid has no idea whether the code came
from the serial or parallel VID interface.
The following should at least get rid of the warning in the kernel logs:
* * * * *
Since family 11h processors, AMD is exclusively using 7-bit VID codes
transmitted using a serial protocol over two pins (clock and data.)
Signed-off-by: Jean Delvare <khali@xxxxxxxxxxxx>
---
drivers/hwmon/hwmon-vid.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- linux-3.7-rc8.orig/drivers/hwmon/hwmon-vid.c 2012-10-20 21:11:32.000000000 +0200
+++ linux-3.7-rc8/drivers/hwmon/hwmon-vid.c 2012-12-12 15:36:36.309882929 +0100
@@ -115,6 +115,12 @@ int vid_from_reg(int val, u8 vrm)
return (val < 32) ? 1550 - 25 * val
: 775 - (25 * (val - 31)) / 2;
+ case 26: /* AMD family 10h to 15h, serial VID */
+ val &= 0x7f;
+ if (val >= 0x7c)
+ return 0;
+ return DIV_ROUND_CLOSEST(15500 - 125 * val, 10);
+
case 91: /* VRM 9.1 */
case 90: /* VRM 9.0 */
val &= 0x1f;
@@ -195,6 +201,10 @@ static struct vrm_model vrm_models[] = {
{X86_VENDOR_AMD, 0xF, 0x40, 0x7F, ANY, 24}, /* NPT family 0Fh */
{X86_VENDOR_AMD, 0xF, 0x80, ANY, ANY, 25}, /* future fam. 0Fh */
{X86_VENDOR_AMD, 0x10, 0x0, ANY, ANY, 25}, /* NPT family 10h */
+ {X86_VENDOR_AMD, 0x11, 0x0, ANY, ANY, 26}, /* family 11h */
+ {X86_VENDOR_AMD, 0x12, 0x0, ANY, ANY, 26}, /* family 12h */
+ {X86_VENDOR_AMD, 0x14, 0x0, ANY, ANY, 26}, /* family 14h */
+ {X86_VENDOR_AMD, 0x15, 0x0, ANY, ANY, 26}, /* family 15h */
{X86_VENDOR_INTEL, 0x6, 0x0, 0x6, ANY, 82}, /* Pentium Pro,
* Pentium II, Xeon,
Also available as a standalone driver at:
http://khali.linux-fr.org/devel/misc/hwmon-vid/
After applying the patch you sent cpu0_vid reads as 1550. Thanks much, that was very helpful.
Hopefully here is an updated patch ready to add IT8603E support in the it87 driver. There is one question maybe still worth asking, namely: temp3_input - should this be disabled because the chip only has 2 analog temperature inputs?
Is the SST/PECI/AMDSTI/PCH SM-Link read using temp3_input? Otherwise I assume it is outside the scope of the it87 driver?
* * * * *
Add experimental support for the it8603e chip (Asus f2a85-m motherboard)
Write only tested for pwmN and pwmN_enable.
Read tested, but the following appear broken:
alarms
fanN_alarm
inN_alarm
inN_max
inN_min
intrusionN_alarm
pwmN_auto_channels_temp
pwmN_freq
temp3_input (there is no 3rd analog temp input to the chip)
--- a/drivers/hwmon/it87.c 2012-12-10 02:51:13.680000001 -0700
+++ b/drivers/hwmon/it87.c 2012-12-13 08:42:54.195515406 -0700
@@ -21,10 +21,12 @@
* IT8758E Super I/O chip w/LPC interface
* IT8782F Super I/O chip w/LPC interface
* IT8783E/F Super I/O chip w/LPC interface
+ * IT8603E Super I/O chip w/LPC interface
* Sis950 A clone of the IT8705F
*
* Copyright (C) 2001 Chris Gauthron
* Copyright (C) 2005-2010 Jean Delvare <khali@xxxxxxxxxxxx>
+ * Copyright (C) 2012 David Hubbard <david.c.hubbard@xxxxxxxxx>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -62,7 +64,7 @@
#define DRVNAME "it87"
enum chips { it87, it8712, it8716, it8718, it8720, it8721, it8728, it8782,
- it8783 };
+ it8783, it8603 };
static unsigned short force_id;
module_param(force_id, ushort, 0);
@@ -142,6 +144,7 @@
#define IT8728F_DEVID 0x8728
#define IT8782F_DEVID 0x8782
#define IT8783E_DEVID 0x8783
+#define IT8603E_DEVID 0x8603
#define IT87_ACT_REG 0x30
#define IT87_BASE_REG 0x60
@@ -303,7 +306,8 @@
* on selected inputs.
*/
return data->type == it8721
- || data->type == it8728;
+ || data->type == it8728
+ || data->type == it8603;
}
static inline int has_newer_autopwm(const struct it87_data *data)
@@ -313,7 +317,8 @@
* mapping and the manual duty cycle.
*/
return data->type == it8721
- || data->type == it8728;
+ || data->type == it8728
+ || data->type == it8603;
}
static int adc_lsb(const struct it87_data *data, int nr)
@@ -413,7 +418,8 @@
|| data->type == it8721
|| data->type == it8728
|| data->type == it8782
- || data->type == it8783;
+ || data->type == it8783
+ || data->type == it8603;
}
static inline int has_old_autopwm(const struct it87_data *data)
@@ -1707,6 +1713,9 @@
case IT8783E_DEVID:
sio_data->type = it8783;
break;
+ case IT8603E_DEVID:
+ sio_data->type = it8603;
+ break;
case 0xffff: /* No device at all */
goto exit;
default:
@@ -1728,8 +1737,8 @@
err = 0;
sio_data->revision = superio_inb(DEVREV) & 0x0f;
- pr_info("Found IT%04xF chip at 0x%x, revision %d\n",
- chip_type, *address, sio_data->revision);
+ pr_info("Found IT%04x%c chip at 0x%x, revision %d\n",
+ chip_type, (chip_type == 0x8603) ? 'E' : 'F', *address, sio_data->revision);
/* in8 (Vbat) is always internal */
sio_data->internal = (1 << 2);
@@ -1986,6 +1995,7 @@
"it8728",
"it8782",
"it8783",
+ "it8603",
};
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
_______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors