Jonmoz,
You might not need to modify u-boot at all. By what you posted below, it
looks like GPIOs 144, 145, 146, and 147 are already enabled. Do these GPIOs
show up at all in /sys/class/gpio? If not, try running the following:
$ echo "number" > /sys/class/gpio/export
where number is the GPIO number you want to export from the kernel. You'll
have to export each GPIO separately. If this works, then you'll have a
separate 'gpioXXX' folder under /sys/class/gpio for each number you export.
Can't hurt to try this before reconfiguring u-boot.
On Tue, Jan 26, 2010 at 1:07 PM, Jonmoz <jmozeika@...> wrote:
>
> Hi,
>
> I'm attempting to do something somewhat similar. Essentially I need to be
> able to drive some of the GPIO ports from the kernel (specifically ports
> 144, 145, 146, 147, and 151). I have located overo.h and am looking
> through
> it.
>
> I'm not exactly sure how to enable these GPIOs, and am slightly hesitant to
> muck (mux? :D) up the code without being fairly sure what I'm doing.
>
> So this question should be pretty easy:
>
> What lines do I change in overo.h to enable these GPIOs? For example, I
> see
>
> MUX_VAL(CP(UART2_CTS), (IEN | PTD | DIS | M4)) /*GPIO_144
> - LCD_EN*/\
> MUX_VAL(CP(UART2_RTS), (IEN | PTD | DIS | M4))
> /*GPIO_145*/\
> MUX_VAL(CP(UART2_TX), (IEN | PTD | DIS | M4))
> /*GPIO_146*/\
> MUX_VAL(CP(UART2_RX), (IEN | PTD | DIS | M4))
> /*GPIO_147*/\
>
> But have no idea whether changing DIS to EN by itself would do the trick,
> or
> whether I have to change the MUX value itself, or the mode.
>
> As always, any help is appreciated,
> Jon
>
> coderdrone wrote:
> >
> >>
> >> I think u-boot-omap3 is the version you want to be using.
> >>
> >> scott@...$ grep -r u-boot * |
> grep
> >> overo
> >> machine/overo.conf:PREFERRED_PROVIDER_virtual/bootloader =
> "u-boot-omap3"
> >> machine/omap3.conf:# there is no generic omap3 u-boot, so just build the
> >> overo one
> >>
> >> You might want to manage your changes with a patch file so it fits
> >> smoothly
> >> into the OE framework.
> >>
> >> Go ahead and build u-boot-omap3 once so that the source gets extracted
> >> into
> >>
> >>
> >>
> $TMPDIR/work/over-angstrom-linux-gnueabi/u-boot-omap3-1_2009.11+r1+git87d93a1ba2ae23550e1370adb7a3b00af0831165-r1
> >>
> >> (The version info after u-boot-omap3 might change.)
> >>
> >> (TMPDIR is defined in ~/overo-oe/build/conf/site.conf)
> >>
> >> Then to modify git/board/overo/overo.h file, you could do the following
> >>
> >> $ cd
> >>
> >>
> $TMPDIR/work/over-angstrom-linux-gnueabi/u-boot-omap3-1_2009.11+r1+git87d93a1ba2ae23550e1370adb7a3b00af0831165-r1
> >>
> >> $ cp git/board/overo/overo.h git/board/overo/overo.h-orig
> >>
> >> $ vi git/board/overo/overo.h
> >>
> >> $ [make your changes and save it]
> >>
> >> $ git diff git/board/overo/overo.h-orig git/board/overo/overo.h >
> >> my-pin-mux.patch
> >>
> >> $ cp my-pin-mux.patch
> >> ~/overo-oe/org.openembedded.dev/recipes/u-boot/u-boot-omap3-git/
> >> (Note that it is u-boot-omap3<dash>git)
> >>
> >> Now edit the u-boot-omap3_git.bb recipe to include the patch.
> >>
> >> $ cd ~/overo-oe
> >>
> >> $ vi org.openembedded.dev/recipes/u-boot/u-boot-omap3_git.bb
> >> (Note that it is u-boot-omap3<underscore>git.bb)
> >>
> >> ...
> >> SRC_URI = "git://git.denx.de/u-boot.git;protocol=git \
> >> file://fw_env.config \
> >> file://tincan.patch;patch=1 \
> >> file://gpmc-net.patch;patch=1 \
> >> + file://my-pin-mux.patch;patch=1 \
> >> "
> >> ...
> >>
> >> When you don't want the patch applied just remove the line you added
> from
> >> the recipe.
> >>
> >> Then rebuild u-boot
> >>
> >> $ cd ~/overo-oe
> >>
> >> The clean will remove the
> >> $TMPDIR/work/overo-angstrom-linux-gnueabi/u-boot... directory
> >> $ bitbake -c clean u-boot-omap3
> >>
> >> The rebuild will apply the patches after extraction
> >> $ bitbake -c rebuild u-boot-omap3
> >>
> >> If it works you'll have a new u-boot-overo.bin file here
> >>
> >> $TMPDIR/deploy/glibc/images/overo/u-boot-overo.bin
> >>
> >> Seems like a lot of work at first, but at the end you only have to
> manage
> >> the patch
> >> file or files if you have different versions. It also makes it easy to
> >> move
> >> around
> >> among different build machines.
> >>
> >> You can put the new u-boot on a microSD card using these instructions
> >>
> >>
> http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/111.html
> >>
> >> or first copy it to the overo filesystem and then use the mtd tools to
> >> copy
> >> it to nand using these instructions
> >>
> >>
> http://www.gumstix.net/Setup-and-Programming/view/Overo-Setup-and-Programming/Writing-images-to-onboard-nand/111.html
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/-Gumstix-Users--GPIO-pin-usage-tp26879785p26980554.html
> >> Sent from the Gumstix mailing list archive at Nabble.com.
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> This SF.Net email is sponsored by the Verizon Developer Community
> >> Take advantage of Verizon's best-in-class app development support
> >> A streamlined, 14 day to market process makes app distribution fast and
> >> easy
> >> Join now and get one step closer to millions of Verizon customers
> >> http://p.sf.net/sfu/verizon-dev2dev
> >> _______________________________________________
> >> gumstix-users mailing list
> >> gumstix-users@...
> >> https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >>
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/-Gumstix-Users--GPIO-pin-usage-tp26879785p27327104.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@...
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
|