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 A0559C433F5 for ; Wed, 16 Mar 2022 12:35:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6424A82155; Wed, 16 Mar 2022 13:35:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="jwptSzpc"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="vzi/5lXh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 04BE5831AA; Wed, 16 Mar 2022 13:35:41 +0100 (CET) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6E34E8301E for ; Wed, 16 Mar 2022 13:35:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 7DE4F4E2006; Wed, 16 Mar 2022 12:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1647434133; bh=R3NqM2PNp4jd1UQ9iAb9Z1WQDcmgNUdnapRAMYmf6ZI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=jwptSzpcxEYyCH4s/TH1pRfKErqaIw2OYmBpMfxsBxg3gTvr58qfNIZ3IhF+YYH1e nbzFIVQ3KpdgnIYDFyA5rYXWyjtmdm3gSmd+1iYJ2lXwDv2AkZce4hawgIA/NHa7hY 2JECuI+kAyPMNt1IRzi8uqROBWD09TGVHaQfUvkY= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FsdO1erHFJsY; Wed, 16 Mar 2022 12:35:32 +0000 (UTC) Received: from www.akkea.ca (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 9C2DE4E2003; Wed, 16 Mar 2022 12:35:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1647434132; bh=R3NqM2PNp4jd1UQ9iAb9Z1WQDcmgNUdnapRAMYmf6ZI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=vzi/5lXh5lvunkSh20D4X1tNcq13Pg2zGFRo1VPGjltmDuYUwQG0sqisEgTVMmkWj M0BMkS2tdRk1Ixk9QvbCld2zuHa1eaChsRKJ/2gpClkdlAViD3R0voRh+D/FtRoWbK wvg3NUUGA10JX9SZ26cAfXbuo+8SSdxdGS4O4SV0= MIME-Version: 1.0 Date: Wed, 16 Mar 2022 05:35:32 -0700 From: Angus Ainslie To: Heiko Thiery Cc: Angus Ainslie , u-boot@lists.denx.de, Marek Vasut , lukma@denx.de, seanga2@gmail.com, sbabic@denx.de, festevam@gmail.com, kernel@puri.sm, uboot-imx@nxp.com, peng.fan@nxp.com Subject: Re: [PATCH v4 2/4] clk: imx8mq: Add a clock driver for the imx8mq In-Reply-To: References: <20220315130820.1054186-1-angus@akkea.ca> <20220315130820.1054186-3-angus@akkea.ca> Message-ID: <59a8d3a19ef0d7f7a982083b5002cb51@akkea.ca> X-Sender: angus@akkea.ca User-Agent: Roundcube Webmail/1.3.17 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 2022-03-16 05:26, Heiko Thiery wrote: > Hi, > > Am Mi., 16. März 2022 um 08:14 Uhr schrieb Heiko Thiery > : >> >> Hi Angus, >> >> Am Di., 15. März 2022 um 16:46 Uhr schrieb Angus Ainslie >> : >> > >> > Hi Heiko, >> > >> > On 2022-03-15 08:35, Heiko Thiery wrote: >> > >> > Hi Angus and all, >> > >> > >> > >> > >> > Am Di., 15. März 2022 um 14:09 Uhr schrieb Angus Ainslie : >> >> >> >> This is a DM clock driver based off the imx8mm u-boot driver and the linux >> >> kernel driver. >> >> >> >> All of the PLLs and clocks are initialized so the subsystems below are >> >> functional and tested. >> >> >> >> 1) USB host and peripheral >> >> 2) ECSPI >> >> 3) UART >> >> 4) I2C all busses >> >> 5) USDHC for eMMC support >> >> 6) USB storage >> >> 7) GPIO >> >> 8) DRAM >> >> >> >> >> > Snip >> > >> > >> > when adding this patch and enabling CLK_IMX8MQ I see the following on my board .. Any idea what I missed here? >> > >> > --- >8 --- >> > U-Boot SPL 2022.04-rc4-00008-g390d9bf9a1 (Mar 15 2022 - 16:26:59 +0100) >> > Trying to boot from SD card >> > >> > >> > U-Boot 2022.04-rc4-00008-g390d9bf9a1 (Mar 15 2022 - 16:26:59 +0100) >> > >> > CPU: Freescale i.MX8MQ rev2.1 at 800 MHz >> > Reset cause: POR >> > Model: Kontron pITX-imx8m >> > DRAM: alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > alloc space exhausted >> > 4 GiB >> > >> > My guess is that there was static code that was setting up the DRAM pll that isn't get executed now that there's a DM clock driver. >> > >> > I'd try enabling DEBUG in the clk-uclass and clk-composite drivers. >> > >> > Also look at what DRAM initialization code is not being run now. Our board doesn't have an DRAM specific initialization so there could be a bug in the DRAM setup. >> >> The problem was the MALLOC_F_LEN value. Increasing that the "alloc >> space exhausted" is gone. >> >> But with the enabled DM_SERIAL the problem of "No serial driver found" >> is still there and the board reboots. You said you have DM_SERIAL >> enabled and it works? > > Meanwhile I figured out what the problem is with the 'No serial driver > found'. In the used dtb there are 'assigned-clocks' and > 'assigned-clock-parents' set in the uart nodes. When removing this the > serial will work. I have to admit that I do not know why this is set > that way. I can only imagine that this was taken from the uboot-imx > tree. > > --- > assigned-clocks = <&clk IMX8MQ_CLK_UART1>; > assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>; > --- > Does that solve the reboot ? > see also here: > https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/imx8mq-kontron-pitx-imx8m.dts#L315 If that works for Linux it should also work for u-boot. It may be that the SYS1_PLL_80M isn't set correctly or that the CLK_UART1 mux isn't correctly setup. If you enable DEBUG in clk-uclass I might be able to figure out were the problem is.