diff --git a/board/nm/nbhw18_v2/board.c b/board/nm/nbhw18_v2/board.c index e86b587fd4..f114a22ad9 100755 --- a/board/nm/nbhw18_v2/board.c +++ b/board/nm/nbhw18_v2/board.c @@ -589,6 +589,22 @@ static void set_phy_fast_blink_mode(int phy_addr) set_phy_page(miidev, phy_addr, 0); } +#if !defined(CONFIG_SPL_BUILD) + +static void set_devicetree_name(void) +{ + char devicetreename[64]; + /* add hardware versions to environment */ + if (bd_get_devicetree(devicetreename, sizeof(devicetreename)) != 0) { + printf("Devicetree name not found, use legacy name\n"); + strcpy(devicetreename, "am335x-nbhw16.dtb"); + } + + env_set("fdt_image", devicetreename); +} + +#endif + int board_late_init(void) { #if !defined(CONFIG_SPL_BUILD) @@ -611,6 +627,8 @@ int board_late_init(void) check_reset_button(); + set_devicetree_name(); + set_mac_addresses(3); /* Take phy out of reset after FPGA was loaded */