Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp64272rdb; Fri, 5 Jan 2024 02:57:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkV71v3WxBfHdhjDY4907E8jwu1I/5GYNG16RDELh7DPcGiiKsU69ZlbuRpRgF3pwnDkxF X-Received: by 2002:a05:620a:8105:b0:781:b0e3:ec2a with SMTP id os5-20020a05620a810500b00781b0e3ec2amr1826248qkn.118.1704452252915; Fri, 05 Jan 2024 02:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704452252; cv=none; d=google.com; s=arc-20160816; b=N4d2pjriy9INSLGLg1inN1fWWMxRINeeA5j7jCD8EhdD32gYnDNJG31hSG9DkLQAp9 XZxwmEVzhUQ7qpkbTdYtF7qeAx5jpMYgUMoStl1f/oytXJQ3oV8Dj64LIYtoe2RFvaoj K/3s2nrCuWXmQBGTjwE/gor9Hby0cL/b73zA7RZ3QFx6SJZe+5CXJdOHwnjwAys/bB5x RS+KzBwj6Iljp1Oe0haO73Xl4tkXd+29sC0BQVJSQq3D5SBVHGbu44fwVbtT1fdDHHV6 miw5BhMyT6mTqPGuXukaG2bb3vvDJwnnUJIBjFO9xUI1Ljtid8uU2Fw+CPdVaD9k+/u7 7jfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=x+z+RFQcST+1ELSBLAitcefUwOcohJs4otLoDevYpi0=; fh=UMDWZ6glHhWvSzgslcR8MyZ2l3wSEWWiNpXSTzU7vXo=; b=FL4iiniz0WKAEj/Jm91u/47nl0lqc2MRBfDmhld99oxtXuYobhqVGp1hlcCrh8+PVW 2xm3ZqxhxtNKhIHWhVRQkpHLQsyeYtc58qyum2rm4LrrmPQZU8t/OJP2S63jYQjloEdq yDIKQDh6X1+P9PmjmXpAxqGiLpF1A+bFsatNlsGSmXj9n3eOZQB5m9D1mjylRvy2jcS8 eMn9xyya17AjV0AvBVLlTT01pnsWE37X40fsnA00UdAlHeO/MB331rKRa+2R8brMwqhV aWpzoKIHYgo9/mMllfDoMSAT/4OlkqUrKbjAfpXFTzE3MWFQxtq8+jnN0oPyemTjy+yE BREQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WmmgmU6W; spf=pass (google.com: domain of linux-kernel+bounces-17775-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id vu8-20020a05620a560800b00781b580f371si1394606qkn.754.2024.01.05.02.57.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 02:57:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17775-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WmmgmU6W; spf=pass (google.com: domain of linux-kernel+bounces-17775-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17775-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AADFB1C230A8 for ; Fri, 5 Jan 2024 10:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6084E28E2D; Fri, 5 Jan 2024 10:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WmmgmU6W" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 074FA28DD7; Fri, 5 Jan 2024 10:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704452242; x=1735988242; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=bWLA9uHAE4XhP297Hf+kKUGZ6XNNGd0zX30Q+EHU8bg=; b=WmmgmU6W6dLVdZWLfGY03Xz+MtZHYa/Fa8vMj1REMG9vz5o2OyOiQGCw Hqjub23kInip7e/f6e1ZFhlgq5bCcFzoxecmlaxbhbIp5w2JLGmuXhx97 b65gpZ4SGjPQvoxhK+3/81CfbDClzghC/1d6XCMlWBLouh1m6ujII3EYZ HGmpuLYhYNPpRjsD8QnPgadVSw51twL8XbshCP3WeVvJeCFWVxmOX2Asx SdDyER6fOhUUChvdvTt6Ke+9HQwhbg1j148DuAUOD6d2okpUUsWtWyPcf VykMjN38H5aiFDG0mnmDn9ViTjC26jQXbcqHFZOqcinO2LyUu11FmFgc8 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="401271564" X-IronPort-AV: E=Sophos;i="6.04,333,1695711600"; d="scan'208";a="401271564" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2024 02:57:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10943"; a="730443114" X-IronPort-AV: E=Sophos;i="6.04,333,1695711600"; d="scan'208";a="730443114" Received: from kuha.fi.intel.com ([10.237.72.185]) by orsmga003.jf.intel.com with SMTP; 05 Jan 2024 02:57:17 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Fri, 05 Jan 2024 12:57:16 +0200 Date: Fri, 5 Jan 2024 12:57:16 +0200 From: Heikki Krogerus To: Jai Luthra Cc: Greg Kroah-Hartman , Javier Carrasco , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, rogerq@kernel.org, r-gunasekaran@ti.com, vigneshr@ti.com, d-gole@ti.com Subject: Re: [PATCH] usb: typec: tipd: Separate reset for TPS6598x Message-ID: References: <20240105-next-tps-fix-v1-1-158cabaec168@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240105-next-tps-fix-v1-1-158cabaec168@ti.com> On Fri, Jan 05, 2024 at 02:36:54PM +0530, Jai Luthra wrote: > Some platforms like SK-AM62, SK-AM62A cannot boot up to prompt if > TPS6598x is cold-reset during unconditionally on probe failures by > sending "GAID" sequence. > > The probe can fail initially because USB0 remote-endpoint may not be > probed yet, which defines the usb-role-switch property. > > Fixes: d49f90822015 ("usb: typec: tipd: add init and reset functions to tipd_data") > Closes: https://lore.kernel.org/linux-usb/vmngazj6si7xxss7txenezkcukqje2glhvvs7ipdcx3vjiqvlk@ohmmhhhlryws/ > Signed-off-by: Jai Luthra Reviewed-by: Heikki Krogerus > --- > Boot-logs with this patch applied: > https://gist.github.com/jailuthra/b66d5722090ce1fbc2886986e53640f7 > --- > drivers/usb/typec/tipd/core.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c > index a956eb976906..8ba2aa05db51 100644 > --- a/drivers/usb/typec/tipd/core.c > +++ b/drivers/usb/typec/tipd/core.c > @@ -1223,11 +1223,16 @@ static int cd321x_reset(struct tps6598x *tps) > return 0; > } > > -static int tps6598x_reset(struct tps6598x *tps) > +static int tps25750_reset(struct tps6598x *tps) > { > return tps6598x_exec_cmd_tmo(tps, "GAID", 0, NULL, 0, NULL, 2000, 0); > } > > +static int tps6598x_reset(struct tps6598x *tps) > +{ > + return 0; > +} > + > static int > tps25750_register_port(struct tps6598x *tps, struct fwnode_handle *fwnode) > { > @@ -1545,7 +1550,7 @@ static const struct tipd_data tps25750_data = { > .trace_status = trace_tps25750_status, > .apply_patch = tps25750_apply_patch, > .init = tps25750_init, > - .reset = tps6598x_reset, > + .reset = tps25750_reset, > }; > > static const struct of_device_id tps6598x_of_match[] = { > > --- > base-commit: e2425464bc87159274879ab30f9d4fe624b9fcd2 > change-id: 20240105-next-tps-fix-904ed92bc1cc > > Best regards, > -- > Jai Luthra -- heikki