From patchwork Tue Aug 26 05:46:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 35952 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E8F7620565 for ; Tue, 26 Aug 2014 05:47:28 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id w10sf112677701pde.3 for ; Mon, 25 Aug 2014 22:47:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=2OXPGQmhM+upg9990b16bVF0m6jaB6jGXcMaM5RecBg=; b=Mfq0IGExGpTh5yv/nmoZFSZtmKlmI1teJV2Oa14lXDBPUREcI8//fJKTMYM1oc2Wt1 +OcYPyx4hBAnCQ8VmM8cNSsK9H5Y1U/uliZoUfM/7YVbmt2bHBTO6sDN4SsaNbqub/7Q VXMLKynYQL8i47FsmNwNRspCcfbo2uMjd8r0pQed/Ndt7dHHg9XMqVZdPrr+4PvdaNWJ NsEHBO4tJCu3a+iN1/s6VANdwcJudZI3qt6h0ZIUfysPnoDmcuYl8A863EUYbfaWgaCO H3Ln6Zu669yDwjE5PF0NGKUVOOUdF2rrSiQHoo/YVm++TPo91vyW4OtYOU1IetYCwnlh 1VSQ== X-Gm-Message-State: ALoCoQmR6Tyvz00vVLpd/JvWxZ2KJAvTCXSWLW+BGJ4MHIeGrkUhAJEAdRTdf3dZCsHDyT8EEo7h X-Received: by 10.66.248.232 with SMTP id yp8mr13300509pac.22.1409032048243; Mon, 25 Aug 2014 22:47:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.99 with SMTP id k90ls2465931qgk.78.gmail; Mon, 25 Aug 2014 22:47:28 -0700 (PDT) X-Received: by 10.220.172.8 with SMTP id j8mr9959070vcz.32.1409032048142; Mon, 25 Aug 2014 22:47:28 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id wx4si1029451vdb.77.2014.08.25.22.47.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 22:47:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so16089891vcb.41 for ; Mon, 25 Aug 2014 22:47:28 -0700 (PDT) X-Received: by 10.220.49.10 with SMTP id t10mr9943986vcf.34.1409032047971; Mon, 25 Aug 2014 22:47:27 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp171188vcb; Mon, 25 Aug 2014 22:47:27 -0700 (PDT) X-Received: by 10.70.98.129 with SMTP id ei1mr27526231pdb.27.1409032047058; Mon, 25 Aug 2014 22:47:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ey10si2723589pdb.108.2014.08.25.22.47.26 for ; Mon, 25 Aug 2014 22:47:27 -0700 (PDT) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755435AbaHZFr0 (ORCPT + 6 others); Tue, 26 Aug 2014 01:47:26 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:50380 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754412AbaHZFrZ (ORCPT ); Tue, 26 Aug 2014 01:47:25 -0400 Received: by mail-pa0-f41.google.com with SMTP id rd3so22641368pab.28 for ; Mon, 25 Aug 2014 22:47:25 -0700 (PDT) X-Received: by 10.66.66.101 with SMTP id e5mr35114315pat.100.1409032045302; Mon, 25 Aug 2014 22:47:25 -0700 (PDT) Received: from localhost.localdomain ([114.97.111.70]) by mx.google.com with ESMTPSA id hb1sm1696102pbd.28.2014.08.25.22.47.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Aug 2014 22:47:24 -0700 (PDT) From: Zhangfei Gao To: Mike Turquette , haojian.zhuang@linaro.org, haifeng.yan@linaro.org, jchxue@gmail.com, xuwei5@hisilicon.com Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Wei Yan , Zhangfei Gao Subject: [PATCH resend 4/4] clk: hix5hd2: add I2C clocks Date: Tue, 26 Aug 2014 13:46:10 +0800 Message-Id: <1409031970-4821-5-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1409031970-4821-1-git-send-email-zhangfei.gao@linaro.org> References: <1409031970-4821-1-git-send-email-zhangfei.gao@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Wei Yan hix5hd2 add I2C clocks (I2C0~i2C5) Signed-off-by: Wei Yan Signed-off-by: Zhangfei Gao --- drivers/clk/hisilicon/clk-hix5hd2.c | 25 +++++++++++++++++++++++++ include/dt-bindings/clock/hix5hd2-clock.h | 12 ++++++++++++ 2 files changed, 37 insertions(+) diff --git a/drivers/clk/hisilicon/clk-hix5hd2.c b/drivers/clk/hisilicon/clk-hix5hd2.c index 232c38a..5f4b5a8 100644 --- a/drivers/clk/hisilicon/clk-hix5hd2.c +++ b/drivers/clk/hisilicon/clk-hix5hd2.c @@ -100,6 +100,31 @@ static struct hisi_gate_clock hix5hd2_gate_clks[] __initdata = { CLK_SET_RATE_PARENT, 0x178, 0, 0, }, { HIX5HD2_WDG0_RST, "rst_wdg0", "clk_wdg0", CLK_SET_RATE_PARENT, 0x178, 4, CLK_GATE_SET_TO_DISABLE, }, + /* I2C */ + {HIX5HD2_I2C0_CLK, "clk_i2c0", "100m", + CLK_SET_RATE_PARENT, 0x06c, 4, 0, }, + {HIX5HD2_I2C0_RST, "rst_i2c0", "clk_i2c0", + CLK_SET_RATE_PARENT, 0x06c, 5, CLK_GATE_SET_TO_DISABLE, }, + {HIX5HD2_I2C1_CLK, "clk_i2c1", "100m", + CLK_SET_RATE_PARENT, 0x06c, 8, 0, }, + {HIX5HD2_I2C1_RST, "rst_i2c1", "clk_i2c1", + CLK_SET_RATE_PARENT, 0x06c, 9, CLK_GATE_SET_TO_DISABLE, }, + {HIX5HD2_I2C2_CLK, "clk_i2c2", "100m", + CLK_SET_RATE_PARENT, 0x06c, 12, 0, }, + {HIX5HD2_I2C2_RST, "rst_i2c2", "clk_i2c2", + CLK_SET_RATE_PARENT, 0x06c, 13, CLK_GATE_SET_TO_DISABLE, }, + {HIX5HD2_I2C3_CLK, "clk_i2c3", "100m", + CLK_SET_RATE_PARENT, 0x06c, 16, 0, }, + {HIX5HD2_I2C3_RST, "rst_i2c3", "clk_i2c3", + CLK_SET_RATE_PARENT, 0x06c, 17, CLK_GATE_SET_TO_DISABLE, }, + {HIX5HD2_I2C4_CLK, "clk_i2c4", "100m", + CLK_SET_RATE_PARENT, 0x06c, 20, 0, }, + {HIX5HD2_I2C4_RST, "rst_i2c4", "clk_i2c4", + CLK_SET_RATE_PARENT, 0x06c, 21, CLK_GATE_SET_TO_DISABLE, }, + {HIX5HD2_I2C5_CLK, "clk_i2c5", "100m", + CLK_SET_RATE_PARENT, 0x06c, 0, 0, }, + {HIX5HD2_I2C5_RST, "rst_i2c5", "clk_i2c5", + CLK_SET_RATE_PARENT, 0x06c, 1, CLK_GATE_SET_TO_DISABLE, }, }; enum hix5hd2_clk_type { diff --git a/include/dt-bindings/clock/hix5hd2-clock.h b/include/dt-bindings/clock/hix5hd2-clock.h index b8e3c9d..fd29c17 100644 --- a/include/dt-bindings/clock/hix5hd2-clock.h +++ b/include/dt-bindings/clock/hix5hd2-clock.h @@ -62,6 +62,18 @@ #define HIX5HD2_SD_CIU_RST 138 #define HIX5HD2_WDG0_CLK 139 #define HIX5HD2_WDG0_RST 140 +#define HIX5HD2_I2C0_CLK 141 +#define HIX5HD2_I2C0_RST 142 +#define HIX5HD2_I2C1_CLK 143 +#define HIX5HD2_I2C1_RST 144 +#define HIX5HD2_I2C2_CLK 145 +#define HIX5HD2_I2C2_RST 146 +#define HIX5HD2_I2C3_CLK 147 +#define HIX5HD2_I2C3_RST 148 +#define HIX5HD2_I2C4_CLK 149 +#define HIX5HD2_I2C4_RST 150 +#define HIX5HD2_I2C5_CLK 151 +#define HIX5HD2_I2C5_RST 152 /* complex */ #define HIX5HD2_MAC0_CLK 192