From mboxrd@z Thu Jan 1 00:00:00 1970 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 B899237D130 for ; Fri, 13 Mar 2026 11:49:28 +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=1773402569; cv=none; b=WC7hG57ONfVRF1kyL7NDhnNij/1vp3Uq9IuOJuBBntTDMwnBcD6sdIkEkLXJlMrTfTQgdklE7UlTqpAUl7M1SE7xRXmfyevvNe9BL3p9TM2CHMNnxB8ICqZld0gc62Yz1jh9wRIXnsVjFt+WwiJSVtYQVI7EdIDLKLHsHO/ZxIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773402569; c=relaxed/simple; bh=sZZUUaLeQ4v1ZopvGzFNNVcPexUQKf94vjgCIozk+Os=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VpbbdfUk/8H764REPpnCLpK4ZoiDAsBSWTiVpT/uYr4Jk5Zse9DQlR7mq96JSvMnyvmi9rT2Wcf1dAV+bLUsKefSy/skfv9MAKNUKX8l1L46LIYUMBw+MvpxggLQ00qx2jPYt0r114g2KGEJiev04kVl+4I6Hm//aBPkqbNhNy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=g9o9HVig; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=C2cVIcE4; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="g9o9HVig"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="C2cVIcE4" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62D5tZD14140640 for ; Fri, 13 Mar 2026 11:49:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= lPH4ExXk6F+X6p3nI+qiTA/Ls4lIhf6gx//Vkpe7pzM=; b=g9o9HVig4ffaDHOB jGTh61lFgJTDEjfWbFQXBgimrx+Mjfhz2DcjOgU67Bl7/E/I0aOrXsRbDMZGABSs rPZaigzI/vYCdZHVACawtE85gG3yc+zgFod4BCR4AjYSqzuqA8qykq8Qp2ryPAbN 20rHxUawno6VZBO7wrl7YyqNUp17JyxJw7zdN/Ve8768sNa3MmxH7zbPRZoJLbBq Kr7ASKvS0OVZ8iVAXEelfQPUtqghi76VvJISo0cVQC2r1LAHXVp+XRuCWEaEWjVu vxwfNT0wAuc6o25sTnA1X8rf0yPCpn+wRO1dLAWQDtE3Z9/xoDlgDfOqmydpmdJB 57Vf3g== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cvbn29dxc-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Mar 2026 11:49:27 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8cd90210336so91302585a.3 for ; Fri, 13 Mar 2026 04:49:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773402567; x=1774007367; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=lPH4ExXk6F+X6p3nI+qiTA/Ls4lIhf6gx//Vkpe7pzM=; b=C2cVIcE46CvjIB968TAMStjXLmn6iWrMRw8K+nleDGgSYLMfWJk4uLUUKJr6yFLkLD yMax+E+9KICr6kRyos8FWBqchv0ZgbO5NO+Omw0jfhqtcSV4+CsS1zgQxc3RCkKAKHgG PPhytlS6ugh2qltuSzCNSlSHQjHuVCcQrWy6/XW2COQQ3ooMozjkhN7FBENZux1S4IfZ hcgZWQWMZBNuYsR+4MKP928FbAlTG6kus1QgTlr3KwIkVlL4KGJQnoFTPJz0YBfor3cj lr5m2K9Htuy5ZwqSzc+STx5Du2imiJAb6xtO9bK+Uao8g9+HEkUHzu7SD1a+JUmHDvME NpBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773402567; x=1774007367; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lPH4ExXk6F+X6p3nI+qiTA/Ls4lIhf6gx//Vkpe7pzM=; b=nEDyqz+urlLszKnFgHeqfoXoMktaMrWo6gWMYkjLqxUe8Kv24D/NdvTlRkNTmzvOZG bvvAo8hY0hRit2CBFKXmGWFfx8IZttbBjZCD6vXHDTSHGSgPYtDFKSpKkrMc+ItT0rlQ tizQK7fI6+EF15OeFwXX5UvKYJLWLM+ESB4NPcJIjqW+do5rquS6VyUAAZsID9bLzSnm vgZJ1KuxBL+SjWeV99N6NzKfmf/cJwnrZpyLp/YsGZli0FCLV+4jNk0Y64NQhC2aFfx9 lSzwTHZuQy3LHdGVLsP31A/HOAY7Cq5ww14JcttjJf2f62cBZBpekAbOYv+wPoXgCxqX wMrw== X-Forwarded-Encrypted: i=1; AJvYcCXNWHuq/J6WmpJ2Y+9zvXwDVkpnAZEzAksq9ABWFWqNtuZgOyUDHKU5vD/V1Vo8v+1Wxn9kHPZ/Mdlo@vger.kernel.org X-Gm-Message-State: AOJu0YyxrfNTcGxpDLnq+RDeqEfCXtzMHUogS3RpE48fafZ6pkcXnBN7 5ZYpv0DExE+VX/KkJl1mXZTqqnN2lM2yhbWtPtelDo1ns1fyZZ4aMJ4liKTdezmrcu5T6rRHwdQ Do9AbmrCQKNXvcDhuVHipnkbUEd0CSJPhixA9lYM/5pzPeF/qKiWE2TwqWDfNzQbU X-Gm-Gg: ATEYQzwNTZarr4yaaIo5uLP4OdHy6ghbQG+TJam7Pr1eDrR2Eu1/dB4OiA/SQbNqzwD uSN78R3FIFsuk5owbtc9fFyeIqxZ0h9CgWfme1YLUNni8JJR7i3RvrIDPG4yxEIj7SgVZs1EvAo ncKypFFfiCkYrnr81fkIGAmJtmnZHphf058cLhLiu7VCqZdW2MpQBTxuZrCJdgmpBiX3vohpJ2G Sd8vGnc2SfOesW42UbfyyeJHI8ufT/fBWNXiduN/lN4ftoY/ACOPObDUHXQEv7QD2Oev/JsemOQ rUl2TwxEvTSTRPoS1pCguo31KB+nxQSdOGumrGcey7H5ENF6seM+5ubkZusIP/bAJDtCtLcvdHi tLHLXNpayqE/5l1n3n60ey0Rg/Kbt2wye8Gp8QxKs1eS0ej8GLAeBcWDJoi46iIZ4goXXCGxWti ZQK2I= X-Received: by 2002:a05:620a:4625:b0:8cd:b2ce:b746 with SMTP id af79cd13be357-8cdb5a1caa9mr297026885a.1.1773402566966; Fri, 13 Mar 2026 04:49:26 -0700 (PDT) X-Received: by 2002:a05:620a:4625:b0:8cd:b2ce:b746 with SMTP id af79cd13be357-8cdb5a1caa9mr297023485a.1.1773402566495; Fri, 13 Mar 2026 04:49:26 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b976d08e6a0sm39218666b.61.2026.03.13.04.49.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Mar 2026 04:49:25 -0700 (PDT) Message-ID: <0df69fd0-92f0-4daa-af15-56163b812741@oss.qualcomm.com> Date: Fri, 13 Mar 2026 12:49:22 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] irqchip/qcom-pdc: Configure PDC to pass through mode To: "Maulik Shah (mkshah)" , Dmitry Baryshkov Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Gleixner , Linus Walleij , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Sneh Mankad , Stephan Gerhold , Johan Hovold References: <20260312-hamoa_pdc-v1-0-760c8593ce50@oss.qualcomm.com> <20260312-hamoa_pdc-v1-3-760c8593ce50@oss.qualcomm.com> <771a8f63-90d1-45b5-960e-342d9041fc4d@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <771a8f63-90d1-45b5-960e-342d9041fc4d@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: rmmskFLSbZ-vKe5qxtFwfFk9d4c7MsZR X-Proofpoint-GUID: rmmskFLSbZ-vKe5qxtFwfFk9d4c7MsZR X-Authority-Analysis: v=2.4 cv=ZKfaWH7b c=1 sm=1 tr=0 ts=69b3f9c7 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=bDJMtZGroyP0dw3QX1AA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEzMDA5MyBTYWx0ZWRfX7XvvkHnrPpuF 9aiAU+vUcibjzkWd03hDbw3mhLVaYskEyEXgR/IXZFb7dNVhy7fQrzvOK4JDqftCzUVLcpcOHHP 6+AJyN8iS/5P1+eo87TCJlxqRjF6qmt2xLLp17cqM1BPKKd+IFYtNcuNZU9iPe5WHyrlgnB8iEF CyqcAPIjPKhu+KuthcVYoQ+A9iIo8Pw63YKsF3U2uoIsoewuC4EAbN0VCKG7VoTvvYCDEnQnm5F VVpswyFURdvcwoHmig+c2S33JGL4H4R0TtmHJGh6Mu+0zLuYkYahee110bZd9zDEPC1gbApISuM T6GhswrGUZU4FBmtH8M0cK7K7MtdFJWLS0x9zYuZVK9TyG/ror1a+8IZxd/IRQR48TGgC3Ar5ll 1xPyVUYaVHWgmn9hYML9cqGNlMBJxcHFcr/F5Zo87jXZqsO+CVB32MqinwjJdFvI/P3LFaBDRZW e/jP/Q3EDfAbEoCe/uA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-13_02,2026-03-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 spamscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 adultscore=0 priorityscore=1501 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603130093 On 3/13/26 7:40 AM, Maulik Shah (mkshah) wrote: > > > On 3/13/2026 7:52 AM, Dmitry Baryshkov wrote: >> On Thu, Mar 12, 2026 at 09:26:37PM +0530, Maulik Shah wrote: [...] >>> All the SoCs so far default uses pass through mode with the exception of >> >> Is it something that must be configured by the bootloaders? > > yes, currently changing the the mode can be done from secure world either at boot > or after boot via scm write. ..which won't work on almost any X1E devices, except CRD and IOT.. >>> x1e. x1e PDC may be set to secondary controller mode for builds on CRD >>> boards whereas it may be set to pass through mode for IoT-EVK. >>> >>> There is no way to read which current mode it is set to and make PDC work >>> in respective mode as the read access is not opened up for non secure >>> world. There is though write access opened up via SCM write API to set the >>> mode. >> >> What are going to loose? The ability to latch the wakeup sources on the >> CRD? > > CXPC (SoC level low power mode) would be lost if the device can not wake up from GPIO wakeup sources. To the best of my understanding, that's only because your approach chooses to ignore supporting the secondary controller mode and force-reconfigure, since GPIO wakeup functionality is otherwise available regardless of the mode. >>> Configure PDC mode to pass through mode for all x1e based boards via SCM >>> write. >> >> Would it make sense to always use the secondary mode instead? > > No, it would not make sense to support the secondary mode in Linux. Why? [...] >>> + * - Inform TLMM to monitor GPIO IRQs (same as MPM) >>> + * - Prevent SoC low power mode (CxPC) as PDC is not >>> + * monitoring GPIO IRQs which may be needed to wake >>> + * the SoC from low power mode. >> >> This doesn't quite match the description of "latches the GPIO IRQs". > > It does, PDC would continue to still latch the GPIO IRQs (as the mode change failed) > but PDC won't forward them to parent GIC as they are masked at PDC with __pdc_mask_intr(). Can you not refrain from masking them then, and clear them upon reception, with a write to IRQ_i_CFG[IRQ_STATUS]? The HPG states that this mechanism is only engaged for GPIO IRQs and that the forwarded interrupt will be of LEVEL_HIGH type (which is what TLMM accepts anyway) FWIW, some related work: c7984dc0a2b9 ("pinctrl: qcom: Add test case for TLMM interrupt handling") Konrad