Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593AbcDRNPv (ORCPT ); Mon, 18 Apr 2016 09:15:51 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:56818 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbcDRNPt (ORCPT ); Mon, 18 Apr 2016 09:15:49 -0400 X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 X-KSVirus-check: 0 X-RL-SENDER: david.wu@rock-chips.com X-FST-TO: wdc@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: david.wu@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH v5 2/2] i2c: rk3x: add i2c support for rk3399 soc To: Wolfram Sang References: <1458147438-62387-1-git-send-email-david.wu@rock-chips.com> <1458147438-62387-3-git-send-email-david.wu@rock-chips.com> <20160414184848.GB2338@katana> <5710DA28.6010104@rock-chips.com> <20160415175846.GA1533@katana> Cc: heiko@sntech.de, dianders@chromium.org, andy.shevchenko@gmail.com, huangtao@rock-chips.com, hl@rock-chips.com, xjq@rock-chips.com, zyw@rock-chips.com, cf@rock-chips.com, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, David Wu From: "David.Wu" Message-ID: <5714DE02.3040304@rock-chips.com> Date: Mon, 18 Apr 2016 21:15:46 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160415175846.GA1533@katana> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 783 Lines: 20 Hi Wolfram, 在 2016/4/16 1:58, Wolfram Sang 写道: >> The default frequency rate of function clock is 50M Hz, it can match >> F/S mode, but HS mode not. If use default rate 50M to get 1.7M >> scl-frequency rate , we could not get accurately 1.7M frequecy rate. >> The input-clk-rate is more higher, we get more accurately >> scl-frequency rate, as 200M is a suitable input-clk-rate. >> >> If 200M was used for F/S mode, it would increase power consumption, so >> add a option that could be configured from DT. > If I understand you correctly, couldn't you use clk_set_rate() depending > on the desired scl frequency which is already described in DT as > clock-frequency? Yeap, the default input clock rate is too low for HS mode, and it 's flexible that we get it from DT.