[Solved] A20 LIME GPIO Block function

Started by Mark13, June 28, 2016, 09:58:09 AM

Previous topic - Next topic

Mark13

Hello,

in my project i try to write user code in C to access gpios of the A20-LIME 4GB board.
Finally the LIME shall be able to control some other hardware of a device.
I'm working with the mainline Kernel, u-boot and a modified sun7i-a20-olinuxino-lime.dts.

I came up with a working version of the u-boot-like mmap access method for the A20.
I can successfully control GPIO Blocks: B C H I , which indicates for me that config register
are set quite well.

What does not work:
I never managed to use GPIO-Blocks E and G. (which adress prior I and H)
They just seem not to function, even with U-Boot gpio control functions.

I have two identical boards here, both the same.
(As I know, I did'nt overvoltage the ports)

Does this make any sense?




Mark13

#1
or...to ask more precisely

do the Blocks E and G of the gpio controller are working like expected
on your olinuxino-LIME-4G ?

some other details i forgot:
-Block G Pins shows some small logic output like 0.8 V or so...
while Block E shows nothing.

- my program does:
  1. pin cfg to GPIO Out
  2. SUNXI_DRV_LEVEL to 1 (10mA)
  3. SUNXI_PULL_DOWN (UP and NONE => same)
  4. toggle the pin

Mark13

#2
a third A20-OLinuXino-LIME-4G Board, completely new out of the BOX
shows same behaviour:

- weak GPIO Block G 0.8V
- dead GPIO Block E
- other GPIO Blocks ok

1-Board A20-OLinuXino-LIME-4G Rev.C
2-Boards A20-OLinuXino-LIME-4G Rev.E

tested with U-Boot 2015.10-00427-g8168ee3

>:(

Mark13

Now the ports work as expected.
what I did was updating to the latest U-Boot / sunxi version to 2016.07.

For reasons I don't understand at the moment my c-code is working as well after installing
new U-Boot.

I compared both .config files from 2015.10 and 2016.07 and found lots of differences.
So it's very likely that my configuration of U-Boot was wrong.
...have to write Application code now.