aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ichiic/ig4_pci.c
Commit message (Collapse)AuthorAgeFilesLines
* ichiic: Add PCI id for Arrow Lake.Takanori Watanabe2025-07-081-0/+12
| | | | | | | Add PCI id for Arrow Lake to attach iic driver Reviewed by: wulf, mav Differential Revision: https://reviews.freebsd.org/D51107
* ig4(4): Add several PCI IDs for Intel Jasper Lake controllersJean-Sébastien Pédron2025-05-081-0/+12
| | | | | | | | | | | | | | The first added ID was found in a Asus E510KA laptop by the reporter. They tested the patch successfully: with that patch, the Elantech touchpad was properly detected and worked fine. Other PCI IDs were not tested but they are from the same family. Reported by: Lukas Friedrich Tested by: Lukas Friedrich Reviewed by: wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D49879
* ig4(4): Add Raptor Lake PCI IDsBen Wilber2025-04-281-0/+12
| | | | | Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1678
* ig4(4): Add Meteor Lake PCI IDsAustin Shafer2024-11-091-0/+4
| | | | | PR: 282389 MFC after: 3 days
* Add smbus and i2c device IDs for Meteor LakeSHENG-YI HONG2024-08-131-0/+8
| | | | | | | | Reviewed by: emaste, Daniel Schaefer <dhs@frame.work> MFC after: 3 days Sponsored by: Framework Computer Inc Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46249
* ig4: Add PCI IDs for Intel Ice Lake I2C controller.Vladimir Kondratyev2023-11-271-0/+12
| | | | | | PR: 275115 Tested by: Sam <sam3423.yntmr_AT_slmail_DOT_me> MFC after: 2 weeks
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* ichiic: use bool for one-bit wide bit-fieldsDimitry Andric2023-04-191-2/+2
| | | | | | | | | | | A one-bit wide bit-field can take only the values 0 and -1. Clang 16 introduced a warning that "implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1". Fix by using c99 bool. Reported by: Clang Reviewed by: emaste, wulf MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D39665
* ichiic: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-091-2/+1
|
* ig4: Add PCI IDs for Intel Alder Lake I2C controller.Alexander Motin2021-11-251-0/+40
| | | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> MFC after: 2 weeks
* ig4: Add PCI IDs for Intel Gemini Lake I2C controller.Vladimir Kondratyev2021-02-231-0/+16
| | | | | Submitted by: Dmitry Luhtionov MFC after: 2 weeks
* ig4(4): Add PCI IDs for Intel Tiger LakeVladimir Kondratyev2020-12-051-0/+30
| | | | | | | | Submitted by: Neel Chauhan <neel AT neelc DOT org> Differential Revision: https://reviews.freebsd.org/D27483 Notes: svn path=/head/; revision=368366
* ig4(4): Add PCI IDs for Intel Comit Lake I2C controllers.Vladimir Kondratyev2020-10-311-0/+28
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=367230
* ig4(4): Add PCI IDs for Intel Bay Trail I2C controllers.Vladimir Kondratyev2020-04-261-0/+14
| | | | | | | | | PR: 245654 Reported by: <xspbe3ho3p5uac@protonmail.com> MFC after: 1 week Notes: svn path=/head/; revision=360355
* [ig4] Remove unused methods from bus interfaceVladimir Kondratyev2019-12-101-2/+0
| | | | | | | | | | | bus_get/set_resource methods are implemented in child device (iicbus). As their implementation with bus_generic_rl_get/set calls do not recurse up the tree, the versions in ig4 are never called. Suggested by: jhb Notes: svn path=/head/; revision=355596
* [ig4] Add support for CannonLake controllersVladimir Kondratyev2019-11-031-1/+21
| | | | | | | | | | They are clocked at 216MHz rate, much higher than previous models. PR: 240485 Submitted by: Neel Chauhan <neel@neelc.org> Notes: svn path=/head/; revision=354320
* [ig4] Add generic resource methods to bus interfaceVladimir Kondratyev2019-11-031-0/+12
| | | | | | | That allows ig4 children to allocate IRQs Notes: svn path=/head/; revision=354319
* [ig4] Add suspend/resume supportVladimir Kondratyev2019-11-031-0/+18
| | | | | | | | | | That is done with re-execution of controller initialization procedure from resume handler. PR: 238037 Notes: svn path=/head/; revision=354308
* [ig4] Allow enabling of polled mode from iicbus allocation callbackVladimir Kondratyev2019-11-031-1/+1
| | | | | | | | | | If controller is allocated with IIC_NOWAIT option ig4 enables polled mode for a period of allocation that makes possible to start I2C transfers from the contexts where sleeping is not allowed e.g. from ithreads or callouts. Notes: svn path=/head/; revision=354302
* [ig4] Give common name to PCI and ACPI device driversVladimir Kondratyev2019-11-031-8/+4
| | | | | | | | | | | | | They share common device driver code with different bus attachments This commit starts a bunch of changes which have following properties: Reviewed by: imp (previous version) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D22016 Notes: svn path=/head/; revision=354291
* Catch up with r338948.Mark Johnston2018-12-171-1/+1
| | | | | | | MFC with: r342178 Notes: svn path=/head/; revision=342180
* Revert r336326.Mark Johnston2018-12-171-4/+2
| | | | | | | | | | | | | | | | | | | | | In testing on a Dell Latitude 7480, having ig4.ko loaded during a suspend caused the system to hang. It turns out that ig4iic_intr() was being called after the device entered D3, and entered an infinite loop because a read of the I2C status register returned all ones, causing us to attempt to read a byte from the data buffer until one of the status bits clears. This occured because ig4iic_pci0 shares an interrupt with the VGA device on this laptop, so ig4iic_intr() gets called even when there is no work to do. This is exactly the problem fixed by r342170, which resolves the hang for me and allows suspend/resume to work with ig4.ko loaded. So, re-enable autoloading of ig4.ko in the hope that r342170 resolves the problem universally. Reviewed by: gonzo MFC after: 1 month (pending an MFC of r342170) Differential Revision: https://reviews.freebsd.org/D18587 Notes: svn path=/head/; revision=342178
* [ig4] Fix device description for Kaby Lake systemsOleksandr Tymoshenko2018-09-161-2/+2
| | | | | | | | | | Kaby Lake I2C controller is Intel Sunrise Point-H not Intel Sunrise Point-LP. Submitted by: Dmitry Luhtionov Approved by: re (kib) Notes: svn path=/head/; revision=338701
* [ig4] Add PCI IDs for I2C controller on Intel Kaby Lake systemsOleksandr Tymoshenko2018-09-131-0/+4
| | | | | | | | | PR: 221777 Approved by: re (kib) Submitted by: marc.priggemeyer@gmail.com Notes: svn path=/head/; revision=338654
* Remove MODULE_PNP_INFO for ig4(4) driverOleksandr Tymoshenko2018-07-161-2/+4
| | | | | | | | | | | | | ig4(4) does not support suspend/resume but present on the hardware where such functionality is critical, like laptops. Remove PNP info to avoid breaking suspend/resume on the systems where ig4(4) load is not explicitly requested by the user. PR: 229791 Reported by: Ali Abdallah Notes: svn path=/head/; revision=336326
* ig4(4): add devmatch(8) PNP infoOleksandr Tymoshenko2018-07-091-3/+4
| | | | | | | | Now that we have all devices ids in a table add MODULE_PNP_INFO macro to let devmatch autoload module Notes: svn path=/head/; revision=336142
* ig4(4): Fix Apollo lake entries platform identifierOleksandr Tymoshenko2018-07-061-8/+8
| | | | | | | | | Identify Apollo Lake controllers as IG4_APL and not as a IG4_SKYLAKE Reported by: rpokala@ Notes: svn path=/head/; revision=336051
* ig4(4): add support for Apollo Lake I2C controllersOleksandr Tymoshenko2018-07-061-61/+51
| | | | | | | | | | | Add PCI ids for I2C controllers on Apollo Lake platform. Also convert switch/case probe logic into a table. Reviewed by: avg Differential Revision: https://reviews.freebsd.org/D16120 Notes: svn path=/head/; revision=336050
* [ig4] Add support for i2c controllers on Skylake and Kaby LakeOleksandr Tymoshenko2018-03-061-0/+40
| | | | | | | | | | | | | | | This was tested by Ben on HP Chromebook 13 G1 with a Skylake CPU and Sunrise Point-LP I2C controller and by me on Minnowboard Turbot with Atom E3826 (formerly Bay Trail) Submitted by: Ben Pye <ben@curlybracket.co.uk> Reviewed by: gonzo Obtained from: DragonflyBSD (a4549657 by Imre Vadász) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D13654 Notes: svn path=/head/; revision=330558
* [ig4] Add ACPI platform support for ig4 driverOleksandr Tymoshenko2016-12-261-17/+8
| | | | | | | | | | | | Add ACPI part for ig4 driver to make it work on Intel BayTrail SoC where ig4 device is available only through ACPI Reviewed by: avg MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8742 Notes: svn path=/head/; revision=310621
* Add Braswell PCI IDs for Intel CherryviewConrad Meyer2016-12-201-0/+24
| | | | | | | | | Submitted by: Johannes Lundberg <yohanesu75 at gmail.com> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8861 Notes: svn path=/head/; revision=310340
* ichiic/ig4: completely disengage from smbusAndriy Gapon2016-11-021-19/+1
| | | | | | | MFC after: 5 weeks Notes: svn path=/head/; revision=308219
* add iic interface to ig4 driver, move isl and cyapa to iicbusAndriy Gapon2016-10-301-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The hardware does not expose a classic SMBus interface. Instead it has a lower level interface that can express a far richer I2C protocol than what smbus offers. However, the interface does not provide a way to explicitly generate the I2C stop and start conditions. It's only possible to request that the stop condition is generated after transferring the next byte in either direction. So, at least one data byte must always be transferred. Thus, some I2C sequences are impossible to generate, e.g., an equivalent of smbus quick command (<start>-<slave addr>-<r/w bit>-<stop>). At the same time isl(4) and cyapa(4) are moved to iicbus and now they use iicbus_transfer for communication. Previously they used smbus_trans() interface that is not defined by the SMBus protocol and was implemented only by ig4(4). In fact, that interface was impossible to implement for the typical SMBus controllers like intpm(4) or ichsmb(4) where a type of the SMBus command must be programmed. The plan is to remove smbus_trans() and all its uses. As an aside, the smbus_trans() method deviates from the standard, but perhaps backwards, FreeBSD convention of using 8-bit slave addresses (shifted by 1 bit to the left). The method expects 7-bit addresses. There is a user facing consequence of this change. A user must now provide device hints for isl and cyapa that specify an iicbus to use and a slave address on it. On Chromebook hardware where isl and cyapa devices are commonly found it is also possible to use a new chromebook_platform(4) driver that automatically configures isl and cyapa devices. There is no need to provide the device hints in that case, Right now smbus(4) driver tries to discover all slaves on the bus. That is very dangerous. Fortunately, the probing code uses smbus_trans() to do its job, so it is really enabled for ig4 only. The plan is to remove that auto-probing code and smbus_trans(). Tested by: grembo, Matthias Apitz <guru@unixarea.de> (w/o chromebook_platform) Discussed with: grembo, imp Reviewed by: wblock (docs) MFC after: 1 month Relnotes: yes Differential Revision: https://reviews.freebsd.org/D8172 Notes: svn path=/head/; revision=308104
* Protect smbus ioctls in ig4 driver using a shared lock.Michael Gmelin2015-06-251-5/+10
| | | | | | | | | | | Document locking semantics. Differential Revision: https://reviews.freebsd.org/D2744 Reviewed by: jah, kib Approved by: kib Notes: svn path=/head/; revision=284803
* ig4 - Intel fourth gen integrated I2C SMBus driver.Michael Gmelin2015-05-301-0/+192
Differential Revision: https://reviews.freebsd.org/D2372 Reviewed by: jhb, wblock, adrian Approved by: jhb, wblock Relnotes: yes Notes: svn path=/head/; revision=283766