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 A8327C433F5 for ; Fri, 22 Apr 2022 13:14:36 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 84ACE83D5C; Fri, 22 Apr 2022 15:14:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1650633274; bh=bzeMTYFyI2uLfghu7mUnuVeblgir4C1jjtvwD08mfpI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RFOEPo2ue7L1C1EhhYkqCnD80RGkrhd3vuzd+N/NcsMd151xOza94S35YIoaNn9OF vYBoTbo03umB84hW/7DmeLNE1LGvVD5sUjWOJIPHwhv+48KH3FS+Q5H9FGUSqxmI9F FiBs7bDQBgwjbtORXEp3OJsY2fFFkr9xdGrH4D7UGOtDcJ5axSqhviv+8G1Xybq9Wx k+x3PA/0/fF8cEBdaCb5od70f5Tirio3HJ8He70wHTHjXaM9ueFgfZdw86B1ICXb7P TQRd9h95jmV7WEns+IezC1tbqxLjxwqYwY0w4jeemxOdwT1Y6C62acaXjginqL+H5H LBKCVrh7WBF5w== Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D4E8582A3A; Fri, 22 Apr 2022 15:14:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1650633271; bh=bzeMTYFyI2uLfghu7mUnuVeblgir4C1jjtvwD08mfpI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=RLMlUxolwcfE1HKMfwG3sWeHOdQSgY27Ada+1nYB42fibAtHGgEGt+EPBgp48hF9F 7mJ2NB12MBiTSEfzAVPyuPf/ka6kg8h/4kC6WhxiirkRHUxIB7bxHjRrMKApS3ZmoN g7YyPHLgrEy/lrYt1pkOgqnlfqY6z0Ar0T4duau+6SQu/EeGI9mtIYKv3K912JQmou n9YcSzLV2WTA1mIObibx1Qv5F9+lVJ+pWfLHenmpZtKAAA/ay5emQu8Y8gIQln1ZeA xCl8PD3PkKISG9RxOAD3fqE/PmO6VgKjPKfWrEJq4LQ8zKvnetcuNqlSAFU9Qq67dn NArRta3v4ickw== Message-ID: <88045841-5cee-a2de-9905-e3e63ba3d72d@denx.de> Date: Fri, 22 Apr 2022 15:14:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] led: Configure LED default-state on boot Content-Language: en-US To: Patrice CHOTARD , Sean Anderson , u-boot@lists.denx.de Cc: Alex Nemirovsky , Patrick Delaunay , Philippe Reynes , Simon Glass , Steven Lawrance References: <20220403232327.720900-1-marex@denx.de> <051116fd-2619-fe62-cd1d-6b1ab64e9949@foss.st.com> <1eb6ece0-e62c-e63b-da81-6455a6a18c5b@foss.st.com> <564bcf5b-11c2-7ae3-66e5-4d208fbeece0@gmail.com> <0e0dbf8a-118d-b7e7-0e4f-3394fc69eada@foss.st.com> <785558cc-a91f-caab-92b7-4bf050524202@denx.de> <8ce83b6a-0fd3-dc2a-5b5d-1ef11fb41579@denx.de> <01b827f8-8581-df72-1cfd-fe3046884eb9@foss.st.com> From: Marek Vasut In-Reply-To: <01b827f8-8581-df72-1cfd-fe3046884eb9@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 On 4/22/22 14:35, Patrice CHOTARD wrote: > Hi Marek > > On 4/22/22 13:41, Marek Vasut wrote: >> On 4/22/22 11:02, Marek Vasut wrote: >>> On 4/22/22 09:09, Patrice CHOTARD wrote: >>>> Hi Sean >>>> >>>> On 4/22/22 02:06, Sean Anderson wrote: >>>>> On 4/21/22 11:26 AM, Patrice CHOTARD wrote: >>>>>> >>>>>> >>>>>> On 4/21/22 17:18, Marek Vasut wrote: >>>>>>> On 4/21/22 17:09, Patrice CHOTARD wrote: >>>>>>>> Hi Marek >>>>>>> >>>>>>> Hi, >>>>>>> >>>>>>>> I tested the current U-Boot master branch (22bfaa1f673ab5442dfb9778eea4c9a18dee42d0) >>>>>>>> This patch is breaking the boot sequence on stm32mp157c-dk2. >>>>>>> >>>>>>> Breaking it ... how ? What happens, hang ? >>>>>> >>>>>> Here is the boot log : >>>>>> >>>>>> U-Boot SPL 2022.04-00827-g22bfaa1f67 (Apr 21 2022 - 17:22:47 +0200) >>>>>> RAM: DDR3-DDR3L 16bits 533000kHz >>>>>> WDT:   Started watchdog@5a002000 with servicing (32s timeout) >>>>>> >>>>>> >>>>>> U-Boot 2022.04-00827-g22bfaa1f67 (Apr 21 2022 - 17:22:47 +0200) >>>>>> >>>>>> CPU: STM32MP157CAC Rev.B >>>>>> Model: STMicroelectronics STM32MP157C-DK2 Discovery Board >>>>>> Board: stm32mp1 in basic mode (st,stm32mp157c-dk2) >>>>>> Board: MB1272 Var2.0 Rev.C-01 >>>>>> DRAM:  512 MiB >>>>>> Clocks: >>>>>> - MPU : 0 MHz >>>>>> - MCU : 0 MHz >>>>>> - AXI : 0 MHz >>>>>> - PER : 0 MHz >>>>>> - DDR : 0 MHz >>>>>> clock rate is 0 >>>>>> clock rate is 0 >>>>>> clock rate is 0 >>>>>> clock rate is 0 >>>>>> clock rate is 0 >>>>>> cloc >>>>>> >>>>>> What worried me is that all clocks are set to 0 (MPU/MCU/AXI ....)...no direct link with the led-uclass update. >>>>>> For information, if i comment the device_probe(dev) in led_post_bind(), it avoid the hang. >>>>> >>>>> Can you try applying the LED patch on top of 2022.04? >>>>> I made some clock changes recently, so it could be an interaction with that. >>>>> >>>> >>>> Thanks for the tips, but unfortunately, i have the same issue when applying this patch on top of v2022.04. >>>> I am still investigating ..... ;-) >>> >>> Maybe the clk_* in gpio_stm32 is the problem, is the gpio driver for mp1 probed by the time the led post_bind is called ? If not, maybe that's an issue. >>> >>> I'll have a look too. >> >> Try this patch, does it "fix" it for you ? >> >> diff --git a/arch/arm/dts/stm32mp151.dtsi b/arch/arm/dts/stm32mp151.dtsi >> index 5a2be007586..ec5cddfcf98 100644 >> --- a/arch/arm/dts/stm32mp151.dtsi >> +++ b/arch/arm/dts/stm32mp151.dtsi >> @@ -70,7 +70,7 @@ >>                 interrupt-parent = <&intc>; >>         }; >> >> -       clocks { >> +//     clocks { >>                 clk_hse: clk-hse { >>                         #clock-cells = <0>; >>                         compatible = "fixed-clock"; >> @@ -100,7 +100,7 @@ >>                         compatible = "fixed-clock"; >>                         clock-frequency = <4000000>; >>                 }; >> -       }; >> +//     }; >> >>         thermal-zones { >>                 cpu_thermal: cpu-thermal { >> >> If so, we need to figure out why. > > With this patch, the board is booting fine > > The "led patch" is changing the order of probing of some early drivers (led, clock, gpio, pinctrl....) ..... to be continued ... ;-) Larger change is coming, you are on CC.