Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mroge7
Beginner
1,869 Views

Using interrupts with Kaby Lake Sunrise Point GPIO driver

Hope someone can help !

I'm using 4.11.12 on Fed 25, with a C236 PCH. pinctrl_sunrisepoint & pinctrl_intel modules are loaded.

I can use /sys/class/gpio/export and friends to do I/O, but I need interrupts also.

Echoing for ex. "both" to gpio475/edge causes these to appear in /proc/interrupts:

14: 0 0 0 0 0 0 0 0 IR-IO-APIC 14-fasteoi INT345D:00

292: 0 0 0 0 0 0 0 0 intel-gpio 155 gpiolib

But setting it as input and toggling it generates no interrupts. I also tried the C code here:

https://developer.ridgerun.com/wiki/index.php?title=Gpio-int-test.c https://developer.ridgerun.com/wiki/index.php?title=Gpio-int-test.c

but I never see the interrupt counts increment...

Ultimately I must create a driver with my own interrupt service rtn, but it would be great

to get this working first.

Thanks in advance,

Martin

0 Kudos
5 Replies
CarlosAM_INTEL
Moderator
150 Views

Hello, mrogers2 :

Thank you for contacting Intel Embedded Community.

In order to be on the same page, could you please give me the part number and SKU of the processor related to this threat? By the way, could you please explain us the meaning of the phrase "4.11.12 on Fed 25"?

Please let us know all the information that should answer the previous questions.

We really appreciate your cooperation.

Best regards,

Carlos_A.

mroge7
Beginner
150 Views

Hey,

I'm using Fedora 25, kernel updated to version 4.11.12.

The CPU is a Xeon E3-1505L v6, and the PCH (where the GPIOs are !) is a CM238.

This should be enough to identify the parts closely enough to answer this linux driver question..

thx,

marty

CarlosAM_INTEL
Moderator
150 Views

Hello, mrogers2 :

Thanks for your update.

Based on the information stated on page 5 of the https://www.intel.com/content/dam/www/public/us/en/documents/platform-briefs/xeon-processor-e3-1500-... Intel(R) Xeon(R) Processor E3-1200 v6 and E3-1500 v6 Processor Families with Intel(R) C236 and CM238 Series Chipsets: Platform Brief document # 335409 as a reference you should address this kind of consultations to the https://ask.fedoraproject.org/en/questions/ Questions - Ask Fedora: Community Knowledge Base and Support Forum.

We hope that this information may help you.

Best regards,

Carlos_A.

mroge7
Beginner
150 Views

thanks.. but this is not Fedora-specific. and Fedora generally has no info on such a low level issue.

i actually got it to work, using my kernel's tools/gpio/gpio-event-mon.c program. I just had to 'export' the

input first.

Two hitches- the gpiolib code seems to not know the Sunrise Point-H Group E has only 13 GPIOs, not the full 24,

hence i had to pass an adjusted GPIO # to gpio-event-mon (because my interrupt line is on group G, and the mis-

numbering affects everything after E12..).

Second, it always reports "rising edge" (never falling edge) no matter if I pass -r, -f, both, or neither, and no matter

the actual edge of the GPIO change !

Anyone want to comment on these two issues?

Martin

CarlosAM_INTEL
Moderator
150 Views

Hello, mrogers2:

Thanks for your clarification.

We suggest you as a reference address your previous consultations to the following support channel since you are creating your own driver, which is a situation out of our scope of support:

https://www.bugzilla.org/

We hope that this information may help you.

Best regards,

Carlos_A.