BeagleBones use the am335x_evm configuration in U-Boot which supports running a single image on any board that provides identity information via an EEPROM. U-Boot determines which BeagleBone variant is present by reading board-specific information from the EEPROM and selects a .dts file to load based on that information. The BBB EEPROM is located at I2C bus 0 address 0x50, as mentioned in the BBB SRM. The allowable EEPROM contents are defined at the Beagleboard.org EEPROM database. A new variant must use a unique board revision to allow identification and selection of the proper .dts file. In our case, the board revision (last 4 bytes) is AIA0.
The early derivative board I received had 00A0 as the board revision since the specified contents hadn't been determined at the time that these were first made. After modifying U-Boot to support identifying the AIA0 revision, I now needed to update my board to test this code and the new .dts file for this board. This can all be done from the U-Boot command line as detailed below.
So first, I dump the contents of the EEPROM as offset 0xc (where we find the 4 bytes of the board revision). Note that we must use the syntax of 0x0c.2 where the 2 indicates that 16-bit addressing is to be used because this EEPROM is large enough to require 16-bit addresses. Omitting that would result in reading garbage.
=> i2c md 0x50 0x0c.2 4 000c: 30 30 41 30 00A0This is simply what was put in as a placeholder value when these early boards were rolled. Now I fill a free spot in memory with the new board revision I want to write to the EEPROM.
=> mm.b 0x82000000 82000000: 35 ? 41 82000001: 71 ? 49 82000002: fd ? 41 82000003: f7 ? 30 82000004: ff ? .And then verify it's there.
=> md.b 0x82000000 4 82000000: 41 49 41 30 AIA0Now I can try to write to the EEPROM.
=> i2c write 0x82000000 0x50 0xc.2 4 => i2c md 0x50 0x0c.2 4 000c: 30 30 41 30 00A0Oops, that didn't work because the EEPROM is asserted high through a pullup resistor by default. Luckily, there's a handy test point that we can ground to disable the write protect. Find TP4 between the barrel jack and the RJ45 jack and jumper it to a ground pin like P9-2 that is right nearby. Now try again.
=> i2c write 0x82000000 0x50 0xc.2 4 => i2c md 0x50 0x0c.2 4 000c: 41 49 41 30 AIA0Success! Now let's view the entire contents in context.
=> i2c md 0x50 0x00.2 10 0000: aa 55 33 ee 41 33 33 35 42 4e 4c 54 41 49 41 30 .U3.A335BNLTAIA0The board revision is updated and now U-Boot can identify my board as an AIA0 and load the new .dts file to support the HDMI encoder.