[PATCH 06/13] rockchip: rk3288-tinker: Set cpuid and serial env var
Kever Yang
kever.yang at rock-chips.com
Fri Nov 8 09:54:29 CET 2024
On 2024/11/6 00:00, Jonas Karlman wrote:
> Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set
> the cpuid# and serial# env vars.
>
> Change to read mac address from eeprom in rockchip_early_misc_init_r()
> to ensure the ethaddr env var is set before rockchip_setup_macaddr() try
> to set ethaddr based on cpuid.
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> board/rockchip/tinker_rk3288/tinker-rk3288.c | 2 +-
> configs/tinker-rk3288_defconfig | 2 ++
> configs/tinker-s-rk3288_defconfig | 2 ++
> 3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
> index e966e9f201ab..dfd553d1aa5f 100644
> --- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
> +++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
> @@ -22,7 +22,7 @@ static int get_ethaddr_from_eeprom(u8 *addr)
> return i2c_eeprom_read(dev, 0, addr, 6);
> }
>
> -int rk3288_board_late_init(void)
> +int rockchip_early_misc_init_r(void)
> {
> u8 ethaddr[6];
>
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index aff820ebfdda..851c312d4db5 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y
> CONFIG_DEFAULT_FDT_FILE="rk3288-tinker.dtb"
> CONFIG_SILENT_CONSOLE=y
> CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_MISC_INIT_R=y
> CONFIG_SPL_PAD_TO=0x7f8000
> CONFIG_SPL_NO_BSS_LIMIT=y
> # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> @@ -63,6 +64,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> CONFIG_MISC=y
> +CONFIG_ROCKCHIP_EFUSE=y
> CONFIG_I2C_EEPROM=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index 6aef775a5717..2269d04ee644 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -29,6 +29,7 @@ CONFIG_USE_PREBOOT=y
> CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb"
> CONFIG_SILENT_CONSOLE=y
> CONFIG_DISPLAY_BOARDINFO_LATE=y
> +CONFIG_MISC_INIT_R=y
> CONFIG_SPL_PAD_TO=0x7f8000
> CONFIG_SPL_NO_BSS_LIMIT=y
> # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
> @@ -64,6 +65,7 @@ CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
> CONFIG_ROCKCHIP_GPIO=y
> CONFIG_SYS_I2C_ROCKCHIP=y
> CONFIG_MISC=y
> +CONFIG_ROCKCHIP_EFUSE=y
> CONFIG_I2C_EEPROM=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
More information about the U-Boot
mailing list