Yanhong Wang | 39331e4 | 2023-06-15 17:36:48 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2023 StarFive Technology Co., Ltd. |
| 4 | * Author: Yanhong Wang<yanhong.wang@starfivetech.com> |
| 5 | */ |
| 6 | |
| 7 | #ifndef _ASM_RISCV_EEPROM_H |
| 8 | #define _ASM_RISCV_EEPROM_H |
| 9 | |
Tom Rini | b6b9900 | 2023-10-12 19:03:59 -0400 | [diff] [blame] | 10 | #include <linux/types.h> |
| 11 | |
Yanhong Wang | 39331e4 | 2023-06-15 17:36:48 +0800 | [diff] [blame] | 12 | u8 get_pcb_revision_from_eeprom(void); |
| 13 | u32 get_ddr_size_from_eeprom(void); |
| 14 | |
Heinrich Schuchardt | f560f0f | 2024-04-02 10:49:08 +0200 | [diff] [blame] | 15 | /** |
Heinrich Schuchardt | 89ef034 | 2024-05-12 06:25:22 +0200 | [diff] [blame] | 16 | * get_mmc_size_from_eeprom() - read eMMC size from EEPROM |
| 17 | * |
| 18 | * @return: size in GiB or 0 on error. |
| 19 | */ |
| 20 | u32 get_mmc_size_from_eeprom(void); |
| 21 | |
| 22 | /** |
Heinrich Schuchardt | f560f0f | 2024-04-02 10:49:08 +0200 | [diff] [blame] | 23 | * get_product_id_from_eeprom - get product ID string |
| 24 | * |
| 25 | * A string like "VF7110A1-2228-D008E000-00000001" is returned. |
| 26 | * |
| 27 | * Return: product ID string |
| 28 | */ |
| 29 | const char *get_product_id_from_eeprom(void); |
| 30 | |
Yanhong Wang | 39331e4 | 2023-06-15 17:36:48 +0800 | [diff] [blame] | 31 | #endif /* _ASM_RISCV_EEPROM_H */ |