[gta02-core] -1 Hardware revision stored in EEPROM

Werner Almesberger werner at openmoko.org
Wed Aug 26 22:55:22 CEST 2009


Dave Ball wrote:
> I've not dug into the datasheet, but would doing something with gpa0-8 
> be less risky?

GPAx don't have an internal pull-down, so you need to have a pair
of external resistors, one for "0" and one for "1". With the other
GPIOs, you only need one (small) external resistor.

I think the revision logic we used at Openmoko is a bit inefficient,
with a pair of resistors for each GPIO. If there's only a single
small resistor, then the logic could work as follows:

	gpio_direction_input(xxx);
	s3c2410_gpio_pullup(xxx, 1);
	udelay(10);
	if (gpio_get_value(xxx)) {
		s3c2410_gpio_pullup(xxx, 0);
		return 1;
	} else {
		return 0;
	}

Of course, if we want to go to a more flexible solution in the future
anyway, then there isn't so much use in designing sophisticated board
variant selection for gta02-core. In fact, the 3 bits for the variant
code, would almost be a serial number ;-)

(I'm actually not quite sure why we have that two resistor setup in
GTA02. Might be that this was first planned for GPA and then moved to
other GPIOs. In any case, even GTA02v0 already had them on GPGx.)

- Werner



More information about the gta02-core mailing list