howto use gpio
I stuck in using gpio.
The "old way" like in RPI dows not work.
WiringPi not possible at now and
libgpiod not possible to compile.
I dont know the new needed packages and how to get them work on Renegade with ubuntu 16.04....
Has anyone tried to use gpio?
Success?
I need some help at now....
Regards
Werner
Comments
GPIO support is compiled into the kernel by default. You need to find the rockchip gpio header files. From there, it should work like RPI. I am not sure if there are python bindings.
I am not sure if the sysfs interface for GPIO is enabled on the firefly images. For the mainline kernels that we will be releasing for Renegade, the sysfs interface can directly control the GPIO.
@loverpi CONFIG_GPIO_SYSFS=y is the default in your kernel. You should be able to access the GPIO through sysfs if you have the appropriate headers. I haven't tested this yet but everything looks to be in place within the kernel. Please keep in mind that the RPI GPIO is different from the Rock64 GPIO. It has a lot of pin overlap but they are not identical.
@bholland With SYSFS GPIO, you can just echo values into the /sys folder to control the GPIO without having to use the kernel headers. The ROC-RK3328-CC has nearly the same placement for all major alternative GPIO functions like I2C, SPI, etc so it is far more compatible than ROCK64 in that regard. ROCK64 has a bunch of NC (Not Connected) pins on the GPIO header.
@werner Try this: https://elinux.org/GPIO
Thanks, You helped me!
My fault:
As in RPI I tried to echo 22 to activate "GPIO22".
Because You explained GPIO is available and can be used with echoing values to /sys folder I recogniced the GPIOs on the Renegade-Board with ubuntu are from 1000 up.
Echoing 1022 to /sys folder activates something.
Now I have "only" to change to the different values.
And to compare the pinout.....
Thanks
Werner
I'd like to use the GPIO on this board, way faster than /sys allows. Is there any documentation you can send me... I would like to remap our raspi FPGA interface driver... I need both SPI and GPIO access details. For SPI, I need to find the max transfer spd... can I clock at 32 or 64 MHz?
Sorry,
I have no new infos.
I managed to activate GPIO with /sys but until now did not try out if I am able to switch my LED on / off.
And in RPI I always used /sys. I never thought of any faster.....
Regards
Werner
https://libre.computer/2018/05/19/gpio-headers-reference-for-aml-s905x-cc/