GPIO use
The main problem concern is that the mapping provided does not contain the port numbers GPIO side OS (Ubilinux). After some tests, it turns out that the GPIO ports on the Linux side start at 318 and then dispatch "randomly" (it's over 500). It is therefore difficult to connect the pin 46 (GPIO25 / PWM0) with the corresponding port on the Linux side. It is necessary for us to interface with a driver.
Could you help us to use GPIO port with linux?
Comments
-
Hi ,
UP Core is still not in officially released yet. We will come back to support once we finish all the verification and start mass production. -
FYI,
it's possible to retrieve the information from the relevant Intel pinctrl driver that handles the mapping:GPIOs are divided into 4 groups, and you can find the base number for each group with:
cat /sys/kernel/debug/gpio
which on my setup gives:
gpiochip3: GPIOs 318-372, parent: platform/INT33FF:03, INT33FF:03: gpiochip2: GPIOs 373-396, parent: platform/INT33FF:02, INT33FF:02: gpiochip1: GPIOs 397-455, parent: platform/INT33FF:01, INT33FF:01: gpio-404 ( |ACPI:OpRegion ) out hi gpiochip0: GPIOs 456-511, parent: platform/INT33FF:00, INT33FF:00:
Then, you need to lookup the index of the GPIO you need (in my case Pin32 of the 100-pin connector, ISH_GPIO0 on the UpCore datasheet, which correspondes to "MF_ISH_GPIO_0" in the driver) and sum it to the relevant base GPIO number (in my case 373, so the Linux GPIO for that pin is 373+18=391).
It still would be nice if someone has time to prepare a ready available table as there is one for the UpBoard.
-
Hi @stez_mind ,
Thanks a lot for that information. It will be useful!
And yes, it will be very nice to get a GPIO table for UP core.
Cheers!
-
are there any forums with examples about compatible expansion boards and how to connect to the GPIO ports physically
-
@toinas some are listed ion this wiki page: https://wiki.up-community.org/Verified_HATs
-
Hi @nukular ,
Thanks for sharing the link!