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 EFB0AC197A0 for ; Thu, 16 Nov 2023 21:01:17 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iCxlrXyvq3n5ZrQHtNrX+9FEzxIiBfrqeGKpV4EvF1M=; b=OnnQFyWZ8iWVaR beY/gSRg5SlWrdsdZES7IlAz6ozkL3vQk3CyQt26pv0bGyXCWfEpIB2hxcfY9LJoJVfU0646JCJ2o OPwJMQHq8btBg3JmcgONeSWxy7Jdar70vFDlb8sS7RZFbMuG79Cwgs12qsvvffNO/rSk/bNuES2jr a9B9nm0g+Vs8tD5TE0ZNXMGCHCBGTyQiH2zDi7u4E1ZkzK1mk2jZkuWKhm6D3+2x9ZtB73n8Dp6DG YOyfurHdmtQftqwWo1tzKYVPTpD0BSur3uyOCYxtv6sAvnPZu20V2vJlYE8dh+w/IVlM/sDDIxrn2 B+msw2MQoMor/l3LqD6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3jTo-004pBJ-2a; Thu, 16 Nov 2023 21:00:52 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3iRF-004dDH-2F; Thu, 16 Nov 2023 19:54:11 +0000 Received: from [194.95.143.137] (helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r3iR9-0005Jj-CH; Thu, 16 Nov 2023 20:54:03 +0100 From: Heiko Stuebner To: linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, Tim Lunn Cc: Jagan Teki , Krzysztof Kozlowski , Tim Lunn , Rob Herring , linux-arm-kernel@lists.infradead.org, Conor Dooley , Andi Shyti , linux-i2c@vger.kernel.org Subject: Re: [PATCH 3/8] i2c: rk3x: Adjust grf offset for i2c2 on rv1126 Date: Thu, 16 Nov 2023 20:54:02 +0100 Message-ID: <4846724.GXAFRqVoOG@phil> In-Reply-To: <20231113120705.1647498-4-tim@feathertop.org> References: <20231113120705.1647498-1-tim@feathertop.org> <20231113120705.1647498-4-tim@feathertop.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231116_115409_755372_9F83DAEB X-CRM114-Status: GOOD ( 19.67 ) 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, Am Montag, 13. November 2023, 13:07:00 CET schrieb Tim Lunn: > Rockchip RV1126 has a special case grf offset/mask for i2c2 This sounds misleading. When looking at the soc-data, the grf offset seems to be the same for all busses of the rv1126, only the offset seems to be different for i2c2. Sadly I don't have (and didn't find any) rv1126 TRM, so couldn't verify. Change itself looks nice. As it's only this one bus of one soc so far, we likely won't need a more involved solution just now. > Signed-off-by: Tim Lunn > --- > > drivers/i2c/busses/i2c-rk3x.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c > index a044ca0c35a1..83b7bf7b48a7 100644 > --- a/drivers/i2c/busses/i2c-rk3x.c > +++ b/drivers/i2c/busses/i2c-rk3x.c > @@ -1288,8 +1288,12 @@ static int rk3x_i2c_probe(struct platform_device *pdev) > return -EINVAL; > } > > - /* 27+i: write mask, 11+i: value */ > - value = BIT(27 + bus_nr) | BIT(11 + bus_nr); > + if (i2c->soc_data == &rv1126_soc_data && bus_nr == 2) > + /* rv1126 i2c2 set pmugrf offset-0x118, bit-4 */ same here, comment could drop the offset reference I guess. > + value = BIT(20) | BIT(4); > + else > + /* 27+i: write mask, 11+i: value */ > + value = BIT(27 + bus_nr) | BIT(11 + bus_nr); > > ret = regmap_write(grf, i2c->soc_data->grf_offset, value); > if (ret != 0) { > Heiko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel