On Fri, 14 Jun 2019 13:25 -07:00, Alexander Ivanov <amivanov@fastmail.com> wrote:
On Fri, 14 Jun 2019 12:09 -07:00, Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
On Fri, 14 Jun 2019 12:01:28 -0700, you said:
static const struct pci_device_id pch_gpio_pcidev_id[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) }, { 0, } }; MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
It is a PCI device with 8086/9d20 IDs.
Give this patch a try, if it works I'll push it upstream for you...
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c index 1d99293096f2..19884b5b2a74 100644 --- a/drivers/gpio/gpio-pch.c +++ b/drivers/gpio/gpio-pch.c @@ -439,6 +439,7 @@ static SIMPLE_DEV_PM_OPS(pch_gpio_pm_ops, pch_gpio_suspend, pch_gpio_resume);
static const struct pci_device_id pch_gpio_pcidev_id[] = { { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9d20) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8043) }, { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8803) },
I did try this. It did not enumerate. There is one little detail. This device is hidden by default in motherboard FW. However, I manually un-hide it before trying to enumerate the device.
gpio-pch driver's patched as you described, built out-of-tree and loaded. Then, I un-hide the device and rescan the bus:
# echo 1 > /sys/bus/pcie/rescan
On Fri, 14 Jun 2019 12:13 -07:00, Bjørn Mork <bjorn@mork.no> wrote:
"Valdis Klētnieks" <valdis.kletnieks@vt.edu> writes:
Though I'm having a hard time aligning that with "D31:F2". Are you confusing a PCI address with a PCI ID, or is this on a non-PCI bus?
"D31:F2" is device 31, function 2. We're used to see this as "1f.2".
The question is really: Is there such a device in the system? And if so: What's the ID? That's easy to find out:
lspci -vvvnns 0:1f.2
Device is indeed there: lspci -vvvnns 1f.1 00:1f.1 Memory controller [0580]: Intel Corporation Device [8086:9d20] (rev 21) Subsystem: Gigabyte Technology Co., Ltd Device [1458:1000] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency: 0 Region 0: Memory at 7d000000 (64-bit, non-prefetchable) [size=16M]
ps. I misstyped device address in my original post, it is supposed to be function 1 not 2: d31:f1.
gpio-pch depends on X86_32 || MIPS || COMPILE_TEST config GPIO_PCH tristate "Intel EG20T PCH/LAPIS Semiconductor IOH(ML7223/ML7831) GPIO" depends on X86_32 || MIPS || COMPILE_TEST select GENERIC_IRQ_CHIP the platform at hand, is not X86_32 nor MIPS. It means gpi-pch requires CONFIG_COMPILE_TEST (to compile drivers which wont load....). Sure enough, even when driver enumerates, it fails to map BAR: [ 105.965846] pci 0000:00:1f.1: [8086:9d20] type 00 class 0x058000 [ 105.965928] pci 0000:00:1f.1: reg 0x10: [mem 0xfd000000-0xfdffffff 64bit] [ 105.967084] pci 0000:00:1f.1: BAR 0: assigned [mem 0x7d000000-0x7dffffff 64bit] [ 105.978037] pch_gpio 0000:00:1f.1: pch_gpio_probe : pci_iomap FAILED [ 105.978194] pch_gpio 0000:00:1f.1: pch_gpio_probe Failed returns -12 [ 105.978317] pch_gpio: probe of 0000:00:1f.1 failed with error -12 Any suggestions on what driver (if any available) should be used instead?