I have two Rock Pi S v13 boards. I am using: Armbian_22.05.0-trunk_Rockpi-s_bullseye_current_5.15.32_minimal image. My application requires higher number of GPIOs.
In armbian I am using libgpiod to control the GPIO. The issue is I can not control the following GPIOs on Header 2:
GPIO2_B5 (Always High)
GPIO2_B6
GPIO2_B7
GPIO2_C0
This problem is also present for few Header 1 pins which includes:
GPIO2_A7
GPIO1_C7
GPIO1_C6
The GPIOs are not controllable through sysfs also.
In shell I execute following commands as root:
cd /sys/class/gpio
echo 77 > ./export #GPIO2_B5 Pin number
cd ./gpio77
echo out > direction
echo 1 > value
Command completes without any error, but GPIO hardware state doesn’t change. It happens in both boards so it is not a hardware issue. (GPIO2_B5 is always high after boot)
Are these pins muxed with any other driver or used by system? If so please provide Device tree overlays to disable the pin muxing and use them as GPIO.
Please retest with our debos image first, as the Armbian image we provided is only because there is no downloadable official Armbian image for ROCK S. We don’t provide support to Armbian directly, although if an issue is confirmed to be Armbian-only and not present in our image, we might create PR for them.
Please read the release note on the download page to find out which image you should use.
@Nasca I think there’s some confusion on the numbering. I am considering the pins marked with the oval as the problematic mentioned pins, I just noticed the difference right now.
I consider pin numbering starting from the USB side just like Header 1 and as portrayed on GPIO Pinout page of Rock pi s. Can you please clarify the numbering convention on the headers, where we need to count pin 28?
Let me just check. I think I have been considering the Header 2 orientation to be same as Header 1. This is quite confusing even from official documentation. @Nasca I think these images should be included in the Pinout documentation so that people don’t get confused about orientations of Headers. The documentation specifies the header pin numbers but does not specify how headers are oriented on the board.
I will once again check GPIOs as per this orientation and let you know if I can control the GPIOs or not.
@Nasca, I have checked the GPIO as per header 2 orientation. The pins can be controlled as intended.
Thanks for the support. I wish wiki will be updated to save trouble to other users.