Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHi Ravi,
It seems you have setup the GPIO's correctly in the .SOF file and are able to access them through linux, so if the GPIO 29 to 34 are linked correctly (or not connected to any HPS controller i.e. SPI, UART etc) and you have doubled checked this. Then your right to assume its a Linux resolution. What I suggest is you perform the following sequence within linux to correctly make sure no other drivers are linked to the device. To see how the GPIO's are setup for the working pins and also duplicate this driver for the non-working pins. These are the steps: cat /sys/kernel/debug/gpio The above command in Linux performs a category display of the kernel gpio pins... if you have any drivers linked to the gpio numbers it will say here. So from this information you need to see if any drivers are linked to the working pins? (e.g. GPIO 222 / HPS_LED 53) - If they are you will need to duplicate this driver by binding it to the correct driver. You can do this in Linux or via the Linux Device Tree for a custom built development it suggest just copy the other GPIOs to to a driver and they are linked. Alternatively if this suggest no drivers are connected to the pins and they are all GPIO output enabled then you need to see if the non-working ones are binded to a driver such as "led-gpio" or alternate drivers dependable on your system configuration. If they are this means they are uncontrollable from this point as they are attached direct to a specific driver and need to be un-binded first. (This can be again done in the linux device tree look at where the GPIO's are set up remove and create a new device tree). Or an alternate method would be just to unbind it from Linux itself using the following command syntax below: echo "leds-gpio" > /sys/bus/platform/drivers/leds-gpio/unbind Please note where it says leds-gpio for both the echo and driver you need to alter for exactly the same driver that is linked to you system you should then be able to read and write to these GPIO's.. Does this makes sense? Best of Luck Kyle