[PATCH v3 0/4] Conclusive KSTR-SAMA5D27 support
Artur Rojek
artur at conclusive.pl
Mon Oct 2 14:42:13 CEST 2023
Hi all,
this is v3 of the Conclusive KSTR-SAMA5D27 support series.
Patch [1/4] now takes a different approach at reading the EEPROM serial.
An existing CONFIG_ID_EEPROM option provides a mechanism for reading
EEPROM embedded MAC addresses at init. As this option is meant for
reading various identifying features, not just MACs, I've decided to
expand it by the ability of reading serial number, adding a generic
serial_read_from_eeprom(). For tlv eeprom, this wraps around existing
populate_serial_number(), which now becomes local to tlv_eeprom.c.
Other boards which enable CONFIG_ID_EEPROM, but don't store EEPROM data
as tlv, will need to provide their own implementations of
serial_read_from_eeprom(). A dummy weak function has been provided to
prevent compilation issues on such boards.
Simon, you've already accepted the solution from v2, however changes
required for [4/4] have forced me to go with this new approach.
Patch [2/4] is new. CONFIG_ID_EEPROM requires that the do_mac() command
exists, however implementation of this function has been missing from
tlv_eeprom. This patch adds a bare minimum support for it - only
handling the "mac read" flag. KSTR-SAMA5D27 is supposed to use EEPROM
embedded MAC addresses, however this feature has been overlooked in
previous versions of this series.
Patch [3/4] remains unchanged.
Patch [4/4] now uses CONFIG_DISPLAY_BOARDINFO_LATE in order to display
the board model and S/N. As a side effect of that, serial access has
been moved to CONFIG_ID_EEPROM (see patch [1/4]) and BOARD_LATE_INIT
mechanism dropped as unnecessary.
The kstr_sama5d27_defconfig has also been re-generated with
savedefconfig, which got rid of some redundant flags.
Artur Rojek (4):
common: Add generic function for reading serial number
cmd: tlv_eeprom: Add support for do_mac() command
arm: dts: at91: sama5: Add flexcom4 node
board: Add support for Conclusive KSTR-SAMA5D27
arch/arm/dts/Makefile | 3 +
arch/arm/dts/at91-kstr-sama5d27.dts | 131 ++++++++++
arch/arm/dts/sama5d2.dtsi | 20 ++
arch/arm/mach-at91/Kconfig | 12 +
board/conclusive/kstr-sama5d27/Kconfig | 15 ++
board/conclusive/kstr-sama5d27/MAINTAINERS | 8 +
board/conclusive/kstr-sama5d27/Makefile | 5 +
.../conclusive/kstr-sama5d27/kstr-sama5d27.c | 230 ++++++++++++++++++
cmd/tlv_eeprom.c | 76 ++++--
common/board_r.c | 8 +
configs/kstr_sama5d27_defconfig | 74 ++++++
include/configs/kstr-sama5d27.h | 15 ++
include/init.h | 14 ++
13 files changed, 595 insertions(+), 16 deletions(-)
create mode 100644 arch/arm/dts/at91-kstr-sama5d27.dts
create mode 100644 board/conclusive/kstr-sama5d27/Kconfig
create mode 100644 board/conclusive/kstr-sama5d27/MAINTAINERS
create mode 100644 board/conclusive/kstr-sama5d27/Makefile
create mode 100644 board/conclusive/kstr-sama5d27/kstr-sama5d27.c
create mode 100644 configs/kstr_sama5d27_defconfig
create mode 100644 include/configs/kstr-sama5d27.h
--
2.42.0
More information about the U-Boot
mailing list