Hi there,
I can load the driver for the K20 GPIO expansion:
modprobe gpio-apalis-tk1-k20
And dmesg
confirms:
Firmware version 0.9.
gpiochip_add: registered GPIOs 856 to 1015 on device: generic
So let’s go on:
echo 952 > /sys/class/gpio/export
cat /sys/kernel/debug/gpio
[...]
GPIOs 856-1015, platform/apalis-tk1-k20-gpio, can sleep:
gpio-952 (sysfs ) in hi
GPIOs 1016-1023, platform/as3722-pinctrl, as3722-gpio, can sleep:
gpio-1018 (+V3.3 ) out hi
Looks good in principle, but it says “hi”, even if the Pin is indeed pulled low (yes, confirmed twice it’s that very pin, also tried with others). I can even do
echo low > /sys/class/gpio/gpio952/direction
cat /sys/kernel/debug/gpio
[...]
GPIOs 856-1015, platform/apalis-tk1-k20-gpio, can sleep:
gpio-952 (sysfs ) out hi
This is true for several GPIO ports I checked.
How to debug what’s going wrong here?
(I’m using a 3.10.40 kernel with some custom modifications. Devicetree untouched for spidev1.)
Only odd observation: When erasing K20 firmware and flashing it new, I get
apalis-tk1-k20 spi1.1: K20 FIFO Bug!
gpio wake34 for gpio=82
apalis-tk1-k20 spi1.1: Apalis TK1 K20 MFD driver.
But as I’m able to load the gpio driver afterwards, I suppose this FIFO bug is not critical.