Date: Sun, 12 Aug 2018 20:09:00 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 221777] merge the latest changes to the ig4 module from DragonFly BSD and add Kaby Lake / Intel 100 series platform support Message-ID: <bug-221777-227-ntrNsbpaYV@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-221777-227@https.bugs.freebsd.org/bugzilla/> References: <bug-221777-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221777 --- Comment #7 from marc.priggemeyer@gmail.com --- (In reply to Oleksandr Tymoshenko from comment #6) Please consider these two parts from the patch I provided last year: In ig4_reg.h: +/* Newer versions of the I2C controller allow to check whether + * the above ASSERT/DEASSERT is necessary by querying the DEVIDLE_CONTROL + * register. + * + * the RESTORE_REQUIRED bit can be cleared by writing 1 + * the DEVICE_IDLE status can be set to put the controller in an idle state + * */ + +#define IG4_RESTORE_REQUIRED 0x0008 +#define IG4_DEVICE_IDLE 0x0004 and in ig4_iic.c + v = reg_read(sc, IG4_REG_DEVIDLE_CTRL); + if (sc->version == IG4_SKYLAKE && (v & IG4_RESTORE_REQUIRED) ) { + reg_write(sc, IG4_REG_DEVIDLE_CTRL, IG4_DEVICE_IDLE | IG4_RESTORE_REQUIRED); + reg_write(sc, IG4_REG_DEVIDLE_CTRL, 0); + + reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_ASSERT_SKL); + reg_write(sc, IG4_REG_RESETS_SKL, IG4_RESETS_DEASSERT_SKL); + DELAY(1000); + } This reinitialization makes sure to activate the I2C controller after power down if necessary. It is based on the Intel 100 series PCH documentation. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-221777-227-ntrNsbpaYV>
