hwmon: (it87) Add support for AMDTSI, and restrict sensor type configuration
Subsystems (3)
Guenter Roeck
maintainerPATCH v2 1/1 hwmon: (it87) Add support for AMDTSI, and restrict sensor type configuration
Add support to detect and report AMDTSI temperature sensor types. Only enable PECI and AMDTSI sensor selection if the chip is configured for it.
---
Applies on top of the previously submitted patches. Only tested with IT8728F and Intel CPU.
v2: Add AMDTSI support to IT8728F.
drivers/hwmon/it87.c | 68 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-)
drivers/hwmon/it87.c +61 -6
@@ -228,6 +228,8 @@ static const u8 IT87_REG_TEMP_OFFSET[] = { 0x56, 0x57, 0x59 };#define IT87_REG_AUTO_TEMP (nr, i) (0x60 + (nr) * 8 + (i))#define IT87_REG_AUTO_PWM (nr, i) (0x65 + (nr) * 8 + (i)) +#define IT87_REG_AMDTSI_HSR 0x98 +struct it87_devices {const char *name;u16 features;
@@ -331,6 +333,7 @@ struct it87_data {u16 features;u8 peci_mask;u8 old_peci_mask; +u8 ext_temp_type;/* external temperature sensor type (5 or 6) */ unsigned short addr;const char *name;
@@ -643,7 +646,7 @@ static ssize_t show_temp_type(struct device *dev, struct device_attribute *attr, if ((has_temp_peci(data, nr) && (reg >> 6 = nr + 1)) || (has_temp_old_peci (data, nr) && (extra &0x80 ))) -return sprintf (buf,"6\n" );/* Intel PECI */ +return sprintf (buf,"%u\n" , data->ext_temp_type);if (reg & (1 << nr))return sprintf (buf,"3\n" );/* thermal diode */ if (reg & (8 << nr))
@@ -667,24 +670,26 @@ static ssize_t set_temp_type(struct device *dev, struct device_attribute *attr, reg =it87_read_value (data,IT87_REG_TEMP_ENABLE ); reg &= ~(1 << nr); reg &= ~(8 << nr); - if (has_temp_peci(data, nr) && (reg >> 6 = nr + 1 || val = 6)) + if (has_temp_peci(data, nr) && (reg >> 6 = nr + 1 || + val = data->ext_temp_type)) reg &=0x3f ; extra =it87_read_value (data,IT87_REG_TEMP_EXTRA ); -if (has_temp_old_peci (data, nr) && ((extra &0x80 ) || val =6 )) +if (has_temp_old_peci (data, nr) && ((extra &0x80 ) || + val = data->ext_temp_type)) extra &=0x7f ;if (val =2 ) {/* backwards compatibility */ dev_warn (dev,"Sensor type 2 is deprecated, please use 4 instead\n" ); val =4 ; } -/* 3 = thermal diode; 4 = thermistor; 6 = Intel PECI; 0 = disabled */ +/* 3 = thermal diode; 4 = thermistor; 5/6 = AMDTSI/PECI; 0 = disabled */ if (val =3 ) reg |=1 << nr;else if (val =4 ) reg |=8 << nr; -else if (has_temp_peci (data, nr) && val =6 ) +else if (has_temp_peci (data, nr) && val = data->ext_temp_type) reg |= (nr +1 ) <<6 ; -else if (has_temp_old_peci (data, nr) && val =6 ) +else if (has_temp_old_peci (data, nr) && val = data->ext_temp_type) extra |=0x80 ;else if (val !=0 )return -EINVAL ;
@@ -1988,6 +1993,7 @@ static int __devinit it87_probe(struct platform_device *pdev)int err =0 , i;int enable_pwm_interface;int fan_beep_need_rw; +u8 reg; res =platform_get_resource (pdev,IORESOURCE_IO ,0 ); if (!devm_request_region(&pdev->dev, res->start, IT87_EC_EXTENT,
@@ -2030,6 +2036,56 @@ static int __devinit it87_probe(struct platform_device *pdev)break ; } +if (data->features &FEAT_TEMP_OLD_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x07 ) { +case 0x0 : +default : + data->features &+ ~(FEAT_TEMP_OLD_PECI |FEAT_TEMP_PECI ); +break ; +case 0x3 :/* PCH (IT8721F) */ +if (data->features &FEAT_TEMP_PECI ) { + data->features &= ~FEAT_TEMP_PECI ; + data->ext_temp_type =6 ; + }else { + data->features &= ~FEAT_TEMP_OLD_PECI ; + } +break ; +case 0x4 :/* AMDTSI */ + data->ext_temp_type =5 ; +break ; +case 0x5 :/* SST slave */ +case 0x6 :/* PECI */ +case 0x7 :/* SST host */ +if (data->features &FEAT_TEMP_PECI ) + data->features &= ~FEAT_TEMP_OLD_PECI ; + data->ext_temp_type =6 ; +break ; + } + }else if (data->features &FEAT_TEMP_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x03 ) { +case 0x0 :/* disabled */ +/* Check if AMDTSI is enabled */ +if (reg &0x40 ) { + reg =it87_read_value (data, +IT87_REG_AMDTSI_HSR ); +if (reg &0x40 ) { + data->ext_temp_type =5 ; +break ; + } + } + data->features &= ~FEAT_TEMP_PECI ; +break ; +case 0x1 :/* SST slave */ +case 0x2 :/* PECI */ +case 0x3 :/* SST host */ + data->ext_temp_type =6 ; +break ; + } + } +/* Now, we do the remaining detection. */ if ((it87_read_value (data,IT87_REG_CONFIG ) &0x80 ) ||it87_read_value (data,IT87_REG_CHIPID ) !=0x90 )
Signature · 7 lines
1.7.9.7 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for AMDTSI, and restrict sensor type configura
Quoted 49 lines · Guenter Roeck
Add support to detect and report AMDTSI temperature sensor types. Only enable PECI and AMDTSI sensor selection if the chip is configured for it.
Signed-off-by Guenter Roeck <[email protected]>---
Applies on top of the previously submitted patches. Only tested with IT8728F and Intel CPU.v2: Add AMDTSI support to IT8728F.
drivers/hwmon/it87.c | 68 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-)drivers/hwmon/it87.c +26
-0@@ -2030,6 +2036,56 @@ static int __devinit it87_probe(struct platform_device *pdev)break ; } +if (data->features &FEAT_TEMP_OLD_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x07 ) { +case 0x0 : +default : + data->features &> + ~(FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI); +break ; +case 0x3 :/* PCH (IT8721F) */ +if (data->features &FEAT_TEMP_PECI ) { + data->features &= ~FEAT_TEMP_PECI ; + data->ext_temp_type =6 ; + }else { + data->features &= ~FEAT_TEMP_OLD_PECI ; + } +break ; +case 0x4 :/* AMDTSI */ + data->ext_temp_type =5 ; +break ; +case 0x5 :/* SST slave */ +case 0x6 :/* PECI */ +case 0x7 :/* SST host */ +if (data->features &FEAT_TEMP_PECI ) + data->features &= ~FEAT_TEMP_OLD_PECI ; + data->ext_temp_type =6 ; +break ; + }
drivers/hwmon/it87.c static int __devinit it87_probe(struct platform_device *pdev) · line 2074
Quoted 10 lines
drivers/hwmon/it87.c +10
-0+ }else if (data->features &FEAT_TEMP_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x03 ) { +case 0x0 :/* disabled */ +/* Check if AMDTSI is enabled */ +if (reg &0x40 ) { + reg =it87_read_value (data, +IT87_REG_AMDTSI_HSR ); +if (reg &0x40 ) { + data->ext_temp_type =5 ;
I admit I don't quite get why ITE made these separate configuration bits when all it brings is the possibility to select a non-working combination...
I will also admit I'm kind of lost with the IT8728F. The datasheet suggests that the PCH temperature can be retrieved but there is no configuration bit to actually select it? Or if bit 6 of IT87_REG_VID supposed to do exactly that? And if so, where does the reading go?
BTW maybe we should come up with a different name for register 0x0A for newer chips, otherwise the code gets a little confusing. IT87_REG_IFSEL maybe?
Quoted 12 lines
drivers/hwmon/it87.c +12
-0+break ; + } + } + data->features &= ~FEAT_TEMP_PECI ; +break ; +case 0x1 :/* SST slave */ +case 0x2 :/* PECI */ +case 0x3 :/* SST host */ + data->ext_temp_type =6 ; +break ; + } + }
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
maintainerRe: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for AMDTSI, and restrict sensor type configura
In reply to Guenter RoeckQuoted 65 lines · Jean Delvare
Quoted 49 lines · Guenter Roeck
Add support to detect and report AMDTSI temperature sensor types. Only enable PECI and AMDTSI sensor selection if the chip is configured for it.
Signed-off-by Guenter Roeck <[email protected]>---
Applies on top of the previously submitted patches. Only tested with IT8728F and Intel CPU.v2: Add AMDTSI support to IT8728F.
drivers/hwmon/it87.c | 68 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 6 deletions(-)drivers/hwmon/it87.c +26
-0@@ -2030,6 +2036,56 @@ static int __devinit it87_probe(struct platform_device *pdev)break ; } +if (data->features &FEAT_TEMP_OLD_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x07 ) { +case 0x0 : +default : + data->features &> > + ~(FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI); +break ; +case 0x3 :/* PCH (IT8721F) */ +if (data->features &FEAT_TEMP_PECI ) { + data->features &= ~FEAT_TEMP_PECI ; + data->ext_temp_type =6 ; + }else { + data->features &= ~FEAT_TEMP_OLD_PECI ; + } +break ; +case 0x4 :/* AMDTSI */ + data->ext_temp_type =5 ; +break ; +case 0x5 :/* SST slave */ +case 0x6 :/* PECI */ +case 0x7 :/* SST host */ +if (data->features &FEAT_TEMP_PECI ) + data->features &= ~FEAT_TEMP_OLD_PECI ; + data->ext_temp_type =6 ; +break ; + }drivers/hwmon/it87.c static int __devinit it87_probe(struct platform_device *pdev) · line 2074
Quoted 10 lines
drivers/hwmon/it87.c +10
-0+ }else if (data->features &FEAT_TEMP_PECI ) { + reg =it87_read_value (data,IT87_REG_VID ); +switch ((reg >>4 ) &0x03 ) { +case 0x0 :/* disabled */ +/* Check if AMDTSI is enabled */ +if (reg &0x40 ) { + reg =it87_read_value (data, +IT87_REG_AMDTSI_HSR ); +if (reg &0x40 ) { + data->ext_temp_type =5 ;I admit I don't quite get why ITE made these separate configuration bits when all it brings is the possibility to select a non-working combination...
Quoted 5 lines
I will also admit I'm kind of lost with the IT8728F. The datasheet suggests that the PCH temperature can be retrieved but there is no configuration bit to actually select it? Or if bit 6 of
IT87_REG_VIDsupposed to do exactly that? And if so, where does the reading go?
Oh, there is. Bit 6 of IT87_REG_VID = 1, and bit 6 of register 0x98 (IT87_REG_AMDTSI_HSR) = 0, and then there are a couple additional bits in register 0x9e (as I just noticed, meaning this patch is incomplete and I'll have to send you another version for AMDTSI support on IT8728F). Bit 4/5 of register 0xa are irrelevant for PCH on IT8728F.
Or at least that is how I think it works. I can not test it on my board, so I did not even bother trying to add support for it. It gets tricky, since there are now, at least potentially, two separate "external" temperature sensors, so we would have to change the code structure for it. Maybe sometime later, if someone has a board supporting it and we can test if it actually works.
Quoted 4 lines
BTW maybe we should come up with a different name for register
0x0Afor newer chips, otherwise the code gets a little confusing.IT87_REG_IFSELmaybe?
Ok with me. Since I have to create another version of the patch anyway, I'll merge that in, unless you want a separate patch for it.
Thanks,
Guenter
Quoted 18 lines
Quoted 13 lines
drivers/hwmon/it87.c +12
-0+break ; + } + } + data->features &= ~FEAT_TEMP_PECI ; +break ; +case 0x1 :/* SST slave */ +case 0x2 :/* PECI */ +case 0x3 :/* SST host */ + data->ext_temp_type =6 ; +break ; + } + }Signature · 1 line
Jean Delvare
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for AMDTSI, and restrict sensor type configur
In reply to Guenter RoeckQuoted 16 lines · Guenter Roeck
Quoted 9 lines · Jean Delvare
I admit I don't quite get why ITE made these separate configuration bits when all it brings is the possibility to select a non-working combination...
I will also admit I'm kind of lost with the IT8728F. The datasheet suggests that the PCH temperature can be retrieved but there is no configuration bit to actually select it? Or if bit 6 of
IT87_REG_VIDsupposed to do exactly that? And if so, where does the reading go?Oh, there is. Bit 6 of
IT87_REG_VID= 1, and bit 6 of register0x98(IT87_REG_AMDTSI_HSR) = 0, and then there are a couple additional bits in register0x9e(as I just noticed, meaning this patch is incomplete and I'll have to send you another version for AMDTSI support on IT8728F). Bit 4/5 of register0xaare irrelevant for PCH on IT8728F.
Quoted 6 lines
Or at least that is how I think it works. I can not test it on my board, so I did not even bother trying to add support for it. It gets tricky, since there are now, at least potentially, two separate "external" temperature sensors, so we would have to change the code structure for it. Maybe sometime later, if someone has a board supporting it and we can test if it actually works.
Ack.
Quoted 6 lines
Quoted 3 lines
BTW maybe we should come up with a different name for register
0x0Afor newer chips, otherwise the code gets a little confusing.IT87_REG_IFSELmaybe?Ok with me. Since I have to create another version of the patch anyway, I'll merge that in, unless you want a separate patch for it.
No, merged is fine.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
PATCH v2 1/1 hwmon: (it87) Add support for IT8732F
In reply to Guenter RoeckAdd support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV.
--- Documentation/hwmon/it87 | 35 ++++++++++++++++++++++------------- drivers/hwmon/it87.c | 43 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 58 insertions(+), 20 deletions(-)
Documentation/hwmon/it87 +22 -13
@@ -38,6 +38,10 @@ Supported chips: Prefix: 'it8728' Addresses scanned: from Super I/O config space (8 I/O ports) Datasheet: Not publicly available + * IT8732F + Prefix: 'it8732' + Addresses scanned: from Super I/O config space (8 I/O ports) + Datasheet: Not publicly available * IT8771E Prefix: 'it8771' Addresses scanned: from Super I/O config space (8 I/O ports)
@@ -111,9 +115,9 @@ Description ----------- This driver implements support for the IT8603E, IT8620E, IT8623E, IT8705F, -IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8758E, -IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, and SiS950 -chips. +IT8712F, IT8716F, IT8718F, IT8720F, IT8721F, IT8726F, IT8728F, IT8732F, +IT8758E, IT8771E, IT8772E, IT8781F, IT8782F, IT8783E/F, IT8786E, IT8790E, and +SiS950 chips. These chips are 'Super I/O chips', supporting floppy disks, infrared ports, joysticks and other miscellaneous stuff. For hardware monitoring, they
@@ -137,10 +141,10 @@ The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E and later IT8712F revisions have support for 2 additional fans. The additional fans are supported by the driver. -The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8781F, IT8782F, IT8783E/F, -and late IT8712F and IT8705F also have optional 16-bit tachometer counters -for fans 1 to 3. This is better (no more fan clock divider mess) but not -compatible with the older chips and revisions. The 16-bit tachometer mode +The IT8716F, IT8718F, IT8720F, IT8721F/IT8758E, IT8732F, IT8781F, IT8782F, +IT8783E/F, and late IT8712F and IT8705F also have optional 16-bit tachometer +counters for fans 1 to 3. This is better (no more fan clock divider mess) but +not compatible with the older chips and revisions. The 16-bit tachometer mode is enabled by the driver when one of the above chips is detected. The IT8726F is just bit enhanced IT8716F with additional hardware
@@ -159,6 +163,9 @@ IT8728F. It only supports 16-bit fan mode. The IT8790E supports up to 3 fans. 16-bit fan mode is always enabled. +The IT8732F supports a closed-loop mode for fan control, but this is not +currently implemented by the driver. + Temperatures are measured in degrees Celsius. An alarm is triggered once when the Overtemperature Shutdown limit is crossed.
@@ -173,12 +180,14 @@ is done. Voltage sensors (also known as IN sensors) report their values in volts. An alarm is triggered if the voltage has crossed a programmable minimum or maximum limit. Note that minimum in this case always means 'closest to -zero'; this is important for negative voltage measurements. All voltage -inputs can measure voltages between 0 and 4.08 volts, with a resolution of -0.016 volt (except IT8603E, IT8721F/IT8758E and IT8728F: 0.012 volt.) The -battery voltage in8 does not have limit registers. - -On the IT8603E, IT8721F/IT8758E, IT8781F, IT8782F, and IT8783E/F, some +zero'; this is important for negative voltage measurements. On most chips, all +voltage inputs can measure voltages between 0 and 4.08 volts, with a resolution +of 0.016 volt. IT8603E, IT8721F/IT8758E and IT8728F can measure between 0 and +3.06 volts, with a resolution of 0.012 volt. IT8732F can measure between 0 and +2.8 volts with a resolution of 0.0109 volt. The battery voltage in8 does not +have limit registers. + +On the IT8603E, IT8721F/IT8758E, IT8732F, IT8781F, IT8782F, and IT8783E/F, some voltage inputs are internal and scaled inside the chip: * in3 (optional) * in7 (optional for IT8781F, IT8782F, and IT8783E/F)
drivers/hwmon/it87.c +36 -7
109 lines not on this page · raw message
Signature · 7 lines
2.5.0 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
maintainerRe: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for IT8732F
In reply to Guenter RoeckQuoted 5 lines · Justin Maggard
Add support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV.
Signed-off-by Justin Maggard <[email protected]>
Hi Justin,
Quoted 3 lines
--- Documentation/hwmon/it87 | 35 ++++++++++++++++++++++------------- drivers/hwmon/it87.c | 43 ++++++++++++++++++++++++++++++++++++-------
I forgot earlier: Please also list the chip in drivers/hwmon/Kconfig.
[ ... ]
Quoted 4 lines
static const struct it87_devices it87_devices[] = { [it87] = {(quoted diff) +0
-0@@ -315,6 +319,15 @@ static const struct it87_devices it87_devices[] = { | FEAT_IN7_INTERNAL,
Review static const struct it87_devices it87_devices[] = { · line 329
Quoted 10 lines
(quoted diff) +8
-0.peci_mask = 0x07, }, + [it8732] = { + .name = "it8732", + .suffix = "F", + .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI + | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, + .peci_mask = 0x07, + .old_peci_mask = 0x02, /* Actually reports PCH */
From the little information we have, I suspect that this may be wrong.
The chip is probably closer to 8771/8772. Please check if the code path executed if has_temp_old_peci() is true is executed correctly, and that the registers used in that code path report what is expected. Most likely FEAT_TEMP_OLD_PECI and old_peci_mask should not be set.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for IT8732F
In reply to Guenter RoeckQuoted 11 lines · Guenter Roeck
Quoted 6 lines · Justin Maggard
Add support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV.
Signed-off-by Justin Maggard <[email protected]>Hi Justin,
Quoted 8 lines
Quoted 4 lines
--- Documentation/hwmon/it87 | 35 ++++++++++++++++++++++------------- drivers/hwmon/it87.c | 43++++++++++++++++++++++++++++++++++++-------
I forgot earlier: Please also list the chip in
drivers/hwmon/Kconfig.
OK, it'll be there in v3. :-)
Quoted 15 lines
[ ... ]
Quoted 14 lines
static const struct it87_devices it87_devices[] = { [it87] = {(quoted diff) +7
-0@@ -315,6 +319,15 @@ static const struct it87_devices it87_devices[] = { | FEAT_IN7_INTERNAL, .peci_mask = 0x07, }, + [it8732] = { + .name = "it8732", + .suffix = "F", + .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI + | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, + .peci_mask = 0x07,
Quoted 9 lines
Review static const struct it87_devices it87_devices[] = { · line 329
Quoted 1 line
(quoted diff) +1
-0+ .old_peci_mask = 0x02, /* Actually reports PCH */From the little information we have, I suspect that this may be wrong. The chip is probably closer to 8771/8772. Please check if the code path executed if
has_temp_old_peci()is true is executed correctly, and that the registers used in that code path report what is expected. Most likelyFEAT_TEMP_OLD_PECIandold_peci_maskshould not be set.
I think I'm getting a little confused here. Both IT8721 and IT8732 claim to use IT87_REG_TEMP_EXTRA bit 7 to enable PCH temperature
mapping to 0x2a. IT87_REG_TEMP_ENABLE bits 7-6 match IT8772, and
bits 5-0 match IT8721.
-Justin
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Guenter Roeck
maintainerRe: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for IT8732F
In reply to Guenter RoeckQuoted 48 lines · Justin Maggard
Quoted 11 lines · Guenter Roeck
Quoted 6 lines · Justin Maggard
Add support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV.
Signed-off-by Justin Maggard <[email protected]>Hi Justin,
Quoted 8 lines
Quoted 4 lines
--- Documentation/hwmon/it87 | 35 ++++++++++++++++++++++------------- drivers/hwmon/it87.c | 43++++++++++++++++++++++++++++++++++++-------
I forgot earlier: Please also list the chip in
drivers/hwmon/Kconfig.OK, it'll be there in v3. :-)
Quoted 15 lines
[ ... ]
Quoted 14 lines
static const struct it87_devices it87_devices[] = { [it87] = {(quoted diff) +7
-0@@ -315,6 +319,15 @@ static const struct it87_devices it87_devices[] = { | FEAT_IN7_INTERNAL, .peci_mask = 0x07, }, + [it8732] = { + .name = "it8732", + .suffix = "F", + .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI | FEAT_TEMP_PECI + | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, + .peci_mask = 0x07,Quoted 9 lines
Review static const struct it87_devices it87_devices[] = { · line 329
Quoted 1 line
(quoted diff) +1
-0+ .old_peci_mask = 0x02, /* Actually reports PCH */From the little information we have, I suspect that this may be wrong.
The chip is probably closer to 8771/8772. Please check if the code path executed ifhas_temp_old_peci()is true is executed correctly, and that the registers used in that code path report what is expected. Most likelyFEAT_TEMP_OLD_PECIandold_peci_maskshould not be set.
Quoted 5 lines
I think I'm getting a little confused here. Both IT8721 and IT8732 claim to use
IT87_REG_TEMP_EXTRAbit 7 to enable PCH temperature
mapping to0x2a.IT87_REG_TEMP_ENABLEbits 7-6 match IT8772, and
bits 5-0 match IT8721.
Me too ;-), but from your description it sounds like your definitions are correct.
It is really annoying that ITE is so secretive about their chips.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Re: [lm-sensors] [PATCH v2] hwmon: (it87) Add support for IT8732F
In reply to Guenter RoeckQuoted 57 lines · Guenter Roeck
Quoted 56 lines · Justin Maggard
Quoted 14 lines · Guenter Roeck
Quoted 7 lines · Justin Maggard
Add support for the IT8732F. This chip is pretty similar to IT8721F, with the main difference being that the ADC LSB is 10.9 mV instead of 12 mV.
Signed-off-by Justin Maggard <[email protected]>Hi Justin,
Quoted 9 lines
Quoted 4 lines
--- Documentation/hwmon/it87 | 35 ++++++++++++++++++++++------------- drivers/hwmon/it87.c | 43++++++++++++++++++++++++++++++++++++-------
I forgot earlier: Please also list the chip in
drivers/hwmon/Kconfig.OK, it'll be there in v3. :-)
Quoted 27 lines
[ ... ]
Quoted 14 lines
static const struct it87_devices it87_devices[] = { [it87] = {(quoted diff) +5
-0@@ -315,6 +319,15 @@ static const struct it87_devices it87_devices[] = { | FEAT_IN7_INTERNAL, .peci_mask = 0x07, }, + [it8732] = { + .name = "it8732", + .suffix = "F", + .features = FEAT_NEWER_AUTOPWM | FEAT_16BIT_FANS + | FEAT_TEMP_OFFSET | FEAT_TEMP_OLD_PECI |
FEAT_TEMP_PECIReview
Quoted 3 lines
(quoted diff) +3
-0+ | FEAT_10_9MV_ADC | FEAT_IN7_INTERNAL, + .peci_mask = 0x07, + .old_peci_mask = 0x02, /* Actually reports PCH */From the little information we have, I suspect that this may be wrong.
The chip is probably closer to 8771/8772. Please check if the code path executed ifhas_temp_old_peci()is true is executed correctly, and that the registers used in that code path report what is expected. Most likelyFEAT_TEMP_OLD_PECIandold_peci_maskshould not be set.
Quoted 9 lines
Quoted 5 lines
I think I'm getting a little confused here. Both IT8721 and IT8732 claim to use
IT87_REG_TEMP_EXTRAbit 7 to enable PCH temperature
mapping to0x2a.IT87_REG_TEMP_ENABLEbits 7-6 match IT8772, and
bits 5-0 match IT8721.Me too ;-), but from your description it sounds like your definitions are correct.
Cool, then v3 will be coming shortly...
Quoted 2 lines
It is really annoying that ITE is so secretive about their chips.
Yes, agreed. Until I get approval to share the datasheet, feel free to ping me if you have any particular questions.
-Justin
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors