u-boot/board/siemens/common/eeprom.h
Enrico Leto e9ef9a1377 siemens: eeprom: simplify setup & read
Since we have boards using the driver model or not for i2c, use abstraction
function to probe the i2c, check the EEPROM and read from EEPROM.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
2024-02-05 13:32:48 -05:00

24 lines
558 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright Siemens AG 2023
*
* Common board definitions for siemens boards
*/
#ifndef _COMMON_EEPROM_H_
#define _COMMON_EEPROM_H_
/* EEPROM @ I2C */
#define SIEMENS_EE_I2C_BUS 0
#define SIEMENS_EE_I2C_ADDR 0x50
/* EEPROM mapping */
#define SIEMENS_EE_ADDR_NAND_GEO 0x80
#define SIEMENS_EE_ADDR_DDR3 0x90
#define SIEMENS_EE_ADDR_CHIP 0x120
#define SIEMENS_EE_ADDR_FACTORYSET 0x400
int siemens_ee_setup(void);
int siemens_ee_read_data(uint address, uchar *buffer, int len);
#endif /* _COMMON_EEPROM_H_ */