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 X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A47CCA9EA0 for ; Tue, 22 Oct 2019 17:09:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 20D9420684 for ; Tue, 22 Oct 2019 17:09:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731906AbfJVRJH (ORCPT ); Tue, 22 Oct 2019 13:09:07 -0400 Received: from mga03.intel.com ([134.134.136.65]:60073 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730727AbfJVRJH (ORCPT ); Tue, 22 Oct 2019 13:09:07 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 10:09:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,217,1569308400"; d="scan'208";a="200854750" Received: from yoojae-mobl1.amr.corp.intel.com (HELO [10.7.153.143]) ([10.7.153.143]) by orsmga003.jf.intel.com with ESMTP; 22 Oct 2019 10:09:06 -0700 Subject: Re: [PATCH i2c-next 1/2] dt-bindings: i2c: aspeed: add hardware timeout support To: Wolfram Sang Cc: Peter Rosin , Brendan Higgins , Benjamin Herrenschmidt , Joel Stanley , Rob Herring , Mark Rutland , Andrew Jeffery , Tao Ren , Cedric Le Goater , "devicetree@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , "linux-i2c@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "openbmc@lists.ozlabs.org" References: <20191021202414.17484-1-jae.hyun.yoo@linux.intel.com> <20191021202414.17484-2-jae.hyun.yoo@linux.intel.com> <0a629f7b-b829-c332-27d8-dc825205ff72@axentia.se> <7abf933b-cb18-10af-9c1b-163ec65ffae5@linux.intel.com> <20191022045655.GA975@kunai> From: Jae Hyun Yoo Message-ID: <5cd54c07-4e97-9ed9-1427-d46a7133ee53@linux.intel.com> Date: Tue, 22 Oct 2019 10:09:06 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191022045655.GA975@kunai> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 10/21/2019 9:56 PM, Wolfram Sang wrote: > >> Changes I submitted in this patch set is for a different purpose which >> is very Aspeed H/W specific, and actually it's a more serious timeout >> setting indeed. If this H/W is used in multi-master environment, it >> could meet a H/W hang that freezes itself in slave mode and it can't >> escape from the state. To resolve the specific case, this H/W provides >> self-recovery feature which monitors abnormal state of SDA, SCL and its >> H/W state machine using the timeout setting to determine the escape >> condition. > > Thanks for the summary. I just wonder on what the timeout value depends. > Do we really need to put in DT or can we derive it e.g. from the > compatible value in the driver? It could be derived from the bus timeout value by computing 'divide by x' roughly but it couldn't cover all use cases because this H/W timeout value would depends on each environment. There are many factors that can affect it such as bus speed, peer-master's bus driving characteristic, average transaction period on the bus and so on thus it may need fine adjustments through a DT setting, I think. Thanks, Jae