All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [lm-sensors] Asus smbus mux
@ 2007-04-02  0:22 RusH
  2007-04-02  7:57 ` Jean Delvare
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: RusH @ 2007-04-02  0:22 UTC (permalink / raw)
  To: lm-sensors

On 4/1/07, koko <citizenr@gmail.com> wrote:

rasz@capek:~$ sudo isadump -f 0xe440 16
0 1 2 3 4 5 6 7 8 9 a b c d e f
e440: 10 00 00 00 71 00 00 00 fd 02 c0 00 ff f6 ff 0f
rasz@capek:~$ sudo i2cdetect -y 0 |grep 50
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX

bit 0 0xe44d
rasz@capek:~$ sudo isaset -y -f 0xe44d 0xf7
rasz@capek:~$ sudo i2cdetect -y 0 |grep 50
50: 50 51 52 XX XX XX XX XX XX XX XX XX XX XX XX XX

spd works :)
Big thanks to Tamas MIKLOS (Lavalys) and Franck@x86 (x86-secret)

Tamas MIKLOS send me the asus mux code. There are 5 hacks with smbus
mux switch on IO, and 3 with smbus mux switch on smbus (lol thats
funny), it covers 31 types of asus boards (plus many more subtypes).
Oldest board is P3B, newest P4B.

-- 
Who logs in to gdm? Not I, said the duck.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
@ 2007-04-02  7:57 ` Jean Delvare
  2007-04-02 11:04 ` Jean Delvare
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2007-04-02  7:57 UTC (permalink / raw)
  To: lm-sensors

On Mon, 2 Apr 2007 02:22:54 +0200, RusH wrote:
> On 4/1/07, koko <citizenr@gmail.com> wrote:
> 
> rasz@capek:~$ sudo isadump -f 0xe440 16
> 0 1 2 3 4 5 6 7 8 9 a b c d e f
> e440: 10 00 00 00 71 00 00 00 fd 02 c0 00 ff f6 ff 0f
> rasz@capek:~$ sudo i2cdetect -y 0 |grep 50
> 50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX
> 
> bit 0 0xe44d
> rasz@capek:~$ sudo isaset -y -f 0xe44d 0xf7
> rasz@capek:~$ sudo i2cdetect -y 0 |grep 50
> 50: 50 51 52 XX XX XX XX XX XX XX XX XX XX XX XX XX
> 
> spd works :)
> Big thanks to Tamas MIKLOS (Lavalys) and Franck@x86 (x86-secret)
> 
> Tamas MIKLOS send me the asus mux code. There are 5 hacks with smbus
> mux switch on IO, and 3 with smbus mux switch on smbus (lol thats
> funny), it covers 31 types of asus boards (plus many more subtypes).
> Oldest board is P3B, newest P4B.

Is this information public? We don't yet support I2C/SMBus
multiplexing, but when we do, if we have the information, we can add
support for these boards.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
  2007-04-02  7:57 ` Jean Delvare
@ 2007-04-02 11:04 ` Jean Delvare
  2007-04-02 17:26 ` RusH
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2007-04-02 11:04 UTC (permalink / raw)
  To: lm-sensors

Please reply to the list, rather than to me only. The whole point is to
get the information archived for later use.

On Mon, 2 Apr 2007 10:28:59 +0200, RusH wrote:
> On 4/2/07, Jean Delvare <khali@linux-fr.org> wrote:
> > > Tamas MIKLOS send me the asus mux code. There are 5 hacks with smbus
> > > mux switch on IO, and 3 with smbus mux switch on smbus (lol thats
> > > funny), it covers 31 types of asus boards (plus many more subtypes).
> > > Oldest board is P3B, newest P4B.
> >
> > Is this information public? We don't yet support I2C/SMBus
> > multiplexing, but when we do, if we have the information, we can add
> > support for these boards.
> 
> Well, it is now since I got the code :) (clean with no disclaimers/nda crap).
> I can strip it further to bare specs and post it here.

Yes, please do so.

> > We don't yet support I2C/SMBus multiplexing, but when we do
>
> well, actually I saw some tyan code supporting it allready, plus
> i2c-virtual from 2002

Except that i2c-virtual is a Linux 2.4 driver and does not even work.
It would need changes to i2c-core which will never happen in Linux 2.4,
but will be considered for 2.6 someday.

As for the "tyan code", I guess you refer to my i2c-amd756-s4882 driver?
This is a dedicated driver for only one board, not a generic solution.
We cannot do that for all motherboards out there, in particular we
don't want to do that just to give access to some SPD EEPROMs, the cost
is too high for the thin benefit.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
  2007-04-02  7:57 ` Jean Delvare
  2007-04-02 11:04 ` Jean Delvare
