mpm: tools: Use dts labels for mb, db eeproms

This commit is contained in:
Bjoern Bachmann 2026-03-31 11:32:30 +02:00 committed by Jörg Hofrichter
parent 5d70afebb4
commit 975e87b085
2 changed files with 14 additions and 5 deletions

View File

@ -41,6 +41,12 @@ endif(ENABLE_MYKONOS)
foreach(eeprom_tool_source ${eeprom_tool_sources})
get_filename_component(eeprom_tool ${eeprom_tool_source} NAME_WE)
add_executable(${eeprom_tool} ${eeprom_tool_source} ${eeprom_tool_libs})
if(ENABLE_MYKONOS)
target_compile_definitions(${eeprom_tool} PRIVATE ENABLE_MYKONOS)
endif()
if(ENABLE_E320)
target_compile_definitions(${eeprom_tool} PRIVATE ENABLE_E320)
endif()
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${eeprom_tool} DESTINATION ${CMAKE_INSTALL_BINDIR})
endforeach(eeprom_tool_source ${eeprom_tool_sources})

View File

@ -15,11 +15,14 @@ typedef uint8_t u8;
#define ETH_ALEN 6
/* TODO: Come up with a smarter way to do this when we start using this on
* another device */
#define NVMEM_PATH_SLOT_A "/sys/bus/nvmem/devices/9-00500/nvmem"
#define NVMEM_PATH_SLOT_B "/sys/bus/nvmem/devices/10-00500/nvmem"
#define NVMEM_PATH_MB "/sys/bus/nvmem/devices/2-00500/nvmem"
#ifdef ENABLE_MYKONOS
# define NVMEM_PATH_SLOT_A "/sys/bus/nvmem/devices/db00/nvmem"
# define NVMEM_PATH_SLOT_B "/sys/bus/nvmem/devices/db11/nvmem"
# define NVMEM_PATH_MB "/sys/bus/nvmem/devices/mb2/nvmem"
#endif
#ifdef ENABLE_E320
# define NVMEM_PATH_MB "/sys/bus/nvmem/devices/mb0/nvmem"
#endif
/* Despite the "sulfur" name, this also applies for E320 ("neon")
*/