From mboxrd@z Thu Jan 1 00:00:00 1970 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C5F20C433EF for ; Fri, 20 May 2022 15:34:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3223D83E8B; Fri, 20 May 2022 17:34:29 +0200 (CEST) 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="Eo8GEKxc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 396A580029; Fri, 20 May 2022 17:34:16 +0200 (CEST) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 3A75383DC7 for ; Fri, 20 May 2022 17:34:13 +0200 (CEST) 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=1139ae0037=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24KEtXPR024416; Fri, 20 May 2022 17:34:12 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=69Kl0MaoHWYZwrK7c7/RbMR8wwaUvhqkoqEnMdOHYrs=; b=Eo8GEKxcS/QmtKALS6pKd0/33SySsLppio2zQ4rglkJHTHB+0DoA2xyqamLaBpSTtwPQ 4SjrHohEAXWMyrlafyrI6Pi+YkgF/TcBvfdEAzY3p2yTH1DReMsE6YM5OOHnZSuMxfiv o3x9oAKCNrNWbnp9qYlNrF9qgYccV418Q3xqR4ple60tb9wD7/+/0LJ2FZRUDBDm2L9m TZH1nLOmXDQOwC9d6Z0FC5tDbZaqhYTVBpMjvCbSjnmIAovtihBIbdAk8oqATOotB7lS byLDVJEoCmOGPq1rCcGS8rKgoBkgfpQntYR/j+By8GKD0FL/snNxrhF9P0hHiLWVWNlC zA== 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 3g23aj93n5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 May 2022 17:34:12 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E1900100034; Fri, 20 May 2022 17:34:11 +0200 (CEST) Received: from Webmail-eu.st.com (eqndag1node6.st.com [10.75.129.135]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id CACE224C451; Fri, 20 May 2022 17:34:11 +0200 (CEST) Received: from [10.48.0.213] (10.75.127.51) by EQNDAG1NODE6.st.com (10.75.129.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Fri, 20 May 2022 17:33:15 +0200 Message-ID: <0051776a-3279-7b22-76ba-077039dab1c3@foss.st.com> Date: Fri, 20 May 2022 17:33:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH 11/16] board: stm32pm1: add stm32mp13 board support Content-Language: en-US To: Patrice CHOTARD , CC: References: <20220506140624.445542-1-patrick.delaunay@foss.st.com> <20220506160540.11.I35fae2ba5868b79e66ccef249270e1cf1bf3f04b@changeid> <7b37356a-89fb-58f4-fe77-1623f1e15729@foss.st.com> From: Patrick DELAUNAY In-Reply-To: <7b37356a-89fb-58f4-fe77-1623f1e15729@foss.st.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.75.127.51] X-ClientProxiedBy: SFHDAG2NODE3.st.com (10.75.127.6) To EQNDAG1NODE6.st.com (10.75.129.135) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-20_04,2022-05-20_02,2022-02-23_01 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean Hi Patrice On 5/20/22 09:02, Patrice CHOTARD wrote: > Hi Patrick > > One typo and one remark below > > On 5/6/22 16:06, Patrick Delaunay wrote: >> Add stm32mp15x prefix to all STM32MP15x board specific function, >> this patch is a preliminary step for STM32MP13x support. >> >> This patch also add the RCC probe to avoid circular access with > s/add/adds OK > >> usbphyc probe as clk provider. >> >> Signed-off-by: Patrick Delaunay >> --- >> >> board/st/stm32mp1/stm32mp1.c | 27 ++++++++++++++++++--------- >> 1 file changed, 18 insertions(+), 9 deletions(-) >> >> diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c >> index fff1880e5b..4ba7201ffb 100644 >> --- a/board/st/stm32mp1/stm32mp1.c >> +++ b/board/st/stm32mp1/stm32mp1.c >> @@ -547,8 +547,7 @@ static void sysconf_init(void) >> clrbits_le32(syscfg + SYSCFG_CMPCR, SYSCFG_CMPCR_SW_CTRL); >> } >> >> [...] >> >> -static void board_ev1_init(void) >> +static void board_stm32mp15x_ev1_init(void) >> { >> struct udevice *dev; >> >> @@ -648,13 +648,22 @@ static void board_ev1_init(void) >> /* board dependent setup after realloc */ >> int board_init(void) >> { >> + struct udevice *dev; >> + int ret; >> + >> + /* probe RCC to avoid circular access with usbphyc probe as clk provider */ >> + if (IS_ENABLED(CONFIG_CLK_STM32MP13)) { >> + ret = uclass_get_device_by_driver(UCLASS_CLK, DM_DRIVER_GET(stm32mp1_clock), &dev); >> + log_debug("Clock init failed: %d\n", ret); > I am wondering if usage of DM_FLAG_PROBE_AFTER_BIND in flag would avoid this above piece of code ? Yes, I think you are right => need to be tested when RCC clock driver and USBPHY clock will be upstreamed       and then we will remove these lines >> + } >> + >> board_key_check(); >> >> - if (board_is_ev1()) >> - board_ev1_init(); >> + if (board_is_stm32mp15x_ev1()) >> + board_stm32mp15x_ev1_init(); >> >> - if (board_is_dk2()) >> - dk2_i2c1_fix(); >> + if (board_is_stm32mp15x_dk2()) >> + board_stm32mp15x_dk2_init(); >> >> if (IS_ENABLED(CONFIG_DM_REGULATOR)) >> regulators_enable_boot_on(_DEBUG); Regards Patrick