All of lore.kernel.org
 help / color / mirror / Atom feed
* IT87_REG_PWM[3-5] wrong or obsolete?
@ 2017-03-17 18:42 Justin Maggard
  2017-03-17 19:46 ` Guenter Roeck
  2017-03-22  8:12 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Justin Maggard @ 2017-03-17 18:42 UTC (permalink / raw)
  To: linux-hwmon; +Cc: jdelvare

Hi,

We've started using an IT8613E chip in some hardware designs, and I
was planning to submit our it87 driver changes to support this new
chip.  IT8613 supports 4 fans, but the fans it supports are fans 2-5.
One of our designs has 3 fans, with the third fan connected to FAN4;
however, I'm unable to control that fan using the current driver.

The reason is, in the current driver, IT87_REG_PWM[3-4] is set to
0x7f, 0xa7. But on IT8613E this should be 0x1e, 0x1f.  I see that
these registers were defined when adding support for IT8620E.  Can
anybody confirm that 0x7f, 0xa7 are correct on that chip?  I'm sure
they weren't just pulled out of thin air, but it seems odd that ITE
would have changed only those register indexes.

Assuming that those registers indexes are important for at least
IT8620E, what would be the desired way to proceed with adding IT8613E
support?

Thanks,
-Justin

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

* Re: IT87_REG_PWM[3-5] wrong or obsolete?
  2017-03-17 18:42 IT87_REG_PWM[3-5] wrong or obsolete? Justin Maggard
@ 2017-03-17 19:46 ` Guenter Roeck
  2017-03-22  8:12 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2017-03-17 19:46 UTC (permalink / raw)
  To: Justin Maggard; +Cc: linux-hwmon, jdelvare

On Fri, Mar 17, 2017 at 11:42:13AM -0700, Justin Maggard wrote:
> Hi,
> 
> We've started using an IT8613E chip in some hardware designs, and I
> was planning to submit our it87 driver changes to support this new
> chip.  IT8613 supports 4 fans, but the fans it supports are fans 2-5.
> One of our designs has 3 fans, with the third fan connected to FAN4;
> however, I'm unable to control that fan using the current driver.
> 
> The reason is, in the current driver, IT87_REG_PWM[3-4] is set to
> 0x7f, 0xa7. But on IT8613E this should be 0x1e, 0x1f.  I see that
> these registers were defined when adding support for IT8620E.  Can
> anybody confirm that 0x7f, 0xa7 are correct on that chip?  I'm sure
> they weren't just pulled out of thin air, but it seems odd that ITE
> would have changed only those register indexes.
> 
> Assuming that those registers indexes are important for at least
> IT8620E, what would be the desired way to proceed with adding IT8613E
> support?
> 

We are currently trying to deal with that problem. Here is a quick
summary of what I know so far.

		IT8620E	IT8622E	IT8628E	IT8665E	IT8686E	IT8732
PWM4_CTL	0x7f	0x1e	0x7f	0x1e	0x7f	?
PWM5_CTL	0xa7	0x1f	0xa7	0x1f	0xa7	-
PWM6_CTL	0xaf	-	0xaf	0x92	0xaf	-

On top of that, not all chips share the same register definition.
Only bit 7 is the same.

This means the current code is wrong for at least IT8622E,
won't work for IT8665E (and IT8613E), and we'll need to find
a solution that works for all chips.

Guenter

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

* Re: IT87_REG_PWM[3-5] wrong or obsolete?
  2017-03-17 18:42 IT87_REG_PWM[3-5] wrong or obsolete? Justin Maggard
  2017-03-17 19:46 ` Guenter Roeck
@ 2017-03-22  8:12 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2017-03-22  8:12 UTC (permalink / raw)
  To: Justin Maggard, linux-hwmon; +Cc: jdelvare

Hi Justin,

On 03/17/2017 11:42 AM, Justin Maggard wrote:
> Hi,
>
> We've started using an IT8613E chip in some hardware designs, and I
> was planning to submit our it87 driver changes to support this new
> chip.  IT8613 supports 4 fans, but the fans it supports are fans 2-5.
> One of our designs has 3 fans, with the third fan connected to FAN4;
> however, I'm unable to control that fan using the current driver.
>
> The reason is, in the current driver, IT87_REG_PWM[3-4] is set to
> 0x7f, 0xa7. But on IT8613E this should be 0x1e, 0x1f.  I see that
> these registers were defined when adding support for IT8620E.  Can
> anybody confirm that 0x7f, 0xa7 are correct on that chip?  I'm sure
> they weren't just pulled out of thin air, but it seems odd that ITE
> would have changed only those register indexes.
>
> Assuming that those registers indexes are important for at least
> IT8620E, what would be the desired way to proceed with adding IT8613E
> support?
>

I just pushed a new version of the driver which should resolve this particular
issue. Please let me know if it helps.

Note: If the chip is similar to other recent chips (multi-page), temperature
sensor type detection is probably wrong. Older chips use register 0x55 and 0x77,
newer chips use registers 0x1d, 0x1e, and 0x1f in page 2.

Guenter


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

end of thread, other threads:[~2017-03-22  8:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 18:42 IT87_REG_PWM[3-5] wrong or obsolete? Justin Maggard
2017-03-17 19:46 ` Guenter Roeck
2017-03-22  8:12 ` Guenter Roeck

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.