Re: Intel Atom I2C

From: Imre Vadasz <imre_at_vdsz.com>
Date: Tue, 21 Jun 2016 15:39:04 +0200
Hi,

No driver for the DMA controller is needed for using the I2C controllers.
On many devices the I2C controllers are only mapped as ACPI devices, and
not as PCI-devices, but the existing ichiic driver can trivially be
adapted to attach via acpi, which is already done by DragonFly's ichiic:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/bus/smbus/ichiic/ig4_acpi.c


On many Cherryview devices, the I2C controller driver needs to install a
handler for ACPI accesses to I2cSerialBus fields inside of GenericSerialBus
operation regions.
I have already committed the I2cSerialBus operation region Field handling to
DraognFly master (implemented by the smbacpi(4) driver which attaches as a
child to ichiic:
  https://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/bus/smbus/smbacpi/smbacpi.c)

The I2cSerialBus operation region Field handling is e.g. needed on the
HP X2 210 tablet/detachable for the AC adapter and ACPI battery devices,
as well as for activating power on the external micro-sd card slot via
the sdhc controller's _PS0 ACPI-method.


Peripheral devices hanging on the I2c busses usually are detected as ACPI
devices, which have I2cSerialBus resource entries.
On current Cherryview devices the I2c peripheral devices usually aren't
explicitly child devices of the I2c-Controller devices, but the
I2cSerialBus resources contain a string which can be dereferenced to get
the corresponding I2c-bus device.
The same mechanism is used for mapping GPIO pins and GPIO interrupts
(with the GpioInt and GpioIo resource entries).

Also, since the I2c peripheral devices usually are no longer children of
the I2c-bus, the correct device attachement/initialization order needs to
be derived via the _DEP acpi methods.
Received on Tue Jun 21 2016 - 11:39:10 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:06 UTC