mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-05 20:54:31 +00:00
8c1d443206
The BeagleBone platforms all use a common mechanism to discover and identify extension boards (called "capes"): each extension board has an I2C-connected EEPROM describing itself. This patch implements a generic extension_scan_board() feature that can be used by all BeagleBone platforms to read those I2C EEPROMs and fill in the list of "extension" structures. Following commits will enable this common logic on two BeagleBone platforms. Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
28 lines
568 B
C
28 lines
568 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* (C) Copyright 2021
|
|
* Köry Maincent, Bootlin, <kory.maincent@bootlin.com>
|
|
*/
|
|
|
|
#ifndef __CAPE_DETECT_H
|
|
#define __CAPE_DETECT_H
|
|
|
|
struct am335x_cape_eeprom_id {
|
|
unsigned int header;
|
|
char eeprom_rev[2];
|
|
char board_name[32];
|
|
char version[4];
|
|
char manufacturer[16];
|
|
char part_number[16];
|
|
};
|
|
|
|
#define CAPE_EEPROM_FIRST_ADDR 0x54
|
|
#define CAPE_EEPROM_LAST_ADDR 0x57
|
|
|
|
#define CAPE_EEPROM_ADDR_LEN 0x10
|
|
|
|
#define CAPE_MAGIC 0xEE3355AA
|
|
|
|
int extension_board_scan(struct list_head *extension_list);
|
|
|
|
#endif /* __CAPE_DETECT_H */
|