All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
@ 2006-05-27  9:03 Rudolf Marek
  2006-05-27 11:22 ` Jean Delvare
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Rudolf Marek @ 2006-05-27  9:03 UTC (permalink / raw)
  To: lm-sensors

Hello Yuan,

I have finally put the patch together. It was a bit tricky without Conroe
datasheet ;) I added the mobile Core processor support too. Please can
you give a try and see if it reports meaningful results which should be round
1.2V for Conroe?

Thanks goes to Rene Pavlik for the formula verfication.

Regards
Rudolf

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vid_core.patch
Type: text/x-patch
Size: 2683 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060527/257c13cd/vid_core.bin

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
@ 2006-05-27 11:22 ` Jean Delvare
  2006-05-30  2:30 ` Yuan Mu
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2006-05-27 11:22 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> --- c/drivers/hwmon/hwmon-vid.c	2006-05-12 01:31:53.000000000 +0200
> +++ linux-2.6.17-rc4/drivers/hwmon/hwmon-vid.c	2006-05-27 10:55:07.954764128 +0200
> (...)
>  /* vrm is the VRM/VRD document version multiplied by 10.
> -   val is the 4-, 5- or 6-bit VID code.
> -   Returned value is in mV to avoid floating point in the kernel. */
> +   val is the 4-, 5-, 6- or 7-bit VID code.

Maybe this is time to go with "4 or more". I'm pretty certain we will
see 8-bit VID codes in the future.

> +   Returned value is in mV to avoid floating point in the kernel. 
> +   Some VID have some bits in uV scale, this is rounded to mV */

This was the case of VRD 10 already, and for this one we do truncate,
not round. We need to be consistent here, either round all, or truncate
all.

>  int vid_from_reg(int val, u8 vrm)
>  {
>  	int vid;
> @@ -80,7 +91,10 @@ int vid_from_reg(int val, u8 vrm)
>  			vid -= 125;
>  		vid /= 10;      /* only return 3 dec. places for now */
>  		return vid;
> -
> +	case 110:		/* Intel Conroe */
> +				/* compute in uV, round to mV */
> +		return((val & 0x7e) ? (1600500 - ((val & 0x7f) - 2) * 6250)
> +				      / 1000 : 0);

If we go for rounding, please separate the +500 offset from the base
voltage value, so as to make it clear it is there for rounding purposes.

>  	case 24:                /* Opteron processor */
>  		return(val = 0x1f ? 0 : 1550 - val * 25);
>  
> @@ -106,6 +120,9 @@ int vid_from_reg(int val, u8 vrm)
>  				    1750 - val * 50);
>  	case 13:
>  		return(1708 - (val & 0x3f) * 16);
> +	case 14:		/* Intel Core */
> +				/* compute in uV, round to mV */
> +		return((1500500 - (val & 0x7f) * 12500) / 1000);

Same here. Additionally, values above 0x77 should be filtered out
somehow, as they seem to be invalid (they would result in 0 or nevative
Vcore.)

-- 
Jean Delvare


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
  2006-05-27 11:22 ` Jean Delvare
@ 2006-05-30  2:30 ` Yuan Mu
  2006-05-30 21:36 ` Rudolf Marek
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Yuan Mu @ 2006-05-30  2:30 UTC (permalink / raw)
  To: lm-sensors

Rudolf Marek wrote:
> I have finally put the patch together. It was a bit tricky without Conroe
> datasheet ;) I added the mobile Core processor support too. Please can
> you give a try and see if it reports meaningful results which should be 
> round
> 1.2V for Conroe?
> 

I tried ;)
vrm:110
cpu0_vid:1513
cpu1_vid:1225


Best Regards
Yuan Mu


=============================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such  a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ymu.vcf
Type: text/x-vcard
Size: 56 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060530/c23fa2a5/ymu.vcf

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
  2006-05-27 11:22 ` Jean Delvare
  2006-05-30  2:30 ` Yuan Mu
@ 2006-05-30 21:36 ` Rudolf Marek
  2006-05-31  1:50 ` Yuan Mu
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Rudolf Marek @ 2006-05-30 21:36 UTC (permalink / raw)
  To: lm-sensors

Hello,

> I tried ;)
> vrm:110
> cpu0_vid:1513
> cpu1_vid:1225
> 

The second one looks good. The first one is in fact 001111 which is a bit 
suspicious value. Please can you check the driver/raw bits reading?

Thanks,

Regards
Rudolf


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (2 preceding siblings ...)
  2006-05-30 21:36 ` Rudolf Marek
@ 2006-05-31  1:50 ` Yuan Mu
  2006-06-04 19:56 ` Rudolf Marek
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Yuan Mu @ 2006-05-31  1:50 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> 
>> I tried ;)
>> vrm:110
>> cpu0_vid:1513
>> cpu1_vid:1225
>>
> 
> The second one looks good. The first one is in fact 001111 which is a 
> bit suspicious value. Please can you check the driver/raw bits reading?
> 

VID0REG: 0x10
VID1REG: 0xbf


cpu0_vid:1513
cpu1_vid:1219

in0_input:1182
in1_input:1188


Best Regards
Yuan Mu


=============================================The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such  a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Winbond is strictly prohibited; and any information in this email irrelevant to the official business of Winbond shall be deemed as neither given nor endorsed by Winbond.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ymu.vcf
Type: text/x-vcard
Size: 56 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060531/6dbe9cc0/ymu.vcf

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (3 preceding siblings ...)
  2006-05-31  1:50 ` Yuan Mu
