linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jarkko Nikula <jhnikula@gmail.com>
To: Robert Nelson <robertcnelson@gmail.com>
Cc: tony@atomide.com, linux-omap@vger.kernel.org
Subject: Re: [PATCH v2 1/3] ARM: OMAP: Beagle: revision detection
Date: Thu, 12 Aug 2010 10:03:49 +0300	[thread overview]
Message-ID: <20100812100349.8f151b5b.jhnikula@gmail.com> (raw)
In-Reply-To: <1281569862-19894-1-git-send-email-robertcnelson@gmail.com>

Hi

On Wed, 11 Aug 2010 18:37:40 -0500
Robert Nelson <robertcnelson@gmail.com> wrote:

> Due to the omap3530 ES3.0 Silicon being used on both the
> B5/B6 and C1/2/3 Beagle we can't use the cpu_is_omap34xx() 
> routines to differentiate the Beagle Boards.
> 
> However gpio pins 171,172,173 where setup for this prupose, so 
> lets use them.
> 
> Tested on Beagle Revisions: B5, C2, C4, and xMA
> 
> Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
> ---
>  arch/arm/mach-omap2/board-omap3beagle.c |   60 +++++++++++++++++++++++++++++++
>  arch/arm/plat-omap/include/plat/board.h |   23 ++++++++++++
>  2 files changed, 83 insertions(+), 0 deletions(-)
> 
...
> +	beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1)
> +			| (gpio_get_value(173) << 2);
> +
> +	switch (beagle_rev) {
> +	case 7:
> +		printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
> +		omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
> +		break;
> +	case 6:
> +		printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
> +		omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
> +		break;
> +	case 5:
> +		printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
> +		omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
> +		break;
> +	case 0:
> +		printk(KERN_INFO "OMAP3 Beagle Rev: xM\n");
> +		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
> +		break;
> +	default:
> +		printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
> +		omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
> +	}

My C2 reads as 2 and I have U-Boot 2009.01-dirty (Feb 19 2009 -
12:22:31). I believe these pins are not muxed correctly with that
U-Boot version.

Therefore kernel should remux those pins so that version is detected
right independently of bootloader version. Detections works fine if I
add these:

	omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP);
	omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP);
	omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP);


-- 
Jarkko

  parent reply	other threads:[~2010-08-12  7:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-11 23:37 [PATCH v2 1/3] ARM: OMAP: Beagle: revision detection Robert Nelson
2010-08-11 23:37 ` [PATCH v2 2/3] ARM: OMAP: Beagle: only Cx boards use pin 23 for write protect Robert Nelson
2010-08-11 23:37 ` [PATCH v2 3/3] ARM: OMAP: Beagle: no gpio_wp pin connection on xM Robert Nelson
2010-08-12  7:03 ` Jarkko Nikula [this message]
2010-08-12 11:56   ` [PATCH v2 1/3] ARM: OMAP: Beagle: revision detection Robert Nelson
2010-08-12 12:00 ` Tony Lindgren
2010-08-12 12:09   ` Robert Nelson

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=20100812100349.8f151b5b.jhnikula@gmail.com \
    --to=jhnikula@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=robertcnelson@gmail.com \
    --cc=tony@atomide.com \
    /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;
as well as URLs for NNTP newsgroup(s).