From mboxrd@z Thu Jan 1 00:00:00 1970 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 98C8336493B for ; Thu, 26 Feb 2026 16:59:47 +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=1772125188; cv=none; b=G1fHk4OlqdYFAxf/Z6IChxW5WnuCGWyFiDUNo3xEjE1CyX2bAIxUFyfFMmVPbpPEGnoqsm+4o3ZQmue5NxW6PybwQZTNfKUHqK3A7MyHWxTvyr0N3XY3z9VFJF9GUlznw5/x9SrPuPr67qu13vSjMIKhZSUNygy/Iq0BdwA4gxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772125188; c=relaxed/simple; bh=DuCCb/XRGzy50z6hxqbTg5JmBvPSG3Rfjn4nj7hqk+E=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=LKvLqiErN+s1RRIcjOtFhSXIIxVBuvA6c0y90M9m3/8AolBWe1D1WA4Khcu8CXz1Wtr6b/Rw2kaIunYh4fg09AkzM10D5sc6A7rVIEQYfVGQp7O11TzIyi3OZwEqOBR90pJIVDBLiMed2EjGbG572BDnbsU5QjVWJCMRGepTO7s= 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=ewZnY7Em; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=I5XDYtM9; 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="ewZnY7Em"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="I5XDYtM9" 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 61QGiB131117401 for ; Thu, 26 Feb 2026 16:59:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=d2asf21f0pZXYOQMdBLM1d V3RQi6lpy5t1gpF0I3/7w=; b=ewZnY7EmotplmTwFRrWJdyoT2KUrZsn9l3xiD5 +Ql2GpFEqD+HKwd6dzeY4/5Y4VBS/eQo0y96r/a3xdV9kbzNJCQWpdOmDldJJ8pY eVw+Q7HDqUEr+RfJ+7LW6mSDaqHDiVpAxOVTwIVXRTtOQh9vOHhUd3eRxU4nr9fc /OAOnzjcbKNe0AkCeR1C4uoEpXSm6px2zBCZbvUjOudL1nisIF696cNh2u440vDv Gs1MxRWYjt/F3QM5OfWyOENPqyvY52ViAbFfziRXybw7Z0I5kurLKnaeV+06p9eE RvZA/CuMHqvyMqAVvJIr8aLzOD2rZyqTzPJRhBmX38URk+KA== Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4cjm8u18yb-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 26 Feb 2026 16:59:46 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-8273494d873so459741b3a.1 for ; Thu, 26 Feb 2026 08:59:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1772125185; x=1772729985; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=d2asf21f0pZXYOQMdBLM1dV3RQi6lpy5t1gpF0I3/7w=; b=I5XDYtM9IgdZTarkobzDby1jIivR5xQSQzdYOsxDmZnKRlrMmHnIzmUk9oLg8K3rjt PEBz7QuKpXXRnDUYd/rGejonQyGunlNDW/CIjYN8g8+55zbmDg1RdpMj5wclmqsTA1d0 wtbZ1Li9Xz0e0uZTZE3M8jgYAlKsvBq747Z+LF99d53+zJ3qquPE4OE0KfvFRFjS1udx f8kiGwIKw8xrReinnGs0Qk+o/m2kuO4L08cauu7zqB/CX+eGEBjxQjup96ABYvME6V7W hE7/2rYZMmGNRdNq9tvYIqwyA2iySmTo3tJ8EGHl2O5sK6bGCJ3WVlZ/SiBcxKTmo2WM jx0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772125185; x=1772729985; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=d2asf21f0pZXYOQMdBLM1dV3RQi6lpy5t1gpF0I3/7w=; b=kCKBdPcjdEBZjNV0WqFyJlDDXNHpRuzK6R5Hbipw+2bBIgWVrpAdvI+mbndDHseFjt 7U53i5UZ47451g/ZaeTkyYdAT1dTIRCc9AbRIkXBn/1ILiprl92JFx96B5so9kTQikDy VdvTnY4VKty7eMScz4cZgQqbJFPpep3Y/ANIIqP/zZ+E5npQyR8NqxoMINKaG0+wBm9j kHCdNCMnZXD9K4LTDVOXDlTZSqp9EilCYVRu5yrSYigOFNkRZiEMjgv4O0Mho5+VUWuf Nb6FvQzUFEEidAb54NL8g6WBDlDcB83r4ZRT55uDYQLSQj0XQ5n9ogReDLhwAEd/4rVz TFdQ== X-Forwarded-Encrypted: i=1; AJvYcCVt92Vd+6OrBc2ORO5HPqG/1C5XJF5c9qai0xgZmPS/5MYN3o4EVLRVAXTIXnjswcBsBHHAxws3pvu3rVg=@vger.kernel.org X-Gm-Message-State: AOJu0Yy/oMM4aFuirpFy3sG+TYvMt4s0cdt8wb0cQrwFSFHJCu1B63CC uVpmTBWUY8q2UDio5qapDR2ksBctg2IZXwCpPRFT8sR8Bx1Tm0E958CKiTMtU6XpmRlmMqMfaYN ylUNIl4gwCq6LrZ+S3xpmwncxFVQ0L2pZ/rhOkAoZ+dwDJ1jSzPmwuFtuq5Nc82TowCJjpxzIsn 8= X-Gm-Gg: ATEYQzwqpx8ZxCQFu8rh94nAZ3dGC5xfy4W+6mtjXFZOiVM4SQ4gBw22obzCMSdTwic BzDaMeQ1cyOh47T7qYn8gLRzLbq5x3HuXnVlajjT+gM9PaUqIurXDDkYiMBMr0nTtwcJ4A5WODK 26bNysofWbT7YpNIYrvGo5AJOip7AYF7jrKRTh6KEu2o2FQmp3r0H96yfHWKZOHqJARD+E6BaAN gyzKvO1iOGzGmBOt5e/Arc1x15KJFq8nR/xVA9kcj4lGT295/QjhjjxuK76WELB03CWm5D54ohH 4CK4lCKNHUupwNLBexs0ztdXXTaBR/4FyGBTlI6YLgfbyGAVqu7kXvV/8e4nGYIeOeObxFG+AN8 wu9Fv8CNtO//exnAgh0dc3OvHB75g6sOusn/eSAVt4U9TAP5XVZ+F2guPSH2u6TehY20w7SlwxI UEPttHK7ce0Lly5CBf3iRm/JYQrhNkrsLrlioXiya200D9d+tD47462MLm X-Received: by 2002:a05:6a00:6c9a:b0:824:a466:7470 with SMTP id d2e1a72fcca58-8273980607amr3318736b3a.17.1772125185229; Thu, 26 Feb 2026 08:59:45 -0800 (PST) X-Received: by 2002:a05:6a00:6c9a:b0:824:a466:7470 with SMTP id d2e1a72fcca58-8273980607amr3318704b3a.17.1772125184707; Thu, 26 Feb 2026 08:59:44 -0800 (PST) Received: from hu-kathirav-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8273a01054dsm3626286b3a.43.2026.02.26.08.59.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 08:59:44 -0800 (PST) From: Kathiravan Thirumoorthy Subject: [PATCH v8 0/5] Add support to read the watchdog bootstatus from IMEM Date: Thu, 26 Feb 2026 22:29:35 +0530 Message-Id: <20260226-wdt_reset_reason-v8-0-011c3a8cb6ff@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAPd7oGkC/23NQQ7CIBAF0KsY1tIAFaZ15T2MMbRMLYktChU1T e8udOOmm5/8Sf6bmQT0FgM57mbiMdpg3ZhKtd+RttfjDak1qRPBhGSKM/o209VjwJw6uJGClrp DYIKBJGn28NjZz0qeL6n3NkzOf9cPUeVrxhTj5QYWFWX0wEE3UNWtqeHkQiieL31v3TAUKUg2I /wdIeSGA8lR0sgGsESOzYazLMsPhpfXZ/8AAAA= X-Change-ID: 20250610-wdt_reset_reason-7a5afe702075 To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Wim Van Sebroeck , Guenter Roeck , Rajendra Nayak Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-watchdog@vger.kernel.org, Kathiravan Thirumoorthy , Dmitry Baryshkov , Konrad Dybcio X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1772125179; l=3591; i=kathiravan.thirumoorthy@oss.qualcomm.com; s=20230906; h=from:subject:message-id; bh=DuCCb/XRGzy50z6hxqbTg5JmBvPSG3Rfjn4nj7hqk+E=; b=tQed1FF0lltwTzC7SkqiVeV7oHUd4NWOpxFR032Si4YzylEyb9Nhr90xfpmhVIcpJ5UAR82cg cq4I9HJ1byDCdWEK53Wv7rmtk6DII4sgL+FCYo77z1L1qFgfXA1fehK X-Developer-Key: i=kathiravan.thirumoorthy@oss.qualcomm.com; a=ed25519; pk=xWsR7pL6ch+vdZ9MoFGEaP61JUaRf0XaZYWztbQsIiM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjI2MDE1MyBTYWx0ZWRfX1R8hqfJsWbJN EcTJYY9RAPt93O6UhXcMc1dpBqxg5OaGSeKMJpNtWccEjSUbnIbHBT7nbWObA5foLnPmmYSfHjo sDUB976JW5v3yDUK5z8gu9ul2RNaGo5qUeNwdyIADZegv3w1PGhVtzTprlcfsXH954bPqJBizCU UTfql4lBjkMxpAZv0Isp1rZbIx5aveBNASAT14ND+feEMcJ4I7QBXE8lOukKZKMpv6M8OMvKJVw OgDhwFihm1Nj701fIJGibZXJCNUHmph4AsrGKUT+A7OBrcUMn3aWQlBB959dCps+ICSwKHR8BOh 1FeYej7ZA4ZghrH639Jo9C42yUWRNMVFc7Ii9IbxfW2yUt01EkJUayCCs43XFquvBapzji9cgq9 EyXqyBYyIZ+j+ptC/VvoD6cySPVP0UglNbTRrpyhV3vXSxjFFoAy4Ga8zgpEyX4+irBW75gSr4h WAay3AbLQCB23aBqWLA== X-Authority-Analysis: v=2.4 cv=O780fR9W c=1 sm=1 tr=0 ts=69a07c02 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=3xu3cfvniY9m67ySxx8A:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-ORIG-GUID: fTgg7vDgBnD6iIos3gAxYM4FK4oUAUaU X-Proofpoint-GUID: fTgg7vDgBnD6iIos3gAxYM4FK4oUAUaU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-26_01,2026-02-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 adultscore=0 spamscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 bulkscore=0 impostorscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2602130000 definitions=main-2602260153 In Qualcomm IPQ SoCs, if the system is rebooted due to the watchdog timeout, there is no way to identify it. Current approach of checking the EXPIRED_STATUS in WDT_STS is not working. To achieve this, if the system is rebooted due to watchdog timeout, the information is captured in the IMEM by the bootloader (along with other reason codes as well). This series attempts to address this by adding the support to read the IMEM and populate the information via bootstatus sysfs file. With the CONFIG_WATCHDOG_SYSFS enabled, user can extract the information as below: cat /sys/devices/platform/soc@0/f410000.watchdog/watchdog/watchdog0/bootstatus 32 Signed-off-by: Kathiravan Thirumoorthy --- Changes in v8: - Collected the tags - Updated the commit msg with reasoning in 1/5 - Updated the comment in 4/5 - Link to v7: https://lore.kernel.org/r/20260225-wdt_reset_reason-v7-0-65d5b7e3e1eb@oss.qualcomm.com Changes in v7: - Collected the tags - Added the reference link in 1/5 - Added the flag 'no-memory-wc' in 2/5 - Link to v6: https://lore.kernel.org/r/20260130-wdt_reset_reason-v6-0-417ab789cd97@oss.qualcomm.com Changes in v6: - Moved the IMEM compatible from qcom,imem to sram binding - Updated the 'sram' property in watchdog binding to point to SRAM region and update the watchdog driver accordingly - Dropped the Konrad's R-b tag in 2/5 Changes in v5: - Rename property 'qcom,imem' to 'sram' - Use dev_err_probe instead of dev_err - Link to v4: https://lore.kernel.org/linux-arm-msm/20250519-wdt_reset_reason-v4-0-d59d21275c75@oss.qualcomm.com/ Changes in v4: - Kept only the WDIOF_CARDRESET and dropped other codes (Guenter) - Renamed qcom_wdt_get_restart_reason() to qcom_wdt_get_bootstatus() - Dropped the device data and describe the required information in the DT (Konrad) - Link to v3: https://lore.kernel.org/linux-arm-msm/20250502-wdt_reset_reason-v3-0-b2dc7ace38ca@oss.qualcomm.com/ Changes in v3: - Picked up the relevant tags - Dropped the fallback compatible handling - Split the driver changes into 2. Introduce the device data in one and extend the same in another for the use case - Link to v2: https://lore.kernel.org/linux-arm-msm/20250416-wdt_reset_reason-v2-0-c65bba312914@oss.qualcomm.com/ Changes in v2: - Dropped the RFC tag - Reworked the driver changes to use the syscon API - Link to v1: https://lore.kernel.org/linux-arm-msm/20250408-wdt_reset_reason-v1-0-e6ec30c2c926@oss.qualcomm.com/ Signed-off-by: Kathiravan Thirumoorthy --- Kathiravan Thirumoorthy (5): dt-bindings: sram: describe the IPQ5424 IMEM as mmio-sram arm64: dts: qcom: ipq5424: Add the IMEM node dt-bindings: watchdog: qcom-wdt: Document sram property watchdog: qcom: add support to get the bootstatus from IMEM arm64: dts: qcom: ipq5424: add support to get watchdog bootstatus from IMEM .../devicetree/bindings/sram/qcom,imem.yaml | 1 - Documentation/devicetree/bindings/sram/sram.yaml | 1 + .../devicetree/bindings/watchdog/qcom-wdt.yaml | 6 ++++ arch/arm64/boot/dts/qcom/ipq5424.dtsi | 16 +++++++++ drivers/watchdog/qcom-wdt.c | 42 ++++++++++++++++++++-- 5 files changed, 63 insertions(+), 3 deletions(-) --- base-commit: 7d6661873f6b54c75195780a40d66bad3d482d8f change-id: 20250610-wdt_reset_reason-7a5afe702075 Best regards, -- Kathiravan Thirumoorthy