From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jae Hyun Yoo Date: Tue, 22 Oct 2019 10:09:06 -0700 Subject: [PATCH i2c-next 1/2] dt-bindings: i2c: aspeed: add hardware timeout support In-Reply-To: <20191022045655.GA975@kunai> 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> Message-ID: <5cd54c07-4e97-9ed9-1427-d46a7133ee53@linux.intel.com> List-Id: To: linux-aspeed@lists.ozlabs.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jae Hyun Yoo Subject: Re: [PATCH i2c-next 1/2] dt-bindings: i2c: aspeed: add hardware timeout support Date: Tue, 22 Oct 2019 10:09:06 -0700 Message-ID: <5cd54c07-4e97-9ed9-1427-d46a7133ee53@linux.intel.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20191022045655.GA975@kunai> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Wolfram Sang Cc: Mark Rutland , "devicetree@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , Andrew Jeffery , Benjamin Herrenschmidt , "openbmc@lists.ozlabs.org" , Brendan Higgins , "linux-i2c@vger.kernel.org" , Rob Herring , Joel Stanley , Tao Ren , Peter Rosin , "linux-arm-kernel@lists.infradead.org" , Cedric Le Goater List-Id: linux-i2c@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=jae.hyun.yoo@linux.intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 46yKjg1tDHzDqLx; Wed, 23 Oct 2019 04:09:09 +1100 (AEDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 10:09:07 -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 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2019 17:09:12 -0000 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 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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 759A6CA9EA0 for ; Tue, 22 Oct 2019 17:09:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49A0720684 for ; Tue, 22 Oct 2019 17:09:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fPmcRYOa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 49A0720684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A5tEg/15bNqAR2W59d7Aex20U8DDt5yURofSYsNUGPA=; b=fPmcRYOaiKoWRt15uXs6iaTPC oEacRNJ8biD1aYiG43lc9TPkI8tjgKfaHfPRvuAInNtcapTpnGlq563LLDodG0aiZS3o/3O9+76yY D4aXNRVXlqB5PthOrgpdDPwrws5NzpjV9ZRK1JfmpEgBLNDgazToU/lPw5dn6QMedTV/FvaHtheQn FhR78nEgC3EiQtj6uzUZDTv05uoEVUt2PobbmELMXu1/7759oc9nUPxhIiZTQruySAp47j+jYAHO2 Pcmk3KEiiGvosvPJfBgf9SEN9HmmkRjH8cjSCXKd8AWI8VqkTWCCeZevlsZHbg0M/BiGXHHWI6wTq QpzqvLZkg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMxeg-0003cn-TU; Tue, 22 Oct 2019 17:09:10 +0000 Received: from mga09.intel.com ([134.134.136.24]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMxee-0003bi-2w for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2019 17:09:09 +0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 10:09:07 -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 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191022_100908_172627_0B8F1013 X-CRM114-Status: GOOD ( 14.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , "linux-aspeed@lists.ozlabs.org" , Andrew Jeffery , Benjamin Herrenschmidt , "openbmc@lists.ozlabs.org" , Brendan Higgins , "linux-i2c@vger.kernel.org" , Rob Herring , Joel Stanley , Tao Ren , Peter Rosin , "linux-arm-kernel@lists.infradead.org" , Cedric Le Goater Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel