All of lore.kernel.org
 help / color / mirror / Atom feed
* PWM on a W83697HF
@ 2005-05-19  6:24 Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting Uwe Andersen:

> do you know how to work with the fan control capability (PWM) of a
> Winbond W83697HF?
> I tried various values in the bank0-registers 0x00, 0x01, 0x02, 0x03,
> 0x04 with various fans(do PWM need special fans?) but the fan
> rotation never changed.

PWM doesn't need special fans AFAIK (unlike fan speed reporting).

The W83697HF has two PWM channels (registers 0x01 and 0x03) which are
handled by our drivers (w83781d and w83627hf). You should not have to
play with registers directly, simply use the the pwm1 and pwm2 files
exported through procfs (2.4 kernels) or sysfs (2.6 kernels). The value
to write to/read from the file is between 0 and 255 (these are the
values of the registers, unchanged).

For gory details, see the W83697HF datasheet, but it should not be
needed (unless you suspect there is some bug in our drivers).

You may want to take a look at the tools under prog/pwm and
doc/fancontrol.txt in our package.

Note that for PWM to work, your motherboard manufacturer must have wired
the chip and fans correctly. If you cannot get it to work, this may
simply mean that this wasn't done. Which motherboard is it after all?

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

[Iiiirk, I misspelled Uwe's address, resending... Sorry for the noise.]

Quoting Uwe Andersen:
                                                                        
                                                    
> do you know how to work with the fan control capability (PWM) of a
> Winbond W83697HF?
> I tried various values in the bank0-registers 0x00, 0x01, 0x02, 0x03,
> 0x04 with various fans(do PWM need special fans?) but the fan
> rotation never changed.
                                                                        
                                                    
PWM doesn't need special fans AFAIK (unlike fan speed reporting).
                                                                        
                                                    
The W83697HF has two PWM channels (registers 0x01 and 0x03) which are
handled by our drivers (w83781d and w83627hf). You should not have to
play with registers directly, simply use the the pwm1 and pwm2 files
exported through procfs (2.4 kernels) or sysfs (2.6 kernels). The value
to write to/read from the file is between 0 and 255 (these are the
values of the registers, unchanged).
                                                                        
                                                    
For gory details, see the W83697HF datasheet, but it should not be
needed (unless you suspect there is some bug in our drivers).
                                                                        
                                                    
You may want to take a look at the tools under prog/pwm and
doc/fancontrol.txt in our package.
                                                                        
                                                    
Note that for PWM to work, your motherboard manufacturer must have
wired
the chip and fans correctly. If you cannot get it to work, this may
simply mean that this wasn't done. Which motherboard is it after all?
                                                                        
                                                    
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/                                  
                                                                       
                  


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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` AW: " Jean Delvare
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting Uwe Andersen <uandersen@MAYAH.com>:

> I should have be more concrete:
> 
> I'm not using lm_sensors...
> I'm working on a real time OS called RTOS-32 and doing the hardware
> monitoring software on my own.
> The last thing missing was PWM and I read that lm_sensors is using
> that feature on the W83697HF.
> So I thought of an answer like "Did you enabled PWM in register xy
> with bit n?"
> I have written several values into register 0x01 and register 0x03
> but the fan speed didn't change.
> If there is nothing else to do it looks like that my motherboard
> (Epox 8KMM3I) is the problem.
> 
> Sorry for being so unprecise.

No problem. We don't do anything but read/write registers 0x01 and 0x03
in our drivers, and this is supposed to work, so there's nothing more I
can tell you, sorry. There is no bit that is supposed to be set to
enable it AFAIK.

Maybe you could contact Epox and ask them if PWM is supposed to be
supported on this motherboard?

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
                   ` (4 preceding siblings ...)
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting myself :

> No problem. We don't do anything but read/write registers 0x01 and
> 0x03 in our drivers, and this is supposed to work, so there's nothing
> more I can tell you, sorry. There is no bit that is supposed to be set
> to enable it AFAIK.

I'm plain wrong here. 0x01 and 0x03 are for the W83627HF, *not* the
W83697HF. Try registers 0x5A and 0x5B instead (with bank=0, important).
It could work :)

