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 89C553AD527 for ; Wed, 2 Sep 2026 12:45:08 +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=1788353110; cv=none; b=ThCn8appOjy6DoqRqAPRseAAqBgvB85dTPefS7t+opY4RkwkQ4fMu014uPiqXMrOhbYG7oYQTAI/BiLHk3UKaqq7TqPM6J8Mmx2Z8jt0g2qrinWIVINd6KJyr/qLBcwi7BNHgKwdu5mzzD3Q8ZiXM8uYV4R3rY7HpOU+gn72zaQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788353110; c=relaxed/simple; bh=S371zcMUWzIHOFWi/1yKjlfgsvLnkrHmWNy6VFMSzbQ=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=XwJfBbnsAmVGb6D/F8UD7iRr6S/sjqOXI6a+rUb/rX1ZeY7zMo02QRK79O9PVwgHg8idykCkjaLiT0gA7WvZlL5siNR80tblGH6g4DM9nLC0C+J/piJo1kghBYDvJr10lRfVRDZH7ZhwG+lW3n0uLKQPLJImUWiDtxFw405aFnc= 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=eFrVYlbs; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=MEk5z+sX; 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="eFrVYlbs"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="MEk5z+sX" 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 682CR8jH935608 for ; Wed, 2 Sep 2026 12:45: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= WVgNOrBJ13icUw/RU5bG9u51U+93bZ1CQveedgfARFk=; b=eFrVYlbsye+dG0bj xuXhj4a2MwWtYcr6GMzTvHab30Ae+xutvRqWYx9PN97agXPLM3r8hszQIJxahEwr kM5mQ94wfFSncVSTrgWVz1PuGwOqc4D7L/9jgRp4hiTFRXUfnSO5+J+ME1mC5b7U Wa6cS937XstGt2eK57+R+xzHhYEKHVdnf/z+S17LUBzPm6iGntpDyrHKvInBtJS6 OXiw9qOeMeW4+HjEksZ9O512J49MEBK589wJIwCjvJhm5KUJeIh+b3+pKPkHqhs7 fap6hjmM9KgpvCqfN27hxGih/uBmXorif9X0HncufDqvhkYkNo00qbUXqfHYrEEO xVcEtg== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ge397by2f-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 02 Sep 2026 12:45:06 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-85722fc5a21so1525635b3a.2 for ; Wed, 02 Sep 2026 05:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1788353106; x=1788957906; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=WVgNOrBJ13icUw/RU5bG9u51U+93bZ1CQveedgfARFk=; b=MEk5z+sXwdjQXLM/2u7f2PCXwvKOySv2vR30KFAX2U+i/3Y1TfD0I032hMZkB8qNKt a0ox8h5cafV+YXFv9Hh7831+kiTpZMUB89+0MHRy5HYLMANiEzsSzRINitD5fD84Omxl UhsZgScNnAwiYvQSzY29FVXxxO2PbxC9uwEXhVJ1FGtjDaRMoGgy01ZjxtPsHpbXoSsG BJIwYpRfKC/UC5keIwBDFbJqnWUOf2zC3mcYWaX3vqbVRzRWG870yiKK1/5zfoIUUMQ+ uzJB+PRvZXm9ckMT0UYNy/7N1jNCf7Vxgv8k7KefCImgsmo4NhK3ih1ZgtOShlzhMBvF dWkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788353106; x=1788957906; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=WVgNOrBJ13icUw/RU5bG9u51U+93bZ1CQveedgfARFk=; b=ORzTCE9A2+XlYF67n+VYMV9riZ09UJLEtdRXzRt+7in1HeLV6RpS0DcCI6RZd5OhJz BcdoLNvfENEKllppJQQGKXSZsSsyrijltQ8h/MGzCpFQuO9PGkmI6qjuCc5s0bLbKARf q0QM+lwxqSZnluyRVJ/wkZdPcqqV4JO7+5ez62OwvaRNBaD7rGcNEO3Pka7lxH1KtxUL 9SZbgrcxEE8M/VD582GMqjUukn45o6pQhEywypWKr7PJoMuD5J1kfSnqExpstpI3jEQX wd9bUVDDKCQVVF7LZhVOSt2jGrZqkft84awVS5Arbo4HtY5/K6E6nWYgqIHjEO9lsvsL NVvA== X-Forwarded-Encrypted: i=1; AKwUvBzWVatZlccyykEf5spueF0BNFfebSsFqQZYyu7LjEOmDr30WvdtYxzXY1Xp2E5wGI2qHTZY9VsoLExXBWY=@vger.kernel.org X-Gm-Message-State: AFuF++lCThbK95Mt9pIX/L+VFJ9WQ5WjZD+bmskHElnLUuSiKTjlcsWF QFx23q3wE1CkmxETD0zyD9YSLsxLyEaKQTWSWdaRHEovSjCE4jiWv5WuKRpCEEzLYEXztlg6dZX v2wmas9WqKXe7AkAb+7Eae/yx8YswVTrxIVHzYNoIeVqL/6VniW7fAsJqIelOazsBbQ== X-Gm-Gg: AYBFou36nXqlVL9MIDmA5/17MqxLOm4IfdvHwpTpWyB4MGf3WqxA0SzUxB5kYO9fca+ 5P5MtVkVnr/yMaDKu9uMxRuEpnH4z8L1M+FKNSCK3uo7qprbU4U4Wq6scifMXiYFmifn53TEler UDLSUaSo+fZt4XM94bcxwBZCy9LVsovE73/vQ+EkMHD62f/wVz0xTWSibCDFo3hslgv0dvYF9mI s35KvAtdfr5sI49j0AZ69t/NnT6P1BRNjYDZx0quvJD0VHrTfUYKtl0SsA6KsX4EE8UAvX31Ecz 4/XzvsF4pgI/6UZ93xBQdr5BHwGftmfwhdEWU5A+hcFpD68akQiGC8T2jFE9KvhU+k1B/KqhPSJ 9iuSwSoc6QlK+UjgSoqQWIbGhnGWLlfg= X-Received: by 2002:a05:6a00:420c:b0:84f:a170:4f5b with SMTP id d2e1a72fcca58-85ed6790ddfmr7638209b3a.8.1788353105873; Wed, 02 Sep 2026 05:45:05 -0700 (PDT) X-Received: by 2002:a05:6a00:420c:b0:84f:a170:4f5b with SMTP id d2e1a72fcca58-85ed6790ddfmr7638098b3a.8.1788353105212; Wed, 02 Sep 2026 05:45:05 -0700 (PDT) Received: from [10.218.33.235] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-85dc003a82bsm1286626b3a.33.2026.09.02.05.44.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Sep 2026 05:45:04 -0700 (PDT) Message-ID: Date: Wed, 2 Sep 2026 18:14:55 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Faruque Ansari Subject: Re: [PATCH v2 1/4] dt-bindings: power: reset: add PSCRR NVMEM recorder binding To: Krzysztof Kozlowski Cc: Oleksij Rempel , Pengutronix Kernel Team , Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Wim Van Sebroeck , Guenter Roeck , Benson Leung , Tzung-Bi Shih , Srinivas Kandagatla , Daniel Lezcano , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, Liam Girdwood , Mark Brown , "Rafael J. Wysocki" , Zhang Rui , Lukasz Luba , =?UTF-8?Q?S=C3=B8ren_Andersen?= , Guenter Roeck , Matti Vaittinen , Ahmad Fatoum , Andrew Morton , avaneesh.dwivedi@oss.qualcomm.com, Umang Chheda References: <20260819-pscrr-provider-v2-0-9072383e0f4d@oss.qualcomm.com> <20260819-pscrr-provider-v2-1-9072383e0f4d@oss.qualcomm.com> <20260827-spiffy-effective-hare-c05f53@quoll> Content-Language: en-US In-Reply-To: <20260827-spiffy-effective-hare-c05f53@quoll> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTAyMDExMyBTYWx0ZWRfXwijADUN3voaY 8oU8fT41h4XFqusjTev9rRZnlNEvN1EGzKb5f7NCcW9dq0f3TwFTVcCxMfhhYCvAW8Gkwgj8ihL uyQIXC2vHklZ9h8+s9vanfZ5RS/NRxBwYm4lZ8ahAlqIixj92LToqeAKK6jfW43XtEbD1KOOY5R Y0IIAW7M1HPUZBn5vIZor3+kuCM25byS2zob/d1Ef4ye5XnQiZ/vQJ+14HmOyRggrq7c8rJMtuZ aNPpxMhtjHvpK0yRlpNkAqTboHFgwikBUsX+El53iJLPCgpCREKHAYQiyYChBrugkjS5MQhbJkU hxoJ5anuENWgA19PREDxoTTFaLXnoiNpGXyUm3AonHCAcIjHK50KRlL4hwf3+45yPb4Q7RgeQn5 vzMt5jAP4zMTiCXeZwZsVhQwW6ME6poYCdvSB2pcDAB5sMJCpA9pZ7n4YbG3zMrBgMzO5ccC56x K6mw3NFrYYzL0ZqB68Q== X-Proofpoint-GUID: G7hS2nAr5O-4o0SpcAv_9XSiDpaZTQF0 X-Proofpoint-ORIG-GUID: G7hS2nAr5O-4o0SpcAv_9XSiDpaZTQF0 X-Authority-Analysis: v=2.4 cv=Re6gzVtv c=1 sm=1 tr=0 ts=6a981a52 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=P-IC7800AAAA:8 a=gEfo2CItAAAA:8 a=EUspDBNiAAAA:8 a=pgIzJ0-J4Cnj9ACx_iUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 a=d3PnA9EDa4IxuAV0gXij:22 a=sptkURWiP4Gy88Gu7hUp:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTAyMDExMyBTYWx0ZWRfX/DBSRb+ZhWpV 72k8CpmdjsuJEvlMEUsqDs4e9yXs3LddvjMnlyqWfwxcHQF78NT70Q01ioLoKnbq2aI6Yi2XRr+ Sa5NqAFdQ0eElNMsjOH2uBxV+kbIVyI= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-02_03,2026-09-01_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 adultscore=0 impostorscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2609020113 Hi Krzysztof, On 27-Aug-26 3:15 PM, Krzysztof Kozlowski wrote: > On Wed, Aug 19, 2026 at 10:50:43PM +0530, Faruque Ansari wrote: >> Add binding for the PSCRR NVMEM recorder. Records the power state >> change reason into a small NVMEM cell, such as a PMIC SDAM byte or >> RTC scratch register — so the cause survives a power cycle and can be >> read back on the next boot. > > A nit, subject: drop second/last, redundant "binding". The > "dt-bindings" prefix is already stating that these are bindings. > See also: > https://elixir.bootlin.com/linux/v7.1-rc7/source/Documentation/devicetree/bindings/submitting-patches.rst#L23 > Thanks for the review. I'll fix this in V3. >> Signed-off-by: Faruque Ansari >> --- >> .../bindings/power/reset/pscrr-nvmem.yaml | 59 ++++++++++++++++++++++ >> MAINTAINERS | 1 + >> 2 files changed, 60 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml b/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml >> new file mode 100644 >> index 000000000000..5334c923d644 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/power/reset/pscrr-nvmem.yaml >> @@ -0,0 +1,59 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +%YAML 1.2 >> +--- >> +$id: http://devicetree.org/schemas/power/reset/pscrr-nvmem.yaml# >> +$schema: http://devicetree.org/meta-schemas/core.yaml# >> + >> +title: NVMEM Power State Change Reason recorder >> + >> +maintainers: >> + - Faruque Ansari >> + - Oleksij Rempel >> + >> +description: >> + An NVMEM-backed recorder for Power State Change Reasons (PSCRR). Persists >> + the reboot or shutdown cause into a small NVMEM cell, such as an RTC >> + scratch register, a PMIC SDAM (Scratch Data Access Memory) byte, or an >> + EEPROM — so the reason survives a power cycle and can be read back on the >> + next boot. The cell is referenced via the standard nvmem-cells consumer >> + binding. > > I do not see how this should be a separate device. This should be rather part > of PSCRR, reboot handler or just the nvmem. Otherwise it is just device > node for instantiating driver. There's already precedent in-tree for exactly this shape of binding: Documentation/devicetree/bindings/power/reset/nvmem-reboot-mode.yaml defines a standalone "nvmem-reboot-mode" compatible whose sole purpose is to bind an nvmem-cell and instantiate a driver that writes a reboot-mode value into it before reset, for the bootloader to read. pscrr-nvmem follows the same pattern: instead of a reboot-mode value for the bootloader, it records the PSCRR reason into an NVMEM cell before reset and reads it back on the next boot for PSCRR to report. Like nvmem-reboot-mode, it works with any NVMEM backend (RTC scratch register, PMIC SDAM, EEPROM, etc.). It doesn't fit cleanly into PSCRR core (hardware-agnostic, no NVMEM dependency today) or a specific reset handler (it only records the reason, it doesn't initiate the reset). Thanks, Faruque Ansari