[Avila] Gateworks Openwrt and GPIO

Mark Kelly mark.kelly at cadre5.com
Wed Jun 11 19:07:05 EDT 2008


Chris, 

Do you by chance know if gpio 1 is tied to something not in the
manual?  

gpioctl dirout 1

yields in locking up my gw2345, but 0 and 2 appear to work fine.   I see
gpio 1 as being unused in the tables in the manual but maybe I missed
something?

On Wed, 2008-06-11 at 18:38 -0400, Mark Kelly wrote:

> This is the patch I was sent:
> 
> 
> I don't know if this is related, but I had to make this patch for all 
> the gpio to work on a 2348-4:
> 
> [naw at scale ~]$ cat 
> kamikaze_svn/target/linux/ixp4xx/patches-2.6.24/403-avila_gpio_device_2348.patch
> Index: linux-2.6.24.2/include/asm-arm/arch-ixp4xx/avila.h
> ===================================================================
> --- linux-2.6.24.2.orig/include/asm-arm/arch-ixp4xx/avila.h
> +++ linux-2.6.24.2/include/asm-arm/arch-ixp4xx/avila.h
> @@ -41,4 +41,4 @@
>   #define AVILA_GW23X7_LED_USER_GPIO     4
> 
>   /* gpio mask used by platform device */
> -#define AVILA_GPIO_MASK        (1 << 1) | (1 << 3) | (1 << 5) | (1
> << 
> 7) | (1 << 9)
> +#define AVILA_GPIO_MASK        (1 << 1) | (1 << 3) | (1 << 5) | (1
> << 
> 7) | (1 << 9) | (1 << 0) | (1 << 2) | (1 << 4)
> 
> 
> On Wed, 2008-06-11 at 15:29 -0700, Chris Lang wrote:
> 
> >  
> > That would be correct, never saw a suggestion of adding gpio's 0, 2,
> > and 4 to the mask, but it really needs to be setup board
> > specifically.
> >  
> > - Chris
> > 
> >         ----- Original Message ----- 
> >         From: Mark Kelly 
> >         To: Chris Lang 
> >         Cc: avila 
> >         Sent: Wednesday, June 11, 2008 3:25 PM 
> >         Subject: Re: [Avila] Gateworks Openwrt and GPIO 
> >         
> >         
> >         Thanks Chris,
> >         
> >         so does the adding 0 2 4 to the mask like was suggested
> >         earlier get me control of those for the gw2345???
> >         
> >         Mark
> >         
> >         On Wed, 2008-06-11 at 15:22 -0700, Chris Lang wrote:
> >         
> >         >  
> >         > Mark, 
> >         > For the Avila, the gpio's currently are not configured on
> >         > a per board basis. You will notice in avila-setup.c that
> >         > it is flagged as needing to be done. Instead it has a
> >         > blanket mask of the following: 
> >         > #define AVILA_GPIO_MASK (1 << 1) | (1 << 3) | (1 << 5) |
> >         > (1 << 7) | (1 << 9) 
> >         > which means that you can only control gpio's 1, 3, 5, 7,
> >         > and 9. 
> >         > You will also need to set them as output's before trying
> >         > to set/clear them. So, in your example, you will need to
> >         > do the following to set/clear gpio 1: 
> >         > # gpioctl dirout 1 
> >         > # gpioctl set 1 
> >         > # gpioctl clear 1 
> >         > As for gpio 3, you are able to set/clear it without
> >         > setting the direction because the led driver set's it as
> >         > an output. 
> >         > - Chris 
> >         > 
> >         >         ----- Original Message ----- 
> >         >         From: Mark Kelly 
> >         >         To: avila 
> >         >         Sent: Wednesday, June 11, 2008 11:48 AM 
> >         >         Subject: [Avila] Gateworks Openwrt and GPIO 
> >         >         
> >         >         
> >         >         Anyone using the current openwrt and their
> >         >         gpiodev?
> >         >         
> >         >         I have this strange problem with my GW2345 and I'm
> >         >         not sure where to look.  I've found in the the
> >         >         openwrt patches where they assign gpio 3 to the
> >         >         LED which works great.  Now what doesn't appear to
> >         >         work is the other gpio on the board.  using the
> >         >         gpioctl package I can control gpio 3 just fine,
> >         >         but  if I try to turn gpio 0,1,2, or 4 on or off
> >         >         with it.  It just sits there.  It acts like it
> >         >         does something, but that status of those gpio
> >         >         never changes.  
> >         >         
> >         >         When I look at the patchset for gpio 3 it appears
> >         >         that it is latched and I'm wondering if I change
> >         >         the other gpio pins to be that way if I can
> >         >         control similarly?
> >         >         
> >         >         
> >         >         
> >         >         
> >         >         
> >         >         
> >         >         
> >         >         __________________________________________________
> >         >         
> >         >         
> >         >         
> >         >         _______________________________________________
> >         >         Avila mailing list
> >         >         Avila at lists.gateworks.com
> >         >         http://lists.gateworks.com/cgi-bin/mailman/listinfo/avila 
> 
> _______________________________________________
> Avila mailing list
> Avila at lists.gateworks.com
> http://lists.gateworks.com/cgi-bin/mailman/listinfo/avila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.gateworks.com/pipermail/avila/attachments/20080611/b736e1a8/attachment.htm 


More information about the Avila mailing list