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 X-Spam-Level: X-Spam-Status: No, score=-10.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BA64C432BE for ; Thu, 26 Aug 2021 20:13:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D02B960E78 for ; Thu, 26 Aug 2021 20:13:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D02B960E78 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IWKA+22MY2il4YWfCLq3Eg9xeQk6sX7ShWvPv5w/UIw=; b=mWluvpup3tsDbl FGf19p2Y91gs3qZFcsu7h+UKldbBEpm+cBSfjJW5sodqqMjVi5U2GBIefOdan1QsRsE0ruF6sj0nq zoSIXxkSfxMDk32lsFtOE227DUmJcqZ9mMk7xgAle8CWrRwLXior83L65pdyT5/FMailskdGlJy3G zSitqGSwXg0ThU65bVLdZS1g0D/MYMmOIJHtWlj5dWBX2yB/4zOoMlFtbPKzGA53aSJ1Oa7d4jOlC uTh3639rxuSZ79J0v35QZ3WCV78FtvEirZ6LMKBPV6SrcdJMTxyH890w2qyfLys/eJwS461T15d2w hOvsIlUJka9URNWMXBtw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJLia-00Arr4-15; Thu, 26 Aug 2021 20:11:20 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mJLiV-00Arp7-Ib for linux-arm-kernel@lists.infradead.org; Thu, 26 Aug 2021 20:11:16 +0000 Received: by mail-lf1-x135.google.com with SMTP id z2so9447958lft.1 for ; Thu, 26 Aug 2021 13:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ljj8+PavRlDjCYeTM0Y3t8UOeuSlVU1mCZqXOWU6lU4=; b=HZXNjsumIeyG/Vw1OkTWrHVqSz854PwQ8Uzncg58on9e+pvcqxfj6hXQL7ZBNi4nQL 5VfWKv/IiEYXqgSqsFwevzsA4/nT1dU4onrngt55MkH6GNAL5UTbGSsJVogBMZ6rkZH2 LJeO6A/nY+89KrRDfDipt56aaYEx/yK4gpLQmxl8EXuSPGAQu8Q3ZTc6S0Ij3Dunk8Ts PiDb1cC/p5AYnvpMdtb5ac1Ecb38f0epPZd6Ycs2CEveEZbIiOgYlhcSLKKf9SeS9srd qYQzVx75gn1COsLKKGxOBWIolHYAWGnQCDEJ/F9v4FWdXNOscC1q6wn/rgp7RCwpNdpW 45TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ljj8+PavRlDjCYeTM0Y3t8UOeuSlVU1mCZqXOWU6lU4=; b=l5bCN19jedp5uMzJIK7hrNOOzaNYGG+LbRjyRVOggQoa/Aa0m8/smwkumgcabKpwZU 1N7Ef2T88+ZK0eAdxjcSS40uHTpu3hhSe8Gu1kzpOxWkGDbva7OeU/nixYTcLf8tFBva /FA65xsBgRiQpTRiDxtSoHL/npVSDsrDNY9gnkEMV+K/n4CMcpM1qqkVD5PwXqZF3Qqm 4x3qQuuNVDQ3uJFj15SXUjK1F2arhoFEUGlkUjdvpT4Zee6AwcAwHiO5E5qxMIzrVsCL KddHvgT+C1Fk6arTH7LqWLLWHAGXfReIPQQPADwKAyeeReYwqLDf9nVQ5UJjGJOSt2wA nBqQ== X-Gm-Message-State: AOAM532u2Ed5ZLRKzhm5A8pIfMrINiVu+DKyL5DZ/9YmvYOSiOuaqeG4 qPvCJ0FECqUxvt8XHxGv+Lnf2NyoHmv0FjWgw+0= X-Google-Smtp-Source: ABdhPJzxIdSWys8Hw92KNWOfn1riI9bczm/DEuK3YN4HyXHP5OwUUrv0OrO/ap9lIuw2Q9E9wOKiBpxoZiiKIj5QqHE= X-Received: by 2002:ac2:4e98:: with SMTP id o24mr4267641lfr.295.1630008670134; Thu, 26 Aug 2021 13:11:10 -0700 (PDT) MIME-Version: 1.0 References: <20210826152049.4175381-1-s.riedmueller@phytec.de> <20210826152049.4175381-2-s.riedmueller@phytec.de> In-Reply-To: <20210826152049.4175381-2-s.riedmueller@phytec.de> From: Fabio Estevam Date: Thu, 26 Aug 2021 17:10:58 -0300 Message-ID: Subject: Re: [PATCH 2/2] clk: imx: imx6ul: Fix csi clk gate register To: Stefan Riedmueller Cc: Abel Vesa , Michael Turquette , Stephen Boyd , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-clk , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210826_131115_665901_EC8364DC X-CRM114-Status: GOOD ( 21.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Stefan, On Thu, Aug 26, 2021 at 12:20 PM Stefan Riedmueller wrote: > > According to the imx6ul Reference Manual the csi clk gate register is > CCM_CCGR3 (offset 0x74) bit 0/1. For the imx6ull on the other hand the > Reference Manual lists register CCM_CCGR2 (offset 0x70) bit 2/3 as the > csi clk gate which is the current setting. > > Tests have shown though that the correct csi clk gate register for the > imx6ull is actually CCM_CCGR3 bit 0/1 as well. Thus set the correct > register for both platforms. > > Signed-off-by: Stefan Riedmueller I tested the series on an imx6ull-evk with an OV5640 sensor: Tested-by: Fabio Estevam but in my case, I did not see the problem even without your patch. Most likely because the bootloader turned on the CSI clock. > --- > drivers/clk/imx/clk-imx6ul.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/clk/imx/clk-imx6ul.c b/drivers/clk/imx/clk-imx6ul.c > index 206e4c43f68f..5dd222fab01b 100644 > --- a/drivers/clk/imx/clk-imx6ul.c > +++ b/drivers/clk/imx/clk-imx6ul.c > @@ -380,7 +380,6 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) > hws[IMX6ULL_CLK_ESAI_IPG] = imx_clk_hw_gate2_shared("esai_ipg", "ahb", base + 0x70, 0, &share_count_esai); > hws[IMX6ULL_CLK_ESAI_MEM] = imx_clk_hw_gate2_shared("esai_mem", "ahb", base + 0x70, 0, &share_count_esai); > } > - hws[IMX6UL_CLK_CSI] = imx_clk_hw_gate2("csi", "csi_podf", base + 0x70, 2); > hws[IMX6UL_CLK_I2C1] = imx_clk_hw_gate2("i2c1", "perclk", base + 0x70, 6); > hws[IMX6UL_CLK_I2C2] = imx_clk_hw_gate2("i2c2", "perclk", base + 0x70, 8); > hws[IMX6UL_CLK_I2C3] = imx_clk_hw_gate2("i2c3", "perclk", base + 0x70, 10); > @@ -391,6 +390,7 @@ static void __init imx6ul_clocks_init(struct device_node *ccm_node) > hws[IMX6UL_CLK_PXP] = imx_clk_hw_gate2("pxp", "axi", base + 0x70, 30); > > /* CCGR3 */ It would be nice to put a comment here explaining the imx6ull Reference Manual mismatch. Maybe Abel could help to check internally at NXP? > + hws[IMX6UL_CLK_CSI] = imx_clk_hw_gate2("csi", "csi_podf", base + 0x74, 0); Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel