Hi On Wed, 11 Aug 2010 18:37:40 -0500 Robert Nelson <robertcnelson@xxxxxxxxx> 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@xxxxxxxxx> > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html