Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1B12C433F5 for ; Mon, 15 Nov 2021 11:18:58 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2BE6B61C15 for ; Mon, 15 Nov 2021 11:18:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2BE6B61C15 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=foss.st.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0ADF28366A; Mon, 15 Nov 2021 12:18:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="2oOWh1Ym"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C37D18361C; Mon, 15 Nov 2021 12:18:53 +0100 (CET) Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4056D83651 for ; Mon, 15 Nov 2021 12:18:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=595306832a=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1AF7WXVm010463; Mon, 15 Nov 2021 12:18:47 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=oSI21NlXoV2NSStQnThMhGli606dHw37QpCgIyhZPVo=; b=2oOWh1YmROoqg2KK9Gr4aiLmeTatr6Rly5rWtHHdRucP+QTUCc7u8lvUMCNTVQaU4itW MJ4GwakwQbhsYFtg2mIvdnPZwO4ipeiCJ29kGSrhQuLvH0IJlGzuOXJGNyckh69mlvS6 1OdGsO1DaGEk9J5Lb58+AM4Tec5ysgD2F/PXGNPV3x0ecN1MZYkHdqBekHyT0rELY/Dz Z1zXmrJ2DMa6QXvU0AUin85mL4G4e6KPcb/1S3ix8lvpQlcd5X8LZ86/gHQL2yIhd/cH 6jR/S3sL5WtdbN030tc1UzbaWXQGvD6lxavVpM3E/CVqDtvzuZOma7x7fpzI++hnKiTe mA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3cbk8j1ejy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Nov 2021 12:18:47 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4DDF910002A; Mon, 15 Nov 2021 12:18:47 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 3E04722D179; Mon, 15 Nov 2021 12:18:47 +0100 (CET) Received: from lmecxl0994.lme.st.com (10.75.127.50) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Mon, 15 Nov 2021 12:18:46 +0100 Subject: Re: [PATCH] ARM: stm32: Increase USB power-good delay on DHSOM To: Marek Vasut , CC: Patrice Chotard References: <20211113022444.231801-1-marex@denx.de> From: Patrick DELAUNAY Message-ID: <6188970d-e4cd-4158-3bf7-db0124b400b9@foss.st.com> Date: Mon, 15 Nov 2021 12:18:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <20211113022444.231801-1-marex@denx.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.75.127.50] X-ClientProxiedBy: SFHDAG1NODE2.st.com (10.75.127.2) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-15_10,2021-11-15_01,2020-04-07_01 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.35 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Marek, On 11/13/21 3:24 AM, Marek Vasut wrote: > The USB hub on STM32MP1 DHCOM boards needs to wait a bit longer until > the USB Vbus is stable. Increase the USB power-good delay to 1 s. > > This adds default-undefined STM32MP_BOARD_EXTRA_ENV variable into > stm32mp15_common.h to reduce duplication in board-specific config > files adding custom environment. > > Signed-off-by: Marek Vasut > Cc: Patrice Chotard > Cc: Patrick Delaunay > --- > include/configs/stm32mp15_common.h | 3 ++- > include/configs/stm32mp15_dh_dhsom.h | 3 +++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h > index 4e2cabff2e7..be22d3ea7f1 100644 > --- a/include/configs/stm32mp15_common.h > +++ b/include/configs/stm32mp15_common.h > @@ -169,7 +169,8 @@ > STM32MP_BOOTCMD \ > STM32MP_PARTS_DEFAULT \ > BOOTENV \ > - STM32MP_EXTRA > + STM32MP_EXTRA \ > + STM32MP_BOARD_EXTRA_ENV I think you that patch failed for the board which include "stm32mp15_common.h" only STM32MP_BOARD_EXTRA_ENV is not define => board/engicam/stm32mp1/Kconfig:10:    default "stm32mp15_common" at minimal, you need to add: #ifndef STM32MP_BOARD_EXTRA_ENV #defineSTM32MP_BOARD_EXTRA_ENV #endif But for my point of view CONFIG_EXTRA_ENV_SETTINGS is already a "default" value => it can be override in board (after #undef) or the overidde should be also managed by  STM32MP_EXTRA, if we add in the common file: #ifndef STM32MP_EXTRA #defineSTM32MP_EXTRA \ "altbootcmd=run bootcmd\0"\ "env_check=if env info -p -d -q; then env save; fi\0"\ "boot_net_usb_start=true\0" #endif > #endif /* ifndef CONFIG_SPL_BUILD */ > #endif /* ifdef CONFIG_DISTRO_DEFAULTS*/ > diff --git a/include/configs/stm32mp15_dh_dhsom.h b/include/configs/stm32mp15_dh_dhsom.h > index c559cd72da7..bac9e8388a7 100644 > --- a/include/configs/stm32mp15_dh_dhsom.h > +++ b/include/configs/stm32mp15_dh_dhsom.h > @@ -8,6 +8,9 @@ > #ifndef __CONFIG_STM32MP15_DH_DHSOM_H__ > #define __CONFIG_STM32MP15_DH_DHSOM_H__ > > +#define STM32MP_BOARD_EXTRA_ENV \ > + "usb_pgood_delay=1000\0" > + > #include proposal 1: overiddeCONFIG_EXTRA_ENV_SETTINGS as it is done in stm32mp15_st_common.h #include #define STM32MP_DH_EXTRA_ENV \ "usb_pgood_delay=1000\0" #undefCONFIG_EXTRA_ENV_SETTINGS #defineCONFIG_EXTRA_ENV_SETTINGS \ STM32MP_MEM_LAYOUT \ ST_STM32MP1_BOOTCMD \ STM32MP_PARTS_DEFAULT \ BOOTENV \ STM32MP_EXTRA \ STM32MP_DH_EXTRA_ENV or #include #undefCONFIG_EXTRA_ENV_SETTINGS #defineCONFIG_EXTRA_ENV_SETTINGS \ STM32MP_MEM_LAYOUT \ ST_STM32MP1_BOOTCMD \ STM32MP_PARTS_DEFAULT \ BOOTENV \ STM32MP_EXTRA \ "usb_pgood_delay=1000\0" proposal 2: you can overrideSTM32MP_EXTRA #defineSTM32MP_EXTRA \ "altbootcmd=run bootcmd\0"\ "env_check=if env info -p -d -q; then env save; fi\0"\ "boot_net_usb_start=true\0" \ "usb_pgood_delay=1000\0" #include open point : do you really need "altbootcmd" ? "boot_net_usb_start" ?"env_check" ? I moved them in EXTRA define to be override by board because I think they are not always necessary. > > #define CONFIG_SPL_TARGET "u-boot.itb" Patrick