Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: i2c: piix4: Add ACPI section

Provide information how to reference I2C busses created by the PIIX4
chip driver from the ACPI code.

Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>

authored by

Konstantin Aladyshev and committed by
Andi Shyti
1922bc24 c366be72

+63
+63
Documentation/i2c/busses/i2c-piix4.rst
··· 109 109 Thinkpad laptops, but desktop systems may also be affected. We have no list 110 110 of all affected systems, so the only safe solution was to prevent access to 111 111 the SMBus on all IBM systems (detected using DMI data.) 112 + 113 + 114 + Description in the ACPI code 115 + ---------------------------- 116 + 117 + Device driver for the PIIX4 chip creates a separate I2C bus for each of its 118 + ports:: 119 + 120 + $ i2cdetect -l 121 + ... 122 + i2c-7 unknown SMBus PIIX4 adapter port 0 at 0b00 N/A 123 + i2c-8 unknown SMBus PIIX4 adapter port 2 at 0b00 N/A 124 + i2c-9 unknown SMBus PIIX4 adapter port 1 at 0b20 N/A 125 + ... 126 + 127 + Therefore if you want to access one of these busses in the ACPI code, port 128 + subdevices are needed to be declared inside the PIIX device:: 129 + 130 + Scope (\_SB_.PCI0.SMBS) 131 + { 132 + Name (_ADR, 0x00140000) 133 + 134 + Device (SMB0) { 135 + Name (_ADR, 0) 136 + } 137 + Device (SMB1) { 138 + Name (_ADR, 1) 139 + } 140 + Device (SMB2) { 141 + Name (_ADR, 2) 142 + } 143 + } 144 + 145 + If this is not the case for your UEFI firmware and you don't have access to the 146 + source code, you can use ACPI SSDT Overlays to provide the missing parts. Just 147 + keep in mind that in this case you would need to load your extra SSDT table 148 + before the piix4 driver starts, i.e. you should provide SSDT via initrd or EFI 149 + variable methods and not via configfs. 150 + 151 + As an example of usage here is the ACPI snippet code that would assign jc42 152 + driver to the 0x1C device on the I2C bus created by the PIIX port 0:: 153 + 154 + Device (JC42) { 155 + Name (_HID, "PRP0001") 156 + Name (_DDN, "JC42 Temperature sensor") 157 + Name (_CRS, ResourceTemplate () { 158 + I2cSerialBusV2 ( 159 + 0x001c, 160 + ControllerInitiated, 161 + 100000, 162 + AddressingMode7Bit, 163 + "\\_SB.PCI0.SMBS.SMB0", 164 + 0 165 + ) 166 + }) 167 + 168 + Name (_DSD, Package () { 169 + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 170 + Package () { 171 + Package () { "compatible", Package() { "jedec,jc-42.4-temp" } }, 172 + } 173 + }) 174 + }