Created attachment 246341 [details] dmesg output This issue is similar to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245654 but for Intel IceLake.
Created attachment 246342 [details] pciconf -lv output
Created attachment 246428 [details] icelake-i2c.patch Test attached patch.
Created attachment 246488 [details] dmesg output
Created attachment 246489 [details] pciconf -lv output Tell me if I tested the patch correctly. I'm a newbie. I applied the patch by: $ cd /sys/dev/ichiic/ $ sudo patch ig4_pci.c < icelake-i2c.patch Then compiled it by: $ cd /usr/src/sys/modules/i2c/controllers/ichiic/ $ sudo make And then I loaded the module by: $ sudo kldload /usr/obj/usr/src/amd64.amd64/sys/modules/i2c/controllers/ichiic/ig4.ko But it did not work. So I added the above module in kldlist of /etc/rc.conf and rebooted. Still it didn't.
Created attachment 246490 [details] devinfo -rv output Side question: How to add multiple attachments?
(In reply to Sam from comment #5) > Side question: How to add multiple attachments? I got it, it's not possible. If we want to add output of multiple commands we need to concatenate the files.
(In reply to Sam from comment #4) > But it did not work. So I added the above module in kldlist of /etc/rc.conf and rebooted. Still it didn't. ig4iic0 and ig4iic1 devices appeared in every file you attached. What do you mean 'not work' ?
(In reply to Vladimir Kondratyev from comment #7) Touchpad did not work.
I suspect that this touchpad is not working because of undetected serial bus devices. As we can see in pciconf output these two devices are undetected: none3@pci0:0:31:4: class=0x0c0500 rev=0x30 hdr=0x00 vendor=0x8086 device=0x34a3 subvendor=0x103c subdevice=0x86c8 none4@pci0:0:31:5: class=0x0c8000 rev=0x30 hdr=0x00 vendor=0x8086 device=0x34a4 subvendor=0x103c subdevice=0x86c8 After some work I managed to get the none3 device get detected by adding following lines in '/usr/src/sys/dev/ichsmb/ichsmb_pci.c' #define ID_ICELAKE 0x34a3 { PCI_DEV(PCI_VENDOR_INTEL, ID_ICELAKE), PCI_DESCR("Intel Ice Lake SMBus controller") }, Now new pciconf line for none3 is: ichsmb0@pci0:0:31:4: class=0x0c0500 rev=0x30 hdr=0x00 vendor=0x8086 device=0x34a3 subvendor=0x103c subdevice=0x86c8 For none4 I think we need to edit files in '/usr/src/sys/modules/intelspi', but I'm not sure what to put in these files. Here is the relevant file from Linux kernel https://lxr.linux.no/#linux+v6.0.9/drivers/spi/spi-intel-pci.c
(In reply to Sam from comment #8) iicbus driver did not find any ACPI info about devices attached to I2C bus. To be on the safe side, rebuild and reinstall whole kernel rather than single module with 'make -j`sysctl -n kern.smp.cpus` kernel'. Than test again. If it does not help, then attach 'acpidump -dt' output.
(In reply to Vladimir Kondratyev from comment #10) Thank you! Touchpad worked this time. I wonder why after building the whole kernel.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=789ffce392946d2f71a51bbac60db16dcdea2928 commit 789ffce392946d2f71a51bbac60db16dcdea2928 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-11-27 15:25:48 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2023-11-27 15:25:48 +0000 ig4: Add PCI IDs for Intel Ice Lake I2C controller. PR: 275115 Tested by: Sam <sam3423.yntmr_AT_slmail_DOT_me> MFC after: 2 weeks sys/dev/ichiic/ig4_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
(In reply to Sam from comment #11) > I wonder why after building the whole kernel. I don't know. May be updated linker hints did the trick.
Hi Can you test this patch for intel spi ? ``` --- sys/dev/intel/spi_pci.c.orig 2023-11-28 11:52:25.113630000 +0200 +++ sys/dev/intel/spi_pci.c 2023-12-15 12:33:35.695709000 +0200 @@ -46,6 +46,7 @@ enum intelspi_vers vers; const char *desc; } intelspi_pci_devices[] = { + { 0x34a48086, SPI_SUNRISEPOINT, "Intel Ice Lake-LP SPI Controller" }, { 0x9c658086, SPI_LYNXPOINT, "Intel Lynx Point-LP SPI Controller-0" }, { 0x9c668086, SPI_LYNXPOINT, "Intel Lynx Point-LP SPI Controller-1" }, { 0x9ce58086, SPI_LYNXPOINT, "Intel Wildcat Point SPI Controller-0" }, ```
(In reply to Dmitry Lukhtionov from comment #14) I applied the patch and compiled the kernel but, I think it's not getting detected. Relevant pciconf output: ``` none3@pci0:0:31:5: class=0x0c8000 rev=0x30 hdr=0x00 vendor=0x8086 device=0x34a4 subvendor=0x103c subdevice=0x86c8 vendor = 'Intel Corporation' device = 'Ice Lake-LP SPI Controller' class = serial bus ```
(In reply to Sam from comment #15) Relevant dmesg | grep spi output: ``` spi0: <Intel Ice Lake-LP SPI Controller> mem 0xfe010000-0xfe010fff at device 31.5 on pci0 spi0: Using MSI spi0: can't allocate IRQ resource device_attach: spi0 attach returned 6 ```
Can you use SPI_LYNXPOINT instead of SPI_SUNRISEPOINT ? And recompile module again thanks in advance
A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=36d6a456547cfe2a565bc60990e9cf421d267d07 commit 36d6a456547cfe2a565bc60990e9cf421d267d07 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-11-27 15:25:48 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2023-12-19 20:34:56 +0000 ig4: Add PCI IDs for Intel Ice Lake I2C controller. PR: 275115 Tested by: Sam <sam3423.yntmr_AT_slmail_DOT_me> sys/dev/ichiic/ig4_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2cbd132986a782f689e169f4bf47793e1fc8a147 commit 2cbd132986a782f689e169f4bf47793e1fc8a147 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-11-27 15:25:48 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2023-12-19 20:53:48 +0000 ig4: Add PCI IDs for Intel Ice Lake I2C controller. PR: 275115 Tested by: Sam <sam3423.yntmr_AT_slmail_DOT_me> (cherry picked from commit 789ffce392946d2f71a51bbac60db16dcdea2928) sys/dev/ichiic/ig4_pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
(In reply to Dmitry Lukhtionov from comment #17) Still no success. Relevant outputs: dmesg | grep spi ``` spi0: <Intel Ice Lake-LP SPI Controller> mem 0xfe010000-0xfe010fff at device 31.5 on pci0 spi0: Using MSI spi0: can't allocate IRQ resource device_attach: spi0 attach returned 6 ``` pciconf -lv ``` none3@pci0:0:31:5: class=0x0c8000 rev=0x30 hdr=0x00 vendor=0x8086 device=0x34a4 subvendor=0x103c subdevice=0x86c8 vendor = 'Intel Corporation' device = 'Ice Lake-LP SPI Controller' class = serial bus ```
Just my 2 cents: There seems to be a bug in MSI support in intel_spi. It always reports 'Using MSI' but ever fails to allocate them and silently falls back to wired ones. But according to pciconf output sent to me by Dmitry privately his Icelake SPI controller does not expose MSI capability, so that is not an issue. The aforementioned bug is originated in ig4 driver and have to be fixed in ig4 too.