From: bjorn@mork.no (Bjørn Mork)
To: lm-sensors@vger.kernel.org
Subject: SOLVED: Ticket #1409
Date: Thu, 19 May 2005 06:24:20 +0000 [thread overview]
Message-ID: <hvvfr8digc.fsf@rasputin.ws.nextra.no> (raw)
I didn't find any way of updating the ticket, so I'm sending this via
mail. After writing the original ticket I downloaded and read the
IT8712F data sheet, which I of course should have done first... This
enabled me to write a small program to retrieve the non-default
address of the IT8712F on the Asus A7N8X-VM:
#include <stdio.h>
#include <unistd.h>
#include <sys/io.h>
#include <string.h>
int main(int argc, char **argv) {
if (ioperm(0x0, 0x3ff, 1)) {
perror("Set i/o permission");
exit(0);
}
/* enter MB PnP mode */
outb(0x87, 0x2e);
outb(0x01, 0x2e);
outb(0x55, 0x2e);
outb(0x55, 0x2e);
/* get chip ID */
outb(0x20, 0x2e);
printf("chip id = 0x%02x", inb(0x2f));
outb(0x21, 0x2e);
printf("%02x\n", inb(0x2f));
/* select GPIO */
outb(0x07, 0x2e);
outb(0x04, 0x2f);
outb(0x60, 0x2e); /* address MSB */
printf("LDN 4, reg 0x60 = 0x%02x\n", inb(0x2f)); /* default 0x02 */
outb(0x61, 0x2e); /* address LSB */
printf("LDN 4, reg 0x61 = 0x%02x\n", inb(0x2f)); /* default 0x90 */
outb(0x30, 0x2e); /* enable */
printf("LDN 4, reg 0x30 = 0x%02x\n", inb(0x2f)); /* default 0x00, should be >0 */
/* exit from MB PnP mode */
outb(0x02, 0x2e);
outb(0x02, 0x2f);
return 0;
}
Which gave the following output right after a reboot:
chip id = 0x8712
LDN 4, reg 0x60 = 0x0d
LDN 4, reg 0x61 = 0x00
LDN 4, reg 0x30 = 0x01
I.e. Asus have changed the base address from 0x290 to 0xd00. Using
this address with it87 worked perfectly:
modprobe it87 probe‘91,0x0d00
I wonder however, would it be possible to include a refined version of
the address detection code in the module? I am willing to try to
write it myself, but I won't do it unless I know it has some remote
possibility of being included.
Bj?rn
next reply other threads:[~2005-05-19 6:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:24 Bjørn Mork [this message]
2005-05-19 6:24 ` SOLVED: Ticket #1409 Bjørn Mork
2005-05-19 6:24 ` Mark Studebaker
2005-05-19 6:24 ` Bjørn Mork
2005-05-19 6:24 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=hvvfr8digc.fsf@rasputin.ws.nextra.no \
--to=bjorn@mork.no \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.