Merge tag 'u-boot-stm32-20211213' of https://source.denx.de/u-boot/custodians/u-boot-stm
- enable KSZ90x1 PHY driver on DHCOR - DHSOM boards: - increase USB power-good delay - add update_sf script to install U-Boot into SF - increase PHY auto-negotiation timeout to 20 seconds - fix SoM and board coding strap GPIO handling # gpg verification failed.
This commit is contained in:
@@ -19,6 +19,17 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
ðernet0 {
|
||||
mdio0 {
|
||||
ethernet-phy@7 {
|
||||
reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <11000>;
|
||||
reset-deassert-us = <1000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdmmc1 {
|
||||
u-boot,dm-spl;
|
||||
};
|
||||
|
@@ -212,34 +212,40 @@ static void board_get_coding_straps(void)
|
||||
ofnode node;
|
||||
int i, ret;
|
||||
|
||||
brdcode = 0;
|
||||
ddr3code = 0;
|
||||
somcode = 0;
|
||||
|
||||
node = ofnode_path("/config");
|
||||
if (!ofnode_valid(node)) {
|
||||
printf("%s: no /config node?\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
brdcode = 0;
|
||||
ddr3code = 0;
|
||||
somcode = 0;
|
||||
|
||||
ret = gpio_request_list_by_name_nodev(node, "dh,som-coding-gpios",
|
||||
gpio, ARRAY_SIZE(gpio),
|
||||
GPIOD_IS_IN);
|
||||
for (i = 0; i < ret; i++)
|
||||
somcode |= !!dm_gpio_get_value(&(gpio[i])) << i;
|
||||
|
||||
gpio_free_list_nodev(gpio, ret);
|
||||
|
||||
ret = gpio_request_list_by_name_nodev(node, "dh,ddr3-coding-gpios",
|
||||
gpio, ARRAY_SIZE(gpio),
|
||||
GPIOD_IS_IN);
|
||||
for (i = 0; i < ret; i++)
|
||||
ddr3code |= !!dm_gpio_get_value(&(gpio[i])) << i;
|
||||
|
||||
gpio_free_list_nodev(gpio, ret);
|
||||
|
||||
ret = gpio_request_list_by_name_nodev(node, "dh,board-coding-gpios",
|
||||
gpio, ARRAY_SIZE(gpio),
|
||||
GPIOD_IS_IN);
|
||||
for (i = 0; i < ret; i++)
|
||||
brdcode |= !!dm_gpio_get_value(&(gpio[i])) << i;
|
||||
|
||||
gpio_free_list_nodev(gpio, ret);
|
||||
|
||||
printf("Code: SoM:rev=%d,ddr3=%d Board:rev=%d\n",
|
||||
somcode, ddr3code, brdcode);
|
||||
}
|
||||
|
@@ -108,6 +108,8 @@ CONFIG_SPI_FLASH_SPANSION=y
|
||||
CONFIG_SPI_FLASH_STMICRO=y
|
||||
CONFIG_SPI_FLASH_WINBOND=y
|
||||
CONFIG_SPI_FLASH_MTD=y
|
||||
CONFIG_PHY_MICREL=y
|
||||
CONFIG_PHY_MICREL_KSZ90X1=y
|
||||
CONFIG_DM_ETH=y
|
||||
CONFIG_DWC_ETH_QOS=y
|
||||
CONFIG_PHY=y
|
||||
|
@@ -142,6 +142,10 @@
|
||||
"env_check=if env info -p -d -q; then env save; fi\0" \
|
||||
"boot_net_usb_start=true\0"
|
||||
|
||||
#ifndef STM32MP_BOARD_EXTRA_ENV
|
||||
#define STM32MP_BOARD_EXTRA_ENV
|
||||
#endif
|
||||
|
||||
#include <config_distro_bootcmd.h>
|
||||
|
||||
/*
|
||||
@@ -169,7 +173,8 @@
|
||||
STM32MP_BOOTCMD \
|
||||
STM32MP_PARTS_DEFAULT \
|
||||
BOOTENV \
|
||||
STM32MP_EXTRA
|
||||
STM32MP_EXTRA \
|
||||
STM32MP_BOARD_EXTRA_ENV
|
||||
|
||||
#endif /* ifndef CONFIG_SPL_BUILD */
|
||||
#endif /* ifdef CONFIG_DISTRO_DEFAULTS*/
|
||||
|
@@ -8,6 +8,22 @@
|
||||
#ifndef __CONFIG_STM32MP15_DH_DHSOM_H__
|
||||
#define __CONFIG_STM32MP15_DH_DHSOM_H__
|
||||
|
||||
/* PHY needs a longer autoneg timeout */
|
||||
#define PHY_ANEG_TIMEOUT 20000
|
||||
|
||||
#define STM32MP_BOARD_EXTRA_ENV \
|
||||
"usb_pgood_delay=1000\0" \
|
||||
"update_sf=" /* Erase SPI NOR and install U-Boot from SD */ \
|
||||
"setexpr loadaddr1 ${loadaddr} + 0x1000000 && " \
|
||||
"load mmc 0:4 ${loadaddr1} /boot/u-boot-spl.stm32 && " \
|
||||
"env set filesize1 ${filesize} && " \
|
||||
"load mmc 0:4 ${loadaddr} /boot/u-boot.itb && " \
|
||||
"sf probe && sf erase 0 0x200000 && " \
|
||||
"sf update ${loadaddr1} 0 ${filesize1} && " \
|
||||
"sf update ${loadaddr1} 0x40000 ${filesize1} && " \
|
||||
"sf update ${loadaddr} 0x80000 ${filesize} && " \
|
||||
"env set filesize1 && env set loadaddr1\0"
|
||||
|
||||
#include <configs/stm32mp15_common.h>
|
||||
|
||||
#define CONFIG_SPL_TARGET "u-boot.itb"
|
||||
|
Reference in New Issue
Block a user