From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 DFD342FB0B9 for ; Sun, 9 Nov 2025 14:38:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699096; cv=none; b=QMl8cQ8bXdAXh8ni+wkcKv9Av3EdU6b3cCsT1LiLjWJJWHKLuw/nEWg3RsUDnQxI+6dx3LaFYb9yyYG46CxOf7p1G1qqPtZSGzF5HZZI1SqLJ85QUxErI/IzAoOQ3nEenFai3tTMoKxDKjkF58fKupHR7SZYiJ/mRoWO/0oAuGg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699096; c=relaxed/simple; bh=tSD2yNZaJDc5m1jdDRoQ2dA6oSVGR8ZTHjS4GRBmNcg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YrWYUvlbH3hoPyLmTbV7yeTffCCxjrrLdHCtl6wy8wutm5kCx94d52NHKxIaCjQ/QyUS4SFKpkvn+cAhBydWO7bf6PArOD0d7o96JnW+AIj9dp+vKKXgt99HacUVwB40JxmpPOkPnDP81WasvrsttLFrzuuKv7lL38pTlUCr+DE= 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=HIoQb7Uj; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=DqKsCLBb; arc=none smtp.client-ip=205.220.180.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="HIoQb7Uj"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="DqKsCLBb" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9EHBUp786941 for ; Sun, 9 Nov 2025 14:38:14 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= jiNDMgJ1PRczoI1657/zd47IielAoH6hCTaVhiNKpyE=; b=HIoQb7UjY9q077NI kVl2CpnPnEJvwugYDSyD0BYY7Ki1Ddbt4V2S12+fnDUy7cDXHr5lEwCKvV8sfzI4 UGzOvjxgkrxhEUwljXiwKmposcK1U9CsT3eDZA48WD9edb5d24OEq03Qy3iKMW/l gm0pZPVbVktoSzG9zqMu1MEuAM/FnB5PduxO6LdBsEO/sSKBZO6gkjsIglsAlUl7 ucvhr1MhO+1vPJlKDrGpgkph5Id5Xk3qpn0TgRkyaMaOmdXOHOuBCrhDfDG8nNrR bDGsRSZXq0NYbxd/hjscqlwJHKiOraj4NgN6QLnWQ9jauzBQkncuaBsVC+vb00o/ irn1fg== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4aaue0g3ce-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:13 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-340299cc2ecso2896738a91.1 for ; Sun, 09 Nov 2025 06:38:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699093; x=1763303893; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=jiNDMgJ1PRczoI1657/zd47IielAoH6hCTaVhiNKpyE=; b=DqKsCLBbFDQft/ZoGsDbfSkzCNmoOhIn+rQjC7NCEHqAshONiYsT6cuUhZsfhcFQs0 WRqF7iwG0cZRrMtvevOukeUEzaqhbwQ7wfUtRWhsnwwNNxAHQDE22WuOqyef1nte4Ue6 Z3QL/GAHMi/h17jO4dhzEpicBbZu07CXmJKsdNQ4C+gts1rI5ZvdUJ5lEMkFHTr2Iez3 A8skSGTo8bmWWXWm8s37LjRYmvT/pqPAJEf1Q2DeSs8rfgL1qKtcAzuVLbjdqJ7lmr0D 0CgzYxFhBmfdcc5ZJrY8f2VEflbEWmaE8aqx076ILATG9m2uTXlKCwQAMLABE+J3gNC7 9CJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699093; x=1763303893; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jiNDMgJ1PRczoI1657/zd47IielAoH6hCTaVhiNKpyE=; b=L1yTc9cTfyAeLbUm8ysWtD0SG7Py9AwoaRL9oRrhikTeYAj2j24/UzMOKTjBByQuaL Mc0SSnz+rXktFQEV/LB0UlRfTLvoc1SIb9RTeUoGB3MOJ1nV0ARyxR2RDwWBW5Tn0gBU ADXbfUGXrvYcQl1//Gi6F56cQ4u/EFSdwZ721NxzURCrQm+5NbHGynkI3NZV3YjaKYmV HjoY04kebMp571oHKWGXFAt2g3o82qsjsghPUjPsNUDW3AKPjiQ2ifQ6dNiOfDfPEkw0 DtF4L/kSzQs+r9I3i2QjzWXEaSURUOEK92XIuTZx+K5JRWAOUuBgI1EU0orwnkgWPuyd PTHg== X-Forwarded-Encrypted: i=1; AJvYcCXKJuiDeqSyqPmF+Ov68RqIlqyikacmBtBi4O5P3YATaH7s9Ag4VzdG+YNJHO63EQ1m/V+Gb8OPwgyGAN0=@vger.kernel.org X-Gm-Message-State: AOJu0YxcOpzMufMJNgsQCrR+QqpTutnf8ZzBWGClxmLceRuV6kntgj7c z7eZhWTN2dpKTdcEj+jyqv3qnlidcRBy58SOOG+ElsRNZW+Rk+aV4n/ZLgDZiss9WVd+pb5YSKg Czq49JrK7R+6wszGWJwWw+je5pGRuCMfI7SIXZYDVj1GVH2eL5Dlpv8Mf4Ia+AdP2L9w= X-Gm-Gg: ASbGncu8HTpJM8Wr9bFBJvUflUjVKKMBs6IUoQNd+Bfg00pHbChHNwwKwPl8GuLhFSG LMmGUMCnVb7mQQwErIQn5Tem/iHxs3phBKQQEkOo2JfVcV/65U+LLJJU456X92yGLk+L27HMZRe PnX1UlApCUXXTSeTQXLMEx2j4a/QzPU7MR1iiixp0qT5Y5MN9xxdBRWnpljMgUwG3x88hh5khyf sEE2ncdEVGb3yYoR+KdVKjM2j8mf7NBTESTwkf2Po3Q+XJ3G5yDs1Ah6v0TD11j59+wfXsgNAPR JXm77yp1CHZ34se6+ECMq7PIRA+78QlgTrpjaRyJOIRmCGb9pFcDPDP3R3GwtkhFrL2VQje5N4G ANUc3WAg+hd/rlD+jTCH5JaKoQ+Kd8LLtCKw= X-Received: by 2002:a17:90b:2e50:b0:32e:8ff9:d124 with SMTP id 98e67ed59e1d1-3436acc10b1mr6325921a91.15.1762699092565; Sun, 09 Nov 2025 06:38:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IFsz33mCu2I9XufPajBf7LFsiT4u4peJwvXKj1MW+NqngdPeP21HWE8OBRYf1Aie7N1TK+YOA== X-Received: by 2002:a17:90b:2e50:b0:32e:8ff9:d124 with SMTP id 98e67ed59e1d1-3436acc10b1mr6325873a91.15.1762699092004; Sun, 09 Nov 2025 06:38:12 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:11 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:14 +0530 Subject: [PATCH v17 01/12] power: reset: reboot-mode: Remove devres based allocations 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-1-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=3273; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=tSD2yNZaJDc5m1jdDRoQ2dA6oSVGR8ZTHjS4GRBmNcg=; b=bUjyq9xpjS9KUiS6+Nw78zrsSxHqaWYFJL0jGHwwWaOkVhD0IIgjEAY5Z0HoEPo/CcR3Xz4oA IulwmmBv4T4A9e0Vrji+SnFgsZO+5ByFEtY5OaqNKYLzIpwTq8pESLl X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-ORIG-GUID: dHg5l_0y27db__R4UGRPJpoPY3XjfZk_ X-Authority-Analysis: v=2.4 cv=BfDVE7t2 c=1 sm=1 tr=0 ts=6910a755 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=wx_w4_m59dWKJ5at3RkA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: dHg5l_0y27db__R4UGRPJpoPY3XjfZk_ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX1wCnv8x5L6mu hrdG9fCCZ1FxlElbZ6FcmIWF24AaSHICe9GcTMBcOS3lde1TZeqZdNfsMbRaUEPgrOXNSK+RF21 BLpLJL4UxWqlDflwKZ6KKjuiWDBN8GdBwEMVNTl7KB6AFw8Bi9p1167ULhjuJ2xZUOigkeBv58n jDb0qdbIEUe/qX5zKDXnJtr5LEPnFxBdWR5umrKsu3ZVeQBOfx4iyckchTo7YEieaUnM0RsVpYp pq1KQAcwn7fLhuGorYXKXD4scH9gELVqDZf2Mfn7k/ISELRcqb8FLS5rBv+B39JBvtqfscY4Cgf u9eIut37x/kCh/sNyn5oM+99KZmkGHjhM41FtceEYd19RdNmsVD9bVlWJdvxmkNqx1UOtJyK8Yl jcFH1As3bEJaGdWfRqoyIUTp3ZkP4Q== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Devres APIs are intended for use in drivers, and they should be avoided in shared subsystem code which is being used by multiple drivers. Avoid using devres based allocations in the reboot-mode subsystem and manually free the resources. Replace devm_kzalloc with kzalloc and handle memory cleanup explicitly. Fixes: 4fcd504edbf7 ("power: reset: add reboot mode driver") Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- drivers/power/reset/reboot-mode.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot= -mode.c index fba53f638da04655e756b5f8b7d2d666d1379535..ac4223794083f36960b2bd37a60= 1b7e1f1872de5 100644 --- a/drivers/power/reset/reboot-mode.c +++ b/drivers/power/reset/reboot-mode.c @@ -3,6 +3,8 @@ * Copyright (c) 2016, Fuzhou Rockchip Electronics Co., Ltd */ =20 +#define pr_fmt(fmt) "reboot-mode: " fmt + #include #include #include @@ -71,6 +73,7 @@ static int reboot_mode_notify(struct notifier_block *this, int reboot_mode_register(struct reboot_mode_driver *reboot) { struct mode_info *info; + struct mode_info *next; struct property *prop; struct device_node *np =3D reboot->dev->of_node; size_t len =3D strlen(PREFIX); @@ -82,29 +85,27 @@ int reboot_mode_register(struct reboot_mode_driver *reb= oot) if (strncmp(prop->name, PREFIX, len)) continue; =20 - info =3D devm_kzalloc(reboot->dev, sizeof(*info), GFP_KERNEL); + info =3D kzalloc(sizeof(*info), GFP_KERNEL); if (!info) { ret =3D -ENOMEM; goto error; } =20 if (of_property_read_u32(np, prop->name, &info->magic)) { - dev_err(reboot->dev, "reboot mode %s without magic number\n", - info->mode); - devm_kfree(reboot->dev, info); + pr_err("reboot mode %s without magic number\n", info->mode); + kfree(info); continue; } =20 info->mode =3D kstrdup_const(prop->name + len, GFP_KERNEL); if (!info->mode) { ret =3D -ENOMEM; - goto error; + goto err_info; } else if (info->mode[0] =3D=3D '\0') { kfree_const(info->mode); ret =3D -EINVAL; - dev_err(reboot->dev, "invalid mode name(%s): too short!\n", - prop->name); - goto error; + pr_err("invalid mode name(%s): too short!\n", prop->name); + goto err_info; } =20 list_add_tail(&info->list, &reboot->head); @@ -115,9 +116,14 @@ int reboot_mode_register(struct reboot_mode_driver *re= boot) =20 return 0; =20 +err_info: + kfree(info); error: - list_for_each_entry(info, &reboot->head, list) + list_for_each_entry_safe(info, next, &reboot->head, list) { + list_del(&info->list); kfree_const(info->mode); + kfree(info); + } =20 return ret; } @@ -130,11 +136,15 @@ EXPORT_SYMBOL_GPL(reboot_mode_register); int reboot_mode_unregister(struct reboot_mode_driver *reboot) { struct mode_info *info; + struct mode_info *next; =20 unregister_reboot_notifier(&reboot->reboot_notifier); =20 - list_for_each_entry(info, &reboot->head, list) + list_for_each_entry_safe(info, next, &reboot->head, list) { + list_del(&info->list); kfree_const(info->mode); + kfree(info); + } =20 return 0; } --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 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 E7D522FE592 for ; Sun, 9 Nov 2025 14:38:22 +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=1762699104; cv=none; b=dwc3MDNqJ/+jmFe6Z8gYGPycN2+RsfUIDXndv7GCpglDEe7AhiHDwJccTp9aBpUIsZj8SWcMPTG3OLz8qJUqDRPRxF5I2WZuv8rxKMLBCs5xW+vBhOcNOfdu2EjBU8ksteyfP20m80ZdsBJfbTlBb6ggNmKz1yPQ4ZE5y6RKdpA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699104; c=relaxed/simple; bh=4y05tl5JnFA8b6YlLDdx12ZxapyYnXQ2xFk7Mn0seVs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BPZ3vveIdc0qSLg+MzYCDtoVKTM+cQjdEc4VpBzspcmh54c14MD4hDA22AV315p421WKkKI6sGiKDip6BIDbe3L1yRU4X4qjlwxY35KCIzn9ZBdJ0DLu6rd79i8B4mhaEKn2YpSZdYk8b0Hqh5LyuTTbIHKbCTyShRpPChC7b3Y= 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=hK7Y9mgw; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Zd7FfbET; 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="hK7Y9mgw"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Zd7FfbET" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A98somf4110509 for ; Sun, 9 Nov 2025 14:38:22 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= Uo7LT6euvRJruZtdgnGKAy39fSD8X4XwSTTfUk+1bv0=; b=hK7Y9mgwVQzAX85U htBJKQO4Xl+Ik2DPsS/62bLQLCpinBmOMA0olTpoJHBT98/mpzhRX7iXO+bP+be5 RLi7KiUyf06rka11Oc5a1H7xn4mrHdocQgbCtZ0RML03reAV2bSQI7GFhwFrcLat 7mwZK83txokPi+WOCLM2nFP2N3EtyUBzCKKul0BKbpCMWWdmxMKcIkqTyzU8KHZr L8TucMeJEVCz0NyH7g5XSGnMo1ejR1hs1pQwglrhNYXs99Ghay7isbinaZmK6ZPr XQaWZr4uiv0XGUoBTuRhxmUS7nKraVgNuEtfg3gsQ0fStAI8kFe88v71CBoaEWlQ ZpV3hA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9y56t6fm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:21 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-33d75897745so5092044a91.0 for ; Sun, 09 Nov 2025 06:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699101; x=1763303901; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Uo7LT6euvRJruZtdgnGKAy39fSD8X4XwSTTfUk+1bv0=; b=Zd7FfbET6k7XCfGOmRVRpf9PVPKSIT3laR2pBURCr465w5DZU7y7Pj84H3PFl8y4is hvQqL8cDomQ9ssFTAKS4Yi0HH11qly+ApD19aS+lBUeyB1DH/aDfqtbqa93JCZLr0oX/ uUD80IUPh8p8UatS2Q7eOKgs8M4mpRYhqpU3TUwChRNVzmg9JHphYTXmy1oyx5Uxe6i0 aH22CKGcQWoZIwC6etiJ0E6fEJfLQk0Lc/UeocnMOHzy9uGZho70p8WoAwWXrKsKfRSL rilvWt3VIn/rtZfqum2C1JvC1MsVvwRc4o1zWtVEwkYh3BOSr+sp4ZCipjtsBb47418d Jh8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699101; x=1763303901; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Uo7LT6euvRJruZtdgnGKAy39fSD8X4XwSTTfUk+1bv0=; b=hCpRsxhe7Ay0+7XT+HehWm+vrggzp88YhEBOT8Y7u/RZuoiVUr3FvgMW2voElDosI1 Q61W87i2Nl3bg+ShvDsGFSu0rIrVWTbyWsb9IvT/C5FRlAmB3mXONNJxBNap0W8OsQi1 C77E742QaFa7zEfE8hbpElYNofcIT5Z7LVSQlBEDL7vmvz+yArIujB3oASVa4btpKO2R Kc8R4JAtiL5AvnrmMwabbC1D0719fDeicyb9sLGVr96bV0LKUjsV/SxYUdv7f6fkpilo A7Jl7kW1X7qmFlwncV6B1kRrjO5gppUThwAjrKRfO9fJt5/s0YBmqmKGgHxQ5Xvc19GU 6hyw== X-Forwarded-Encrypted: i=1; AJvYcCXP0eq4ymAMR4UYaEyf05m06ctn0aALLrg9Ge+tkJwNbwkrXSlSmitoLBK/I4v1DrMF+J9tNTwP9cqxl6g=@vger.kernel.org X-Gm-Message-State: AOJu0YzLMWrRMyrlRffsNKCIYRjWq8RQpbk0Qt57sRO7Z0HsFJCLOlst Yoi00uwK/0cIFm/7rBwdHBtYdWcLPptjMScXJWV13RjoRRRDuqD4Qed8fG/ribEm4kpPWd+S16b zGSkQi8uTff1Vl1CqjDoMYGRamjbjEQRQI1YsLyfrkhvQdeqmUGHzFgKzV6NOpdzdyi4= X-Gm-Gg: ASbGncuTdAu+Sj+8wISvXbb/6wucpJlDfAvKgiOSeghV2mndPn7BSLYB0bIekc53FXO 3dYiKwvpbrIlXPbPQwc7v4pbL6ldZBrZxGUD2FiM7mjHODLyAzDiLKPix1CHMOqzHX4xoWA9fXD blc8hK3fbzXAlkh+f8bfiE8JkPrgUpV9Nm7DT9pZXKBNowaki6I7fEyNPzWGdZQYpoheQpc4A04 TI5zBL+TQxndO10/QK0DuDQkI0l5jaK1zX5ibGOGQbmu4McRQzoUh4H3p1vx9IAezKHpAkBQ4u8 Y3Fe195rbDnz/MUSkCHAA9NzzNEzxvYTUCidy27hk3pHGeq4+aQcLnUN2W0CSGEDQ49Eq3iBpT/ 4nBw8ZrDfitB2OCNWc5f67/n8Ozfq5+skHq4= X-Received: by 2002:a17:90b:3811:b0:340:29ce:f7fa with SMTP id 98e67ed59e1d1-3436cb7ae1emr7571923a91.7.1762699101147; Sun, 09 Nov 2025 06:38:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGnivRRM8Xz3flnELsFAmipMGOzqr6JvqifyyUie4y1Y4jWQDfWv+NfIOTqq8B3YWWPWAf5Q== X-Received: by 2002:a17:90b:3811:b0:340:29ce:f7fa with SMTP id 98e67ed59e1d1-3436cb7ae1emr7571881a91.7.1762699100638; Sun, 09 Nov 2025 06:38:20 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:20 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:15 +0530 Subject: [PATCH v17 02/12] power: reset: reboot-mode: Add firmware node based registration 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-2-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=3351; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=4y05tl5JnFA8b6YlLDdx12ZxapyYnXQ2xFk7Mn0seVs=; b=vs3wqeUOLeic+1W7I0EI8aB6oJC74eGyyuuemjAP54LQwPmCWoLH5jWQiO+mDhZeRaIXg4SCi FrddfqAJhKSDh6WdKIQCfUpid1SYartnJ4tBNv3Sl8dK0paFII8Fg1Z X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-GUID: X1dQuRHtknGzqFH4pjqYEvdousHv_bcB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXzdv0CV+jByf6 20kLIYo8SXUajox7tfOez8ADhfYXvu2FXdrWRdpgK317EgQspUEcn1t7W90k1vgCK97hjA1X+4s drezZ77BCrOdZLeLuMJq7eCVnPUC+Ub4IX8J5fH5ZtCV5U+IHXdSmxt4bD3vVmL+TxFRP/PaqWq bXUrpNpgBgoXl7mzvEWag9JKTC3saFQNV5Az6IQtc06DltUf2lye0UmgZIgFrlfzeNLulFaKV4N NAUxpkbI5BVFGPrbV7VA9wY5TeE/Nqqlx6xUj2709Q5BUkz7kK1NkK0OlM0mENFeVNkNPyL0w4v TIguTrFXwgWm1fYKaYRZcyeNODwupJP4Ym/l0hQX4xI43umZIxEm/VMECGBpHRFrfZDBu6cSPls lFtwpqubGalE/TNCdpsP7/G1sXzAyg== X-Authority-Analysis: v=2.4 cv=V8xwEOni c=1 sm=1 tr=0 ts=6910a75d cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=yMQn7kocbCrLHgxSFm0A:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: X1dQuRHtknGzqFH4pjqYEvdousHv_bcB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 malwarescore=0 impostorscore=0 spamscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 The reboot-mode driver does not have a strict requirement for device-based registration. It primarily uses the device's of_node to read mode- properties. Remove the dependency on struct device and introduce support for firmware node (fwnode) based registration. This enables drivers that are not associated with a struct device to leverage the reboot-mode framework. Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- drivers/power/reset/reboot-mode.c | 19 ++++++++++++++++--- include/linux/reboot-mode.h | 4 +++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot= -mode.c index ac4223794083f36960b2bd37a601b7e1f1872de5..eff60d6e04df2cb84ba59d38512= 654336f272f8a 100644 --- a/drivers/power/reset/reboot-mode.c +++ b/drivers/power/reset/reboot-mode.c @@ -8,10 +8,12 @@ #include #include #include +#include #include #include #include #include +#include =20 #define PREFIX "mode-" =20 @@ -67,18 +69,26 @@ static int reboot_mode_notify(struct notifier_block *th= is, /** * reboot_mode_register - register a reboot mode driver * @reboot: reboot mode driver + * @fwnode: Firmware node with reboot-mode configuration * * Returns: 0 on success or a negative error code on failure. */ -int reboot_mode_register(struct reboot_mode_driver *reboot) +int reboot_mode_register(struct reboot_mode_driver *reboot, struct fwnode_= handle *fwnode) { struct mode_info *info; struct mode_info *next; + struct device_node *np; struct property *prop; - struct device_node *np =3D reboot->dev->of_node; size_t len =3D strlen(PREFIX); int ret; =20 + if (!fwnode) + return -EINVAL; + + np =3D to_of_node(fwnode); + if (!np) + return -EINVAL; + INIT_LIST_HEAD(&reboot->head); =20 for_each_property_of_node(np, prop) { @@ -168,11 +178,14 @@ int devm_reboot_mode_register(struct device *dev, struct reboot_mode_driver **dr; int rc; =20 + if (!reboot->dev || !reboot->dev->of_node) + return -EINVAL; + dr =3D devres_alloc(devm_reboot_mode_release, sizeof(*dr), GFP_KERNEL); if (!dr) return -ENOMEM; =20 - rc =3D reboot_mode_register(reboot); + rc =3D reboot_mode_register(reboot, of_fwnode_handle(reboot->dev->of_node= )); if (rc) { devres_free(dr); return rc; diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h index 4a2abb38d1d612ec0fdf05eb18c98b210f631b7f..22f707ade4ba93592823ea8718d= 467dbfc5ffd7c 100644 --- a/include/linux/reboot-mode.h +++ b/include/linux/reboot-mode.h @@ -2,6 +2,8 @@ #ifndef __REBOOT_MODE_H__ #define __REBOOT_MODE_H__ =20 +#include + struct reboot_mode_driver { struct device *dev; struct list_head head; @@ -9,7 +11,7 @@ struct reboot_mode_driver { struct notifier_block reboot_notifier; }; =20 -int reboot_mode_register(struct reboot_mode_driver *reboot); +int reboot_mode_register(struct reboot_mode_driver *reboot, struct fwnode_= handle *fwnode); int reboot_mode_unregister(struct reboot_mode_driver *reboot); int devm_reboot_mode_register(struct device *dev, struct reboot_mode_driver *reboot); --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 439AB2FE56C for ; Sun, 9 Nov 2025 14:38:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699114; cv=none; b=YD7wI0Vw43SVyFQmr1Ar0q9aES7r/0BuOsmmDl7MCrOnfEeLyqBY/EuCfMxUAyF7OoaAidHRZ9h6XhMjLe3B1EdfffnyKl8DzJXiN5qUgZD49xUeR9YX/154IZnoM1UZXocWqxDs/I7+A2Uto3Czz+avs+64TO3Ahf1MwsCssBo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699114; c=relaxed/simple; bh=EQ90lYVfyz+tdTJF0OEbz8TSgTdlKU5QUPgYOVB1ofo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PvUMS6+PTNxOLVF3EeLq5zWXcmjWcyZPSzgmT+MBUYlxhSNS3yZ4947wjJjUDSnM1quX/NpOfLIvZ8NmLwarWXtvsa9ShoG7Fd0JOUR0wJx+ooUjetnnmPjIOaFJ7NSc4x4XYl6dxtzXBDEoqwibELBEy50N1dAgMRwMo2PFOks= 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=N16ebbxP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Rgn0kDz9; arc=none smtp.client-ip=205.220.180.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="N16ebbxP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Rgn0kDz9" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A97ZdFI4122918 for ; Sun, 9 Nov 2025 14:38:31 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= XW2y5qioC+SPBlfV5RMk7FiC5oEKR479wtD8KF5rP1Q=; b=N16ebbxPOt3GpNtx jpG0IO/0FkAxRRg6/c8MjDBZhXu6j8FM3svRePT4ztmHzX5UghwK/wfX/t4pfDrp jlXybmneV2MDf6uLMfiIDcG5jCz+eYUfYDdvnHDilpMsAr27rhAF3BH2cEb41Ad4 uqZGGN8Qjmu3R8CPaZhndVM5vLiVcjSBgEWDemrhvUdYWNfL7PKpcK1NxaCc71jy ZQhwpK8ZK+mXEewjnkHVb6i4/69OJf1VYlbJIkC03dRboxrSEMB65t7blIa3+pY7 csTGuWjK5HRAT6Yxr/G96N/ZT8DbU2imiSEEvtpqrMxxTLtbCie2xbQDT6Jr3Zyr YjUA+Q== Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4aad2a12td-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:31 +0000 (GMT) Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-3438b1220bcso375561a91.2 for ; Sun, 09 Nov 2025 06:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699110; x=1763303910; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XW2y5qioC+SPBlfV5RMk7FiC5oEKR479wtD8KF5rP1Q=; b=Rgn0kDz9Y9XM3udPJ78fvxa+ThE3YUFkIU4XEQvCSxGbJr8AijhNYxWww7ANbTgYS4 OS6H3JHZpw8iQbgrF+IEj7SbODVcBO1mg7jtJe9cMJeJdC+ONyp1vTsVkVJXCSavhz41 nKEf1o3bKxiiIL0zXwHBXixN2sBbfvcUKWnC+64ZJO6jzNJ026QRK5CrSBlSx5nEXK67 4GAGY6xmWiSpiGMCPYXYOHs9cLNstmO24BEAJ1QYgCqdZPmnlymv842B7yFdp6n8y7wO zbe57ueoviCTIuTMBmA/u+jHZPcQfd36Bk8S/obMFUZECD+kVb9vJ7t2Sd+OyPoZ5Aiv +SnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699110; x=1763303910; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XW2y5qioC+SPBlfV5RMk7FiC5oEKR479wtD8KF5rP1Q=; b=rI9I/JCeXP3pDpepJ2NglRz1y1NAhAsJHxpd/pQFbgjRS3YMm3reBPbJbSsKB1sivK oeO32mR8YiWesUYXioB25Hks0GSmcz63Es+PZFUKB6E0y6te2PjBorP5NUgTZKHKM4Xa iteFxh7o+zNa2sWOE4GNUGPnbWE2C4cXaUH8YoyTBE3VjpcJoJ2qfBo8W28UiGX8sxIO ojQ3/8WFdz8Hz7KFfNW3rERP4T8abgpLmJrAA768dLJKpfAiW0NP9v2fMHKUoVHUBNsy SA5idm56WthByK6fVW/17HV/MbfiDaaWQtemThhZNwnFAbcQC3G7gCPv0sNOSHdGI63C NlFA== X-Forwarded-Encrypted: i=1; AJvYcCWhJsy0rqvzK1IyMXOkGem+DCcw9w7iWUr/j6CIueXZD4o2XXQr5XdGqIMOKhatmCvVe/6eQsbyb13UZic=@vger.kernel.org X-Gm-Message-State: AOJu0YwaFA1b/wJPdBXX4hzNWP1Dr8ZW3wWr6t/c84EdtnKvN0RV17Sa gmrHqqargZrJ9kLWqYqr7V251Yv3hiQsuFQRZ9v5zqO7y4wvY68XfJsFmsVVj3mNyt8mNi1Miwg nCJoVvOQ27aZXGM5StInSx9cmE6yGdigWERG74s/7TOv07jcahemgzw/hzLdOxGgeLi8= X-Gm-Gg: ASbGnctKeCX4F8++1QIN6FItbXv90wc3wYUGvTCNmfSpz08C56r+WiFceVjtyqlTu03 80tBwjq6D5wUPcorrjDnUpPlzi6z7E3wuaL1dv9tcCEYlOi6soiSdkcaNkCNWGHvJfyJzzVkGec wsILnCgPkOTH+egAGjm0H1ptd7g1SuXHOm94DrwuZKj+ha4Tal8sUUdSIIyiNX094Ftfi1R/ygg l9Xsg88uWJUAgsu2niXFQuIr6Ld4m6o4a7TV2zKQunSimXGOOYv+Er4HgioB+KjHJuMyWP5VEsc fQCkr855PH0A0MH3Sh8XLXdX85Lem7f5c0mqGy8y2Xo3bkyVBWGz3+d4gbYtVKWuQRRsK6SH45R +sHqtBXQcY+2Y0HjkrdhmYpZ6Uzb95HrZFEw= X-Received: by 2002:a17:90b:3811:b0:340:c60b:f362 with SMTP id 98e67ed59e1d1-3436cb73e66mr8015000a91.6.1762699110238; Sun, 09 Nov 2025 06:38:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI4EIvuNbEFq4KLN5FHWa444x808BHx17XtNyZvkZvzfUrXB1Z2wx/ZIkwrpEWFTg952zrqQ== X-Received: by 2002:a17:90b:3811:b0:340:c60b:f362 with SMTP id 98e67ed59e1d1-3436cb73e66mr8014978a91.6.1762699109678; Sun, 09 Nov 2025 06:38:29 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:29 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:16 +0530 Subject: [PATCH v17 03/12] power: reset: reboot-mode: Add support for 64 bit magic 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-3-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Umang Chheda , Nirmesh Kumar Singh X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=7027; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=EQ90lYVfyz+tdTJF0OEbz8TSgTdlKU5QUPgYOVB1ofo=; b=Kfod+JF3iywzY91KfPB+jr89CkaOtAE9QTJIxP8g1QAeDEUgfTCQDbAeZK29nw7pALYzMYwOb j+WD81Ci+AoACXN9Mr18MfiNM7RGg0kMomlao55X5svxU3hYIhQHjh9 X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Authority-Analysis: v=2.4 cv=aedsXBot c=1 sm=1 tr=0 ts=6910a767 cx=c_pps a=RP+M6JBNLl+fLTcSJhASfg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=bqVjg2-MoX4cBg1ZSeQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX2JOvNmIbVEH5 QYG2aTcrs2sEIEgZvduNPynqgoHpS6MvNOvAAp9U6JG0NscMVMtV38IGp6UyNe4Z+7Sxc0tMB9n gxm2K+qEnHJY8RloCrgyk+2r3uYlVpySzW5buHUJ8A0MQdwzGCYnKJnVRjIkfsldgJk78O5fthh 43Xgw5BkWb2cT/HnSzNsW5wI2ppnrbczeevc0rbO8nYEWtV1lInJXyMZNXSty8V3f2vJ8LoDL0r WhEohLsBXTQp5nMTOYeZNXrEmGU4jyrFEh15f/zEkjszgHej/6nBSNqg9D5CvPc3rNtUG2f5Ksf XxvESc7HSOAI9Yx3o6XDqD/j4zIjavtmz6bro4PXe+q88ubECMHpDgAVlMtxN0/9ZmW/88iZwpv Txfv7MPHALHAYT5euvlEqTTghamGsg== X-Proofpoint-ORIG-GUID: 2LD8PP31BT9rMv89Huy0WFnQ2_GDdJID X-Proofpoint-GUID: 2LD8PP31BT9rMv89Huy0WFnQ2_GDdJID X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 bulkscore=0 suspectscore=0 spamscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Current reboot-mode supports a single 32-bit argument for any supported mode. Some reboot-mode based drivers may require passing two independent 32-bit arguments during a reboot sequence, for uses-cases, where a mode requires an additional argument. Such drivers may not be able to use the reboot-mode driver. For example, ARM PSCI vendor-specific resets, need two arguments for its operation =E2=80=93 reset_type and cookie, to complete the reset operation. If a driver wants to implement this firmware-based reset, it cannot use reboot-mode framework. Introduce 64-bit magic values in reboot-mode driver to accommodate dual 32-bit arguments when specified via device tree. In cases, where no second argument is passed from device tree, keep the upper 32-bit of magic un-changed(0) to maintain backward compatibility. Update the current drivers using reboot-mode for a 64-bit magic value. Reviewed-by: Umang Chheda Reviewed-by: Nirmesh Kumar Singh Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- drivers/power/reset/nvmem-reboot-mode.c | 13 +++++++++---- drivers/power/reset/qcom-pon.c | 11 ++++++++--- drivers/power/reset/reboot-mode.c | 19 +++++++++++++------ drivers/power/reset/syscon-reboot-mode.c | 11 ++++++++--- include/linux/reboot-mode.h | 3 ++- 5 files changed, 40 insertions(+), 17 deletions(-) diff --git a/drivers/power/reset/nvmem-reboot-mode.c b/drivers/power/reset/= nvmem-reboot-mode.c index 41530b70cfc48c2a83fbbd96f523d5816960a0d1..5d73dde585b1fd438b1847f884f= eb37cd9e4dd5c 100644 --- a/drivers/power/reset/nvmem-reboot-mode.c +++ b/drivers/power/reset/nvmem-reboot-mode.c @@ -16,15 +16,20 @@ struct nvmem_reboot_mode { struct nvmem_cell *cell; }; =20 -static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot, - unsigned int magic) +static int nvmem_reboot_mode_write(struct reboot_mode_driver *reboot, u64 = magic) { - int ret; struct nvmem_reboot_mode *nvmem_rbm; + u32 magic_32; + int ret; + + if (magic > U32_MAX) + return -EINVAL; + + magic_32 =3D magic; =20 nvmem_rbm =3D container_of(reboot, struct nvmem_reboot_mode, reboot); =20 - ret =3D nvmem_cell_write(nvmem_rbm->cell, &magic, sizeof(magic)); + ret =3D nvmem_cell_write(nvmem_rbm->cell, &magic_32, sizeof(magic_32)); if (ret < 0) dev_err(reboot->dev, "update reboot mode bits failed\n"); =20 diff --git a/drivers/power/reset/qcom-pon.c b/drivers/power/reset/qcom-pon.c index 7e108982a582e8243c5c806bd4a793646b87189f..d0ed9431a02313a7bbaa93743c1= 6fa1ae713ddfe 100644 --- a/drivers/power/reset/qcom-pon.c +++ b/drivers/power/reset/qcom-pon.c @@ -27,17 +27,22 @@ struct qcom_pon { long reason_shift; }; =20 -static int qcom_pon_reboot_mode_write(struct reboot_mode_driver *reboot, - unsigned int magic) +static int qcom_pon_reboot_mode_write(struct reboot_mode_driver *reboot, u= 64 magic) { struct qcom_pon *pon =3D container_of (reboot, struct qcom_pon, reboot_mode); + u32 magic_32; int ret; =20 + if (magic > U32_MAX || (magic << pon->reason_shift) > U32_MAX) + return -EINVAL; + + magic_32 =3D magic << pon->reason_shift; + ret =3D regmap_update_bits(pon->regmap, pon->baseaddr + PON_SOFT_RB_SPARE, GENMASK(7, pon->reason_shift), - magic << pon->reason_shift); + magic_32); if (ret < 0) dev_err(pon->dev, "update reboot mode bits failed\n"); =20 diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot= -mode.c index eff60d6e04df2cb84ba59d38512654336f272f8a..873ac45cd7659b214b7c21958f5= 80ca381e0a63d 100644 --- a/drivers/power/reset/reboot-mode.c +++ b/drivers/power/reset/reboot-mode.c @@ -19,12 +19,11 @@ =20 struct mode_info { const char *mode; - u32 magic; + u64 magic; struct list_head list; }; =20 -static unsigned int get_reboot_mode_magic(struct reboot_mode_driver *reboo= t, - const char *cmd) +static u64 get_reboot_mode_magic(struct reboot_mode_driver *reboot, const = char *cmd) { const char *normal =3D "normal"; struct mode_info *info; @@ -56,7 +55,7 @@ static int reboot_mode_notify(struct notifier_block *this, unsigned long mode, void *cmd) { struct reboot_mode_driver *reboot; - unsigned int magic; + u64 magic; =20 reboot =3D container_of(this, struct reboot_mode_driver, reboot_notifier); magic =3D get_reboot_mode_magic(reboot, cmd); @@ -80,6 +79,8 @@ int reboot_mode_register(struct reboot_mode_driver *reboo= t, struct fwnode_handle struct device_node *np; struct property *prop; size_t len =3D strlen(PREFIX); + u32 magic_arg1; + u32 magic_arg2; int ret; =20 if (!fwnode) @@ -101,12 +102,18 @@ int reboot_mode_register(struct reboot_mode_driver *r= eboot, struct fwnode_handle goto error; } =20 - if (of_property_read_u32(np, prop->name, &info->magic)) { - pr_err("reboot mode %s without magic number\n", info->mode); + if (of_property_read_u32(np, prop->name, &magic_arg1)) { + pr_err("reboot mode without magic number\n"); kfree(info); continue; } =20 + if (of_property_read_u32_index(np, prop->name, 1, &magic_arg2)) + magic_arg2 =3D 0; + + info->magic =3D magic_arg2; + info->magic =3D (info->magic << 32) | magic_arg1; + info->mode =3D kstrdup_const(prop->name + len, GFP_KERNEL); if (!info->mode) { ret =3D -ENOMEM; diff --git a/drivers/power/reset/syscon-reboot-mode.c b/drivers/power/reset= /syscon-reboot-mode.c index e0772c9f70f7a19cd8ec8a0b7fdbbaa7ba44afd0..3cbd000c512239b12ec51987e90= 0d260540a9dea 100644 --- a/drivers/power/reset/syscon-reboot-mode.c +++ b/drivers/power/reset/syscon-reboot-mode.c @@ -20,16 +20,21 @@ struct syscon_reboot_mode { u32 mask; }; =20 -static int syscon_reboot_mode_write(struct reboot_mode_driver *reboot, - unsigned int magic) +static int syscon_reboot_mode_write(struct reboot_mode_driver *reboot, u64= magic) { struct syscon_reboot_mode *syscon_rbm; + u32 magic_32; int ret; =20 + if (magic > U32_MAX) + return -EINVAL; + + magic_32 =3D magic; + syscon_rbm =3D container_of(reboot, struct syscon_reboot_mode, reboot); =20 ret =3D regmap_update_bits(syscon_rbm->map, syscon_rbm->offset, - syscon_rbm->mask, magic); + syscon_rbm->mask, magic_32); if (ret < 0) dev_err(reboot->dev, "update reboot mode bits failed\n"); =20 diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h index 22f707ade4ba93592823ea8718d467dbfc5ffd7c..e0d3e8a54050a76f26846f45612= 0b4c7e371d284 100644 --- a/include/linux/reboot-mode.h +++ b/include/linux/reboot-mode.h @@ -3,11 +3,12 @@ #define __REBOOT_MODE_H__ =20 #include +#include =20 struct reboot_mode_driver { struct device *dev; struct list_head head; - int (*write)(struct reboot_mode_driver *reboot, unsigned int magic); + int (*write)(struct reboot_mode_driver *reboot, u64 magic); struct notifier_block reboot_notifier; }; =20 --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 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 908892FE56C for ; Sun, 9 Nov 2025 14:38:40 +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=1762699122; cv=none; b=uNhCsFy3m+TVVKz5W8dlJQsYJhnmNy0eQ/KzXIUS1zJeD7kXKLBlSqOvpzlLuiggN5DhOXyCG4Tkj4I85AwrXw/u3vUO4lp/+I7BKj9MOoN+oEqMKCcf9TS2nsiAkbMKLERfjISBBROQsA2o628mmV5Wu8ksHLMM8f9FInvejs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699122; c=relaxed/simple; bh=KkC4QSxclwx5Tk4AVwolzQwcYruXvNFOfpqU998deKY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=r9GWhJB9ydG56PCCdwi/IUL4sYzuJEXu1DRJ7kG0OkrQ5FuIXvZ2eW+jGmkIgsTTqthBzaw7ih7mmLevhlMCqDe3xcWYhrSFdQ0LLB9a+DiUoU1qJrDReMe3+vxh2zSXCnsU6n1YH2JWuk8DbPLDef7JoEP8jRh4CNWXx5dgxWs= 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=fQH7vgGi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YxO4yW9K; 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="fQH7vgGi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YxO4yW9K" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9ABlm9159474 for ; Sun, 9 Nov 2025 14:38:39 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= 4zriVHHzMQQ8ELUT932V4l8RDRcEXWAm2X8YnUX13NY=; b=fQH7vgGixjiezK07 fHna/+OSPKGwQ+ItQcFWBf75PqMmDj7mK0/1WjMPhxYBYZXlr28l40xHB9zumemM Gf/N5j2b+WjKVUTWYYITipRoXxviQIGEzlClo/y+wJN1aNLSn370ihi1GDKmJCnL C6lxzlJmDcvSiKQS9eZueFxfb8xHXuWwjGvQlJkLjiPboPrtuiTs5NBczHedbfPM 76XMxwKiH+Wit8LYvT3xoZ4qQdxM8uNVE0kVakSpwaaLGlGIHlS/qIISX1FS/aae 3X0Jk1nk94TUTFLPx0+QYNO4LRv/o7gd88r5RfUdaCHQl9JalTjuXTbQZg/pqPvW 0Vr8dg== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xu9t7da-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:39 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-343725e6243so981202a91.1 for ; Sun, 09 Nov 2025 06:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699119; x=1763303919; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=4zriVHHzMQQ8ELUT932V4l8RDRcEXWAm2X8YnUX13NY=; b=YxO4yW9KpIvFZbjymrxiUPEdTaJaHX037L0Zg9KeUJlIEXH/wWgXB8OsYEqmrHuML5 IsncZnEzhhs4iEuu6o7XSkQ5xHHtWhldr35gkRKghhqJq5n8eeVPUBe9J1oi0MeOkCf4 Ri7qd/yPq3oTQjiWAAnHPwYvK+sYCvwgbBUroocsoXlb0wjk94g5KpvOuGwANXPPUuAu 7Q+OX3UbM4eifwgIIKH5LNeO78gfRSLiDIgWVA2DWexMyR2IETADWAWRbQQP4La9PXSu GQI0T+3llyOMEjM6VocMb/qe/2x+atRA5L5J5Q5CuTJyEuSmfvj+6kvVxH7pyolxoage 814Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699119; x=1763303919; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=4zriVHHzMQQ8ELUT932V4l8RDRcEXWAm2X8YnUX13NY=; b=eGYg0lmVu4OMIE5IDRrvlq4y3aNXQMifd/axxnEMdlHLj14y4msIGNx3yIeo0eb375 bnk7x6MgC7rEItJkimnB5iFG6ILaKw9QB8gEcz1nQ5QBKzfkt0PqLh4o4VJ8Knj1QeWP Dsfe9Qf4xYwvI9Xn3HvA8br+2xzDv46lYkHMem40E0mhZVOpZktsJiVePlPFfx6ayCze Bp1deWfS4MYhGobqpwFRAwni87snjel1WxK3lRFolhEfZIFSF27TpdF+QyNhka8YmbUj eVmi7AcKckn9ITl1Hn7g8e/t3N+PT/i/F4NmkBwC283UTCLFhxaaPAcM6xrAXl3ku+q7 9I5Q== X-Forwarded-Encrypted: i=1; AJvYcCX7mkFmNNc/y7I4RaF94F6KG5Vv4C31boVLPy9FjdtCaC1/DlVPNXGGLuwAvFlOwlkkr2YAWTK7Sns4iRc=@vger.kernel.org X-Gm-Message-State: AOJu0Yweurlg6sMsoOSBaA7nD9uA6/LVTEUSbSahaPpAxDpsa3V9sKgG uS4xfW6nl53uMdlVN32vFGEWx6S0DpXxK9dL8LazGaIuBPPEqdCcps2uQVKYhOQMShNuIhJcxkZ mkOXbIzLWK9SXE599+BOFumjdnZIrNijGo22fdvk+1UMJc4Wq0llkzNA2/XIoxyD4anY= X-Gm-Gg: ASbGnct7YZvybufBgXB6pDmpgecRrPED89eGgCAPHDpUrldXWp4Htn6FNp8hOfxBud3 xbXTdCwtsQ+YFekaeLLk5YFnUTO+BSoIQuAEH2sxdfas06MPym+Znaj1SWDGpzKuawu9XYytUhT Q8Nz1jFHh5DOBuf+YbnGrQbxbp8Agdaj2VSPRzyfbiq8zrXuQnCQzJvNSO9U/DheCE8qW3GvaOT 8OzAGez6PRsrfeFfZMvi/7sP6syHrRN1ZxGcvQZX8fHtGOwEqW4lmflRUkAyFSMvMFTMKbGGylH bWVe2zkA8GBVbqNxHKPOyPz21JX8GEnqU4VK0huE5MigCsfC2soRhxQuzIjXnxFjrJTTMJ8sC/0 X0yJLPlr2tIaYas+71bG3P16YgPgFskkr8L4= X-Received: by 2002:a17:90b:2fcb:b0:341:88c5:d58 with SMTP id 98e67ed59e1d1-34353778f97mr10161808a91.13.1762699119024; Sun, 09 Nov 2025 06:38:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IGJ8oa2bDV/JZ9g1CCPavF/hAUNJNmqCBo60PmRDygnciNNIeyHDQbrbNCCVrsDLl+kVYkWyw== X-Received: by 2002:a17:90b:2fcb:b0:341:88c5:d58 with SMTP id 98e67ed59e1d1-34353778f97mr10161766a91.13.1762699118507; Sun, 09 Nov 2025 06:38:38 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:38 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:17 +0530 Subject: [PATCH v17 04/12] Documentation: ABI: Add sysfs-class-reboot-mode-reboot_modes 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-4-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Sebastian Reichel X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=2381; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=KkC4QSxclwx5Tk4AVwolzQwcYruXvNFOfpqU998deKY=; b=SqWaS1L4R9/PRetPDl5ezV2V1ONox0X/KxMUmUzwxKvHFi1GczgvDsL8xutCsbzcMU539brQM euC4liUMVlvBRKiwx/WOO31aamwBf3jSBXBW4Fc21qvaSDRKVnvttJf X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-ORIG-GUID: fvQ1lDHTpLpyh4-YVP1r6ypaRQbjwZu1 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXzBdTiXRoJZrc rjAfA0mx+bVg6Lc7CClKrFSPIPANBoTvthPs7eF5H3YVeDUXXO6vBKvmJ2QYhwE4MrPIMgnSnRS BMsneoir7G028BADqmMTWFBlFt1Sjh2Actu8sCZUrZEnSBIhf6efjvbq39F0R4kTqmNz+esiiJ+ I7QbryZzsz+pskv/xgwHWEMi772W4+9hJ2TltY4F7P7UjoghuT8LXGCyKGB+g6K5AlFzQDf0TO1 8VGeZRIwSpzYi0gYwHQoCsVS0YZUpVFuwMIkR64TIBk4GZ2LYFtAXVw2QncDDV9zafg/0gBbbkw xKiDDa24CORXurDSCuWoM+gD0ZXMapgjt+7XQWA/UQ26iqIHQJXZQjctFRQSKHT36jWmKlHyfvw J0+Z4Z3XjMi5EW4f2LpMlxka0TbUxg== X-Authority-Analysis: v=2.4 cv=ZPXaWH7b c=1 sm=1 tr=0 ts=6910a76f cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=QX4gbG5DAAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=5CgfHzhl2afHKY-Ush4A:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 a=AbAUZ8qAyYyZVLSsDulk:22 X-Proofpoint-GUID: fvQ1lDHTpLpyh4-YVP1r6ypaRQbjwZu1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 bulkscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 phishscore=0 spamscore=0 adultscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Add ABI documentation for /sys/class/reboot-mode/*/reboot_modes, a read-only sysfs attribute exposing the list of supported reboot-mode arguments. This file is created by reboot-mode framework and provides a user-readable interface to query available reboot-mode arguments. Reviewed-by: Sebastian Reichel Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- .../testing/sysfs-class-reboot-mode-reboot_modes | 39 ++++++++++++++++++= ++++ 1 file changed, 39 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes= b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes new file mode 100644 index 0000000000000000000000000000000000000000..6a3fc379afae3a6caf56ad0b73b= 1c06c43a9fee7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-reboot-mode-reboot_modes @@ -0,0 +1,39 @@ +What: /sys/class/reboot-mode//reboot_modes +Date: August 2025 +KernelVersion: 6.17.0-rc1 +Contact: linux-pm@vger.kernel.org + Description: + This interface exposes the reboot-mode arguments + registered with the reboot-mode framework. It is + a read-only interface and provides a space + separated list of reboot-mode arguments supported + on the current platform. + Example: + recovery fastboot bootloader + + The exact sysfs path may vary depending on the + name of the driver that registers the arguments. + Example: + /sys/class/reboot-mode/nvmem-reboot-mode/reboot_modes + /sys/class/reboot-mode/syscon-reboot-mode/reboot_modes + /sys/class/reboot-mode/qcom-pon/reboot_modes + + The supported arguments can be used by userspace + to invoke device reset using the reboot() system + call, with the "argument" as string to "*arg" + parameter along with LINUX_REBOOT_CMD_RESTART2. + Example: + reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, + LINUX_REBOOT_CMD_RESTART2, "bootloader"); + + A driver can expose the supported arguments by + registering them with the reboot-mode framework + using the property names that follow the + mode- format. + Example: + mode-bootloader, mode-recovery. + + This attribute is useful for scripts or initramfs + logic that need to programmatically determine + which reboot-mode arguments are valid before + triggering a reboot. --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 121D92FF142 for ; Sun, 9 Nov 2025 14:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699132; cv=none; b=NHzIM2ihnTT26fSEqxuqJ0F0rUVV1MmYt+JKWyYhQgU55E74rKcMiCX/9ZIYEj9HNAFnAb9Wbxut+i5XMNzjZHQvexzvtB5Z9jn/gCEEqCpumN8G1q/SnPl3uwUe0X1L5ebLOJOvKRK6YUDbqqog9GosAeltnM0CsVo5EaGpwJE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699132; c=relaxed/simple; bh=p8VTlQ3pXarRYayw8UBrYcTj+4OjWYYKSpMSZeU0bPM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uBkgAlhmEgX3gobZbm8vmPJvDBQROBu7gPLbKsRIUiLmxA1ZVk+a8KLwU66oOK07FLvM9787Zaw6kxNWxbE2eYi/Xd/GGdX8IYIASfXkhBDt5ncWSDgG/RT2Btb0kmqfrM9X8KG86bitVJ6kYmyC6QWE27Icyax85CaH+8hxWd4= 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=Z/frQ9Ff; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hgFRdL8P; arc=none smtp.client-ip=205.220.180.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="Z/frQ9Ff"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hgFRdL8P" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9BK3ax457367 for ; Sun, 9 Nov 2025 14:38:49 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= PHiUGzt7WA5d+ZZv2cAEdOLPNuf+lkNI7THaM5BmfBE=; b=Z/frQ9Ff9WvMicSf jXePQiSoQ2DCGdI57w/z4ylqCylDODHu4P11/CPUpUTBVhxa6lqXX24xUWKEVNei K28GJrz+2qUR4jSnU81xzsyG8e4ey3To1iSlmFaU7sm/p2pP7OvPx2Le9QYB4WkS g7O9mdU0ZY+W6FsN19wOfeD/ylwHROcMZPsXTGluKMA1dExpOw7dtyLpqDj3hdr1 BfR/F6FxZxnTWQ9xQhVF3x/DdZvqVUsFXDPprIC2voHF5/aPTbHaqIvSKdYi2a4w 8ViGj/xyE+eyU4bzexf/YfLdClCKkLAaNzK6mJq2yRET2pBzKbeHJ4uYPW7KQ3R2 UKLBcA== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xu2t815-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:48 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3436d53e990so1051121a91.2 for ; Sun, 09 Nov 2025 06:38:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699128; x=1763303928; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=PHiUGzt7WA5d+ZZv2cAEdOLPNuf+lkNI7THaM5BmfBE=; b=hgFRdL8PPfoZHEanfw7qP1yLBaaLKopfMnV9o4NmKWCQQ7msoDomIgY6Y31XLpwEuc 2QgQari+Z5TEtVNJ9SBIIPhJbLb22KZ+qDWQhM8rELC7BIDrA4yClLzVQnVGntNboOF2 Ex7GduGZuV3DowEMBuLhaOjh1obvtY627ryTPy35WsPVNsN83Fb19JCJA5MAhnlUOUa4 5WE/uEouCArrB9jb6TMvy14Y7CkdSCpHdtxaUM7qwVijuJ6XR5Bvp26tqIWw26PC39OJ n3uNl1PsvcQ51MO05gzn8XzMgABmYMUsHZuNJhZR2+7OxWTYCx+DRvc+0c4/96YUjE0T /7Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699128; x=1763303928; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=PHiUGzt7WA5d+ZZv2cAEdOLPNuf+lkNI7THaM5BmfBE=; b=KVVaZpJyWUF54LKQEs27GIcSHRjRo0+njaOx1YMKLrhZ6VgmB1s8UHUg/YJYUUrH3t 7ItDtijm1Z20rNi4okxpJ+yHclRshOK5dsiC6dY/LZSOyCGdBMFiDCBnorvhxeEH0xwI k1ut0DFfvfi1SIX33MPOsaVzt49qrId8eguZDdc4mOnIFnxSKmfpanXgqY+xXiybTaDj NksB5KYOtPXJaTxndr1ER0jktVQpg77etgJmMNy0acKyDTy7zCGX6J5/z1nYI0l30yAG kd6uwV98YuuPdMYSl5rqJn4fQ+r55wU2Np7zgoqXiFPMe4J0Gqajvd7+nzean+HoriG8 QazA== X-Forwarded-Encrypted: i=1; AJvYcCUIQlCerZoziPoVYZ+GBhWXFum8wMjnIA1vWjV9JMfVYhB+nAhXuyDVE5npYo8vVkS/1pzzm2oWLLHvTLU=@vger.kernel.org X-Gm-Message-State: AOJu0YyVrVehK8SVHHhc9VLt5qiDDPGBgiAyHGjaJ985j6HvqTcJmUTe ZDiGlVRFeh+P/chhv2x8EikuRzMfGojHIFR1KelH6ELHXJ+hL5tFFVhn/hSf41T2jXQh6ZHfOnS yTrTiPL/9lF2uWYs2GVz+0IfujYzg4yksAG+Rn2iFpqG52jgErqAySxU61bZ9i0zmqHs= X-Gm-Gg: ASbGncvJo8P8ZEG9tCSz9g0q8wEFIF5bGxjOyYCIso1u4+yLYsHGgJ2ncyJjs5Uqdv0 eMLdBbMRZZTvs3/WLEYk31agYvivjYu1f9oFmlfVt0cO7Hh28DTa9hhR51+sSrUfksmD6AQrW/R d2n85Kl4NNCbLtvZXRqjc+K0hFrSJZEX+VBwJq/WQ01seUozJramvxluoAer+bI7JGxWaMS/WCZ 1uYu1br4mBDyQ2BEAqF5sYtpMBT70bXjJ8njIM1E2Hq5i7DMty8Bmc5kPFY3unoBtzeYNy7MG2B gOe+qZrtLfxYzN6HngT/2X+P3HSLDKJG2O0lc3dYoCiwYA/qRwdiTAEWo+EPilc9fmlVL2rx5OU 6nwy7ZOMWJmbkY0dt2+vy3/36P9ZhMpqf32Y= X-Received: by 2002:a17:90a:bf11:b0:343:7714:4ca6 with SMTP id 98e67ed59e1d1-34377144d90mr3756486a91.22.1762699127672; Sun, 09 Nov 2025 06:38:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJi8IG6JcT7AZMHFUMvIpgZqX/jl5jfBcQHPdOcQ8sjNa1J3m8dUnVgXFrv/h62wi7ogujmw== X-Received: by 2002:a17:90a:bf11:b0:343:7714:4ca6 with SMTP id 98e67ed59e1d1-34377144d90mr3756460a91.22.1762699127112; Sun, 09 Nov 2025 06:38:47 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:46 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:18 +0530 Subject: [PATCH v17 05/12] power: reset: reboot-mode: Expose sysfs for registered reboot_modes 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-5-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=5178; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=p8VTlQ3pXarRYayw8UBrYcTj+4OjWYYKSpMSZeU0bPM=; b=MD9m7lTEeVEibrUjikce7zPcaS1semLkXOkrguR66wGJvIqOv+EHyzaYktJlvdV2jDw8VWpxB tIqnoN5SuPkBCmyCv5QcKTnCU5JaIMN/Q1g3pDkebYFGBmrGkIioukZ X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Authority-Analysis: v=2.4 cv=dMWrWeZb c=1 sm=1 tr=0 ts=6910a778 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=ogmrOWMnV0kDla0zgWoA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: CkbwjbWJaEeqeHYx1xDjB8iJAP80R93x X-Proofpoint-ORIG-GUID: CkbwjbWJaEeqeHYx1xDjB8iJAP80R93x X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXyIuBe6r4WQDA Xvy9uOHVpQoqxtFGu9YH2NHlKOZTQl60QGkD+8fp+HtNKu29dPOMcqqiHfF3s8XTGuUwC81iOEO xbyxQdL3VlVzY3iLN/saNwz222BHqqMwwQrskFX+QVnqzXrpIeItTYWpaSeK1qZj2FgeXicF8g3 MUUfX/KF57zRHfjDMDo280aKE8fXAyi36pSGEQqGhiulPGgs36sTHODMHbXIb7QRTECEGjOJZZV m6jbnQ2JUThRUmhBv5NQleG3WHpbdgYrGQyALzkxtKhnjID33yT3nUbogSPWUhIcnI/KKF+qqTs J/OkYE54m3XJyQgeIEGKVB6A7R8YSCVTTuaHgMmo1CavLzttV/MYtL88PWWC/vLTFiCxhbqI2VS 7ayTnjwuFfp/jNUZcAkkc7cgBIwiUQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 impostorscore=0 malwarescore=0 adultscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 phishscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Currently, there is no standardized mechanism for userspace to discover which reboot-modes are supported on a given platform. This limitation forces tools and scripts to rely on hardcoded assumptions about the supported reboot-modes. Create a class 'reboot-mode' and a device under it to expose a sysfs interface to show the available reboot mode arguments to userspace. Use the driver_name field of the struct reboot_mode_driver to create the device. For device-based drivers, configure the device driver name as driver_name. This results in the creation of: /sys/class/reboot-mode//reboot_modes This read-only sysfs file will exposes the list of supported reboot modes arguments provided by the driver, enabling userspace to query the list of arguments. Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- drivers/power/reset/reboot-mode.c | 62 +++++++++++++++++++++++++++++++++++= +++- include/linux/reboot-mode.h | 2 ++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/power/reset/reboot-mode.c b/drivers/power/reset/reboot= -mode.c index 873ac45cd7659b214b7c21958f580ca381e0a63d..582aa7f8ed7fa485c5a67877558= c9b15d3600ef4 100644 --- a/drivers/power/reset/reboot-mode.c +++ b/drivers/power/reset/reboot-mode.c @@ -6,6 +6,7 @@ #define pr_fmt(fmt) "reboot-mode: " fmt =20 #include +#include #include #include #include @@ -23,6 +24,8 @@ struct mode_info { struct list_head list; }; =20 +static struct class *rb_class; + static u64 get_reboot_mode_magic(struct reboot_mode_driver *reboot, const = char *cmd) { const char *normal =3D "normal"; @@ -65,6 +68,51 @@ static int reboot_mode_notify(struct notifier_block *thi= s, return NOTIFY_DONE; } =20 +static ssize_t reboot_modes_show(struct device *dev, struct device_attribu= te *attr, char *buf) +{ + struct reboot_mode_driver *reboot; + struct mode_info *info; + ssize_t size =3D 0; + + reboot =3D (struct reboot_mode_driver *)dev_get_drvdata(dev); + if (!reboot) + return -ENODATA; + + list_for_each_entry(info, &reboot->head, list) + size +=3D sysfs_emit_at(buf, size, "%s ", info->mode); + + if (size) { + size +=3D sysfs_emit_at(buf, size - 1, "\n"); + return size; + } + + return -ENODATA; +} +static DEVICE_ATTR_RO(reboot_modes); + +static int create_reboot_mode_device(struct reboot_mode_driver *reboot) +{ + int ret =3D 0; + + if (!rb_class) { + rb_class =3D class_create("reboot-mode"); + if (IS_ERR(rb_class)) + return PTR_ERR(rb_class); + } + + reboot->reboot_dev =3D device_create(rb_class, NULL, 0, (void *)reboot, r= eboot->driver_name); + if (IS_ERR(reboot->reboot_dev)) + return PTR_ERR(reboot->reboot_dev); + + ret =3D device_create_file(reboot->reboot_dev, &dev_attr_reboot_modes); + if (ret) { + device_unregister(reboot->reboot_dev); + return ret; + } + + return ret; +} + /** * reboot_mode_register - register a reboot mode driver * @reboot: reboot mode driver @@ -83,13 +131,17 @@ int reboot_mode_register(struct reboot_mode_driver *re= boot, struct fwnode_handle u32 magic_arg2; int ret; =20 - if (!fwnode) + if (!fwnode || !reboot->driver_name) return -EINVAL; =20 np =3D to_of_node(fwnode); if (!np) return -EINVAL; =20 + ret =3D create_reboot_mode_device(reboot); + if (ret) + return ret; + INIT_LIST_HEAD(&reboot->head); =20 for_each_property_of_node(np, prop) { @@ -142,6 +194,8 @@ int reboot_mode_register(struct reboot_mode_driver *reb= oot, struct fwnode_handle kfree(info); } =20 + device_remove_file(reboot->reboot_dev, &dev_attr_reboot_modes); + device_unregister(reboot->reboot_dev); return ret; } EXPORT_SYMBOL_GPL(reboot_mode_register); @@ -155,6 +209,9 @@ int reboot_mode_unregister(struct reboot_mode_driver *r= eboot) struct mode_info *info; struct mode_info *next; =20 + if (!reboot->reboot_dev) + return -EINVAL; + unregister_reboot_notifier(&reboot->reboot_notifier); =20 list_for_each_entry_safe(info, next, &reboot->head, list) { @@ -163,6 +220,8 @@ int reboot_mode_unregister(struct reboot_mode_driver *r= eboot) kfree(info); } =20 + device_remove_file(reboot->reboot_dev, &dev_attr_reboot_modes); + device_unregister(reboot->reboot_dev); return 0; } EXPORT_SYMBOL_GPL(reboot_mode_unregister); @@ -192,6 +251,7 @@ int devm_reboot_mode_register(struct device *dev, if (!dr) return -ENOMEM; =20 + reboot->driver_name =3D reboot->dev->driver->name; rc =3D reboot_mode_register(reboot, of_fwnode_handle(reboot->dev->of_node= )); if (rc) { devres_free(dr); diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h index e0d3e8a54050a76f26846f456120b4c7e371d284..81c149edf40fbcf0d3427c2e12e= b415199cb153b 100644 --- a/include/linux/reboot-mode.h +++ b/include/linux/reboot-mode.h @@ -7,6 +7,8 @@ =20 struct reboot_mode_driver { struct device *dev; + struct device *reboot_dev; + const char *driver_name; struct list_head head; int (*write)(struct reboot_mode_driver *reboot, u64 magic); struct notifier_block reboot_notifier; --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 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 CD9D32FF65D for ; Sun, 9 Nov 2025 14:38:57 +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=1762699139; cv=none; b=jmusLAw2DpC1CfgECMkSumvLNFZegEs8iTQrOKycMUwz+GFzyGG4ZhYv4X0PxfwjjZH6t4aVYMzxAXV08uUlQbBBY2M92GKL5TR1Shrx2RdRm7FkLkqwh3IwLdzmZ3doBbzRTHtRl+pFWi1TKGABwaDiIhRT3JkyhJe7/haCbjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699139; c=relaxed/simple; bh=lD7kEuHLtxPB5/pfzwbQqcQgB967yAINPlEeVv9qg4k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YGqUkxDjLU7Nc6V6annNaHUKOmtowVP3eWEU8IL0rxYjEtLazUJXtcCK88kisvIRtbEJM1u3PZPEsweyzF+QOh80BDcOGHvjVdSQibIpKCSoO7Fh4Ejt2YSqHwHeakR7MLKvQyiURHkjJGvtxvXOFVYg+W8NYVIFPrGeK46DxG8= 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=O/U/5VgC; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MKeOnd0F; 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="O/U/5VgC"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MKeOnd0F" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9Dm9fJ491425 for ; Sun, 9 Nov 2025 14:38:57 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= ITVJjoF8oZpX6CH3gig4SV3VeFTPVCOpuJTI/Zh540c=; b=O/U/5VgCt0tVUGhi 1sTWsd8rg5gNFsb9YQ14KZGzk3An53UKweDTPlyyUGLwufyg6TAHWhCZ9t9ZzGgt rR2F6stJbxw/f0Trw2JuSHnXs2HwzKeO0l/CdTSLRKqeWptBDL9KaxJZ7EaBwlEH nvel7fBlaBbi8jhX3t3JPGpdZ2/JWB7FiNQHX/dru4O+kuRYUp8E/00i+NpL1yDk p5lOReIsheP0BPveaff9CQyU3Noof+MNQ6pmpuAGu6JsOj1JQ3z2WAMmVBkemyYP vV5LXSvDB2eg2jvIoAx2wkrgSXPLtKcGzse9Bks9iPCqlZKLEw0OhBEijK5fBbyc mRwVcA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9y56t6gu-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:38:57 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-29555415c09so26948605ad.0 for ; Sun, 09 Nov 2025 06:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699136; x=1763303936; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ITVJjoF8oZpX6CH3gig4SV3VeFTPVCOpuJTI/Zh540c=; b=MKeOnd0FOg8YEHDp2sqvCj4uVpXeEmb1auM44vad0//gKaEdxXSeCNO7Ky7Ob2CoWu OOKrO3PYXIooSRmjtZWcf7oaVIl3YB0fEzKm43R0EEU3j1zw8ZfnPSIajAVTF+OtFpgF AhUb9J4A5lM8G0+o/Krc1IB4TTspBdXZEwadvMVQ9ZYqgy8NG+8Hvp7zm+oiI0v+bi6C kvgxDmSdw+hLERTZ5zeUHPDgjIEnZDaDAQkW3l0r6l1Aj7qsd9qixlQY2kvKNEmOYpkB h2qJhYgtdvBb3o6OKqeU+62KWf49VdJkJlRTl3lPlwLpjW9dX1deRD6fvpTOvAXt+nlP HMFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699136; x=1763303936; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=ITVJjoF8oZpX6CH3gig4SV3VeFTPVCOpuJTI/Zh540c=; b=aFUUT+4ziosY3KCbR9HGWrAT+ncFzDufHWzxRWIqxN31XRZgUnoYcFC2ZTwJiV1JeW O7RWydEFgiMgk3caBEcc4CL1nLYWIsRuNOZlE55vmPNTSc1Pa4wnTnhJ8pUwo9TBnHJx drjv/7R36GbsoidUYUdz3CnhhsZFZA6WhcNOjWDyIC6/r83sSSrrNu/OUk7KRImpmt46 EtVTIHzN+n8YvUN0ay5bBYTQOp45blF3IqTUlcmyOfQj7oWqm9Do7WWvKpal8+6bdHtH QsP4/dlJcNdAcS7/ycLoM+sBNNKxlDa1VIURb6gtTlWrHAjj6iAKBDCag+nPuLwNUG7D w4rw== X-Forwarded-Encrypted: i=1; AJvYcCXtD33GIQkmlolAWG/jVfEZ0ry3kZ+CB+tjHdGkAApHBzdy33g4y3M0qs21cJ8Rct6+S6XfT8aD+dcZlaw=@vger.kernel.org X-Gm-Message-State: AOJu0YyysnEK6hRA93qkDM9vxSaApO2kxLyrUQXUQb0KHOZEhcfU55fQ 9NPcIrAuBeQnippguIhcuFvZl+McBiURC1kSTDaAgh6fA+wLdsD+650OngFvvqH2jINrbWsirGC LNeTLyQkZHWv0k2uVRxWml/jNOsHVov0qDNz647D+XXMVb/gnwEp37Es1QT/X1F9KQjg= X-Gm-Gg: ASbGncuGGecLA4q/0Qc49etF3DQ2nEx2hbjKH4ITB6HUUFHEFul4/G49CQZqIks2fHO EN3+six0CnG0EL5sMq9XRf1lYetvwECDgBD1dKtkxEJAfih1G4Wn2FSBNuKmMP6BoqTLgIXN1b5 kXdfW9XomXctsYQMQN1y6YY/NwP9p2DNiA95V5dnBU350efeHYFABKTNS697PEJa3kzW5fhGtiy DFHT/eZuIJ2lBlrvyb3zNWLsdUghYWLtGW7/5qTbXRQmtMCz44Chi7mIVydGGawQRqDDQMH3usj EWerUdGOcJrX6tP3CHu8aq1miblIFRnYcRi2m6kBg0OIkAtAHyVNOAr1+JMrrpyml00mnRnLF6e SLQj2iFA/p6ZHnAI8khcDy21igYADU1tW6bw= X-Received: by 2002:a17:902:dace:b0:276:d3e:6844 with SMTP id d9443c01a7336-297e56d88bdmr63591565ad.33.1762699136499; Sun, 09 Nov 2025 06:38:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH3UK3IxssuAt8f6Uf5qJF5IzeFnxGusDT91RpZ+I9igX3d1o15ZrL5lOOJz8dXAPHVZHqHFA== X-Received: by 2002:a17:902:dace:b0:276:d3e:6844 with SMTP id d9443c01a7336-297e56d88bdmr63591025ad.33.1762699135919; Sun, 09 Nov 2025 06:38:55 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:38:55 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:19 +0530 Subject: [PATCH v17 06/12] dt-bindings: arm: Document reboot mode magic 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-6-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Elliot Berman X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=2577; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=NXUaK0H1266YWuSrue+BtWJ+iZQFKGg3Cd3Y8xvw8yY=; b=IBO1GIE/u618IwCGMuCa43qSii19KTQHEGwFzpPwYdrhllUCpnl1RodmdS6Jqito7Taa7pZ2j zMh4i8pdHxiACinhu7JfTus6mkQ6xs8ZVE6UrCP7Mrbw3Zehfpdh1i/ X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-GUID: JZUDy5vaR1Gw34B4l_CCuxeDG7uKKq3z X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXwcigaZ4mT6SA 5zxD3u5kUdaeuq3v+Zk2OKRMShEq8MgCr7L4/2Tjwo1M/t7OWmhfLsumfhuF9uNwKrBubrYlfne yp51UBbRnlbMafxObrWiGOg8sU/MDVS2zbSmOGT5gYkpKseJ3U/w4jv8jHEBdZR0hhaa2MPdOqQ 0PxHo79yTPegcvAWA6RZp1DiAZZaPpiB+gUk2e4+BSI7zG9F7WbbO/Mm+3HXzP4QZZj6FLSscL3 MPa9nYKZzS/iPw5mfHXjZAhKx2ERGVqnse5+IFrn4Kg9ixU9/mO/eFT/KedL2WXajA/sUmYlu4G Bh8SLmimnpEVrrf+xb0+lTDE8Q4BjqmHwUkdHFmhwz5nZMfQ9GbagAbWEtisTVjpaKJPWO9e89K or1JXU7oExRlxXbW/3KMQYxaJ+sCkA== X-Authority-Analysis: v=2.4 cv=V8xwEOni c=1 sm=1 tr=0 ts=6910a781 cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=UInjrUrXc7y1C1sAkbYA:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-ORIG-GUID: JZUDy5vaR1Gw34B4l_CCuxeDG7uKKq3z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 malwarescore=0 impostorscore=0 spamscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 From: Elliot Berman Add bindings to describe vendor-specific reboot modes. Values here correspond to valid parameters to vendor-specific reset types in PSCI SYSTEM_RESET2 call. Reviewed-by: Rob Herring (Arm) Signed-off-by: Elliot Berman Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- Documentation/devicetree/bindings/arm/psci.yaml | 43 +++++++++++++++++++++= ++++ 1 file changed, 43 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/psci.yaml b/Documentatio= n/devicetree/bindings/arm/psci.yaml index 6e2e0c551841111fbb0aa8c0951dca411b94035c..5d4368d77d07e3340bb380df93a= ae31df40e2779 100644 --- a/Documentation/devicetree/bindings/arm/psci.yaml +++ b/Documentation/devicetree/bindings/arm/psci.yaml @@ -98,6 +98,27 @@ properties: [1] Kernel documentation - ARM idle states bindings Documentation/devicetree/bindings/cpu/idle-states.yaml =20 + reboot-mode: + type: object + $ref: /schemas/power/reset/reboot-mode.yaml# + unevaluatedProperties: false + properties: + # "mode-normal" is just SYSTEM_RESET + mode-normal: false + patternProperties: + "^mode-.*$": + minItems: 1 + maxItems: 2 + description: | + Describes a vendor-specific reset type. The string after "mode-" + maps a reboot mode to the parameters in the PSCI SYSTEM_RESET2 c= all. + + Parameters are named mode-xxx =3D , where xxx + is the name of the magic reboot mode, type is the lower 31 bits + of the reset_type, and, optionally, the cookie value. If the coo= kie + is not provided, it is defaulted to zero. + The 31st bit (vendor-resets) will be implicitly set by the drive= r. + patternProperties: "^power-domain-": $ref: /schemas/power/power-domain.yaml# @@ -137,6 +158,15 @@ allOf: required: - cpu_off - cpu_on + - if: + not: + properties: + compatible: + contains: + const: arm,psci-1.0 + then: + properties: + reboot-mode: false =20 additionalProperties: false =20 @@ -260,4 +290,17 @@ examples: domain-idle-states =3D <&cluster_ret>, <&cluster_pwrdn>; }; }; + + - |+ + + // Case 5: SYSTEM_RESET2 vendor resets + psci { + compatible =3D "arm,psci-1.0"; + method =3D "smc"; + + reboot-mode { + mode-edl =3D <0>; + mode-bootloader =3D <1 2>; + }; + }; ... --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 BB00B2FE06E for ; Sun, 9 Nov 2025 14:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699149; cv=none; b=Sehkgu/TCv8BerZh/aS1rKbq6UBQGXR+eggK+I1JwrZBpH+dhg3shPECQPKje2tdyvyfomeUWky20yY2sutHLjjYLS3NPa4PpvuDJRGYN08MsgpTyXJy8YoR8rZtZG59K8a8RW/Whlxwb5ON30pu/aY/JVdfCE3yv25kTAnZUPk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699149; c=relaxed/simple; bh=gOqHkjWgXv2eEhKUz/L3I9ntPxQxM5L+0g6CBUJNCec=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XdA1EQe0C5SPirmgHYFyHlFMMdiblZm3liTf7wq6+9A21I6GcidMjPVJm2yCD7YmlU3wsLn/2eI40JndzeUialuxo/Vjyct1q0/VfZijdWVY1JwMdj2WpbYGSeskbPQun4ZgT/USjPtU9oJsXlFSwnIp64VIVaDUu/3Jv2K+Q4Q= 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=BbiVJZUi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=hVsQdTd6; arc=none smtp.client-ip=205.220.180.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="BbiVJZUi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="hVsQdTd6" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A96csLo034841 for ; Sun, 9 Nov 2025 14:39:07 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= WbnFer6ISvtTqu+4JwESaso5mdco91wCeNffONil714=; b=BbiVJZUilltEG8Zc zmeH5i0vVOBoNszLCBD+ywS+JOkyzqGKzC9CKLGZcX8UtHhIIU/96uZnxyccgB50 Qap65XzJST1hRFANY2I+lFfNSyQVBfwH8tVJktlMWdfGLFk4SLPtvuXUTkl1uwV1 yp5z50RTpfju9/Iv4rQMXpq+DUjkvAvIndzAedaEDpsJV6qaYP2hYvJ5dDJOmJe8 8vyz/aKX9Z381xUf+YZmwFa+Wqkwql/Wbm+m0hAM4eup0tU4Bvrgcd7ZpM1ThXNh LPcUZP3jhn/kpo/q2nubUjtMgYX9PFVfR9DMLcDIwVy/Fpx3swEFKiMCGCgKAVnQ BlxHuQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xwfj86p-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:06 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3437863d0easo732435a91.0 for ; Sun, 09 Nov 2025 06:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699146; x=1763303946; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WbnFer6ISvtTqu+4JwESaso5mdco91wCeNffONil714=; b=hVsQdTd6220shS/D2Pvg0l14wxhyVe1dqKPVgzfK7c5WWukdR/4pBA3R78mAz+ZU4C YNpxJqgIK0DQzyKwI+K1ZywHMcvK+zrwBsUXhRJIig2l39aqJvBsKwf26dwC0Cll/0ok 5X3PumURCtZz/zy6+1l2jNlLV0IIdukO+cfZGjoCM8XwmHUHVjSQYYUowE06HffnM2+w ecX4GlyE2lANqspgeW7m+s28RCjOsMAQiX9P34t9heOHVP+PU5u9Ws/D/UEWbi5jV55z MBi+CYlKI6SZjlGT2AcUnRc67/KFDgoGAkrZKxmK5BZhvIXIbciDJVDJskYC/w9L9VKY 7e+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699146; x=1763303946; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=WbnFer6ISvtTqu+4JwESaso5mdco91wCeNffONil714=; b=FZkO9o6TQAJEpl91Gj2iFOVtH3Eq49jYT01czqAiIFvTwN8YegDpwY+1uXcTX2mPRb G3FMr4rvTFkng/6QLyovPGm7fam/V0TDoY1SwIeEoTcOAc/3EEL5lyci6Wt9PKw8hUeL IUeeAwWjGS/DdPdpw1QhQRj2tzxHTQH6FxyjEhl92JMpzmWr4y8+ngniJdrTYCb6aSqO AX9DDj8Nj5edMkfgpnGIN1SBhMsFIapcpQ7R1zLnlEyqmPNmvZtU/LvIFzju8KkaaI2w Pcev2Hnn1gFWh3aqrpyfJiKk+DRR0aETTsbvjfQXEwxx0Vu351Y1mZP+gVpHCtgF0k1P +IWw== X-Forwarded-Encrypted: i=1; AJvYcCXoTjVVDUgSy1AwkStZk0go37uXUwxYLbflTji5TxQTsD/d3haUKl+712WNQ0G9UXx+Q8G6KapgwC8xQSI=@vger.kernel.org X-Gm-Message-State: AOJu0YzX91IFfe4Wkk48RTPcRBdtDAHeZcR/Wzw2PtPM6+7rvnI25wYR a3TWEFo8B2ZosEGwlxyPUJw7VSpZoOvBKdp4tPDvl+IJI/ONaYbjbUlIjGwSwirAqsOw6D5tTug 2xQHZJQICsL2jJarZydJ4517JJW3QZDgSqdtqpIfRmMiz4Y4lZgTcZ+Dy+3cJSUR5tcM= X-Gm-Gg: ASbGncu41PH4ruaZ3Y8NeKbl8X9niUIVDRF5uJXWoCOQqZy4ICrrCo2LuzQHkeZjAA8 nwXz3f5FwZFz7uNbMKJd+A7ayYTdPxVtTgYYGBXV3O3RstMipwKI2NnG1ev649qv991Yy+Wdv8+ 90hMxeQJpQOPULaVgBVL8oSnn3ovEw3i9bkDkCUYJpBm3kXv6ctqoBvr/wwrMXgsbXKyz8FC7eY i/MF8a3zfNQjeBE7l+kP2ZQzUbmE5n+0stWgaE7YyFiH5f4/NTk33corriAMAcVOMGJq9X8Kqxy M7cx/pRQKUFzTMe/EK472pIiwo9x2giNzYereDzWiozSXQP+ho29m7rHWnPHwzPFsiPQ4jeDKQz 0qqu/++XUjyD9Dr643Buf4I3OtFYIGd/ZfFU= X-Received: by 2002:a17:90b:3d90:b0:32e:9f1e:4ee4 with SMTP id 98e67ed59e1d1-3436cbf7dd3mr7770299a91.17.1762699145562; Sun, 09 Nov 2025 06:39:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IG+2hAPMgXntUQ8yQpAM9+0XRennk8O6s10oC9AfbkmsdbrsxlwJ+Ti99rsp24Oev9CA5kAPA== X-Received: by 2002:a17:90b:3d90:b0:32e:9f1e:4ee4 with SMTP id 98e67ed59e1d1-3436cbf7dd3mr7770256a91.17.1762699144992; Sun, 09 Nov 2025 06:39:04 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:04 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:20 +0530 Subject: [PATCH v17 07/12] firmware: psci: Implement vendor-specific resets as reboot-mode 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-7-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Umang Chheda , Nirmesh Kumar Singh X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=6623; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=gOqHkjWgXv2eEhKUz/L3I9ntPxQxM5L+0g6CBUJNCec=; b=gAySl5Mi53Gi7nfTHC/n9Cy9cFjThjpNi4Fl76P3IZkKi+5Z7ZEaKFx674fCUd4LmoI19chi8 GMsh0cHnyyTDm+EsnJOkw8XO1J1k3Z06hT0DJbRueMK1Sw/ND3+PFyc X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-GUID: 4uid2RzprX1oo-4XKgxNDhBkjuREHj60 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX756ibELrBB5w 1MmbtSwkzOTGHeJsn7B23N30Ed29kYgjBXh+lJB4aFUhA4k8IJ2T7t93ehK5AUMYnQVTZ8pvAaI 4tDzC7/4r6pWogTScDive7mjd85SmFNeb0SlTB4bq0aM76v4PUuOBeEAauJmNkDJ2R5kTi719gy 5qEzMqfmzzzLLvav5rvKdahR4qMaNPHZveyKZEDw5t/9czL4+m2X3IcaEWQopmssTKMN0Bqj8Ia xkJnu5RRui/TSXdH4ixb5OUU7QNKlazJ77hrxDfiWtlN7sQxPXrUFC1333kx6t0qdax8IORXfp+ XxqvncxmxzS0hk4LAVjIs93qavuINL/Lu5bA5eSlSKNnVF083y7sUCi5b+FyrE7SwYYPt9B1ny7 hRZX5Pef/sZ9SHx/TvlJN2fskW46tg== X-Authority-Analysis: v=2.4 cv=LaoxKzfi c=1 sm=1 tr=0 ts=6910a78a cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=1Y-8vuCXXADn_sFn8ogA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-ORIG-GUID: 4uid2RzprX1oo-4XKgxNDhBkjuREHj60 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 SoC vendors have different types of resets which are controlled through various hardware registers. For instance, Qualcomm SoC may have a requirement that reboot with =E2=80=9Cbootloader=E2=80=9D command should reboot the device to bootloader flashing mode and reboot with =E2=80=9Cedl=E2=80=9D should reboot the device into Emergency flashing= mode. Setting up such reboots on Qualcomm devices can be inconsistent across SoC platforms and may require setting different HW registers, where some of these registers may not be accessible to HLOS. These knobs evolve over product generations and require more drivers. PSCI spec defines, SYSTEM_RESET2, vendor-specific reset which can help align this requirement. Add support for PSCI SYSTEM_RESET2, vendor-specific resets and align the implementation to allow user-space initiated reboots to trigger these resets. Implement the PSCI vendor-specific resets by registering to the reboot-mode framework. As psci init is done at early kernel init, reboot-mode registration cannot be done at the time of psci init. This is because reboot-mode creates a =E2=80=9Creboot-mode=E2=80=9D class f= or exposing sysfs, which can fail at early kernel init. To overcome this, introduce a late_initcall to register PSCI vendor-specific resets as reboot modes. Implement a reboot-mode write function that sets reset_type and cookie values during the reboot notifier callback. Introduce a firmware-based call for SYSTEM_RESET2 vendor-specific reset in the psci_sys_reset path, using reset_type and cookie if supported by secure firmware. Register a panic notifier and clear vendor_reset valid status during panic. This is needed for any kernel panic that occurs post reboot_notifiers. By using the above implementation, userspace will be able to issue such resets using the reboot() system call with the "*arg" parameter as a string based command. The commands can be defined in PSCI device tree node under =E2=80=9Creboot-mode=E2=80=9D and are based = on the reboot-mode based commands. Reviewed-by: Umang Chheda Reviewed-by: Kathiravan Thirumoorthy Reviewed-by: Nirmesh Kumar Singh Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- drivers/firmware/psci/Kconfig | 2 + drivers/firmware/psci/psci.c | 92 +++++++++++++++++++++++++++++++++++++++= +++- 2 files changed, 93 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/psci/Kconfig b/drivers/firmware/psci/Kconfig index 97944168b5e66aea1e38a7eb2d4ced8348fce64b..93ff7b071a0c364a376699733e6= bc5654d56a17f 100644 --- a/drivers/firmware/psci/Kconfig +++ b/drivers/firmware/psci/Kconfig @@ -1,6 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config ARM_PSCI_FW bool + select POWER_RESET + select REBOOT_MODE =20 config ARM_PSCI_CHECKER bool "ARM PSCI checker" diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 38ca190d4a22d6e7e0f06420e8478a2b0ec2fe6f..ff82e7f4c27d1609a75cedc3a97= 90affaf839801 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -8,15 +8,18 @@ =20 #include #include +#include #include #include #include #include #include +#include #include #include #include #include +#include #include #include =20 @@ -51,6 +54,24 @@ static int resident_cpu =3D -1; struct psci_operations psci_ops; static enum arm_smccc_conduit psci_conduit =3D SMCCC_CONDUIT_NONE; =20 +struct psci_vendor_sysreset2 { + u32 reset_type; + u32 cookie; + bool valid; +}; + +static struct psci_vendor_sysreset2 vendor_reset; + +static int psci_panic_event(struct notifier_block *nb, unsigned long v, vo= id *p) +{ + vendor_reset.valid =3D false; + return NOTIFY_DONE; +} + +static struct notifier_block psci_panic_block =3D { + .notifier_call =3D psci_panic_event +}; + bool psci_tos_resident_on(int cpu) { return cpu =3D=3D resident_cpu; @@ -309,7 +330,10 @@ static int get_set_conduit_method(const struct device_= node *np) static int psci_sys_reset(struct notifier_block *nb, unsigned long action, void *data) { - if ((reboot_mode =3D=3D REBOOT_WARM || reboot_mode =3D=3D REBOOT_SOFT) && + if (vendor_reset.valid && psci_system_reset2_supported) { + invoke_psci_fn(PSCI_FN_NATIVE(1_1, SYSTEM_RESET2), vendor_reset.reset_ty= pe, + vendor_reset.cookie, 0); + } else if ((reboot_mode =3D=3D REBOOT_WARM || reboot_mode =3D=3D REBOOT_S= OFT) && psci_system_reset2_supported) { /* * reset_type[31] =3D 0 (architectural) @@ -547,6 +571,72 @@ static const struct platform_suspend_ops psci_suspend_= ops =3D { .enter =3D psci_system_suspend_enter, }; =20 +static int psci_set_vendor_sys_reset2(struct reboot_mode_driver *reboot, u= 64 magic) +{ + u32 magic_32; + + if (psci_system_reset2_supported) { + magic_32 =3D magic & GENMASK(31, 0); + vendor_reset.reset_type =3D PSCI_1_1_RESET_TYPE_VENDOR_START | magic_32; + vendor_reset.cookie =3D (magic >> 32) & GENMASK(31, 0); + vendor_reset.valid =3D true; + } + + return NOTIFY_DONE; +} + +static int __init psci_init_vendor_reset(void) +{ + struct reboot_mode_driver *reboot; + struct device_node *psci_np; + struct device_node *np; + int ret; + + if (!psci_system_reset2_supported) + return -EINVAL; + + psci_np =3D of_find_compatible_node(NULL, NULL, "arm,psci-1.0"); + if (!psci_np) + return -ENODEV; + + np =3D of_find_node_by_name(psci_np, "reboot-mode"); + if (!np) { + of_node_put(psci_np); + return -ENODEV; + } + + ret =3D atomic_notifier_chain_register(&panic_notifier_list, &psci_panic_= block); + if (ret) + goto err_notifier; + + reboot =3D kzalloc(sizeof(*reboot), GFP_KERNEL); + if (!reboot) { + ret =3D -ENOMEM; + goto err_kzalloc; + } + + reboot->write =3D psci_set_vendor_sys_reset2; + reboot->driver_name =3D "psci"; + + ret =3D reboot_mode_register(reboot, of_fwnode_handle(np)); + if (ret) + goto err_register; + + of_node_put(psci_np); + of_node_put(np); + return 0; + +err_register: + kfree(reboot); +err_kzalloc: + atomic_notifier_chain_unregister(&panic_notifier_list, &psci_panic_block); +err_notifier: + of_node_put(psci_np); + of_node_put(np); + return ret; +} +late_initcall(psci_init_vendor_reset) + static void __init psci_init_system_reset2(void) { int ret; --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 64C9D2FF177 for ; Sun, 9 Nov 2025 14:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699158; cv=none; b=A3T6+MjDTETkczVDgkXtRQ4pv8HJGBKvDpP7EdiJtxIcCvBrY4DMnQp0KTdMl9fT8gddmfBKV0+Qn/UcLtkB26z6+4+auIUlb6ezv5pELxvmQSTdEJA3fHAkFFMd8b5XSy47UZjCvgm9vOvBuZOeJJni6xO32wqr4wNoSv2t+S0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699158; c=relaxed/simple; bh=UMYfdnFcEDl//CBNfVhkReoHQvijQL74vM5MXpvs8vA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DjmNSnIA/2cZTg0yJq22rXYQ/+AOCs9KbYBHe76ItjtsXiffHoPONMERLlEphwKQlQcwUl0F0fN5Rm77VivkfE1/is0rvCbSizCKc6fhxo7GpBKTaO5rtV7Ps+UAQIxAw0fFm/wA8C8hcy8GwO5BX37hu0jwrHbuO7fVumjETtI= 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=PY0hDFBG; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=StsmIab+; arc=none smtp.client-ip=205.220.180.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="PY0hDFBG"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="StsmIab+" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9AOQEC282697 for ; Sun, 9 Nov 2025 14:39:15 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= 9xzsLq6x8zujM+mSWgjjGh8I+QpYkRNwwRETPEDP6/Q=; b=PY0hDFBGvwSC/Zwi eQZoP7MaJFNlvAN82OowVKLHEzV8+xZVYpiffL5WlL0Nxs2NFBYkGvGJXUpIKKUs 6FaAtf5VqcPX2TbrYmq9U1JSvr1225VP/huhWBvQkIxjPy3GKfz1A/V9fzYR4B5J E78Tcc772JXXsVgdVjboP+R7uxLcJq5GmMpKdH+Ca5YfxN3wowd1cZi/WaoXS6Wg ZHgsiGko8Jp35Vea3xz2lvUH9xMYdC5gF+Ed2812Qh9vjBEncXHOJ7Icue4ijvUD 7v08VXreRAwwCdi2stgO3bfRQQtOmHbTY2cUxflaZU0pPEdVh1J6uUoRwD0wKFg3 pBEU5g== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xvja8g4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:15 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-297f587dc2eso9228095ad.2 for ; Sun, 09 Nov 2025 06:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699154; x=1763303954; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=9xzsLq6x8zujM+mSWgjjGh8I+QpYkRNwwRETPEDP6/Q=; b=StsmIab+MQbvCKmKPe7/w4w8g/z9pUxNWTbmy5Jcr7p5tfzDsau0J/Ks3XPq7J3bwi t00R5gFm9k7gSp4v8kGBlSHRGhfP0c+LTR6OCun2qKOkDnssXsO3WwdRNGLwrxXm3sO5 d/Js8Xngf0VrziqntGVocxA5vQDCX+K7r92jsZyyj1t8Do4ubl1npkPYkozCAJnEFHe/ NwuLa8kPKKqDXbnGlpPGyCaIAq+/VGD6vVjB3uS2mUYrz61uD+ePEuaPXyGhu4FJDwtk 8IeqF8GP4B2rEdCb0fBpvgccvL0iqoYZRtrnhXRudTl6Lru3V3UPBOo5lueuQtI5PJEY gCdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699154; x=1763303954; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=9xzsLq6x8zujM+mSWgjjGh8I+QpYkRNwwRETPEDP6/Q=; b=oukveAn+56Ijw1XesaymqdoYWfmG4ZxwnBVWQ8tTWKfDBVgTLVOyZQfNZxfKvG2p3+ LsE7KC6ebRO+5+hcxnPZwAjHkIl87uTJVtau0wVV+waJCBUXTIw9ynYG+M9O9bWleGb2 7F27Uj0ZCtOc9BMf98KiIxYHdrJ69uQ94vkIKmIa87OPIsXieAPbekZdL/cvUp/Yt1OZ Xa5OiHSSYR7/Ti9zf428dAc5zYRtxINiWtx++ZH9zTNgu5dmUQPP5qyHFyEnbPZfMhyI 3EesW2apHrUQWrFgQgvTAD0JREoT6RMpsDyHsgGxqV0gh4iYso+5TPnZc8ExRRL2OrAm 0XLQ== X-Forwarded-Encrypted: i=1; AJvYcCWCyFGKmg4D5OVHHXd8EZf4l1J5CwkIDI4wdUf1Aa+kFXsyXt/EKAq9Uiyxe9iNInosYXUNXhdoXfLKHCI=@vger.kernel.org X-Gm-Message-State: AOJu0YwFNU8VGtfv6ey3vQJflJsQPtP5p9pZEfgSbNugKek0LRHbSPe6 X/xEfj8Alp3EOXElsGbGO4dZcVO8JphjgWiWvcWUeQ4SQuzdPJ+6lfDVUqFR9wh6ZAo0BerTvVM yqkGsCTbkbVUIr1nPEwj36t/4xRRiiwiHaoohSt2050tGDtzKVfJmXvHXZuSVC0LXh5o= X-Gm-Gg: ASbGncs+YCR8E9S6DPvqOl6EIHZoe2QuedYHURVACzFD377dtTM6FtaiMaGMr454krv gxIEpFQcQzRs+/7bZb+/0e9PTred3ZwHzKHjAJD8K+mZtWP+TLmOjNx2t/Ajd6sQ2qbGzihOmow ZAa2jhFppesBqZhFNAHUMi82qb4drapqIbUfAYA8whwQOyDgIGUNumjLC+kPCFKqJVfqrd+IWN2 SvDvxSh1HExmlxQAhTU0DRGaWmJSpFunrnJpxJVDhqpmMQbKqo4hXGemq34oiFu58MYIUqPUOIe Egn+K26x78fF4Q8UFLiCP/tt2ApddaA9y0NekPpAIgz9IuIdF3qIc+i/F+IOArtsZC3SNOiL0xf 1tS9maYu6XFEEcsRbd7yPvPWm4BU+PFu333w= X-Received: by 2002:a17:903:244a:b0:295:59ef:809e with SMTP id d9443c01a7336-297e564e380mr69725145ad.24.1762699154320; Sun, 09 Nov 2025 06:39:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJIVsonHu4pNwPE+f7/331weZTNenlkh2Ar1ZXefNCwpSl91W0SITTJGiPOzgc2bETvAUx0w== X-Received: by 2002:a17:903:244a:b0:295:59ef:809e with SMTP id d9443c01a7336-297e564e380mr69724875ad.24.1762699153810; Sun, 09 Nov 2025 06:39:13 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:13 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:21 +0530 Subject: [PATCH v17 08/12] arm64: dts: qcom: qcm6490-idp: Add PSCI SYSTEM_RESET2 types 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-8-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Elliot Berman , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=1628; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=wPevfrKI7oCQBZ67FuK+Z4QMbgrqZ9zLXyhCmM5o3U8=; b=KRVfr1hd7m7qekk11hcXPHqyUxRtzdmozZcKhdaIrFvqaMzJOpK7PwGxYGG/pI/c4lZoafU+D C1C+I5ZDulcC10A5XnRAERkFZgYaryxMEbXGezaQxwhe1NO0r20BiqE X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Authority-Analysis: v=2.4 cv=QuxTHFyd c=1 sm=1 tr=0 ts=6910a793 cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=w06kbW2hXDg5FjFnD0gA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: Di7f3xx4cLzlPi4t5JTgesu44OIKgRZU X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX9M3cAB+3qxsg 4p3OPV0GJCoH7PUvKfzjpV7/NYLqunKPUTfktl3szKpNd9EbVEipemzlc/qCfgPIrTNSiuFvbYZ NguCAIxrhMlqC4Xk+cCDd5GuH2dyVnaHa0/GqH3B4AszNhkUo6dM6xT9YBGE4TqzGjEQeQ/BoOH og4uclMKPT0bar0g8o+PEwyTPyI09fI+V9ubasJF6PaQdZmrJ7ydINLaqc6g+kZKcAOs+Lf9c8s 50BrQAVQo9c9O7QpGq+GAwJlLYXUDUcbc/661iZr3GCACdANPqVFIeB0jUp+7sQ9uyXQh+idvQa 91sh/aswuBZfAzswCWFqLgKugImLHyHvCMuu2bc/BWcQdGcXFkuHBggTTXwxAefTFHwE9tRb1uh 54eQrU0JibRwOVLyRf5eduWcBnqXUg== X-Proofpoint-GUID: Di7f3xx4cLzlPi4t5JTgesu44OIKgRZU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 priorityscore=1501 adultscore=0 phishscore=0 spamscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 From: Elliot Berman Add support for SYSTEM_RESET2 vendor-specific resets in qcm6490-idp as reboot-modes. Describe the resets: "bootloader" will cause device to reboot and stop in the bootloader's fastboot mode. "edl" will cause device to reboot into "emergency download mode", which permits loading images via the Firehose protocol. Reviewed-by: Konrad Dybcio Signed-off-by: Elliot Berman Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- arch/arm64/boot/dts/qcom/qcm6490-idp.dts | 7 +++++++ arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts b/arch/arm64/boot/dts= /qcom/qcm6490-idp.dts index 73fce639370cd356687f14a3091848b8f422e36c..84322b74917f3a70adce5a4182a= dfa5d787ab11c 100644 --- a/arch/arm64/boot/dts/qcom/qcm6490-idp.dts +++ b/arch/arm64/boot/dts/qcom/qcm6490-idp.dts @@ -695,6 +695,13 @@ &pon_resin { status =3D "okay"; }; =20 +&psci { + reboot-mode { + mode-bootloader =3D <0x10001 0x2>; + mode-edl =3D <0 0x1>; + }; +}; + &qupv3_id_0 { status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qco= m/sc7280.dtsi index 3ef61af2ed8a87d03e82131fcd8848f0a1bc509c..5fe7a2220e1dec3b5cffdf151e0= 9553d54e27960 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -858,7 +858,7 @@ pmu-a78 { interrupts =3D ; }; =20 - psci { + psci: psci { compatible =3D "arm,psci-1.0"; method =3D "smc"; =20 --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 C13552FE048 for ; Sun, 9 Nov 2025 14:39:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699167; cv=none; b=iawdIiHXso11mhnhHQokcpGqRGAxOZObPITytDm/Gf5DvpVJ8eJHDZKZHjCBb3Qptzao+l1H+EOxkZC+oE23uSEszWYUn1BmAhF/x+EydBtQzhZPkcP5Mspf+r++ZWiuvzK8zX6RreI0eu7158W+cnp3dgN+4m7hcpcDeVASTKE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699167; c=relaxed/simple; bh=L5z7An1rQfRgBI3aAbZ9RvjHkAJiYPaDq4L3GKStdk0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p1g61RODKECyqd67TdJ6ZF3FOEZ7dHWOqs9i+dME/hbiW/guHXJHPAKTfazK1d7/7v+Rw6LkfLnDJhSxba3DqaHKVDEGMLFjilMOVhI65UocA5vU3MbZrymQMQhG8RP3LUuFt3IG86vtSgBP3eg+lhR9N4qadx3yRh0HpA0TkrQ= 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=Qulzs5RI; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jZgiIy2o; arc=none smtp.client-ip=205.220.180.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="Qulzs5RI"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jZgiIy2o" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9B2OLF557920 for ; Sun, 9 Nov 2025 14:39:24 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= kca6TC9CdzvVOcI/VsKM/bsiay1QMyWDYIKPAfu3ShE=; b=Qulzs5RIIcnCNQvw 3YASa0XskvbnqqKy9Et5ewjLMICObYe5WyY4Dp9KLZDrt1fKTRPPJEVoF+hKdhnt 1nVtb5sLIeeEsMQQs+OWfbBzB2L8tzmb9g3O+ega2uaFOsQq/GL0G0CrXp0NUdmE CU0hQj4rvUY69jpAJzSa14a5JbXYJt909h1ZPYHQTz0Lmb52KCiToZkj8gG/6ufp ueLmRn13RSa+g6vU/HD72oV0TCUjkXUWnjkwQPTU2PgtKwVJUKmTAGO7gVmtgkHe H0wZejM89vC7pojazs4Rq8swLhC/zCNkrxchus3j37ug7KIgNnp3YLDsW57qCyr+ Ij4Iqw== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xwfj87f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:24 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-340ad9349b3so5696701a91.1 for ; Sun, 09 Nov 2025 06:39:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699163; x=1763303963; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=kca6TC9CdzvVOcI/VsKM/bsiay1QMyWDYIKPAfu3ShE=; b=jZgiIy2oAs2ilqRqsJYytbJsNvkw0Q9vCB+5tDijCJxacGoDk+8u2+mK6upMG1fXRv DUxLHp/iug9IihWlmd3dNMHVHHDd7XMVO+A1nEZ0Qd2Bahiutb2zQ4Fr/AkamhvyhCpa 0r1Fv7P1P4UUwBoyhdp9YMrSH5TdiPCAvUl8l6ZgN/AVuVx9mt5ZURSnBkz/QKuqm8F5 7M/9kryJsOej60g7FLDP91onY75cg4cSPLOYsBzYPxQK7XgP6X8INUWI5Wc7IVHGbrdd 1dlV8yQVRt/NXW2iLVHIrj+U/u2G415OV0+gXdGKPoX6tpvbIh3O03CbWH8yxjGp2zNz W6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699163; x=1763303963; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=kca6TC9CdzvVOcI/VsKM/bsiay1QMyWDYIKPAfu3ShE=; b=Q9jmyRsk3+srpMDapiMWmTDm1C9w1wyraj8ZxIMukognpzMNf0n8owSytmEjfY+DDC CJM41liB5f7XerFqUH3spU+vGKCh4AczHmgtOWvQEZnNC42QPT39OvI5qhbvPj+aokEg e75HYqOCqkPNabyB8WbDAAgLc1A4dlkpbdiWu2MnZilEI2zDm8TY3AIik6/AIOBykHTe hoG64HTnXUO3rgb+v3pY0CJhsi1p+0c2zRJdTsEqZOebLmiW22hCfX5suCeWXBZ8y7D2 W8N0MehkLEdFgvJeKcU2m0yTwCjf9/0Sa1uK3OV0HmTYpB1kCt+cXlplOX7Pr1wOKY10 4Zyg== X-Forwarded-Encrypted: i=1; AJvYcCXfgrYJod1nbv+IoAIoby4YGbFEVdzwAbh+AuYCHYr9IcKHeHg/P2/3r3bEgmNsylfm5gZObumgClnjxZU=@vger.kernel.org X-Gm-Message-State: AOJu0Yx5yAs6EuwFCj0reQMHMyVcPOIyTs9rsZwzfBRsE9BNFYSzKaU1 MfSX3hiDqb7OEeRNPIqx5aHDBHNEGy3pto2zw0uAwglNgVxijpBZUZjPRggk31GPonz9cGea1PE cTnJ0P+hzLHUQXfLCvNRBqpHcRvzdcL5obL6WD8wHPyA3iUp2U5ZBNteGy+RgqnFUHdw= X-Gm-Gg: ASbGncuc73G1CXNmYYtho313EQxcXJIbwCga9TzIcLSK+Kw2rmZgdu8Ltp2jgm3GrVj CPWtrXKtqt1GI82A63qFnAS5MLCVwPj9Lj0MpH7PkqcC7CwODtdxQth5wMbeaKPYwxwlcn+RFl/ XKBEF/DpQyaWMqlaT8y362qjrdJmjvw+DSe6v41hqF82vmppM4qlhmTnEa1r6tQvX0IWGqfb59m Snc9tG1HLvdCiHMB2IhCnG31RNT93F0kcZa0tOx1tczDn6k+xt2Kq9vgcvfMOft0xjGu5iRiYu5 L1+m7ZctQ5b/s1J7RfzZR0AN0YXdds2wK/rXESmgulW/HXa6i26C0IU2TV20q8s5yMjlQKySteL Z89Gkd0ipfjdMod9WTAAjQcfnbvfhaGnR/xM= X-Received: by 2002:a17:90a:e7ca:b0:343:66e2:5f9b with SMTP id 98e67ed59e1d1-3436ccfa18amr6671639a91.24.1762699163436; Sun, 09 Nov 2025 06:39:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHVvyQ7Ie5qv51GMyMWvjT+5IIfkhTgU5ORFWh8Z2JxruCZKThIUurXvRJ2KKFN2TNS6U0/pA== X-Received: by 2002:a17:90a:e7ca:b0:343:66e2:5f9b with SMTP id 98e67ed59e1d1-3436ccfa18amr6671612a91.24.1762699162859; Sun, 09 Nov 2025 06:39:22 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.39.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:22 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:22 +0530 Subject: [PATCH v17 09/12] arm64: dts: qcom: qcs6490-rb3gen2: Add PSCI SYSTEM_RESET2 types 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-9-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Elliot Berman , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=1185; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=aXB/ZtnzKwJgS2fh5ZS7UmEMWdC2tYWUu81bgPi7sZA=; b=cGRfGGTemz5mYMnHzcIsN7x+3Xmr9GhPgiiKRvGsHEkgcZwXovPN8MabUz5/JPID3VZvw/NR1 ZRO8BE+Wor7ATT2oXZpYWQAGPs+8aDB6Tz4FhHXDk06RqE5h7lgvJnC X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-GUID: 5b3LiIuQm-ndp8K-J2zrPUJP93hNSP9V X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX7yTPyIsQbxan zYaQqrtGD/R8PNI3vkUFzVWC+Kisj27pBqvsUiyIDpfSPB59E3PbU3gHEiWiDhIyQ4pE8IYcJv/ Qaw4sMUZXOLfXn+IO1BiS2HHojW2ZlIkMhh0F5ca8WAXNNdcx5/LCuRCZLQl0hO+R6xscbHh8ai 1mJM6RMZ+Q6bMJ3ox1sNX3MWYBESJ7fgFjlMQ6ErIgZrVDmGQ1BXdMlI+HCbUOKfDFyoFKF4YO4 KHD1QeuCXHw/jOduJOF0XNRDyl86gCKRrNRENfFEt+XRIzB8RNyEnTzatvRDmS5BAODy99HlVnQ wEP2yK8lGo2lw2A03rQzKZT8NVi/wYt4d3tNsOL/Zm+qhv3Ytdnn/emB8X3LJRKQ5YGlSkW109w kJG5jhGaFiqOMMghUxyKRx6xMAu2Ww== X-Authority-Analysis: v=2.4 cv=LaoxKzfi c=1 sm=1 tr=0 ts=6910a79c cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=w06kbW2hXDg5FjFnD0gA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-ORIG-GUID: 5b3LiIuQm-ndp8K-J2zrPUJP93hNSP9V X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 spamscore=0 adultscore=0 suspectscore=0 bulkscore=0 clxscore=1015 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 From: Elliot Berman Add support for SYSTEM_RESET2 vendor-specific resets in qcs6490-rb3gen2 as reboot-modes. Describe the resets: "bootloader" will cause device to reboot and stop in the bootloader's fastboot mode. "edl" will cause device to reboot into "emergency download mode", which permits loading images via the Firehose protocol. Reviewed-by: Konrad Dybcio Signed-off-by: Elliot Berman Signed-off-by: Shivendra Pratap Acked-by: Mukesh Ojha Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot= /dts/qcom/qcs6490-rb3gen2.dts index 721a26d49ccaeb1429e2cc1c3a5c8d9517da3be6..cebdedd5d614b9efb6dfbee91dd= 67f3c3e322a38 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -935,6 +935,13 @@ &pon_resin { status =3D "okay"; }; =20 +&psci { + reboot-mode { + mode-bootloader =3D <0x10001 0x2>; + mode-edl =3D <0 0x1>; + }; +}; + &qup_uart7_cts { /* * Configure a bias-bus-hold on CTS to lower power --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 7A30F2FFFBF for ; Sun, 9 Nov 2025 14:39:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699176; cv=none; b=B9xFIHKJoFjReSdyUAX2mRM5NV5xwL+hdayGjYQj7me6y1W0gs4xgY13sCLIffbZPKYFabLa8AZLa0+PezJwDI1QaFf9bCfVyn6+vI7/DDNG3u4AAqaXHKbjaW2ht/XwuFRlSz9Fj7IVKGI9Fdct0IMwu8VoBGNb87UDhpes8DU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699176; c=relaxed/simple; bh=c0sDk7nE0BsMGILV6gAFYqW71r5wB3+58FpK7/a/qxY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m10uIJ+2HE7uMxofnvDr2HTyH1rBGaKfWFWRsixAxl1SbAHNf5KW7slBWphCShUQxhbGzrWF3/rA8IqRXcEVVjJ09Y7Sn2zmzcy3yo7QQBzzILbKOI8YUFqgUhWUW6+AXPYocw/k60DThu2oAagB7gm9fmdFCRVL2Ec/wBcV6nM= 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=VgiUOEvV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=RRCzDD2r; arc=none smtp.client-ip=205.220.180.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="VgiUOEvV"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="RRCzDD2r" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9ERXrt808763 for ; Sun, 9 Nov 2025 14:39:33 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= AukN+b68F1iRj8szvnom43KeenMjLq1Gdzm80qeFQxk=; b=VgiUOEvVyDsP0oiU 6O6pBDoPcx6kQ/cDcQH5U4M5hCfoGn/3vBSxJGIIidIdGAuoomIaeCnJMoGBPhNc NIrZmhFwcW0JtpWHxQ44+Go/aCrrpxLbEJIFy22SRlqxllY9/cAGmuycF8KSYWMD 1s8aL3nlivCdOcg227EsfW52qrCfsMHuHa5b6ZbZSfUpurDl7opwxemavruSykVb X40FH6Ov+Rg6c3/XWu47aU1VBpv3Ic/9ra6oVRyQNnXTVqxFRUR1QmXW6gzmbkfP yeSmvtl+uXIvhYii/2gu5Q+LD0GkC3au7aJCUrvM3BFQxvSN3Vr4TxhYCl0XcHmq TRz2wA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4aaue0g3gy-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:33 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-340bc4ef67fso2482543a91.3 for ; Sun, 09 Nov 2025 06:39:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699172; x=1763303972; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AukN+b68F1iRj8szvnom43KeenMjLq1Gdzm80qeFQxk=; b=RRCzDD2r61YkYdFAERCKNj+xiaMA7yOC1NfJbNHgtCi2Oa1NLNCTXnCM5Pv6i7yyka 2gXdlPCHb3kHUyFNMHBiKLjVje/H3KBJuHEHG/C7Az7C0udoxtHbcDdOQ4okodKYCg6h VBUF6i6XArahiXPZ6VFAWH0Yb3n6aDCXoEFEKGvrKMughDtZR/tiQCcXmo4Zqaspu/jf sF1v7Q99mfbMPcRBQDrgwPsiBSgoIl0Ia0rJsG1bOJq8FVJ5OCiceO1aUL0IHKzDmd5h 6Sh1kLFLx637xOIrvssUjr8vOsr9SxBsmU30GRVKbwhdyJOYyojiMfz3iHu+KyypBjsP 75Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699172; x=1763303972; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=AukN+b68F1iRj8szvnom43KeenMjLq1Gdzm80qeFQxk=; b=SlVgnY3KLKXrlfStd2PjKK/kYvDDWkouVypaJJEvgFX8hUHSkt4MZ3SSsSkVcQN3qW bpQ9X61d8KPube+34FUpzwwa8QRvJxee5JEl8MHl+Nh92Ybp0mEeGggyHp+MPlKdRZKp TMdx1lgbK2yeYS/YxIX76fkRMu7IGmnfu9BYakAozxKCqLjDA7NJ3Py5OoUsfKSD+IpX F6emEH1Ta6FKdYSq7S40w0JhVWSjFc+d/2Cn7QXqg8HVqEHIty/t/9TUwPAm9Gl9A/jF ArORR4LbqszsAyXfyhbFvc3bj5Ckr0qquHLZ1l5zTR9JKeTbr4c5dTdPLVxN6EgnPCei QvBg== X-Forwarded-Encrypted: i=1; AJvYcCXTaMeob29DYpMNJWnknvhWZAdiyBS4qoeveJky4RyfJwxwdhZKX83GqkgvKcH0ekKqj+yWSej0w4WFlTQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyM1se240hvStuXTlLr6KNZ/KF7FL5T4JDsiQ82NLzpmzvD8Tkt pwDjUt0t+NasqZnBkkx+yLQo0sFvqdNkogVRJU9NE4zHv3dW9W/0mIZQcLsqkQ6zJpumefIqk7b Kz2H7AIAPTdgdnYLQl2pmOM2Z5VPZW2pUkToUS/UbDUVlbcBWZNyOfzE1YxbgNmIp7paWHjYZkQ U= X-Gm-Gg: ASbGncvwCr9oVIQKJc0dI6VxUAF0/Cu9r+s12PI/Aggw3GkGFOieV5XATld8J1CBAuA uvO/GUQ4bUpFd7IAxSmzS0kRbT7r0Z4G1HfXqZe5iKleGzo3X5l4D2MB5VpG8ahZzE7oX6dyS3F LSdhYlZyyN7Yl6+CYZlA2OTgHyrnRFNBDIbFvug/w4nrN+dpEPUG93XPdgmoE3ilKr1FGCHl8he cwh0jGI86s0W9vKQc9vlZkQZBsRqn/d+JI4/AJqs8Q4eQp5OnG3NbiRnl5hzs9E/adljUHR9WLM PSP60AXtsCsvfMDqHpz8bE5g4mOAvkGvQgubOY0Y/YlDC5cyZ2Vi1de8T1lpraPCg22NCVvGn/i JMIPF5xwt130bN80aD8ItNC+o/2LHfRL79Vs= X-Received: by 2002:a17:90b:2d48:b0:33b:cbb2:31ed with SMTP id 98e67ed59e1d1-3436ca9af80mr7084178a91.0.1762699172275; Sun, 09 Nov 2025 06:39:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKmUKmAO/5YNNJQCK9WyTgSA7HEo4zvTBWQQYM60M955N7ymLGX8tiEKVtC08gIxpgP+mmzw== X-Received: by 2002:a17:90b:2d48:b0:33b:cbb2:31ed with SMTP id 98e67ed59e1d1-3436ca9af80mr7084148a91.0.1762699171725; Sun, 09 Nov 2025 06:39:31 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.39.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:31 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:23 +0530 Subject: [PATCH v17 10/12] arm64: dts: qcom: lemans: Add PSCI SYSTEM_RESET2 types 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-10-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Elliot Berman X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=1108; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=c0sDk7nE0BsMGILV6gAFYqW71r5wB3+58FpK7/a/qxY=; b=Mz+dwUU5jjgSzD6eifvT7KiJQzAbIaiZ/S841YqDDe6M8lFmUBSh7CQIbRvQr1GkfZsQfHygp 2lejprqAIqqDTRobgFBQ8CGm51ZyS/hsWggwRnLthv1chZL9MjYDNJJ X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-ORIG-GUID: Gc4MvjI-l4CTeE1vo2aN69fiSehpzIN9 X-Authority-Analysis: v=2.4 cv=BfDVE7t2 c=1 sm=1 tr=0 ts=6910a7a5 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=Ld_RF3OM1xByVwKNVVYA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 X-Proofpoint-GUID: Gc4MvjI-l4CTeE1vo2aN69fiSehpzIN9 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXwQ8LJy0Zb3Df yISi5o9NtXcpsepbqi/Zs7agD0ktYa1hFdXovuaGkU04o++8YGpW/xaDQ6CSEB8IcmQgdZlW6HN EgMqtJjv7KQpLU+Ra84wyNs1LDIcawsFFqna2UPQxipWIdnbmZ4pYxn0jrwu12wOzYLhuTSpQCk eKmROnPETf0g6MG/q2MNDr/y6vGw/QNlMk1HDe2rd/9GjBmJcCpvaTdFcFDkuXqphjqcU8GHv8Z QnAiDQKcirPJcmfI5Vw11g7iWRqBvM/hLQvYpM+Z15Y352AbZmW78MntS/RGZDpQqFCUT/HGY/3 0rtTScXNwTQNxggp9AKJbmbIB0sIl3/md4RucQmOVt+gDAu2KC2LZkgo7jB3Du+DA1baH8yJQ9q HHaYS1rAtX9g23b7w/3aVVuGCgt7Ew== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 clxscore=1015 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Add support for SYSTEM_RESET2 vendor-specific resets as reboot-modes in the psci node. Describe the resets: "bootloader" will cause device to reboot and stop in the bootloader's fastboot mode. "edl" will cause device to reboot into "emergency download mode", which permits loading images via the Firehose protocol. Signed-off-by: Elliot Berman Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- arch/arm64/boot/dts/qcom/lemans.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/lemans.dtsi b/arch/arm64/boot/dts/qco= m/lemans.dtsi index 0b154d57ba24e69a9d900f06bbb22baa2781cc3f..8b594a6535199b38ab6ca432673= c4a9432c0df39 100644 --- a/arch/arm64/boot/dts/qcom/lemans.dtsi +++ b/arch/arm64/boot/dts/qcom/lemans.dtsi @@ -698,6 +698,11 @@ system_pd: power-domain-system { #power-domain-cells =3D <0>; domain-idle-states =3D <&cluster_sleep_apss_rsc_pc>; }; + + reboot-mode { + mode-bootloader =3D <0x10001 0x2>; + mode-edl =3D <0 0x1>; + }; }; =20 reserved-memory { --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 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 10F192F9DAE for ; Sun, 9 Nov 2025 14:39:42 +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=1762699183; cv=none; b=KUFWSIu90wboX3fth+sZwg6oe7xOoPPwPbJZaAI3LZqhsQ//pDKmY+H0KeKo82O7sSjAvHWc0V4S2UUCul71CHrmj11OAAvFH/uQCS1SBzwaKgCzM+bHIUzkORN268xC4DBQls4XUhpiUaxb9biHE25RSGSPrz1ApNwRs7I+nj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699183; c=relaxed/simple; bh=R3MfvFc6/bdQVm4YlgZtmV6Bl4EiIOJCDZmSi9IVDL0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gjUG7bFfUMImXywMppOuz+G3U71twf3surxkq+F3BEz0SoaouGPFYVpHI3YVVSf/Q9Kb2F6yfhX/Dt3VVoOnxzOsNCiE1hP3wEzQS1oK27rv6uWiudfsuD78fm9p5ZkfJFTjbZgCosQqomsSZd1k/YghbhmA0zS5ForCZM3SBKY= 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=e34DRIW+; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Q7AdMaA2; 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="e34DRIW+"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Q7AdMaA2" 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 5A9AwN2I212836 for ; Sun, 9 Nov 2025 14:39:41 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= jDT1n8ZxH/CHdaAziXcBd4tY/Cun3ebrWgj6oFVzywM=; b=e34DRIW+aFKLkVZ4 s8Nc6Xk9e9BU8glO/nSdKMY9s8rDlZxpTZZmwOL/PF2/hFKRSJS3Zj/PeUyc1A90 6epxi4DWAezhqN922U3NX78TUMaX1dSFmaHa2N0CZ24/rok/J5dmA3DESlXAH2k3 RBiRZoM70tctillhPKgc4q/D7HdJ/bXYnqmhnMLlCV6PYcO3kBluaZ4302ikSwPY giOskXUhNI7iBqf9e2Cq3AVFcSWfYRtrv2jqP3QNs6lSgZ9o1UipD4vLTJuCqNnU UpWsBtz/7LPsro7f4Xo3pUkTpNHzSkNCgXLQMqgXJjV+zrCXsjc7/dZoekeE0ZIm ZMkdnw== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xw6j831-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:41 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-340c261fb38so4789399a91.0 for ; Sun, 09 Nov 2025 06:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699181; x=1763303981; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=jDT1n8ZxH/CHdaAziXcBd4tY/Cun3ebrWgj6oFVzywM=; b=Q7AdMaA2Q3SARml+tgAUYhzuRjD4aSs7hrJCn2Iwn42eoGhgQVChZyi0N9bXaobUGf ZUf/k+L4e8uC0SJPhjJ+pHwV3FFv42DJqs0jjdjkBd6rfvRl8aQDv4a+acXGNVOgYwDN Cp37xBs7q2jleZoE1q291TDv2gDy0KZSbpK98+5WEzfwy6xePMBqjeqYNT7y93Es1kcg 5B4BhGYPMhqbArCMgvQ9t6v5wFg8nmxvDUqSPZxc/n51WDLgjWOgW9yMIOtDWG+ty05t DrucKKmoo2jdU20RVLRjFh5k7emfHl98ZGoCeDpyYj1DQBE6nyY4bBjLv9wwpG+59ef4 quQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699181; x=1763303981; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=jDT1n8ZxH/CHdaAziXcBd4tY/Cun3ebrWgj6oFVzywM=; b=aNnPorX0EmzMl717BfJkKrANZQzGP4hQOPpFMfiPmQ8/zy4SlC83y405a3jqr5/CqZ fk/Qo9rnXQmSb98AfroCKBYhVY9NIaGKu6f+4Hz7fsW0vVBf3WRu3m+wIl/r6Ngiwly+ sJVHxPhS+XyeAaQT24cGVC347cxrvc8rJ9S9RYajbWUok69Rfjz+ZOHwlOjuBKdoJOSl PdXodRFVELNrTXh4vYp43L/4OOY9AveMAMbq5fHEZ0+M8OR/SWNMmjAGu8bl7VFkFnTG lW5o5r8F6LGZwlxKAUwtFSj+WrZXZ8kZCmCwRY9aw0JKOJ/YO9LV219Kg2iBGq9cQmPC 3BSQ== X-Forwarded-Encrypted: i=1; AJvYcCV3YFOcuYmi8EhaFxzgOgxmsBMBX0S+CQrbgcmQWfma4LF0f95fM9VPei2Qx4IABdEMqOxtpldeCqMdRI8=@vger.kernel.org X-Gm-Message-State: AOJu0YyEqqvD6LZ2o9iq+h3Mn3gyqhVA9s2UphLi3Dn18P3TaAKasMpc VW0EnIMpbIov8TZ5uG91/fFfYYZvLJj6ANKedMVMZ3pDKo0ygQtPtaOE8jvcxTOu46M8Q52X9V3 TWfWq9m5VEtJ2NxpOZr09ycrjx/hEppSVayDX0yf9U1/KgftbAfBhcD+otLWp7D0AqWM= X-Gm-Gg: ASbGnct7JeLU+wOjcAcgqgDRKOdMdkveZT1utkCesbOwJCQFWEh3sXwWv4w26g1bRj/ yppbdBA/xbthyeAkLYxWOtcDTLu2dy37ogcz29y5ACagd8GjhYDR+efZ0mZJfKid7slDdRWeR9b aX6iIMc2roWdrVfQdGHlMZcu1jRGxVQkqUykFmtLh0W2nFX3SeuIHUBIbziZffHKfZCsa5uyN/h 1qzT5hJRRHu9fkVn9AlMivvfcCp0xXScvFAhceGny5uToIwYsAAEbaTbBip+sMpgib9AmX8Dw68 e/HzLSftKR1VsuwQIOOXSK/BlyIaSb8vjRaxOA8kX5TQKLegzhGScwNwGWtzDwlp3LSewUPtkWC m8XiJ4WogPJzOaXciRgw5KVZByIaLjw+WZao= X-Received: by 2002:a17:90b:350d:b0:33b:cfac:d5c6 with SMTP id 98e67ed59e1d1-3436cbb25dbmr6963965a91.29.1762699180824; Sun, 09 Nov 2025 06:39:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6UGkpZ4ivllNU4v/AEheb8P8LWmWGO/LPwOkhMrFYsVmL78fLA2Q/qPRznueCahMEJJH/RA== X-Received: by 2002:a17:90b:350d:b0:33b:cfac:d5c6 with SMTP id 98e67ed59e1d1-3436cbb25dbmr6963942a91.29.1762699180337; Sun, 09 Nov 2025 06:39:40 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:40 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:24 +0530 Subject: [PATCH v17 11/12] arm64: dts: qcom: monaco: Add PSCI SYSTEM_RESET2 types 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-11-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=1031; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=R3MfvFc6/bdQVm4YlgZtmV6Bl4EiIOJCDZmSi9IVDL0=; b=54E+nkd9FWt/08GWunbAWGMeVDUP+hEKjK6dnGVejbyt3ewl73JQ0q6KHba6hNUtkGN94xIJx gASkoJxb9eNBoqbLVNq8Vr238KihsIdXNm9JRx0AE+SHqM4+zqIt2vg X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfX1GD/N1AYuGqk hf9WPvA4+GMnu1G1I5RFX0dULC3XVb4gTpcCLVXE9q29GEyrCBMhc3EIx+k05ajpEVvgmz6JUk+ YnYGHh4Cd2cfFbt5MB8G6w3IYvkWztyrulnyl+7Cq+FFnvfNv7xZXvM/XUaM2FinvjRQvaXAwxX 4LtL/E9m5bCR/A926LcSvXj0aPj8LPlMXGKDB8SF3T8eBDZvn1YNoofd3WnQRN9ENmkGIIjqBbQ ICA1e2AsH1KFjsVRM3TJKtBXfc3D/gp5xobVJnzGBQ+j8FKBsquMyMCHyrLjZN2ehsiLoTh5Afx Lv4wNLdkJP3osbQ5zXKz4erMm0g+k6hXhSWXKGJZg024I6pda2OtT7A+rChfAdCMVLik+B8V8Xb gokbjCaOUPGUyR/NgI6/HlCSl2F/EA== X-Proofpoint-ORIG-GUID: Z8Os_YuVJcsbWDD65lXVPEISHPIFZ9Ee X-Authority-Analysis: v=2.4 cv=cpmWUl4i c=1 sm=1 tr=0 ts=6910a7ad cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=_PJuSq69R3b4qrRYkJAA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-GUID: Z8Os_YuVJcsbWDD65lXVPEISHPIFZ9Ee X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 clxscore=1015 priorityscore=1501 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Add support for SYSTEM_RESET2 vendor-specific resets as reboot-modes in the psci node. Describe the resets: "bootloader" will cause device to reboot and stop in the bootloader's fastboot mode. "edl" will cause device to reboot into "emergency download mode", which permits loading images via the Firehose protocol. Signed-off-by: Shivendra Pratap Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- arch/arm64/boot/dts/qcom/monaco.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/monaco.dtsi b/arch/arm64/boot/dts/qco= m/monaco.dtsi index 816fa2af8a9a663b8ad176f93d2f18284a08c3d1..e690ba62d9099e270e14510325d= d1422b152584b 100644 --- a/arch/arm64/boot/dts/qcom/monaco.dtsi +++ b/arch/arm64/boot/dts/qcom/monaco.dtsi @@ -732,6 +732,11 @@ system_pd: power-domain-system { #power-domain-cells =3D <0>; domain-idle-states =3D <&system_sleep>; }; + + reboot-mode { + mode-bootloader =3D <0x10001 0x2>; + mode-edl =3D <0 0x1>; + }; }; =20 reserved-memory { --=20 2.34.1 From nobody Wed Dec 17 00:18:26 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 7F9A42FE56C for ; Sun, 9 Nov 2025 14:39:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699193; cv=none; b=PlImK6jLSRHUYbYmdoJ3oy7VcPb7tT6jbS+PfQdS78rxxINANuXImM1mf/nwx+1OpN2kttptNh6ysnsS8qZjeyhD6aLXdJwahlhl/GoAK52bZeSOtcMruT4EiQCbWImmHTf6AUricrF4RDe0C6eU3nNTNMR2mlqHRoiYKJdodJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762699193; c=relaxed/simple; bh=0DTO16A80WGqaz3z0hmwtkj7NXigq+2LLdiQNk+Q8ls=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MP7zWQ2sFtWGvK/hFVMSMdB/EmUEbA8dZgdpJPMLFW1jfUfTWgco2gBWQyq7P4iGzQQtEEMOz77GN8XuONrzuwhf7N5mL0+m/Wy5hkau0Wb+m5PVPknqamOrMFfRpSQ5YZLJRHfadImqAiXxk0x4dBdkBYbJAhPnKEf1SxELmgU= 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=LouQCAfv; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=JVQ8bqgp; arc=none smtp.client-ip=205.220.180.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="LouQCAfv"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="JVQ8bqgp" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5A9Ae383398794 for ; Sun, 9 Nov 2025 14:39:50 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= XptDc+YZFL8JqGr8hCEtPLAIPxbU2ERemzFyFeabLdI=; b=LouQCAfvJVsviDRk e4CY4qK42rhnC0FvsyR2Cy/0F5qmsBpki4Fqpd6Ilw3/karaAt+lzYTtsXLMiboY mGuBD20b1cO+uOCgAHGusvJJrjG69B990iYgFvyDpMKUHe6a5FNkPzQaoR3YQkt5 E8Ffsahc1ecGoxpaiRw5CeSIuKs0Gdc9lgbNmxMnxMw2reAGoHQd66xTG0qrQI/Z F2fG3D/j4eD7tt/NfXvMq1u677K6Wo6lfeTiNyC5f0Lnht90N9oMjp0w9kbMurth m3ojc9ApXLNT4xSsyoZE38iKk47TJ2O/HR7iwTLi8vlqtYG0KvhnKRAHtnw00VfK dagjPA== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4a9xuej7ya-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 09 Nov 2025 14:39:50 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-34188ba5990so4802715a91.0 for ; Sun, 09 Nov 2025 06:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1762699190; x=1763303990; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XptDc+YZFL8JqGr8hCEtPLAIPxbU2ERemzFyFeabLdI=; b=JVQ8bqgpSRlZ4k5zw1QUKvz9n+S3uGkAhfmMlpCAxhaFytUaT1T3dHAeF4ZCgXMo4l yWdnmvo+rx5PWU+f4kkLROG4LBzokJZLJX5lphv9pjBMBLvvNHD9ZpJVxxTkP/zRi7KA 94IWDcbI+TiGBeuwobuahrmk2lhW5pVr3mVfDKG7IVi5REiN1900X5DKkPVvXa9Hmx9K yTL8kzkmv6h+JvPH9NiClrQni12a3UTqeIJUNGY2MPU/ssTsuLNHEOOeQ+AXlObMZx+Q e6dEZc6d48SfRPm2IEu9gL7FOouO8b+nvs0ec/fARj4ZNcYzt4Qy4AjDheCB1PL1ucpC 0USw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762699190; x=1763303990; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XptDc+YZFL8JqGr8hCEtPLAIPxbU2ERemzFyFeabLdI=; b=dzweZXLBU6Z6lENGFp759BfpHTpgOsPuf5pqW4oEsYPfsJFIvb1lp9a1uL0CzvwRRp 4FBvVJtLNLZQkzVJLaTiuW24mW6XhLSgM4Y79RSAKHie6OUVF5WXe60f5bIfocIPqOUJ 34nhS5+t7V+vbCIdn5Z9IiKQuwBNL4QmR5IpYGhWO0u2XLJm6e6kK4Vsk7yGHvSmQHHN Ea34PLzo7eHSF8PqnXJXCaY5in4fidnznV2XVBKM3fB6kWDINjoUMWpIb+hB4JHXnFdY K9nnyskELo/Qw4350VWmPuvOxZdZWbNO2v9qu37b237g5XBo6+nYiEMoLgHnJCmzjeov 9Qww== X-Forwarded-Encrypted: i=1; AJvYcCVdPt5EH5SitHJA6a7myljt7NhoqUeKVYz+elr+yps5LhYLWbNHTtum5CSejoaBZ9SFN+5azNne1cAvSiU=@vger.kernel.org X-Gm-Message-State: AOJu0YwHqky1mwo0rfQpT1PsmW0EGVmfM18qMFGH7nI0qU+3hInRgHs7 SaUckzPTvD9KsbEoA3T/cnFiWQw3F07VTa836aJGmDZ/upUDlbgxV+KEVaBvQ1psEx67BR2tuRr jzWRJv/mZeip9a+5Yh+hwWHEfH3TOri6MD1TrYHI5LgVxtyUSzCaD5VbwPqy7dE6ciuU= X-Gm-Gg: ASbGncuAlHafgfm/vWay33gVbq70Hu1S///qsAz+zfcCFemHmSSBFj6duyv7e4SlSYj 5FZPSao9taYauX1eS1E2lswi9kkTtX8IbgDN3HDDuM9smhcLoAcxA6ruuV/LbftVyA6k5AUX4x4 3iwSqLqBNNod209F4nX3eY6NUnSHMs/nb65GMODZmQSF7kT/Ru9m8xZjoi6QK5R86xtvRslxliy emptQ1jLOAekpLzP06uj5PmYSrc4AtzTwI85qMHd/kkysUw08eWQek61c3bww2Hjeta7Z8TsJyc dQUZrtHgRedUH70b4T13HVdXWwXWwZbGzPixZT+ZARS/EtyDV4Fm8tYLSjs1ZsCJQVuDg7HXmKY WZIDlWfoKZmEj/QrVwDdWCxbiNA+5wg7ODEg= X-Received: by 2002:a17:90b:254b:b0:341:88c1:6a7d with SMTP id 98e67ed59e1d1-3436cbb3db9mr5858497a91.18.1762699189610; Sun, 09 Nov 2025 06:39:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOq2jGoZdaGTg/RuLpVGRCaTMc0nO8pbXIWYTS2/MK7JSUVoJbW0TcdZDyaG0BSL/En7Uqvg== X-Received: by 2002:a17:90b:254b:b0:341:88c1:6a7d with SMTP id 98e67ed59e1d1-3436cbb3db9mr5858477a91.18.1762699189136; Sun, 09 Nov 2025 06:39:49 -0800 (PST) Received: from hu-spratap-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-341a68a68e6sm14845401a91.4.2025.11.09.06.39.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Nov 2025 06:39:48 -0800 (PST) From: Shivendra Pratap Date: Sun, 09 Nov 2025 20:07:25 +0530 Subject: [PATCH v17 12/12] arm64: dts: qcom: talos: Add PSCI SYSTEM_RESET2 types 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251109-arm-psci-system_reset2-vendor-reboots-v17-12-46e085bca4cc@oss.qualcomm.com> References: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> In-Reply-To: <20251109-arm-psci-system_reset2-vendor-reboots-v17-0-46e085bca4cc@oss.qualcomm.com> To: Bartosz Golaszewski , Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski Cc: Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Shivendra Pratap , Xin Liu , Srinivas Kandagatla , Song Xue X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762699073; l=1067; i=shivendra.pratap@oss.qualcomm.com; s=20250710; h=from:subject:message-id; bh=0DTO16A80WGqaz3z0hmwtkj7NXigq+2LLdiQNk+Q8ls=; b=tP463FsuDoN9+kJtN2MV9dK0Lk1uV0U1Hzq/yfzIbjg8ificPJU+/kUUPfp6nFtHl03InJtGh 9VS6Mie4djKAilbj5ymty9l4y4D5eBAcfYCHZhg23+5Kh3vudrPO9iG X-Developer-Key: i=shivendra.pratap@oss.qualcomm.com; a=ed25519; pk=CpsuL7yZ8NReDPhGgq6Xn/SRoa59mAvzWOW0QZoo4gw= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTA5MDEyOSBTYWx0ZWRfXzf7in1GnQQHe K+Q4hR5+t3hB3spsXgtVGmfh6U2KOXQQdNHmmidfUhcW4IrZI3QNDFy/72ev96OEt8iUWRWoEII ARK4mt1/NS6T0lvQcyGF3bGVIJ7hm8F4xlR8Q9OhG4wKFvzpxMke7aIRzThkQ6K+FvqPa7Hd00A KfhMHUFHJjNd6TlKuqriVgbfNNbXhrWr/LOjHhchMGIWnEcjxqqnnBZXANsmiwJ62rSwS7g4Gfx ZjrsiLSlGbW14AO2MTefnxcbfDCbghhkGcWoBqj92tQYfawMjbFddyaNqHnQLqI7adSElybJWwy Na1xH6171L209pH9FOoD7sW3BgFltk4n1wGhQoXlQgE4sgOUlgpMsGiO5/exTjwA0D91vAuBYfI fPGJmdRipDVehlq9pdgXlAntjT9vsA== X-Proofpoint-GUID: VcShUEFU06RZlQiMpyoSxEE6kvSpQR90 X-Proofpoint-ORIG-GUID: VcShUEFU06RZlQiMpyoSxEE6kvSpQR90 X-Authority-Analysis: v=2.4 cv=BOK+bVQG c=1 sm=1 tr=0 ts=6910a7b6 cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=COk6AnOGAAAA:8 a=EUspDBNiAAAA:8 a=4cuBwC7xTQKafrdxVH8A:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-09_06,2025-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 adultscore=0 clxscore=1015 suspectscore=0 priorityscore=1501 spamscore=0 malwarescore=0 phishscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511090129 Add support for SYSTEM_RESET2 vendor-specific resets as reboot-modes in the psci node. Describe the resets: "bootloader" will cause device to reboot and stop in the bootloader's fastboot mode. "edl" will cause device to reboot into "emergency download mode", which permits loading images via the Firehose protocol. Signed-off-by: Song Xue Signed-off-by: Shivendra Pratap Reviewed-by: Mukesh Ojha Tested-by: Florian Fainelli # On ARCH_BRCMS= TB Tested-by: Kathiravan Thirumoorthy # IPQ5424-RDP466 Tested-by: Xin Liu # On qcs615-ride=20 --- arch/arm64/boot/dts/qcom/talos.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/talos.dtsi b/arch/arm64/boot/dts/qcom= /talos.dtsi index eb6f69be4a82ea47486f5c8e39519d0952b146cb..c946d07c540f5ae40f147ccb065= 39ecf0de18df5 100644 --- a/arch/arm64/boot/dts/qcom/talos.dtsi +++ b/arch/arm64/boot/dts/qcom/talos.dtsi @@ -612,6 +612,11 @@ cluster_pd: power-domain-cluster { &cluster_sleep_1 &cluster_sleep_2>; }; + + reboot-mode { + mode-bootloader =3D <0x10001 0x2>; + mode-edl =3D <0 0x1>; + }; }; =20 reserved-memory { --=20 2.34.1