[PATCH 12/13] rockchip: rk3288-tinker: Fix slow Ethernet initializion
Kever Yang
kever.yang at rock-chips.com
Wed Nov 6 11:22:42 CET 2024
On 2024/11/6 00:00, Jonas Karlman wrote:
> For some reason the Ethernet PHY reset delay is set to 1 second, this
> cause an unneccecery long boot delay.
>
> Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an
> initial 10ms delay and then a 30-76ms delay before accessing registers.
>
> Change to use 80ms delay instead of a full second to speed up Ethernet
> initializion in U-Boot.
>
> Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
> support in U-Boot.
>
> Before:
>
> 1,404,971 960,924 eth_common_init
> 2,438,830 1,033,859 eth_initialize
> 2,444,449 5,619 main_loop
> 2,445,153 704 cli_loop
>
> After:
>
> 1,404,987 960,710 eth_common_init
> 1,519,110 114,123 eth_initialize
> 1,524,734 5,624 main_loop
> 1,525,452 718 cli_loop
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> There are more boards having similar full second delay and a fix will be
> sent to upstream Linux to correct this in due time.
> ---
> arch/arm/dts/rk3288-tinker-u-boot.dtsi | 4 ++++
> configs/tinker-rk3288_defconfig | 3 +++
> configs/tinker-s-rk3288_defconfig | 3 +++
> 3 files changed, 10 insertions(+)
>
> diff --git a/arch/arm/dts/rk3288-tinker-u-boot.dtsi b/arch/arm/dts/rk3288-tinker-u-boot.dtsi
> index 7568b1495341..a6f6f14df93d 100644
> --- a/arch/arm/dts/rk3288-tinker-u-boot.dtsi
> +++ b/arch/arm/dts/rk3288-tinker-u-boot.dtsi
> @@ -16,6 +16,10 @@
> rockchip,sdram-params = <0x20d266a4 0x5b6 2 533000000 6 9 0>;
> };
>
> +&gmac {
> + snps,reset-delays-us = <0 10000 80000>;
> +};
> +
> &gpio7 {
> /delete-property/ bootph-all;
> };
> diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
> index b7636fe581f4..05dca105d609 100644
> --- a/configs/tinker-rk3288_defconfig
> +++ b/configs/tinker-rk3288_defconfig
> @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y
> CONFIG_I2C_EEPROM=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> +CONFIG_PHY_REALTEK=y
> +CONFIG_DM_ETH_PHY=y
> +CONFIG_PHY_GIGE=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> CONFIG_PINCTRL=y
> diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
> index e50424746c81..1bee0d094c8d 100644
> --- a/configs/tinker-s-rk3288_defconfig
> +++ b/configs/tinker-s-rk3288_defconfig
> @@ -58,6 +58,9 @@ CONFIG_ROCKCHIP_EFUSE=y
> CONFIG_I2C_EEPROM=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> +CONFIG_PHY_REALTEK=y
> +CONFIG_DM_ETH_PHY=y
> +CONFIG_PHY_GIGE=y
> CONFIG_ETH_DESIGNWARE=y
> CONFIG_GMAC_ROCKCHIP=y
> CONFIG_PINCTRL=y
More information about the U-Boot
mailing list