https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221777

--- Comment #7 from marc.priggeme...@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.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to