This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c1 interfaced to eeprom in custom board am335x

Hi,

Am trying to bring up uboot on my custom board where eeprom interfaced via i2c1


1)I feel the below board related information are stored in eeprom, could you please let me know how & where this information is written to eeprom before uboot reads & boots further
struct am335x_baseboard_id {
unsigned int magic;
char name[HDR_NAME_LEN];
char version[4];
char serial[12];
char config[32];
char mac_addr[HDR_NO_OF_MAC_ADDR][HDR_ETH_ALEN];
};


2) Could anybody please help me how reading board related information could be bypassed without reading from eeprom, beacause am stuck without getting uboot prompt in my custom board it is interfaced to eeprom via i2c1, & am using ti sdk 7 how can this board related information could be hardcoded for time being,

could you please let me know the correct way of hardcoding the below information as I was facing the below issue with the below printf statements,  please provide correct way of printing this information


printf("magic = %x\n", header->magic);
printf("name = %s\n", header->name);
 printf("version = %s\n",header->version);
printf("serial = %s\n",header->serial);
 printf("config = %s\n",header->config);
printf("mac_addr = %s\n",header->mac_addr[0][0]);

U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Dec 01 2014 - 17:27:38)
magic = ee3355aa
name = A335BNLT00A54001BBBK6150XAXX▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0123456789ABCDEF▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0@(/@▒▒/@x /@
version = 00A54001BBBK6150XAXX▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0123456789ABCDEF▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0@(/@▒▒/@x /@
serial = 4001BBBK6150XAXX▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0123456789ABCDEF▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0@(/@▒▒/@x /@
config = XAXX▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0123456789ABCDEF▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒0@(/@▒▒/@x /@


3) And am trying to read i2c0 register base address but am getting incorrect withthe below printf statement , could you please let me know how this can be correctly printed
if (readw(&i2c_base->con) & I2C_CON_EN) {
printf("INSIDEEEEEEEEEEE i2c_inttttttttttttttttt function, the I2C_BASE_ADDRESSS = %p\n", &i2c_base->con);
writew(0, &i2c_base->con);
udelay(50000);
}
U-Boot 2013.10-00189-g78d8ebd-dirty (Dec 01 2014 - 17:42:47)

I2C: INSIDEEEEEEEEEEE i2c_inttttttttttttttttt function, the I2C_BASE_ADDRESSS = 44e0b0a4
ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Error - No Valid Environment Area found
*** Warning - bad CRC, using default environment

Kindly do the needful as early as possible, as am stuck without getting uboot prompt

Many Thanks in advance