public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Hendrik <chasake@yahoo.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Sunxi (Allwinner A20) GPIO problems on u-boot 2016.1 and 2016.3-rc3 but not on 2015.10
Date: Wed, 2 Mar 2016 17:54:23 +0100	[thread overview]
Message-ID: <56D71ABF.4050300@yahoo.com> (raw)

I am trying to get an Olimex A20-SOM running but I am experiencing 
strange problems on some of the GPIO pins on the device.

We are using (amongst others) pin PE6  as GPIO output but somehow there 
seems to be a change between U-Boot 2015.10 and 2016.01 in the default 
behaviour of these particular pins.

When generating a default config in 2016.01 (for example using 
'A20-OLinuXino-Lime_defconfig' or 'A20-Olimex-SOM-EVB_defconfig') and 
then booting the device with this config I can observe the following:

'gpio status -a PE6' tells me that the pin is INPUT and the value is 
sometimes 0 and sometimes 1. When I measure the pin that is connected to 
3V3 using a 10K pull up on my board, I measure 0.83V. That is strange 
because it should be 3.3V (as it is said to be an input).

'gpio set PE6' tells me that the pin is now OUTPUT and set to 1, so I 
should measure 3V3 on the pin but the pin Voltage is actually around 
0.71V. Switching the pin low with 'gpio clear PE6' gives back a voltage 
of 0.83V. It seems that internally there is a pull down active or 
something although I cannot find this specifically set in the .config 
configuration file.

When using U-Boot 2015.10 the problem disappears completely (still using 
the defconfig). Although I'm fine with using U-Boot 2015.10, I think it 
is weird that the GPIO pin does not follow any of my instructions and 
seems to live its own life in 2016.01 and 2016.03-rc3.

So summarized, pin PE6 in U-Boot 2015.10 is OK:

     PE6 Set to input (default at startup) = 3V3 measured
     PE6 Set to output, high = 3V3 measured
     PE6 Set to output, low = 0V measured

In U-Boot 2016.01 and 2016.03-rc3 it's not OK

     PE6 Set to input (default at startup) = 0.83V measured
     PE6 Set to output, high = 0.83V measured
     PE6 Set to output, low = 0.71V measured

In addition to this; I'm booting a mainline kernel (not the special 
sunxi kernel). I can manage the GPIO pins there as well but the 
behaviour is the same (the same voltages measured). The kernel does not 
seem to have any specific runtime option for enabling or disabling pull 
ups or downs, but I didn't really look into this as u-boot already 
misbehaves and some of our peripherals won't start on boot because of this.

I hope anyone can help me out.

Regards,
Hendrik

             reply	other threads:[~2016-03-02 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02 16:54 Hendrik [this message]
2016-03-03  8:23 ` [U-Boot] Sunxi (Allwinner A20) GPIO problems on u-boot 2016.1 and 2016.3-rc3 but not on 2015.10 Hans de Goede
2016-03-03 16:54   ` Hendrik
2016-03-04  7:54     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D71ABF.4050300@yahoo.com \
    --to=chasake@yahoo.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox