From patchwork Wed Aug 2 08:43:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Yan X-Patchwork-Id: 9876287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 680DF6037D for ; Wed, 2 Aug 2017 08:44:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5686528748 for ; Wed, 2 Aug 2017 08:44:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B62628757; Wed, 2 Aug 2017 08:44:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BFE8928748 for ; Wed, 2 Aug 2017 08:44:01 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XWkgkgbnqb/lF87S4dkCFRmvGJZ3+92oiV15dkQm35A=; b=EJ4yszRCia4vRU2GxSGaKT+Q6q IxI58+6v+vW9VvO9N+DkO59BPImHCkeFB/9klL7Gt2kjD7BUwv9BukEPSJ6LlNunwT4CzUhgpmf1y hiFjMZhIcr84gt4A50XvJ6ERBtARK4GFf9NT8I72FzkZHLcfbzYl+l0CwhVr6TgO8owzKRZ30Vln4 /mei7LLqH7qgAesnu+kWU3QIWh4gAfbBsjcTnpYoF8bOMTxbX9M2iG6NaxEMdt1qNa1iEKwV/MnJe LjUx8TBy29iZE8xAuy4tqjNx1xJJV/xAZIo2NSXgXEKbRAahuDzFRLsgT7zW7QsAhneyz11tQ+1ly JC0bctug==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dcpG1-0006NJ-ND; Wed, 02 Aug 2017 08:43:57 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcpFz-0006M7-6f; Wed, 02 Aug 2017 08:43:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kmICyuCKuAgKwpUiq6j0UDWYoreXBGFeqYnll2j1/uo=; b=ocGR+8oE2reeZr6DEjlQEYd3R GXziOddOLFALozlgZusQ4m8sj6WHYK16LbLWY6YtBkQKkqaFzQWFlFF49XBuIBYKeuqIc1iit7/Rd h5NKxlhSt9rhkJTwVfHE3+Jc2mMvjleeZ4ASKDSvYC6cmV89Lm2ueg+yxKhrMYokNU8enYh77v7VT /ZuHjuhKx8HgLfVxvpV3PF0EXFl5KH5Wy0ImDBeJFtdcb1gfPhdIrMHiaf02x4lOIY+8CaUbMWPcc PAwIFWiwnckmb/uIWRSJyFOqMTJdJAZcl9vx5ZSJY9oO+MAgVpp5/YZCk6xh/IoxswQMoa3sG6koM GYnkIq3eQ==; Received: from regular1.263xmail.com ([211.150.99.140]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dcpFh-0000Xg-8y; Wed, 02 Aug 2017 08:43:38 +0000 Received: from andy.yan?rock-chips.com (unknown [192.168.167.159]) by regular1.263xmail.com (Postfix) with ESMTP id 9B6204CF0; Wed, 2 Aug 2017 16:43:11 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 9616C3B0; Wed, 2 Aug 2017 16:43:10 +0800 (CST) X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: heiko@sntech.de X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: <794377795b1c37c4d67309538b4c25d8> X-ATTACHMENT-NUM: 0 X-SENDER: yxj@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 16419RUU52G; Wed, 02 Aug 2017 16:43:11 +0800 (CST) From: Andy Yan To: heiko@sntech.de Subject: [PATCH v2 12/23] i2c: rk3x: add support for rv1108 Date: Wed, 2 Aug 2017 16:43:04 +0800 Message-Id: <1501663384-12363-1-git-send-email-andy.yan@rock-chips.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501662303-11687-1-git-send-email-andy.yan@rock-chips.com> References: <1501662303-11687-1-git-send-email-andy.yan@rock-chips.com> 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: wsa@the-dreams.de, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, Andy Yan , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Support for the i2c controller on rv1108 soc. Signed-off-by: Andy Yan Reviewed-by: Heiko Stuebner --- Changes in v2: None drivers/i2c/busses/i2c-rk3x.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index df22066..fe23457 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -1131,6 +1131,11 @@ static const struct i2c_algorithm rk3x_i2c_algorithm = { .functionality = rk3x_i2c_func, }; +static const struct rk3x_i2c_soc_data rv1108_soc_data = { + .grf_offset = -1, + .calc_timings = rk3x_i2c_v1_calc_timings, +}; + static const struct rk3x_i2c_soc_data rk3066_soc_data = { .grf_offset = 0x154, .calc_timings = rk3x_i2c_v0_calc_timings, @@ -1158,6 +1163,10 @@ static const struct rk3x_i2c_soc_data rk3399_soc_data = { static const struct of_device_id rk3x_i2c_match[] = { { + .compatible = "rockchip,rv1108-i2c", + .data = (void *)&rv1108_soc_data + }, + { .compatible = "rockchip,rk3066-i2c", .data = (void *)&rk3066_soc_data },