Sorry for the bad information.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* AW: PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
                   ` (2 preceding siblings ...)
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

> But not your information is bad but the Winbond documentation itself
> is bad! On page 27 (Winbond W83697HF, Rel.Date: 04/2003, Rev. 1.2) you
> will find:"The duty cycle of PWM can be programmed by 8-bit registers
> which are defined in the Bank0 CR5A and CR5B" On page 56 you can read:
> "FAN 1 Duty Cycle Select Register-- 01h(Bank0)"

Correct, the datasheet is ambiguous. Quite usual from Winbond anyway.
They cut'n'paste most datasheets from each other and often forget to
change what needs to be.

> I contacted Winbond already to ask which information is right.

Let us know if you have an answer, although you shouldn't hope too much.

> It is fair to assume that the register 0x01 and 0x03 are the right
> ones because the values of the registers 0x01 - 0x04 after power on
> are identical to the defaults printed in the datasheet. Are you really
> sure that you are workink with 0x5A and 0x5B on a W83697HF because in
> your w83627hf.h I found:
> 
> #define W83697HF_REG_PWMCLK1		0x00
> #define W83627THF_REG_PWM1		0x01	/* 697HF too */
> #define W83697HF_REG_PWMCLK2		0x02
> #define W83627THF_REG_PWM2		0x03	/* 697HF too */

You're correct once again. I clearly need some rest or something. I
can't pretend our code actually works, I just thought that we would have
had complaints if it didn't. To make it clear, I don't own such a chip
myself, or I would have tried.

The bad thing here is that this doesn't leave much hope that you'll be
able to get PWM to work on your system. All I can think of is that you
need register 0x04 to be correctly configured for it to work (0x00,
which is the default value, is what you want according to the
datasheet). If you already have tried that (and I guess you did) and it
didn't help, there's nothing else I can think of, sorry.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
                   ` (5 preceding siblings ...)
  2005-05-19  6:24 ` Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting Uwe Andersen <uandersen@MAYAH.com>:

> In the meantime I have an answer from Epox: "We didn't know if the
> mainboard has a fan control or not."

What I would have expected.

> Seems to be that I contacted a person who might be better for
> answering questions like "My battery is low. What should I do?"

Unfortunately, experience shows that you hardly get any valuable
information from hardware (or software) manufacturer's support service.
I sometimes wonder why they pretend having such a service at all.

> Thank you for the time you spent with my problem!
> It was nice to have somebody to talk with who is (or has been)
> working on the same stuff!

No problem, and sorry for the number of broken info again.

BTW, why is it that you cannot use lm_sensors? It doesn't seem to be
that big. The whole i2c stack shouldn't exceed 64k. Or maybe 64k *is*
big for your embedded system?

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting Uwe Andersen <uandersen@MAYAH.com>:

> More or less historical reasons.
> I started five years ago with a W83781D and just integrated it with
> no probs.
> As a Delphi unit. On a OS that's mor or less WinAPI compatible.
> So it made sense to integrate the following chip in the same manner.
> And so on.
> Now I have a collection of chipset drivers that are all based on
> Pascal code.
> When I want to integrate lm_sensors I have to solve some problems:
> a) Throw away running code  ..*sigh*..
> b) Make lm_sensors compatible (e.g. the "out" command has its
> parameters "address" and "value" just the other way round.)
> c) I have to make all the linux header files included compatible

Mhmmm, for which project is this?

IANAL, but if you use our code as a base, and even if in the end the
code differs because it's not the same language, I think you must
release your project as GPL, or you are infringing the GPL.

Thanks.

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

* PWM on a W83697HF
  2005-05-19  6:24 PWM on a W83697HF Jean Delvare
                   ` (3 preceding siblings ...)
  2005-05-19  6:24 ` AW: " Jean Delvare
@ 2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
  2005-05-19  6:24 ` Jean Delvare
  6 siblings, 0 replies; 8+ messages in thread
From: Jean Delvare @ 2005-05-19  6:24 UTC (permalink / raw)
  To: lm-sensors

Quoting Uwe Andersen <uandersen@MAYAH.com>:

> I didn't use your code as a base. 
> (...)
> If you like I can send you my source so that you can convince
> yourself that I don't sponge on your code.

This won't be necessary. I just misread your previous mail, sorry for
the trouble:

> When I want to integrate lm_sensors I have to solve some problems:
> a) Throw away running code  ..*sigh*..
> b) Make lm_sensors compatible (e.g. the "out" command has its
>    parameters "address" and "value" just the other way round.)
> c) I have to make all the linux header files included compatible

I guess this should have read "IF I WOULD want to", not "When I want". I
thought you described what you did, while you were explaining why you
precisely don't want to... Whatever, I read it wrong. Sorry again.

> BTW, what means "IANAL"?

"I'm not a lawyer"
http://www.catb.org/~esr/jargon/html/I/IANAL.html

-- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

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

end of thread, other threads:[~2005-05-19  6:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:24 PWM on a W83697HF Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` AW: " Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` 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.