cancel
Showing results for 
Search instead for 
Did you mean: 

usage of i2c read command in U-Boot

TJann.1
Associate II

Hi,

I have a custom board with a ST32MP157C and a 24AA025E48 on a i2c bus.

In the U-Boot, I want to read the MAC address located in the 24AA025E48 on the i2c bus 1 at address 0x53 at offset 0xFA.

When I can use the following commands it works (MAC Address: 80:1F:12:36:36:7B)

STM32MP> i2c dev 1

Setting bus to 1

STM32MP> i2c md 53 FA 6

00fa: 80 1f 12 36 36 7b ...66{

STM32MP>

but when i use the i2c read it does not answer anything.

STM32MP> i2c read 53 1 6 FA

STM32MP>

what is wrong with the command ?

who can i do to store the result in a variable in order to change the board ethernet mac address ?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

> what is wrong with the command ?

The i2c read command takes the same parameters as md plus one last parameter which is a MPU memory address. The values are read from I2C and written to that memory address, not dumped to the console.

View solution in original post

2 REPLIES 2
KnarfB
Principal III

> what is wrong with the command ?

The i2c read command takes the same parameters as md plus one last parameter which is a MPU memory address. The values are read from I2C and written to that memory address, not dumped to the console.

TJann.1
Associate II

Hello,

thanks, now it works with the command i2c read 53 FA 6 C0000000

best regards.