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 78B89C433F5 for ; Fri, 22 Apr 2022 00:10:13 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4DF8583D7A; Fri, 22 Apr 2022 02:10:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.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=gmail.com header.i=@gmail.com header.b="lrEZxWxQ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8B31A83D62; Fri, 22 Apr 2022 02:10:09 +0200 (CEST) Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9D22983C70 for ; Fri, 22 Apr 2022 02:10:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x729.google.com with SMTP id y129so4790081qkb.2 for ; Thu, 21 Apr 2022 17:10:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tgeB35z6dcHvfsGxecpk23M+wBxFiMnd+7enN6prH2E=; b=lrEZxWxQTn4V713VO0p/yfNBXKScJNmKeE5eRXKOYkxxZhTro1jl+JabZvaHyI/PqX +omTc533U2+H6wKcTQem/dKv1sQDzvASKaJ7RDsEunTO6M4PifVfKmKjx5s0GhcnJ2aB AwonOdmGsWzynOkN/+OgD/J4btzDVhqEt2s4GYNnrPY5Ixxi5jbbBh4yQT5sWPncoLpB xm9bIYdONrKHTaRFXPJtgAB4QQggWYVKvh/k6TkNP+Rh4A7GqgCw/ubD29ls7fxji7V9 ggITKLi2qUC2JDooWvUeVefpzVaGAHEUZAbcWI2EfsdpwiZ8mNbnL5JOsrJ5Ckl6jUSK I1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tgeB35z6dcHvfsGxecpk23M+wBxFiMnd+7enN6prH2E=; b=QYg7GyihvKtAI9tv97bb8/KcklehC4s2+qLJHqBYwTC3w5IBhuhkG3GXcl+hQYe6Ok 92KAy+Vg6FT6knGfKVZ8sR439MdhCt8d8ejcVYYPDm5aAeiwemOGFxztUg0CGUjnt2oW v6BNVCB/RmIfwGQQVMjz3f/ujnsCIXRR3O9wdXWi4vulcUng3FoJ8A34kuiQJqyd1625 ShxAzEDXRo5ieMSVXSObwFrkGdJFjUX/7UXG6aJSy2K7eX8t1huUIjCzkTvYZpPeSKFd XrEUgGgOgxfQRMTRY4S8b+GMasiWeRT/ehhbhNu2CvLlVDkyL/uESmKAUtzX8JAaBJQ9 YiTQ== X-Gm-Message-State: AOAM531ZiD3s3fCpd1jE/ErdaIB6YjfDGqvBONpOELUq8D7sxPKREggi ZosoVUtmb5cP5SoVqp/9O4o= X-Google-Smtp-Source: ABdhPJyvXpFYIBLr/N2bFYX0WPd6R+aRyN7sov8Ce2pMjP+ISh2oI1cEMJZP/PX3xipIr23ZqdxDMw== X-Received: by 2002:a05:620a:2943:b0:69e:80ba:4a18 with SMTP id n3-20020a05620a294300b0069e80ba4a18mr1179181qkp.301.1650586200619; Thu, 21 Apr 2022 17:10:00 -0700 (PDT) Received: from [192.168.1.201] (pool-108-18-137-133.washdc.fios.verizon.net. [108.18.137.133]) by smtp.googlemail.com with ESMTPSA id p4-20020a05620a132400b0069e9d8697b4sm222449qkj.46.2022.04.21.17.10.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Apr 2022 17:10:00 -0700 (PDT) Subject: Re: imx8mm eLCDIF clock To: Tommaso Merciai , u-boot@lists.denx.de Cc: Lukasz Majewski References: <20220421064805.GA2335@tom-ThinkPad-T14s-Gen-2i> From: Sean Anderson Message-ID: Date: Thu, 21 Apr 2022 20:09:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20220421064805.GA2335@tom-ThinkPad-T14s-Gen-2i> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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/21/22 2:48 AM, Tommaso Merciai wrote: > Hi, > I'm working on drivers/clk/imx/clk-imx8mm.c to port and bring up eLCDIF > clocks. After port all necessary clocks needed by eLCDIF I found that > IMX8MM_VIDEO_PLL1 clock is not enabled and need the following code to enable > it at the end of the clk-imx8mm probe: > > struct clk *clkp; > > clk_get_by_id(IMX8MM_VIDEO_PLL1, &clkp); > clk_set_rate(clkp, 594000000UL); > clk_enable(clkp); > > What do you think about this solution? > There is a more standard way to do this? PLL1 should be a parent of one of the clocks required by the eLCDIF. That clock should call clk_enable() on PLL1 when it is enabled itself. If you want to set a specific rate, you can do that with assigned-clock-rates in either the clock's DT node, or the eLCDIF's DT node. --Sean