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=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 6549AC10F13 for ; Thu, 11 Apr 2019 09:15:34 +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 316D7217D4 for ; Thu, 11 Apr 2019 09:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TMI0U+46" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 316D7217D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mslZpGmYqItRrJL5+oh4X6sYofSG1+sBwmf6XWWtC+U=; b=TMI0U+4676zZdu mzSv1QP3hYLnd1U/W6cggYqXGtMoMSJqLDcRRvU4WzR5AW88zfWn3BmNcb9spDgPIlOtuy1o+EonA kuELP9W8snWgMSyytyVPRWUXhF1sh7JagKeLlXBlnLyM9w1ObtP53rr0ArFvUzkQ1b54XUTmlE+E3 mTPEQqDTAGlVYtROr9smlP2UfMdbpsp7B7Z3Dl7IXbOWTW1yVpHzw3tyYYLQqdvsWpyHi/CThhe1W FcyLJm6qCEIW41Q5IYwalXK07ieMXLext/rk/LQfM0EcsX7WOkUNeltCoNzyVzNQm9mIEPkP7qSss KoPn2VABOe544/uCz5WA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEVnx-0001Cz-F1; Thu, 11 Apr 2019 09:15:33 +0000 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEVnt-000144-9A for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 09:15:31 +0000 X-Originating-IP: 109.213.33.177 Received: from localhost (alyon-652-1-42-177.w109-213.abo.wanadoo.fr [109.213.33.177]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 144F024001A; Thu, 11 Apr 2019 09:15:21 +0000 (UTC) Date: Thu, 11 Apr 2019 11:15:21 +0200 From: Alexandre Belloni To: Vladimir Zapolskiy Subject: Re: LPC3250 periph clock at 13MHz instead of 10.4MHz Message-ID: <20190411091521.GJ3578@piout.net> References: <20190212165221.GA10129@piout.net> <20190410134443.GD3578@piout.net> <20190410141805.GE3578@piout.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190410141805.GE3578@piout.net> User-Agent: Mutt/1.11.3 (2019-02-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190411_021529_490014_ACB851FA X-CRM114-Status: GOOD ( 23.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gregory CLEMENT , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/04/2019 16:18:05+0200, Alexandre Belloni wrote: > On 10/04/2019 15:44:43+0200, Alexandre Belloni wrote: > > Hi Vladimir, > > > > On 13/02/2019 19:21:44+0200, Vladimir Zapolskiy wrote: > > > > Am I missing something? > > > > > > > > > > I think I encountered quite a similar issue previously, but under another > > > circumstances, when I begin to modify HCLK PLL clock rate, can you check > > > my comment at https://lore.kernel.org/linux-clk/56D685F6.5060400@mleia.com/ > > > and verify if it's about the same problem? > > > > > > Since the problem hits you also, I plan to spend some time on this weekend > > > to capture more details, fortunately there is a known workaround to pin > > > UART input clock rate to 13MHz, it might be desired to carve it in the code. > > > > > > > I'm pretty sure this is the same issue and that it doesn't only affect > > the UARTs but also timers. > > > > The 2.6.27.8 kernel code would indicated that the timers are only driven > > by sysclk, that is either 13MHz from the oscillator or 13.008896 from > > PLL397. I'm wondering how many other peripherals are affected. > > > > You'll note that this is also true for the watchdog, the driver has: > > // NOTE - the driver only uses this value if it can't get the clock rate from the clk_ drivers > #define WDOG_COUNTER_RATE 13000000 /*the counter clock is 13 MHz fixed */ > Ok, I went further. We have test points for tst_clk1 and tst_clk2 so I've put periph_clk on test_clk2. It is definitively running at 13MHz. I only have access to a 100MHz oscilloscope so measuring hclk is not great but it seems to be around 125MHz (I would guess 130MHz then) So I had a look at SCK on an i2c bus that is supposed to be running at 100kHz. It is actually at 120kHz. My conclusion is that switching from 260MHz to 208MHz is not working as expected, I don't know why yet. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel