162306a36Sopenharmony_ci======================
262306a36Sopenharmony_ciKernel driver i2c-i801
362306a36Sopenharmony_ci======================
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciSupported adapters:
762306a36Sopenharmony_ci  * Intel 82801AA and 82801AB (ICH and ICH0 - part of the
862306a36Sopenharmony_ci    '810' and '810E' chipsets)
962306a36Sopenharmony_ci  * Intel 82801BA (ICH2 - part of the '815E' chipset)
1062306a36Sopenharmony_ci  * Intel 82801CA/CAM (ICH3)
1162306a36Sopenharmony_ci  * Intel 82801DB (ICH4) (HW PEC supported)
1262306a36Sopenharmony_ci  * Intel 82801EB/ER (ICH5) (HW PEC supported)
1362306a36Sopenharmony_ci  * Intel 6300ESB
1462306a36Sopenharmony_ci  * Intel 82801FB/FR/FW/FRW (ICH6)
1562306a36Sopenharmony_ci  * Intel 82801G (ICH7)
1662306a36Sopenharmony_ci  * Intel 631xESB/632xESB (ESB2)
1762306a36Sopenharmony_ci  * Intel 82801H (ICH8)
1862306a36Sopenharmony_ci  * Intel 82801I (ICH9)
1962306a36Sopenharmony_ci  * Intel EP80579 (Tolapai)
2062306a36Sopenharmony_ci  * Intel 82801JI (ICH10)
2162306a36Sopenharmony_ci  * Intel 5/3400 Series (PCH)
2262306a36Sopenharmony_ci  * Intel 6 Series (PCH)
2362306a36Sopenharmony_ci  * Intel Patsburg (PCH)
2462306a36Sopenharmony_ci  * Intel DH89xxCC (PCH)
2562306a36Sopenharmony_ci  * Intel Panther Point (PCH)
2662306a36Sopenharmony_ci  * Intel Lynx Point (PCH)
2762306a36Sopenharmony_ci  * Intel Avoton (SOC)
2862306a36Sopenharmony_ci  * Intel Wellsburg (PCH)
2962306a36Sopenharmony_ci  * Intel Coleto Creek (PCH)
3062306a36Sopenharmony_ci  * Intel Wildcat Point (PCH)
3162306a36Sopenharmony_ci  * Intel BayTrail (SOC)
3262306a36Sopenharmony_ci  * Intel Braswell (SOC)
3362306a36Sopenharmony_ci  * Intel Sunrise Point (PCH)
3462306a36Sopenharmony_ci  * Intel Kaby Lake (PCH)
3562306a36Sopenharmony_ci  * Intel DNV (SOC)
3662306a36Sopenharmony_ci  * Intel Broxton (SOC)
3762306a36Sopenharmony_ci  * Intel Lewisburg (PCH)
3862306a36Sopenharmony_ci  * Intel Gemini Lake (SOC)
3962306a36Sopenharmony_ci  * Intel Cannon Lake (PCH)
4062306a36Sopenharmony_ci  * Intel Cedar Fork (PCH)
4162306a36Sopenharmony_ci  * Intel Ice Lake (PCH)
4262306a36Sopenharmony_ci  * Intel Comet Lake (PCH)
4362306a36Sopenharmony_ci  * Intel Elkhart Lake (PCH)
4462306a36Sopenharmony_ci  * Intel Tiger Lake (PCH)
4562306a36Sopenharmony_ci  * Intel Jasper Lake (SOC)
4662306a36Sopenharmony_ci  * Intel Emmitsburg (PCH)
4762306a36Sopenharmony_ci  * Intel Alder Lake (PCH)
4862306a36Sopenharmony_ci  * Intel Raptor Lake (PCH)
4962306a36Sopenharmony_ci  * Intel Meteor Lake (SOC and PCH)
5062306a36Sopenharmony_ci  * Intel Birch Stream (SOC)
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci   Datasheets: Publicly available at the Intel website
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ciOn Intel Patsburg and later chipsets, both the normal host SMBus controller
5562306a36Sopenharmony_ciand the additional 'Integrated Device Function' controllers are supported.
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ciAuthors:
5862306a36Sopenharmony_ci	- Mark Studebaker <mdsxyz123@yahoo.com>
5962306a36Sopenharmony_ci	- Jean Delvare <jdelvare@suse.de>
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci
6262306a36Sopenharmony_ciModule Parameters
6362306a36Sopenharmony_ci-----------------
6462306a36Sopenharmony_ci
6562306a36Sopenharmony_ci* disable_features (bit vector)
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ciDisable selected features normally supported by the device. This makes it
6862306a36Sopenharmony_cipossible to work around possible driver or hardware bugs if the feature in
6962306a36Sopenharmony_ciquestion doesn't work as intended for whatever reason. Bit values:
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci ====  =========================================
7262306a36Sopenharmony_ci 0x01  disable SMBus PEC
7362306a36Sopenharmony_ci 0x02  disable the block buffer
7462306a36Sopenharmony_ci 0x08  disable the I2C block read functionality
7562306a36Sopenharmony_ci 0x10  don't use interrupts
7662306a36Sopenharmony_ci 0x20  disable SMBus Host Notify
7762306a36Sopenharmony_ci ====  =========================================
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ciDescription
8162306a36Sopenharmony_ci-----------
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciThe ICH (properly known as the 82801AA), ICH0 (82801AB), ICH2 (82801BA),
8462306a36Sopenharmony_ciICH3 (82801CA/CAM) and later devices (PCH) are Intel chips that are a part of
8562306a36Sopenharmony_ciIntel's '810' chipset for Celeron-based PCs, '810E' chipset for
8662306a36Sopenharmony_ciPentium-based PCs, '815E' chipset, and others.
8762306a36Sopenharmony_ci
8862306a36Sopenharmony_ciThe ICH chips contain at least SEVEN separate PCI functions in TWO logical
8962306a36Sopenharmony_ciPCI devices. An output of lspci will show something similar to the
9062306a36Sopenharmony_cifollowing::
9162306a36Sopenharmony_ci
9262306a36Sopenharmony_ci  00:1e.0 PCI bridge: Intel Corporation: Unknown device 2418 (rev 01)
9362306a36Sopenharmony_ci  00:1f.0 ISA bridge: Intel Corporation: Unknown device 2410 (rev 01)
9462306a36Sopenharmony_ci  00:1f.1 IDE interface: Intel Corporation: Unknown device 2411 (rev 01)
9562306a36Sopenharmony_ci  00:1f.2 USB Controller: Intel Corporation: Unknown device 2412 (rev 01)
9662306a36Sopenharmony_ci  00:1f.3 Unknown class [0c05]: Intel Corporation: Unknown device 2413 (rev 01)
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciThe SMBus controller is function 3 in device 1f. Class 0c05 is SMBus Serial
9962306a36Sopenharmony_ciController.
10062306a36Sopenharmony_ci
10162306a36Sopenharmony_ciThe ICH chips are quite similar to Intel's PIIX4 chip, at least in the
10262306a36Sopenharmony_ciSMBus controller.
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ciProcess Call Support
10662306a36Sopenharmony_ci--------------------
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciBlock process call is supported on the 82801EB (ICH5) and later chips.
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ciI2C Block Read Support
11262306a36Sopenharmony_ci----------------------
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ciI2C block read is supported on the 82801EB (ICH5) and later chips.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ciSMBus 2.0 Support
11862306a36Sopenharmony_ci-----------------
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ciThe 82801DB (ICH4) and later chips support several SMBus 2.0 features.
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ciInterrupt Support
12462306a36Sopenharmony_ci-----------------
12562306a36Sopenharmony_ci
12662306a36Sopenharmony_ciPCI interrupt support is supported on the 82801EB (ICH5) and later chips.
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci
12962306a36Sopenharmony_ciHidden ICH SMBus
13062306a36Sopenharmony_ci----------------
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciIf your system has an Intel ICH south bridge, but you do NOT see the
13362306a36Sopenharmony_ciSMBus device at 00:1f.3 in lspci, and you can't figure out any way in the
13462306a36Sopenharmony_ciBIOS to enable it, it means it has been hidden by the BIOS code. Asus is
13562306a36Sopenharmony_ciwell known for first doing this on their P4B motherboard, and many other
13662306a36Sopenharmony_ciboards after that. Some vendor machines are affected as well.
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciThe first thing to try is the "i2c-scmi" ACPI driver. It could be that the
13962306a36Sopenharmony_ciSMBus was hidden on purpose because it'll be driven by ACPI. If the
14062306a36Sopenharmony_cii2c-scmi driver works for you, just forget about the i2c-i801 driver and
14162306a36Sopenharmony_cidon't try to unhide the ICH SMBus. Even if i2c-scmi doesn't work, you
14262306a36Sopenharmony_cibetter make sure that the SMBus isn't used by the ACPI code. Try loading
14362306a36Sopenharmony_cithe "fan" and "thermal" drivers, and check in /sys/class/thermal. If you
14462306a36Sopenharmony_cifind a thermal zone with type "acpitz", it's likely that the ACPI is
14562306a36Sopenharmony_ciaccessing the SMBus and it's safer not to unhide it. Only once you are
14662306a36Sopenharmony_cicertain that ACPI isn't using the SMBus, you can attempt to unhide it.
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ciIn order to unhide the SMBus, we need to change the value of a PCI
14962306a36Sopenharmony_ciregister before the kernel enumerates the PCI devices. This is done in
15062306a36Sopenharmony_cidrivers/pci/quirks.c, where all affected boards must be listed (see
15162306a36Sopenharmony_cifunction asus_hides_smbus_hostbridge.) If the SMBus device is missing,
15262306a36Sopenharmony_ciand you think there's something interesting on the SMBus (e.g. a
15362306a36Sopenharmony_cihardware monitoring chip), you need to add your board to the list.
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ciThe motherboard is identified using the subvendor and subdevice IDs of the
15662306a36Sopenharmony_cihost bridge PCI device. Get yours with ``lspci -n -v -s 00:00.0``::
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ci  00:00.0 Class 0600: 8086:2570 (rev 02)
15962306a36Sopenharmony_ci          Subsystem: 1043:80f2
16062306a36Sopenharmony_ci          Flags: bus master, fast devsel, latency 0
16162306a36Sopenharmony_ci          Memory at fc000000 (32-bit, prefetchable) [size=32M]
16262306a36Sopenharmony_ci          Capabilities: [e4] #09 [2106]
16362306a36Sopenharmony_ci          Capabilities: [a0] AGP version 3.0
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciHere the host bridge ID is 2570 (82865G/PE/P), the subvendor ID is 1043
16662306a36Sopenharmony_ci(Asus) and the subdevice ID is 80f2 (P4P800-X). You can find the symbolic
16762306a36Sopenharmony_cinames for the bridge ID and the subvendor ID in include/linux/pci_ids.h,
16862306a36Sopenharmony_ciand then add a case for your subdevice ID at the right place in
16962306a36Sopenharmony_cidrivers/pci/quirks.c. Then please give it very good testing, to make sure
17062306a36Sopenharmony_cithat the unhidden SMBus doesn't conflict with e.g. ACPI.
17162306a36Sopenharmony_ci
17262306a36Sopenharmony_ciIf it works, proves useful (i.e. there are usable chips on the SMBus)
17362306a36Sopenharmony_ciand seems safe, please submit a patch for inclusion into the kernel.
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ciNote: There's a useful script in lm_sensors 2.10.2 and later, named
17662306a36Sopenharmony_ciunhide_ICH_SMBus (in prog/hotplug), which uses the fakephp driver to
17762306a36Sopenharmony_citemporarily unhide the SMBus without having to patch and recompile your
17862306a36Sopenharmony_cikernel. It's very convenient if you just want to check if there's
17962306a36Sopenharmony_cianything interesting on your hidden ICH SMBus.
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ci----------------------------------------------------------------------------
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ciThe lm_sensors project gratefully acknowledges the support of Texas
18562306a36Sopenharmony_ciInstruments in the initial development of this driver.
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ciThe lm_sensors project gratefully acknowledges the support of Intel in the
18862306a36Sopenharmony_cidevelopment of SMBus 2.0 / ICH4 features of this driver.
189