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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 141F7CCD195 for ; Sun, 19 Oct 2025 23:25:15 +0000 (UTC) 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=ksGeCD3dLvgd/7X8dzuTyJudJ46Ve6Vyfn/leEq2wpA=; b=yBHphYcaM4WKBp /RFTm1NOLltSk+rPjFDKTd7jaB7azq64+hWr4Zratrs0o+hsWhRkUswMU44aRNDNtB6CMS6hMMfkl Eeos7Kwmp5UwV5LXbrm+4mbr4yFRLssUmyy77LlWbWnft82dQE2fMubbhEw9InjtrXRWy+v1cT+oZ 4rUVFjjFG3RYNtYe2Z3bzZuVxNT4qpuMP2eUMmxVyZsEjVWom+aajy7cDIIC3vgLUyoPyacz11d58 2Wa4N6q58MVnX4RvfpioUV06UlQr6nVqU1WpZH/T30YwVqSkY0gl5/McGv6K2N0kTU1QAAZfc0MkK MewEFMMHOJ5SXxoY5ggQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAclr-0000000BXEC-2d2v; Sun, 19 Oct 2025 23:25:03 +0000 Received: from woodpecker.gentoo.org ([140.211.166.183] helo=smtp.gentoo.org) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vAclq-0000000BXDr-1Sco for linux-riscv@lists.infradead.org; Sun, 19 Oct 2025 23:25:03 +0000 Received: from localhost (unknown [116.232.147.23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dlan) by smtp.gentoo.org (Postfix) with ESMTPSA id 1F1DC341F9A; Sun, 19 Oct 2025 23:24:59 +0000 (UTC) Date: Mon, 20 Oct 2025 07:24:55 +0800 From: Yixun Lan To: Andi Shyti Cc: Troy Mitchell , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev Subject: Re: [PATCH v4] i2c: spacemit: configure ILCR for accurate SCL frequency Message-ID: <20251019232455-GYB1506524@gentoo.org> References: <20251017-k1-i2c-ilcr-v4-1-eed4903ecdb9@linux.spacemit.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251019_162502_408748_75DCF2C4 X-CRM114-Status: GOOD ( 15.58 ) X-BeenThere: linux-riscv@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-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Hi Andi, On 00:32 Mon 20 Oct , Andi Shyti wrote: > Hi, > > On Fri, Oct 17, 2025 at 03:27:39PM +0800, Troy Mitchell wrote: > > The SpacemiT I2C controller's SCL (Serial Clock Line) frequency for > > master mode operations is determined by the ILCR (I2C Load Count Register). > > Previously, the driver relied on the hardware's reset default > > values for this register. > > > > The hardware's default ILCR values (SLV=0x156, FLV=0x5d) yield SCL > > frequencies lower than intended. For example, with the default > > 31.5 MHz input clock, these default settings result in an SCL > > frequency of approximately 93 kHz (standard mode) when targeting 100 kHz, > > and approximately 338 kHz (fast mode) when targeting 400 kHz. > > These frequencies are below the 100 kHz/400 kHz nominal speeds. > > > > This patch integrates the SCL frequency management into > > the Common Clock Framework (CCF). Specifically, the ILCR register, > > which acts as a frequency divider for the SCL clock, is now registered > > as a managed clock (scl_clk) within the CCF. > > > > This patch also cleans up unnecessary whitespace > > in the included header files. > > > > Signed-off-by: Troy Mitchell > > looks OK to me. Yixun, any comment here? Do you mind giving it an > ack? > Please go ahead, I gave a Reviewed-by, thanks -- Yixun Lan (dlan) _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv