Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

overo: handle board revision detection for fab revisions <= R2410

Revisions < R2410 connect gpio112 to the 4030 irq_1 line. Since gpio112
is now used for board revision, this could lead to an erroneous
board revision results depending on the state of the irq.

This patch forces a 4030 RTC interrupt, which pulls irq_1 low, giving
a low level on gpio112 on these boards.  This gives a proper revision
0 result for these boards.
  • Loading branch information...
commit a164723f6f8b8b1d47ed368ef78ec52008db0d44 1 parent abcc567
@sakoman sakoman authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 board/overo/overo.c
View
11 board/overo/overo.c
@@ -30,6 +30,7 @@
#include <command.h>
#include <part.h>
#include <fat.h>
+#include <i2c.h>
#include <asm/arch/cpu.h>
#include <asm/arch/bits.h>
#include <asm/arch/gpio.h>
@@ -350,6 +351,16 @@ u32 cpu_is_3410(void)
int get_board_revision(void)
{
int revision;
+ unsigned char data;
+
+ /* board revisions <= R2410 connect 4030 irq_1 to gpio112 */
+ /* these boards should return a revision number of 0 */
+ /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */
+ data = 0x01;
+ i2c_write(0x4B, 0x29, 1, &data, 1);
+ data = 0x0c;
+ i2c_write(0x4B, 0x2b, 1, &data, 1);
+ i2c_read(0x4B, 0x2a, 1, &data, 1);
if (!omap_request_gpio(112) &&
!omap_request_gpio(113) &&
Please sign in to comment.
Something went wrong with that request. Please try again.