GPIO Troubleshooting - Cannot Read or Write value (correctly)
I'm having difficulty getting the GPIO to work on the 4.9.0 kernel (2017.1 from Xilinx). I'm troubleshooting some MIO pins, and I'd like to either output a HIGH or LOW on the pins or read a HIGH or LOW value change.
The pin I'm currently focusing on is MIO 37.
I can export the pin using (base of 898):
echo > 935 /sys/class/gpio/export
And it shows up in /sys/class/gpio/ as gpio935
Then I do this:
And I get a 0. If I jump 3.3VDC to this pin, and redo the read I still get a zero value.
The MIO control register reads:
# devmem 0xF8000794
Which suggests it's correctly configured as a GPIO for the 3.3VDC level
# cat /sys/kernel/debug/gpio
gpiochip1: GPIOs 898-1015, parent: platform/e000a000.gpio, zynq_gpio:
gpio-935 ( |sysfs ) in lo
And from dmesg:
What I'm wondering at the moment is I've been reading this thread , and I'm using the 4.9.0 kernel which has the clock patch that fixed the OP's problem, but he shows that he edited the device tree to add pinctrl entries. Do I need to do this, because I haven't edited the device tree for anything related to GPIO -- I thought it would work since the pins seem to be recognized by the kernel.
Re: GPIO Troubleshooting - Cannot Read or Write value (correctly)
Bumping this thread to see if anyone has any suggestions.
I reconfigured my hardware to use an AXI GPIO, and the PL gpio works as expected (at least for input - haven't tried output ). Of course, in this case I have a specific device tree entry for the GPIO pin I'm using.