summaryrefslogtreecommitdiff
path: root/board/starfive/visionfive2/visionfive2-i2c-eeprom.c
AgeCommit message (Collapse)Author
2026-03-17eeprom: starfive: Support eeprom data format v3Hal Feng
Add eeprom data format v3 support. Add onboard_module field in ATOM4 and add "mac onboard_module <?>" command to modify it. The onboard module field marks the additional modules compared with VisionFive 2 board. Now we define bit7-1: reserved, bit0: WIFI/BT Signed-off-by: Hal Feng <[email protected]>
2026-03-17eeprom: starfive: Correct get_pcb_revision_from_eeprom()Hal Feng
pcb_revision is stored in the pcb_revision field of ATOM4. Correct it. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt <[email protected]> Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng <[email protected]>
2026-03-17eeprom: starfive: Simplify get_ddr_size_from_eeprom()Hal Feng
Directly return the DDR size instead of the field of 'DxxxExxx'. Move the function description to the header file. Return 0 instead of 0xFF if read_eeprom() fails. Reviewed-by: Heinrich Schuchardt <[email protected]> Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Hal Feng <[email protected]>
2025-08-14starfive: fix return code of `mac write_eeprom`Heinrich Schuchardt
When writing the EEPROM fails, the command usage help text is displayed after the error message. We should only display the error message instead. If writing the EEPROM fails, return CMD_RET_FAILURE (1) instead of CMD_RET_USAGE (-1). Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Heinrich Schuchardt <[email protected]> Acked-by: E Shattow <[email protected]>
2025-03-28board: starfive: Remove compatible boards Milk-V Mars CM and Mars CM LiteE Shattow
Remove leftover code from Milk-V Mars CM and Mars CM Lite boards that do not exist in upstream Linux Kernel devicetree-rebasing. These will be re- introduced when submitted upstream for a future U-Boot release. Users of these boards should use the previous stable release of U-Boot until then. Signed-off-by: E Shattow <[email protected]>
2024-05-14starfive: add mac vendor sub-commandHeinrich Schuchardt
As boards from multiple vendors (Milk-V, StarFive, Pine64) use the mac command provide a sub-command to set the vendor string. Reported-by: E. Shattow <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2024-05-14board: starfive: function to read eMMC sizeHeinrich Schuchardt
The EEPROM provides information about the size of the eMMC. Provide a new function get_mmc_size_from_eeprom() to read it. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: E. Shattow <[email protected]>
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Marek BehĂșn <[email protected]>
2024-04-09riscv: starfive: avoid including common.hHeinrich Schuchardt
The usage of common.h is deprecated. Remove it from board files. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2024-04-09eeprom: starfive: function get_product_id_from_eeprom()Heinrich Schuchardt
Export a function get_product_id_from_eeprom() to read the product ID. This value can be used for fixing up the device-tree on JH7110 based products. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-10-16cmd: Convert existing long help messages to the new macroTom Rini
- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines and use U_BOOT_LONGHELP to declare the same variable name as before - In a few places, either rename the variable to follow convention or introduce the variable as it was being done inline before. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-16eeprom: starfive: add 'mac raw' commandHeinrich Schuchardt
Add a sub-command to print a hexdump of the EEPROM content. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-10-16eeprom: starfive: raw dump if unsupported data versionHeinrich Schuchardt
If the data version field of the EEPROM is not supported, provide a hexdump of the data. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-10-16eeprom: starfive: re-implement mac commandHeinrich Schuchardt
The different implementations of the mac command have board or vendor specific sub-commands. Add the command definition specific to the VisionFive 2 board. Don't call cmd_usage() directly but return CMD_RET_USAGE instead. Signed-off-by: Heinrich Schuchardt <[email protected]>
2023-09-05eeprom: starfive: set eth0 mac address properlySeung-Woo Kim
fdt_fixup_ethernet() sets eth0 mac address from ethaddr. Set ethaddr to environment instead of eth0addr. Signed-off-by: Seung-Woo Kim <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2023-07-12eeprom: starfive: Enable ID EEPROM configurationYanhong Wang
Enabled ID_EEPROM configuration for StarFive VisionFive2 board. Signed-off-by: Yanhong Wang <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>