@ 2006-06-04 19:56 ` Rudolf Marek
  2006-06-05  6:18 ` Jean Delvare
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Rudolf Marek @ 2006-06-04 19:56 UTC (permalink / raw)
  To: lm-sensors

Hello

Jean, thanks for the review. Here comes updated patch. I hope that it is OK.

This patch adds support for two new VID codes, supporting Intel mobile Core
processors and new Conroe based platforms.

regards
Rudolf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vid_upd
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060604/8906ff3c/attachment.pl 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (4 preceding siblings ...)
  2006-06-04 19:56 ` Rudolf Marek
@ 2006-06-05  6:18 ` Jean Delvare
  2006-06-08  9:05 ` Jean Delvare
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2006-06-05  6:18 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> Jean, thanks for the review. Here comes updated patch. I hope that it is OK.
> 
> This patch adds support for two new VID codes, supporting Intel mobile Core
> processors and new Conroe based platforms.

Applied, thanks. No signed-off-by line?

-- 
Jean Delvare


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (5 preceding siblings ...)
  2006-06-05  6:18 ` Jean Delvare
@ 2006-06-08  9:05 ` Jean Delvare
  2006-06-09 19:00 ` Rudolf Marek
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2006-06-08  9:05 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> > Jean, thanks for the review. Here comes updated patch. I hope that it is OK.
> > 
> > This patch adds support for two new VID codes, supporting Intel mobile Core
> > processors and new Conroe based platforms.

It seems that the official VRD 11.0 documentation is now available from
Intel:
http://www.intel.com/design/processor/applnots/313214.htm

It includes an "Extended VRD 10.0" VID table. I seem to understand that
the CPUs may alternatively use this table or the VRD 11.0 table you
added support for. I don't really understand what would make a CPU use
one rather than the other though. Can you please investigate? Then your
patch might need some more work. At least it would be nice to point to
the official location for the VRD 11.0 table.

Thanks,
-- 
Jean Delvare


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (6 preceding siblings ...)
  2006-06-08  9:05 ` Jean Delvare
@ 2006-06-09 19:00 ` Rudolf Marek
  2006-06-09 19:40 ` Rudolf Marek
  2006-06-11 14:36 ` Jean Delvare
  9 siblings, 0 replies; 11+ messages in thread
From: Rudolf Marek @ 2006-06-09 19:00 UTC (permalink / raw)
  To: lm-sensors

Hi Jean,

> It includes an "Extended VRD 10.0" VID table. I seem to understand that
> the CPUs may alternatively use this table or the VRD 11.0 table you
> added support for. I don't really understand what would make a CPU use
> one rather than the other though. Can you please investigate? Then your
> patch might need some more work. At least it would be nice to point to
> the official location for the VRD 11.0 table.
> 

Ok I have investigated. It took me one hour to figure it all out.

the VID_SELECT pin is for motherboard that has LGA775 and wants to support old
and new CPUs. Intel introduced the bit already for older Celeron D
http://www.intel.com/design/celeron/datashts/304092.htm

Page 69 clarifies it all.

They already reserved enough bits for VID, using just 5 of them.

With the VID_SEL bit they will just do what we do in software to detect the VRM
version. So => we dont care about this bit.

As for the Extended VRD 10.0:

it just adds one more bit do be able to fine grain the 5bit VID. And because my
patch already rounds it we should not care about this too.

All in all we dont need to do anything special unless we switch to uV as return
value.

I will resend the patch in the moment with updated VRM11 stuff.

Regards
Rudolf


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (7 preceding siblings ...)
  2006-06-09 19:00 ` Rudolf Marek
@ 2006-06-09 19:40 ` Rudolf Marek
  2006-06-11 14:36 ` Jean Delvare
  9 siblings, 0 replies; 11+ messages in thread
From: Rudolf Marek @ 2006-06-09 19:40 UTC (permalink / raw)
  To: lm-sensors

Hello

This patch adds support for two new VID codes, supporting Intel mobile Core
processors and new Conroe based platforms.

Signed-off-by: Rudolf Marek <r.marek at sh.cvut.cz>

This one has fixed VRM11 url and also it seems Intel extended it to 8 bits.

Regards
Rudolf
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: upd_vid2
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060609/8e8e375e/attachment.pl 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe
  2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
                   ` (8 preceding siblings ...)
  2006-06-09 19:40 ` Rudolf Marek
@ 2006-06-11 14:36 ` Jean Delvare
  9 siblings, 0 replies; 11+ messages in thread
From: Jean Delvare @ 2006-06-11 14:36 UTC (permalink / raw)
  To: lm-sensors

Hi Rudolf,

> This patch adds support for two new VID codes, supporting Intel mobile Core
> processors and new Conroe based platforms.
> 
> Signed-off-by: Rudolf Marek <r.marek at sh.cvut.cz>
> 
> This one has fixed VRM11 url and also it seems Intel extended it to 8 bits.

Thanks for this update, I've replaced the old version with this one in
my stack.

Thanks for the clarification with regards to extended VRD 10 too.

-- 
Jean Delvare


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-06-11 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27  9:03 [lm-sensors] [PATCH] New VID codes for Intel Core and Conroe Rudolf Marek
2006-05-27 11:22 ` Jean Delvare
2006-05-30  2:30 ` Yuan Mu
2006-05-30 21:36 ` Rudolf Marek
2006-05-31  1:50 ` Yuan Mu
2006-06-04 19:56 ` Rudolf Marek
2006-06-05  6:18 ` Jean Delvare
2006-06-08  9:05 ` Jean Delvare
2006-06-09 19:00 ` Rudolf Marek
2006-06-09 19:40 ` Rudolf Marek
2006-06-11 14:36 ` Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.