Uboot

=U-Boot= The manual can be found here: [] Notice that not all commands is supported. Type 'help' in u-boot to see the supported commands

Board:
bdinfo //Displays board memory map//

I2C Subsystem:
ibus Selects I2C bus (0-2 for devkit8000). speed = 64 ~100Kbps iprobe //Probes the selected I2C bus for valid device adresses imd. // Reads data from an I2C device imw. //Write data to an I2C device

Ex. Read temp from temp sensor on add-on board// code ibus 2 64   // Select I2C bus 2 @ 100KHz (IIC3 in schematic) iprobe      //returns valid addresses, see schematic I2C device page for devices/addresses imd 48 0.0 1 //Read from device 0x48, local addr 0x00, one byte// code

//Ex. Set IO-expander pin to output and drive this high/low and read// code ibus 2 64     // Select I2C bus 2 @ 100KHz (IIC3 in schematic) imd 22 0.0 4  // Read from device 0x22, local addr 0x00, four bytes ff 00 00 ff   // See what this means in the PCA9554 data sheet imw 22 3.0 7f // Set IO7 to output 0=output (DIR = A3) imw 22 1.0 80 // Set IO7 high (DOUT = A1) imw 22 1.0 0  // Set IO7 low imd 22 0.0 1  // Read the input values (DIN = A0) code

GPIO
To access the board's gpios, you will have to access the GPIO registers directly.

On The DevKit8000 Add-on board the OMAP GPIOs are mapped as follows:


 * ~ AddOn Board ||~ OMAP GPIO ||~ OMAP GPIO5 ||~ Direction ||
 * || GPIO128 ||= 0 ||=  ||
 * || GPIO129 ||= 1 ||=  ||
 * GPIO1_0 || GPIO130 ||= 2 ||= IN ||
 * GPIO1_1 || GPIO131 ||= 3 ||= IN ||
 * GPIO1_2 || GPIO132 ||= 4 ||= IN ||
 * GPIO1_3 || GPIO133 ||= 5 ||= IN ||
 * GPIO1_4 || GPIO134 ||= 6 ||= OUT ||
 * GPIO1_5 || GPIO135 ||= 7 ||= OUT ||
 * GPIO1_6 || GPIO136 ||= 8 ||= OUT ||
 * GPIO1_7 || GPIO137 ||= 9 ||= OUT ||
 * LED1 || GPIO138 ||= 10 ||= OUT ||
 * LED3 || GPIO139 ||= 11 ||= OUT ||

To set the OMAP's GPIO pin direction, read the existing state and update the appropriate bits (SPUF98C sect 25.1.6.2.10) code Set GPIO 130-133 to Inputs and 134-139 to outputs; 0=Out / 1= In:

- Read existing values md.l 0x49056034 1 49056034: 0f9f0dff

- Update relevant values (bits [11:6] = 0 ; bits[5:2]= 1) mw.l 0x49056034 0x0f9f003f code

Now you can assign output a value: code Set all outputs to '0' mw.l 0x4905603c 0x0

Set lower outputs to '1' Remember endian! mw.w 0x4905603c 0xffff code