Add nForce MCP61 support to i2c-nforce2
Subsystems (3)
PATCH 1/1 Add nForce MCP61 support to i2c-nforce2
Hello,
patch below adds support for nVidia's SMBus adapter present on Gateway's GT5414E
motherboard (ECS's MCP61 PM-AM). Patch is for current Linus's git tree.
Thanks,
Petr
--
Add support for MCP61's SMBus interface to i2c-nforce2. Standard NVIDIA i2c design, so just adding new device ID is everything needed.
And move MCP55 defines in pci_ids.h around a bit so NVIDIA's section is really sorted by device ID.
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
Subsystem: Elitegroup Computer Systems Unknown device 2601
Flags: 66MHz, fast devsel, IRQ 10
I/O ports at fc00 [size=64]
I/O ports at 1c00 [size=64]
I/O ports at f400 [size=64]
Capabilities: [44] Power Management version 2
drivers/i2c/busses/i2c-nforce2.c +2 -0
@@ -33,6 +33,7 @@ nForce4 MCP-04 0034 nForce4 MCP51 0264 nForce4 MCP55 0368 + nForce4 MCP61 03EB This driver supports the 2 SMBuses that are included in the MCP of the nForce2/3/4/5xx chipsets.
@@ -200,6 +201,7 @@ static struct pci_device_id nforce2_ids[ { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SMBUS) }, { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS) }, + { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS) }, { 0 } };
include/linux/pci_ids.h +5 -4
@@ -1157,10 +1157,6 @@#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368 -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E -#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
@@ -1209,11 +1205,16 @@#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO5700_2 0x0348#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO1000 0x034C#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1100 0x034E +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SMBUS 0x0368 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E#define PCI_DEVICE_ID_NVIDIA_NVENET_14 0x0372#define PCI_DEVICE_ID_NVIDIA_NVENET_15 0x0373 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F#define PCI_DEVICE_ID_NVIDIA_NVENET_16 0x03E5#define PCI_DEVICE_ID_NVIDIA_NVENET_17 0x03E6#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA 0x03E7 +#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SMBUS 0x03EB#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE 0x03EC#define PCI_DEVICE_ID_NVIDIA_NVENET_18 0x03EE#define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF
Hi Petr,
Quoted 3 lines · Petr Vandrovec
Hello,
patch below adds support for nVidia's SMBus adapter present on Gateway's GT5414E
motherboard (ECS's MCP61 PM-AM). Patch is for current Linus's git tree.
We already have a patch doing exactly this in -mm:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/broken-out/jdelvare-i2c-i2c-nforce2-add-mcp61-mcp65-support.patch
Quoted 7 lines
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
Subsystem: Elitegroup Computer Systems Unknown device 2601
Flags: 66MHz, fast devsel, IRQ 10
I/O ports at fc00 [size=64]
I/O ports at 1c00 [size=64]
I/O ports at f400 [size=64]
Capabilities: [44] Power Management version 2
BTW, note how the MCP61 has not 2 but 3 64-byte I/O areas declared. The previous chips used BAR 4 and 5, this new one additionally uses BAR 0. Without documentation it's hard to be sure this is a 3rd SMBus channel, but it sure looks so. Maybe you'll want to hack the i2c-nforce2 driver a bit to confirm or infirm this theory.
Signature · 1 line
Jean Delvare
Quoted 9 lines · Jean Delvare
Hi Petr,
Quoted 3 lines · Petr Vandrovec
Hello,
patch below adds support for nVidia's SMBus adapter present on Gateway's GT5414E
motherboard (ECS's MCP61 PM-AM). Patch is for current Linus's git tree.We already have a patch doing exactly this in -mm:
http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.21-rc3/2.6.21-rc3-mm2/broken-out/jdelvare-i2c-i2c-nforce2-add-mcp61-mcp65-support.patch
Thanks.
Quoted 8 lines
Quoted 7 lines
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
Subsystem: Elitegroup Computer Systems Unknown device 2601
Flags: 66MHz, fast devsel, IRQ 10
I/O ports at fc00 [size=64]
I/O ports at 1c00 [size=64]
I/O ports at f400 [size=64]
Capabilities: [44] Power Management version 2
Quoted 5 lines
BTW, note how the MCP61 has not 2 but 3 64-byte I/O areas declared. The previous chips used BAR 4 and 5, this new one additionally uses BAR 0. Without documentation it's hard to be sure this is a 3rd SMBus channel, but it sure looks so. Maybe you'll want to hack the i2c-nforce2 driver a bit to confirm or infirm this theory.
I had same idea as you have, so I tried to modify driver to use BAR0 as well, and (1) i2cdump then said that nobody is there and (2) dump of range fc00 was quite different from range 1c00 and f400.
So for my hardware I'm sure that BAR0 is of no use for me - if it is 3rd channel then either it uses different interface from nforce2, or nothing is connected to it.
Petr