From patchwork Sat Apr 22 03:23:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 97935 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp599334qgf; Fri, 21 Apr 2017 20:29:09 -0700 (PDT) X-Received: by 10.99.171.65 with SMTP id k1mr10611229pgp.233.1492831749718; Fri, 21 Apr 2017 20:29:09 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20si12158995pfk.155.2017.04.21.20.29.09; Fri, 21 Apr 2017 20:29:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1042454AbdDVD3H (ORCPT + 1 other); Fri, 21 Apr 2017 23:29:07 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5452 "EHLO dggrg03-dlp.huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1042437AbdDVD3G (ORCPT ); Fri, 21 Apr 2017 23:29:06 -0400 Received: from 172.30.72.54 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.54]) by dggrg03-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id AMH43424; Sat, 22 Apr 2017 11:28:57 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 22 Apr 2017 11:28:45 +0800 From: Hanjun Guo To: , CC: "Rafael J. Wysocki" , Wolfram Sang , Jarkko Nikula , Andy Shevchenko , Mika Westerberg , , , Hanjun Guo Subject: [PATCH 1/2] ACPI / APD: Add clock frequency for Hisilicon Hip07/08 I2C controller Date: Sat, 22 Apr 2017 11:23:43 +0800 Message-ID: <1492831424-40581-1-git-send-email-guohanjun@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.58FACDF9.002F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: dca93ace5ee1a0f3acc359a00cac23ca Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org From: Hanjun Guo I2C clock frequency of Designware ip for Hisilicon Hip07 is 200M, but 250M for Hip08, use two ACPI IDs to differentiate them. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_apd.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 1.7.12.4 -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Jarkko Nikula Reviewed-by: Kefeng Wang diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c index 26696b6..8f57648 100644 --- a/drivers/acpi/acpi_apd.c +++ b/drivers/acpi/acpi_apd.c @@ -106,6 +106,16 @@ static int acpi_apd_setup(struct apd_private_data *pdata) .setup = acpi_apd_setup, .fixed_clk_rate = 133000000, }; + +static const struct apd_device_desc hip07_i2c_desc = { + .setup = acpi_apd_setup, + .fixed_clk_rate = 200000000, +}; + +static const struct apd_device_desc hip08_i2c_desc = { + .setup = acpi_apd_setup, + .fixed_clk_rate = 250000000, +}; #endif #else @@ -169,6 +179,8 @@ static int acpi_apd_create_device(struct acpi_device *adev, #ifdef CONFIG_ARM64 { "APMC0D0F", APD_ADDR(xgene_i2c_desc) }, { "BRCM900D", APD_ADDR(vulcan_spi_desc) }, + { "HISI0A21", APD_ADDR(hip07_i2c_desc) }, + { "HISI0A22", APD_ADDR(hip08_i2c_desc) }, #endif { } };