Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5523536rwb; Wed, 17 Aug 2022 20:26:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR49rflk3yuHY3MR27r9oz33B6WT3fw1Yx+P5r3+F1SVyIdLnyHOCbFOZB9gdNoiCETpEgHq X-Received: by 2002:a65:4381:0:b0:429:8c34:535e with SMTP id m1-20020a654381000000b004298c34535emr990183pgp.91.1660793165683; Wed, 17 Aug 2022 20:26:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660793165; cv=none; d=google.com; s=arc-20160816; b=LCJn329pnSg+f73S8QOeNkO0Grv/xLhVTWvxtqbc7Ra27Jsr+RgH3bCcsHGmrGLMZY IpqNujLLKj1KLhVOYQQhQMVSIUvY6Cz35WRbfp2rTrRu+fNg3OU7DWh0qwRlyBTIH5QN 702tyTt5rNpDImDKVMPz4KYnnYt3HMSjDXcl1lRP4YpqskFw065+1PfPAm7n0VYFj5Mk mNhjzP6W394bE2tW3jdXkywNd0/dXlqYU7Hs9EMtDD8ER5FO1zaw7hqd1i9/hche/wE3 HMK2+K0FULHCcVuNVNUL4rZdqAUQHMNihyOB6y6R2pBibcYRz1y9Rrwx4KWLFOPR55r9 uweA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=s7mvImdTnwfruiP5+oJRaDpwmZoS0KHLcuR5YtEeEsM=; b=UaAgMKxyodhrOZJDrMyO2f2U1W9xQHRA43NMATL9BOT7HmmKvRyFPESmy6pyvEiX0K N05AQ4vF6jJadObfoeUfDt/mb2rT8KNJZ9Uvc0Y+JvY/MMKZ8Jshh5fshIwy5oaIaaTj t78jzphPPWBqajL0UTAc6uVHOoSfz+Y6hneNVrKcb7hGu88wSqGUUUEETbiOGPP/g6xw PcSsEY9n3F9RDPQyKUM3Xn3FrzirpSEh4L6iTtDgRrp+M8++h66Hg8x4JuHxM0x7Na9h DjsK54yhwf5/N1H8/q+IhcKLZYpr5WnWr38fJ64HiE8F/7eIQozX5AgEMKXzVlDifNs1 Lx0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oPd61Mcy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 21-20020a631855000000b0041a4f4a2afesi464018pgy.411.2022.08.17.20.25.51; Wed, 17 Aug 2022 20:26:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=oPd61Mcy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243010AbiHRDWz (ORCPT + 99 others); Wed, 17 Aug 2022 23:22:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240205AbiHRDWw (ORCPT ); Wed, 17 Aug 2022 23:22:52 -0400 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A29C2A9250 for ; Wed, 17 Aug 2022 20:22:50 -0700 (PDT) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-333a4a5d495so8489817b3.10 for ; Wed, 17 Aug 2022 20:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=s7mvImdTnwfruiP5+oJRaDpwmZoS0KHLcuR5YtEeEsM=; b=oPd61McycJXFEWsy0Q32Of8LSDl1hBJagHFeA/ydpr1gT387O7WCMN+uTShodRE34J kuvG/7HvjVjc2HsFHZ3zOGEt2qHg2l5IKeXRzixqS8VlBBSBcO6c/U1VAQo8h8GGJbLj tDWyb1Qw5oqy8DqMdB1IkVDlKqqbOAGpWdimg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=s7mvImdTnwfruiP5+oJRaDpwmZoS0KHLcuR5YtEeEsM=; b=zpDHt8bidaKC09N5cdjdY9h12+cYkfQkX22CF4eHidEiACjNPY3FlJohsQJfy/H0y8 deRpIvYUaI9PsSrqnw4ZUlr4+S5UQdGmQ7gbX3xfMJ5JdcnP7+EyfwMFe/wz6Eac5+4i tq0q8ynGKGHsh9kKLNsYU2l0O8agCW24BcGjL/7zIInXCSj5mf+1B4PfopLOWSeXD7Kw U9h2jPPsBtn+f/G6uk3vDEjQlp+6PgFJViFzuo4ObwCdwtrUuX93MnmkCUubk+79Fy9E MH7RfcPe0/xN01gr00IRb9T/3ABL1Qszb2FBRhQCFgMgIBy2RZynVF+vZJXiLsCd56zt MLWA== X-Gm-Message-State: ACgBeo2zRVlBFglDVLYFZas+8qdhJ12G7YM4uqqZiySAmgDOtXDMvV6v zx6pMLKsNVJ4ajhD8zNjxHlItTAJv0ttSAbWndW0KQ== X-Received: by 2002:a05:6902:90a:b0:683:84f4:245d with SMTP id bu10-20020a056902090a00b0068384f4245dmr1074097ybb.584.1660792969806; Wed, 17 Aug 2022 20:22:49 -0700 (PDT) MIME-Version: 1.0 References: <20220815093905.134164-1-hsinyi@chromium.org> In-Reply-To: From: Hsin-Yi Wang Date: Thu, 18 Aug 2022 11:22:23 +0800 Message-ID: Subject: Re: [PATCH] drm/bridge: ps8640: Add double reset T4 and T5 to power-on sequence To: Rock Chiu Cc: Doug Anderson , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , dri-devel , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 18, 2022 at 11:19 AM Rock Chiu wrote: > > How does T4/T5 impact the real case? We talked previously the T4/T5 > shouldn't cause user impact. > Do we have testing data from ODM? > Please leave comments below the previous comment's headline. I'm confused. The reason I upstreamed this patch is because this is in your application note and you asked us to help upstream it. Now do you mean that we don't need T4 and T5? > Rock Chiu > > Hsin-Yi Wang =E6=96=BC 2022=E5=B9=B48=E6=9C=8818=E6= =97=A5 =E9=80=B1=E5=9B=9B =E4=B8=8A=E5=8D=8810:43=E5=AF=AB=E9=81=93=EF=BC= =9A > > > > On Thu, Aug 18, 2022 at 6:54 AM Doug Anderson w= rote: > > > > > > Hi, > > > > > > On Mon, Aug 15, 2022 at 2:39 AM Hsin-Yi Wang wr= ote: > > > > > > > > The double reset power-on sequence is a workaround for the hardware > > > > flaw in some chip that SPI Clock output glitch and cause internal M= PU > > > > unable to read firmware correctly. The sequence is suggested in ps8= 640 > > > > application note. > > > > > > > > Signed-off-by: Hsin-Yi Wang > > > > --- > > > > drivers/gpu/drm/bridge/parade-ps8640.c | 5 +++++ > > > > 1 file changed, 5 insertions(+) > > > > > > > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/d= rm/bridge/parade-ps8640.c > > > > index 49107a6cdac18..d7483c13c569b 100644 > > > > --- a/drivers/gpu/drm/bridge/parade-ps8640.c > > > > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c > > > > @@ -375,6 +375,11 @@ static int __maybe_unused ps8640_resume(struct= device *dev) > > > > gpiod_set_value(ps_bridge->gpio_reset, 1); > > > > usleep_range(2000, 2500); > > > > gpiod_set_value(ps_bridge->gpio_reset, 0); > > > > + /* Double reset for T4 and T5 */ > > > > + msleep(50); > > > > + gpiod_set_value(ps_bridge->gpio_reset, 1); > > > > + msleep(50); > > > > + gpiod_set_value(ps_bridge->gpio_reset, 0); > > > > > > We really need another 100 ms here? ps8640 is already quite slow at > > > powering itself up and that has a real user impact. Why was it only > > > 2.5 ms for the first reset and 50 ms for the second? > > > > > > > The T4 and T5 are required by Parade. I'm wondering if they can > > shorten the 200ms below: > > > > /* > > * Mystery 200 ms delay for the "MCU to be ready". It's unclear if > > * this is truly necessary since the MCU will already signal that > > * things are "good to go" by signaling HPD on "gpio 9". See > > * _ps8640_wait_hpd_asserted(). For now we'll keep this mystery delay > > * just in case. > > */ > > msleep(200); > > > > Does this have to wait 200ms? Can it shorten to 100 due to the > > additional 100ms from T4 and T5? > > > > > -Doug