Does anyone have instructions on how to setup the pinctrl driver to access the Braswell GPIOs from LINUX? I have searched the forums and the net with no solution. Thank you, John C REF: "The Linux driver used to manage the UDOO X86 Braswell GPIOs is Cherryview/Braswell pinctrl driver" https://www.udoo.org/docs-x86/Hardware_&_Accessories/GPIOs.html
It is enabled by default. Just follow the instructions on that GPIO page to read for example gpio350: cat /sys/class/gpio/gpio350/value For more information the documentation already refers to the Linux GPIO Sysfs Interface for Userspace that can be used to access and control GPIO on a Linux system including the Udoo X86 What kind of GPIO handling do you want to do?
On Fedora 26 the gpio folder is empty: [root@udoo ~]# ls /sys/class/gpio ls: cannot access '/sys/class/gpio': No such file or directory [root@udoo ~]# cat /etc/redhat-release Fedora release 26 (Twenty Six) [root@udoo ~]# uname -a Linux udoo 4.11.9-300.fc26.x86_64 #1 SMP Wed Jul 5 16:21:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
In Ubuntu 16.04 LTS (default installation) there is, so you have to search why Fedora is not supporting gpio by default. udoox86@UDOO-x86:~$ ls /sys/class/gpio export gpiochip318 gpiochip373 gpiochip397 gpiochip456 unexport
Hello all, @waltervl , it's not possible for me to used : echo 497 > /sys/class/gpio/export Console send me a : permission non accordée it's the same with sudo !!! Have you an idea for use this command line ? Please, thank you Thierry
sudo echo 497 > /sys/class/gpio/export doesn't work because of how sudo and redirection works in Linux - sudo doesn't affect the redirection here. You can use for example: echo 497 | sudo tee /sys/class/gpio/export Command "tee" works a bit like redirection ">" does, except that you can use "sudo" with it.
See also this discussion how to setup a user group to have access to Udoo X86 gpio without having to use sudo: https://www.udoo.org/forum/threads/accessing-gpio-without-root.7949/
Hi all, I would like to do (by example) interruption on rx uart ttyACM0. I found torsvald foundation for intel linux, but i don't know how used it. https://github.com/torvalds/linux/tree/master/drivers/pinctrl Have you any example/tuto to do that ? Thanks Thierry
UART is a serial communication protocol that normally runs over 2 GPIO Pins (TX/TR). So if you want to check if there is serial communication over the UART bus than you use serial modules of the programming language you are working with. PySerial for example when using Python. Or you can write it yourself but it is difficult. The interrupt will be somehere in the PINCRTL lib you mentioned. But if you do not understand that now I would advise to keep it simple and use a higher level programming language
A high level programming don't give me interrupt access ... USB, not UART, is working fine, i saw it in ECLIPSE console, but now i want integrated in ROS application. I know it's pinctrl-cherryview.c source file to use, but comment are small ... I will find !
Hi! does anybody know how to use gpio directly ? regs = ioremap(0xdead0000, 4); like this Or how to learn base memory address to use gpio?
You can review the kernel driver code to understand how control a gpio pin. However beware this may not be possible from user space as direct access to the memory region might be protected. Also note the gpio pins are configured by the UEFI BIOS.
Im going to compile LKM . And i need use pin 330 for example. Its not clear for me - how to get address ?
There is little reason to access gipo through manipulating the registers yourself as that is the feature of the existing kernel driver. From LKM you can use the standard gpio api's for access.
Now i use fd = open("/sys/class/gpio/gpio330/value",0_WRONLY); and then write(fd,"1",1) or write(fd,"0",1) it works , but i wish do it faster (as quickly as possible) maybe ioctl works faster ?