@ 2007-04-02 17:26 ` RusH
  2007-04-03  5:46 ` Jean Delvare
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: RusH @ 2007-04-02 17:26 UTC (permalink / raw)
  To: lm-sensors

On 4/2/07, Jean Delvare <khali@linux-fr.org> wrote:
> Please reply to the list, rather than to me only. The whole point is to
> get the information archived for later use.

sorry, Im learning to use gmail with lists (and forgot the 'reply all')

> > Well, it is now since I got the code :) (clean with no disclaimers/nda crap).
> > I can strip it further to bare specs and post it here.
>
> Yes, please do so.

ok

> > > We don't yet support I2C/SMBus multiplexing, but when we do
> >
> > well, actually I saw some tyan code supporting it allready, plus
> > i2c-virtual from 2002
>
> Except that i2c-virtual is a Linux 2.4 driver and does not even work.
> It would need changes to i2c-core which will never happen in Linux 2.4,
> but will be considered for 2.6 someday.
>
> As for the "tyan code", I guess you refer to my i2c-amd756-s4882 driver?
> This is a dedicated driver for only one board, not a generic solution.

I know, that was also the plan for my board (A7V133)

> We cannot do that for all motherboards out there, in particular we
> don't want to do that just to give access to some SPD EEPROMs, the cost
> is too high for the thin benefit.

I understand. Arent clock generators on the smbus too? Not that acces
to them is important or particularly safe.

-- 
Who logs in to gdm? Not I, said the duck.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
                   ` (2 preceding siblings ...)
  2007-04-02 17:26 ` RusH
