Asus smbus mux
On 4/1/07, koko <[email protected]> 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.
Signature · 6 lines
Who logs in to gdm? Not I, said the duck. _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 13 lines · RusH
On 4/1/07, koko <[email protected]> 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 XXbit 0
0xe44drasz@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
Quoted 7 lines
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.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Please reply to the list, rather than to me only. The whole point is to get the information archived for later use.
Quoted 6 lines · RusH
Quoted 5 lines · Jean Delvare
Quoted 4 lines
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.
Quoted 6 lines
Quoted 3 lines
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.
Quoted 4 lines
Quoted 1 line
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.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 2 lines · Jean Delvare
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')
Quoted 4 lines
Quoted 2 lines
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
Quoted 11 lines
Quoted 4 lines
Quoted 1 line
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)
Quoted 3 lines
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.
Signature · 6 lines
Who logs in to gdm? Not I, said the duck. _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 7 lines · RusH
Quoted 3 lines · Jean Delvare
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.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 8 lines · Jean Delvare
Quoted 4 lines
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);----------------------
Signature · 6 lines
Who logs in to gdm? Not I, said the duck. _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 180 lines · RusH
Quoted 3 lines
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 ss=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);
Quoted 9 lines
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.
Signature · 6 lines
Jean Delvare _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors