Do the beagleboard/beaglebone GPIO pins have configurable pullups on them?

Coming from the Arduino world, one of the nice things about their GPIO
pins is that you can configure them to use internal pullups so that if
you have an open collector output on some peripheral you can just
connect it direct to the pin, enable the pull up and away you go.

Does the same exist on the TI chips in the beagleboard/bone?

David

Yes, that is possible. You have to pinmux correctly.

Thanks,
Joel

Is it possible using the userland gpio access? Can you point me at
any docs?

David

Actually, nothing has changed since the earlier beagleboards in this respect.

Here's some example code:
https://github.com/joelagnel/validation-scripts/blob/master/bone-tester/lib/utils.sh#L15

Again, you have to setup the pinmux correctly to make sure the pin on the expansion is a GPIO.

Thanks,
Joel

From: beagleboard@googlegroups.com
[mailto:beagleboard@googlegroups.com] On Behalf Of David Goodenough
Sent: Tuesday, November 01, 2011 12:39 PM
To: beagleboard@googlegroups.com
Subject: Re: [beagleboard] Do the beagleboard/beaglebone GPIO pins have
configurable pullups on them?

> > From: beagleboard@googlegroups.com
> > [mailto:beagleboard@googlegroups.com] On Behalf Of David Goodenough
> > Sent: Tuesday, November 01, 2011 11:30 AM
> > To: beagleboard@googlegroups.com
> > Subject: [beagleboard] Do the beagleboard/beaglebone GPIO pins have
> > configurable pullups on them?
> >
> > Coming from the Arduino world, one of the nice things about their
GPIO
> > pins is that you can configure them to use internal pullups so that
if
> > you have an open collector output on some peripheral you can just
> > connect it direct to the pin, enable the pull up and away you go.
> >
> > Does the same exist on the TI chips in the beagleboard/bone?
>
> Yes, that is possible. You have to pinmux correctly.
>
> Thanks,
> Joel
Is it possible using the userland gpio access? Can you point me at
any docs?

Actually, nothing has changed since the earlier beagleboards in this respect.

Here's some example code:
https://github.com/joelagnel/validation-scripts/blob/master/bone-tester/lib/utils.sh#L15

Again, you have to setup the pinmux correctly to make sure the pin on the expansion is a GPIO.

There isn't a good Linux userspace pinmux driver right now, but you
can hackish things. I've been mounting debugfs and writing the mode
to the mux control register [1]. This is *not* the right way to do
things, but it does document the need a bit for a real pinmux driver.

[1] https://github.com/jadonk/bonescript/blob/master/bonescript.js#L133

Yes, that is possible. You have to pinmux correctly.

pinmux settings defined at u-boot stage?
or they are overriding by Linux kernel during boot?

Yes, that is possible. You have to pinmux correctly.

pinmux settings defined at u-boot stage?
or they are overriding by Linux kernel during boot?

They can and should be overridden in the kernel. Right now, we rely too heavily on the settings from u-boot.

They can and should be overridden in the kernel. Right now, we rely too heavily on the settings from u-boot.

Please, tell me, how to get current pinmux state during runtime? I set
up pinmux in u-boot, but it doest not help me to get i2c functional.
I have board that have pullups to 2.5 V for SDA/SCL on it, with other
board I see proper 2.5 V when IDLE, when connected to Beagleboard -
strange floating levels...

But I disabled internal pullup and pulldown for these line in u-boot -
why level less than 1.8 V???

I have serious problems with I2C, it's stopping me in my project...
Please, refer to "[beagleboard] I2C-2 - timeouts" topic...

I hope I can get current pinmux states from 2.6.32-angstrom kernel...

For I2C you must have external pullups.Internal pullups are not enough.

Gerald