@ 2007-04-03  5:46 ` Jean Delvare
  2007-04-04  2:25 ` RusH
  2007-04-07  7:06 ` Jean Delvare
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2007-04-03  5:46 UTC (permalink / raw)
  To: lm-sensors

On Mon, 2 Apr 2007 19:26:20 +0200, RusH wrote:
> On 4/2/07, Jean Delvare wrote:
> > We cannot do that for all motherboards out there, in particular we
> > don't want to do that just to give access to some SPD EEPROMs, the cost
> > is too high for the thin benefit.
> 
> I understand. Arent clock generators on the smbus too? Not that acces
> to them is important or particularly safe.

They are, but we don't need nor want to touch them. The devices most
frequently found on the SMBus are SPD EEPROMs, clock chips and hardware
monitoring chips. Of these, only hardware monitoring chips are worth
the effort IMHO until we get a more generic mux handling infrastructure.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
                   ` (3 preceding siblings ...)
  2007-04-03  5:46 ` Jean Delvare
@ 2007-04-04  2:25 ` RusH
  2007-04-07  7:06 ` Jean Delvare
  5 siblings, 0 replies; 7+ messages in thread
From: RusH @ 2007-04-04  2:25 UTC (permalink / raw)
  To: lm-sensors

On 4/2/07, Jean Delvare <khali@linux-fr.org> wrote:
> > Tamas MIKLOS send me the asus mux code. There are 5 hacks with smbus
> > mux switch on IO, and 3 with smbus mux switch on smbus (lol thats
> > funny), it covers 31 types of asus boards (plus many more subtypes).
> > Oldest board is P3B, newest P4B.
>
> Is this information public? We don't yet support I2C/SMBus
> multiplexing, but when we do, if we have the information, we can add
> support for these boards.

Here it is, pseudocode:

	ulong temp, temp2;

'3V4X'

enable SPD
	temp = inl_port($e44c);
	outl_port ($e44c,(temp & 0xe7ffffff) | 0x08000000);

disable SPD
	outl_port($e44c,temp);

----------------------

'K7V'
'A7V'
'A7V133'
'A7P'
'A7M'

enable SPD
	temp = inb_port($e44d);
	outb_port ($e44d,temp | 0x01);

disable SPD
	outb_port($e44d,temp);

This one is tested on A7V133, from DSTD
  OperationRegion (\SGPO, SystemIO, 0xE44C, 0x04)
  Field (SGPO, ByteAcc, NoLock, Preserve)
  {
      GPO0,   1,
              Offset (0x01),
      GPO8,   1, fe
          ,   2,
      GP11,   1,
              Offset (0x04)
  }

tested
1 1 1 1 0 0 0 0 GPO0
1 0 0 1 1 0 0 1 GPO8
0 1 0 1 1 0 1 0 GP11
s c n n n n c s

s=spd + hwmonitor
c=clock + hwmonitor
n=hwmonitor
----------------------

'P3B'
'CUBX'

enable SPD
	temp = inb_port($e437);
	outb_port($e437,(temp & 0xe7) | 0x08);

disable SPD
	outb_port($e437,temp);

----------------------

'CUPL'
'UV4X'

enable SPD
	temp = inl_port($e44c);
	outl_port($e44c,(temp & 0xfffff6fff) | 0x100);

disable SPD
	outl_port($e44c,temp);

----------------------

'USL2'
'CUC2'
'-A7V266-E'
'-A7V266-M'
'-A7V266'
'WEM'
'-CUW'
'<<CUW>>'
'P3C'
'UEP2'
'TUEG'
'-MEW-'
'<<MEW>>'
'-P3W-E'
'<<P3W>>'
'CUSI'
'CUV2'
'A7S'

enable SPD
         outb_port($2e,$87);
         outb_port($2e,$87);
         outb_port($2e,7);
         outb_port($2f,8);
         outb_port($2e,$f1);
         temp = inb_port($2f);
         outb_port($2e,$f1);
         outb_port($2f,(temp & 0xe7) | 0x10);
         outb_port($2e,$aa);

disable SPD
         outb_port($2e,$87);
         outb_port($2e,$87);
         outb_port($2e,7);
         outb_port($2f,8);
         outb_port($2e,$f1);
         outb_port($2f,temp);
         outb_port($2e,$aa);

----------------------

'CUR'

enable SPD
         temp = inb_port($ec80);
         outb_port($ec80,(temp & 0xef) | 0x10);
         temp2 = inb_port($ec84);
         outb_port($ec84,(temp2 & 0xef) | 0x10);

disable SPD
         outb_port($ec80,temp);
         outb_port($ec84,temp2);

----------------------

'A7V333'

enable SPD
         outb_port($2E,$87);
         outb_port($2E,$87);
         outb_port($2E,7);
         outb_port($2F,8);
         outb_port($2E,$F0);
         temp = inb_port($2F);
         outb_port($2E,$F0);
         outb_port($2F,(temp & 0xE7) | 0x10);
         outb_port($2E,$F1);
         temp2 = inb_port($2F);
         outb_port($2E,$F1);
         outb_port($2F,(temp2 & 0xE7) | 0x10);
         outb_port($2E,$AA);

disable SPD
         outb_port($2E,$87);
         outb_port($2E,$87);
         outb_port($2E,7);
         outb_port($2F,8);
         outb_port($2E,$F0);
         outb_port($2F,temp);
         outb_port($2E,$F1);
         outb_port($2F,temp2);
         outb_port($2E,$AA);

----------------------

'<P4B>'

enable SPD
         outb_port($2E,$87);
         outb_port($2E,$87);
         outb_port($2E,7);
         outb_port($2F,7);
         outb_port($2E,$F2);
         temp = inb_port($2F);
         outb_port($2E,$F2);
         outb_port($2F,(temp & 0xFC) | 0x1);
         outb_port($2E,2);
         temp2 = inb_port($2F);
         outb_port($2F,temp2 | 0x2);
         outb_port($2E,$AA);

disable SPD
         outb_port($2E,$87);
         outb_port($2E,$87);
         outb_port($2E,7);
         outb_port($2F,7);
         outb_port($2E,$F2);
         outb_port($2F,temp);
         outb_port($2E,$AA);

----------------------


-- 
Who logs in to gdm? Not I, said the duck.

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] Asus smbus mux
  2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
                   ` (4 preceding siblings ...)
  2007-04-04  2:25 ` RusH
@ 2007-04-07  7:06 ` Jean Delvare
  5 siblings, 0 replies; 7+ messages in thread
From: Jean Delvare @ 2007-04-07  7:06 UTC (permalink / raw)
  To: lm-sensors

On Wed, 4 Apr 2007 04:25:10 +0200, RusH wrote:
> > Is this information public? We don't yet support I2C/SMBus
> > multiplexing, but when we do, if we have the information, we can add
> > support for these boards.
> 
> Here it is, pseudocode:
> 
> 	ulong temp, temp2;
> 
> '3V4X'
> 
> enable SPD
> 	temp = inl_port($e44c);
> 	outl_port ($e44c,(temp & 0xe7ffffff) | 0x08000000);
> 
> disable SPD
> 	outl_port($e44c,temp);
> 
> ----------------------
> 
> 'K7V'
> 'A7V'
> 'A7V133'
> 'A7P'
> 'A7M'
> 
> enable SPD
> 	temp = inb_port($e44d);
> 	outb_port ($e44d,temp | 0x01);
> 
> disable SPD
> 	outb_port($e44d,temp);
> 
> This one is tested on A7V133, from DSTD
>   OperationRegion (\SGPO, SystemIO, 0xE44C, 0x04)
>   Field (SGPO, ByteAcc, NoLock, Preserve)
>   {
>       GPO0,   1,
>               Offset (0x01),
>       GPO8,   1, fe
>           ,   2,
>       GP11,   1,
>               Offset (0x04)
>   }
> 
> tested
> 1 1 1 1 0 0 0 0 GPO0
> 1 0 0 1 1 0 0 1 GPO8
> 0 1 0 1 1 0 1 0 GP11
> s c n n n n c s
> 
> s=spd + hwmonitor
> c=clock + hwmonitor
> n=hwmonitor
> ----------------------
> 
> 'P3B'
> 'CUBX'
> 
> enable SPD
> 	temp = inb_port($e437);
> 	outb_port($e437,(temp & 0xe7) | 0x08);
> 
> disable SPD
> 	outb_port($e437,temp);
> 
> ----------------------
> 
> 'CUPL'
> 'UV4X'
> 
> enable SPD
> 	temp = inl_port($e44c);
> 	outl_port($e44c,(temp & 0xfffff6fff) | 0x100);
> 
> disable SPD
> 	outl_port($e44c,temp);
> 
> ----------------------
> 
> 'USL2'
> 'CUC2'
> '-A7V266-E'
> '-A7V266-M'
> '-A7V266'
> 'WEM'
> '-CUW'
> '<<CUW>>'
> 'P3C'
> 'UEP2'
> 'TUEG'
> '-MEW-'
> '<<MEW>>'
> '-P3W-E'
> '<<P3W>>'
> 'CUSI'
> 'CUV2'
> 'A7S'
> 
> enable SPD
>          outb_port($2e,$87);
>          outb_port($2e,$87);
>          outb_port($2e,7);
>          outb_port($2f,8);
>          outb_port($2e,$f1);
>          temp = inb_port($2f);
>          outb_port($2e,$f1);
>          outb_port($2f,(temp & 0xe7) | 0x10);
>          outb_port($2e,$aa);
> 
> disable SPD
>          outb_port($2e,$87);
>          outb_port($2e,$87);
>          outb_port($2e,7);
>          outb_port($2f,8);
>          outb_port($2e,$f1);
>          outb_port($2f,temp);
>          outb_port($2e,$aa);
> 
> ----------------------
> 
> 'CUR'
> 
> enable SPD
>          temp = inb_port($ec80);
>          outb_port($ec80,(temp & 0xef) | 0x10);
>          temp2 = inb_port($ec84);
>          outb_port($ec84,(temp2 & 0xef) | 0x10);
> 
> disable SPD
>          outb_port($ec80,temp);
>          outb_port($ec84,temp2);
> 
> ----------------------
> 
> 'A7V333'
> 
> enable SPD
>          outb_port($2E,$87);
>          outb_port($2E,$87);
>          outb_port($2E,7);
>          outb_port($2F,8);
>          outb_port($2E,$F0);
>          temp = inb_port($2F);
>          outb_port($2E,$F0);
>          outb_port($2F,(temp & 0xE7) | 0x10);
>          outb_port($2E,$F1);
>          temp2 = inb_port($2F);
>          outb_port($2E,$F1);
>          outb_port($2F,(temp2 & 0xE7) | 0x10);
>          outb_port($2E,$AA);
> 
> disable SPD
>          outb_port($2E,$87);
>          outb_port($2E,$87);
>          outb_port($2E,7);
>          outb_port($2F,8);
>          outb_port($2E,$F0);
>          outb_port($2F,temp);
>          outb_port($2E,$F1);
>          outb_port($2F,temp2);
>          outb_port($2E,$AA);
> 
> ----------------------
> 
> '<P4B>'
> 
> enable SPD
>          outb_port($2E,$87);
>          outb_port($2E,$87);
>          outb_port($2E,7);
>          outb_port($2F,7);
>          outb_port($2E,$F2);
>          temp = inb_port($2F);
>          outb_port($2E,$F2);
>          outb_port($2F,(temp & 0xFC) | 0x1);
>          outb_port($2E,2);
>          temp2 = inb_port($2F);
>          outb_port($2F,temp2 | 0x2);
>          outb_port($2E,$AA);
> 
> disable SPD
>          outb_port($2E,$87);
>          outb_port($2E,$87);
>          outb_port($2E,7);
>          outb_port($2F,7);
>          outb_port($2E,$F2);
>          outb_port($2F,temp);
>          outb_port($2E,$AA);
> 

Thanks for the information. I really wonder why Asus tries that hard to
hide some I2C/SMBus devices behind gates. I fail to see any benefit in
doing so, and it makes both the hardware more expensive and the code
more complex.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2007-04-07  7:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-02  0:22 [lm-sensors] Asus smbus mux RusH
2007-04-02  7:57 ` Jean Delvare
2007-04-02 11:04 ` Jean Delvare
2007-04-02 17:26 ` RusH
2007-04-03  5:46 ` Jean Delvare
2007-04-04  2:25 ` RusH
2007-04-07  7:06 ` 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.