Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp659799rdb; Fri, 26 Jan 2024 07:05:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFnn2zLIJg5wRJt+/QHKCINaj0BdGm/d3U+ambCsR0ouPkxRemUlqD+QriFdZmdE0G/ScoB X-Received: by 2002:a05:600c:8506:b0:40e:4d21:6729 with SMTP id gw6-20020a05600c850600b0040e4d216729mr1083126wmb.71.1706281541595; Fri, 26 Jan 2024 07:05:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706281541; cv=pass; d=google.com; s=arc-20160816; b=B9BrznDGRg5aNUptsIYVMLyhPsJzOVX1sYVn2D7HyCGBd+G87y9nHK5xADI7BhtfFU zO5tsyNprtpF/gRvW64jG184yDM+LlZINJ4Dy6EoRY+lVnSG/YGgYNU920ldWCcjIsKQ zyUz9/0wsSrnhJJzCbf+G5M8IQrto3/G3Wvsj6zHcouIf88OoCNU8zmIXCdZ+8an1V8J WW8BQhTP7Lkh9HmD0l7EwC648vA8hnAf+tE0mA8EEtoDfjz+fkeOIMNyM9PbJShT46J2 CzN4u0M2gVPBgZLG0Zl3l7sL4rBOzlKkHszYaJE9Cx2FTMp3GRWMDid0s1C/nDnDl63P /ZAQ== ARC-Message-Signature: i=2; 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=jHB9hK1+IxDYTk3mHsGBslK9MjCNeNeTQmuomB3w7zM=; fh=Zm9Ze3Puf97XvRtuP6ep4Pkv48mCpjwp91T1eMAPV0E=; b=NPDjhXVynO0eNOrXZxPiOGDdapUQS/VSEt3SDpuXPpp07tarHN6IRNtvhLASfsvLDx AStroLV/VOJwrlExxm97+7SSFIRE3S2w6V8CXuVz0UoDkIC/4kcn+OXHf7K6/ZQIaSlr DLBXwUaCUYtpVZuMHLNQDIXwgx43l8lXPs/jSxOz6te7yLllpW21tAfjLCLn6hYKG/uI 9ioAujw4GhYEHoW0uSEKnWU64V9W1A0Y6IdZOSVhwPcYDGSuAPhMs1X54Vk/G9Fwdla5 y6uq0TUvG2PxNY45rDXtYPdrGNW8BTTeTljKkSxwn4K7GE+LWmUitPCRDGcLztjwMjLK 2b5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FaE03Ch/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40241-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hb26-20020a170906b89a00b00a3496faad84si649658ejb.954.2024.01.26.07.05.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 07:05:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FaE03Ch/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40241-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40241-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 27A7C1F22AAD for ; Fri, 26 Jan 2024 15:05:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B7B381CD3D; Fri, 26 Jan 2024 15:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FaE03Ch/" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 550CB1B970; Fri, 26 Jan 2024 15:05:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706281528; cv=none; b=Qzf92lBbhU8ctDZmIHNMjZZE/kzZ4xWMLBTLy1mrIJwTyseUzRf7IZlzsgb83oDj3YQepQrGNwpkJLt3nvZqSLxfEPLWOAePDEbDVWs+GfrleWFjStGJh6kpahiUfCQ2TCT4ESY97hhdM6oUMfjPDlDJOUU5ul1yYX5cdWjWCd0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706281528; c=relaxed/simple; bh=U+99tjIt56hBCPSlbSxS/+VqtJhV/6wL04M231JSrzI=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=gOKTg0xi6xqlaxaaw51wNawJHsWlN5Cp6/GuS8K8Aina7Ibd9jEgkJdu2//UFbBQT10ffXgAX78BA6DEG+5QWjWUq2h+RV+8sBDLyHFK+WR3W0OUkiSWNsqy30MB0b9MmAcEynvkNaIJQ9U2xIWI97aBpyawHk7ZH9+nu7HthU0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=FaE03Ch/; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QDirPM006836; Fri, 26 Jan 2024 15:05:14 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=qcppdkim1; bh=jHB9hK1+IxDYTk3mHsGBs lK9MjCNeNeTQmuomB3w7zM=; b=FaE03Ch/Jzfiv1T2d8ixQbSUtaq1l9MO5jj8n yRFebQlkMJBdnxqtn6tchK1EdBTeT2ELjVlWC/Qdc6Jem7DazcTNPoKiA5GK1y+P QqFTc8VJ3vZF+mHDkRnpgNWKBevBWtgw2ksSZx/yIxPIrC/vVTRut69wCoXhaM4d 2WU9VV5pc8NdWJXdnk4f/Lv6uyV21FVBosmjwYEQLt92vWF1NQDOVAZM1ujh7cSE R9TCiCONAxMWHnPtXFga7TNVvHCpE3ZkeG7VIUGTKya2pBpwOvRuKvpZZHHJOD/X j7d1WaQ+MKfqqlWqjlpAzLHJOtCbhCTGN2LahcOaZS01YapPw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4cascjm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 15:05:14 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QF5DHx029835 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 15:05:13 GMT Received: from hu-bjorande-lv.qualcomm.com (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 07:05:12 -0800 Date: Fri, 26 Jan 2024 07:05:11 -0800 From: Bjorn Andersson To: Daniel Thompson CC: Johan Hovold , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Benjamin Tissoires , Jiri Kosina , Bjorn Andersson , Konrad Dybcio , Johan Hovold , , , , , Konrad Dybcio , Krzysztof Kozlowski Subject: Re: [PATCH 2/2] arm64: dts: qcom: sc8280xp-x13s: Fix/enable touchscreen Message-ID: <20240126150511.GO2936378@hu-bjorande-lv.qualcomm.com> References: <20240125-x13s-touchscreen-v1-0-ab8c882def9c@quicinc.com> <20240125-x13s-touchscreen-v1-2-ab8c882def9c@quicinc.com> <20240126130232.GA5506@aspen.lan> 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: <20240126130232.GA5506@aspen.lan> X-ClientProxiedBy: nalasex01c.na.qualcomm.com (10.47.97.35) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: zkWHTT7R8Yj7UAoh4kZBsPEbusf-OyKI X-Proofpoint-GUID: zkWHTT7R8Yj7UAoh4kZBsPEbusf-OyKI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 clxscore=1015 bulkscore=0 impostorscore=0 priorityscore=1501 spamscore=0 suspectscore=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260110 On Fri, Jan 26, 2024 at 01:02:32PM +0000, Daniel Thompson wrote: > On Fri, Jan 26, 2024 at 09:12:37AM +0100, Johan Hovold wrote: > > On Thu, Jan 25, 2024 at 07:55:14PM -0800, Bjorn Andersson wrote: > > > The failing read-test in __i2c_hid_core_probe() determines that there's > > > nothing connected at the documented address of the touchscreen. > > > > > > Introduce the 5ms after-power and 200ms after-reset delays found in the > > > ACPI tables. Also wire up the reset-gpio, for good measure. > > > > As the supplies for the touchscreen are always on (and left on by the > > bootloader) it would seem that it is really the addition of the reset > > gpio which makes things work here. Unless the delay is needed for some > > other reason. > > > > (The power-on delay also looks a bit short compared to what is used for > > other devices.) > > > > Reset support was only recently added with commit 2be404486c05 ("HID: > > i2c-hid-of: Add reset GPIO support to i2c-hid-of") so we should not > > backport this one before first determining that. > > This comment attracted my attention so I tried booting with each of the > three lines individually. > > > On Thu, Jan 25, 2024 at 07:55:14PM -0800, Bjorn Andersson wrote: > > + reset-gpios = <&tlmm 99 GPIO_ACTIVE_LOW>; > > This is not enough, on it's own, to get the touch screen running. > No, because pinctrl already brings the chip out of reset without this. > I guess that's not so much of a surprise since the rebind-the-driver > from userspace trick wouldn't have been touching this reset. > Right, it would just have been left deasserted from the first attempt. That said, the addition of the reset means that we're now asserting reset in such rebind attempts. And as such the post-reset-deassert-delay-ms is now needed between the explicit deassert from the driver and the i2c read. > > > + post-power-on-delay-ms = <5>; > > This line alone is enough (in v6.7.1). > So the delay taken through really_probe() until we reach that i2c read is almost the entire delay needed, on your specific device. > > > + post-reset-deassert-delay-ms = <200>; > > This line alone is also enough! > > In short it looks like the delays make the difference and, even a short > delay, can fix the problem. > > Of course, regardless of the line-by-line results I also ran with all > the changes so, FWIW: > Tested-by: Daniel Thompson > Thanks, Bjorn > > Daniel.