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=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BCE1EC433E6 for ; Wed, 20 Jan 2021 19:07:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 761B6233ED for ; Wed, 20 Jan 2021 19:07:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392521AbhATTE2 (ORCPT ); Wed, 20 Jan 2021 14:04:28 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:50708 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392493AbhATTDe (ORCPT ); Wed, 20 Jan 2021 14:03:34 -0500 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1l2Ikk-001gxZ-DG; Wed, 20 Jan 2021 20:02:50 +0100 Date: Wed, 20 Jan 2021 20:02:50 +0100 From: Andrew Lunn To: Marek Vasut Cc: netdev@vger.kernel.org, Florian Fainelli , Jakub Kicinski , Michael Grzeschik , Paul Barker Subject: Re: [PATCH net-next V2] net: dsa: microchip: Adjust reset release timing to match reference reset circuit Message-ID: References: <20210120030502.617185-1-marex@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210120030502.617185-1-marex@denx.de> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 20, 2021 at 04:05:02AM +0100, Marek Vasut wrote: > KSZ8794CNX datasheet section 8.0 RESET CIRCUIT describes recommended > circuit for interfacing with CPU/FPGA reset consisting of 10k pullup > resistor and 10uF capacitor to ground. This circuit takes ~100 ms to > rise enough to release the reset. > > For maximum supply voltage VDDIO=3.3V VIH=2.0V R=10kR C=10uF that is > VDDIO - VIH > t = R * C * -ln( ------------- ) = 10000*0.00001*-(-0.93)=0.093 s > VDDIO > so we need ~95 ms for the reset to really de-assert, and then the > original 100us for the switch itself to come out of reset. Simply > msleep() for 100 ms which fits the constraint with a bit of extra > space. > > Fixes: 5b797980908a ("net: dsa: microchip: Implement recommended reset timing") > Reviewed-by: Florian Fainelli > Signed-off-by: Marek Vasut > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc: Jakub Kicinski > Cc: Michael Grzeschik > Cc: Paul Barker Reviewed-by: Andrew Lunn Andrew