From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) (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 96E93317712; Wed, 19 Nov 2025 08:33:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=92.121.34.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763541229; cv=none; b=mcQcYUpMZUQK3ozush1JIIhp7py8g9mOuvEXovYaAdpt11FHFSVz8O1/1va3bnmQckv4RJ3h6Mes4aRT/HAQK6N+42i6mN7h8gEGeMUv7M7+egLhYC8joYrruSzmJZvcnkLPGsq3kOy5Cq2wbwq5U8bxN8ovds/uMdxnM7E9VWs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763541229; c=relaxed/simple; bh=GV5gPVMmn+O3kcrcUwHPuKvrbng1FmqyNnTLDnOXVlk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=RY8qiOpnb3s8i32YiOXPm4V3dbPXHTIK9P/gmWv+hY0I3yYNwNe2SwYw98VMqIzK8Fz7YWhzYsAIpYb++Y6YFjrUlmwzsT84ClpfVXpGYKghHHtm0pnSDGrPonmaMS3/H6UcA7QKPKm+d43jvEAD1ivYlwKwc32uA33hUoztvoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; arc=none smtp.client-ip=92.121.34.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8C24A202A20; Wed, 19 Nov 2025 09:33:40 +0100 (CET) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 553C0202A06; Wed, 19 Nov 2025 09:33:40 +0100 (CET) Received: from lsv03900.swis.in-blr01.nxp.com (lsv03900.swis.in-blr01.nxp.com [10.12.177.15]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 10E631800086; Wed, 19 Nov 2025 16:33:39 +0800 (+08) From: Lakshay Piplani To: alexandre.belloni@bootlin.com, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, wim@linux-watchdog.org, linux@roeck-us.net, linux-watchdog@vger.kernel.org Cc: vikash.bansal@nxp.com, priyanka.jain@nxp.com, shashank.rebbapragada@nxp.com, Lakshay Piplani Subject: [PATCH v3 1/5] dt-bindings: rtc: nxp,pcf85363: add timestamp mode config Date: Wed, 19 Nov 2025 14:03:32 +0530 Message-Id: <20251119083336.2241142-1-lakshay.piplani@nxp.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP NXP PCF85263/PCF85363 provides three timestamp registers (TSR1-TSR3) which latch the current time when a selected event occurs. Add a vendor specific property, nxp,timestamp-mode, to select the event source for each register. Also introduce a new header 'pcf85363-tsr.h' to expose macros for timestamp mode fields, improving readability of device tree file. Signed-off-by: Lakshay Piplani --- V2 -> V3: - No changes in v3 - Added Reviewed-by: Rob Herring V1 -> V2: - Addressed review comments from Rob Herring: * use $ref: /schemas/types.yaml#/definitions/uint32-array * tuple form with exactly 3 items (TSR1/TSR2/TSR3), per items decimal enums * define 'nxp,timestamp-mode' clearly * drop watchdog related vendor properties * remove watchdog related vendor properties from i2c example .../devicetree/bindings/rtc/nxp,pcf85363.yaml | 23 ++++++++++++++- include/dt-bindings/rtc/pcf85363-tsr.h | 28 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 include/dt-bindings/rtc/pcf85363-tsr.h diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml index 52aa3e2091e9..cf9c155162d6 100644 --- a/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf85363.yaml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/rtc/nxp,pcf85363.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Philips PCF85263/PCF85363 Real Time Clock +title: NXP PCF85263/PCF85363 Real Time Clock maintainers: - Alexandre Belloni @@ -39,6 +39,24 @@ properties: start-year: true wakeup-source: true + nxp,timestamp-mode: + $ref: /schemas/types.yaml#/definitions/uint32-array + items: + - enum: [0, 1, 2] # TSR1: NONE, FE, LE + description: TSR1 mode + - enum: [0, 1, 2, 3, 4, 5] # TSR2: NONE, FB, LB, LV, FE, LE + description: TSR2 mode + - enum: [0, 1, 2, 3] # TSR3: NONE, FB, LB, LV + description: TSR3 mode + description: | + Defines timestamp modes for TSR1, TSR2, and TSR3. + Use macros from . + + Each value corresponds to a mode constant: + - TSR1: NONE, FE, LE + - TSR2: NONE, FB, LB, LV, FE, LE + - TSR3: NONE, FB, LB, LV + required: - compatible - reg @@ -47,6 +65,7 @@ additionalProperties: false examples: - | + #include i2c { #address-cells = <1>; #size-cells = <0>; @@ -56,5 +75,7 @@ examples: reg = <0x51>; #clock-cells = <0>; quartz-load-femtofarads = <12500>; + wakeup-source; + nxp,timestamp-mode = ; }; }; diff --git a/include/dt-bindings/rtc/pcf85363-tsr.h b/include/dt-bindings/rtc/pcf85363-tsr.h new file mode 100644 index 000000000000..1fb5b9b3601e --- /dev/null +++ b/include/dt-bindings/rtc/pcf85363-tsr.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause */ +/* + * Copyright 2025 NXP + */ + +#ifndef _DT_BINDINGS_RTC_PCF85363_TSR_H +#define _DT_BINDINGS_RTC_PCF85363_TSR_H + +/* TSR1 modes */ +#define PCF85363_TSR1_NONE 0x00 +#define PCF85363_TSR1_FE 0x01 +#define PCF85363_TSR1_LE 0x02 + +/* TSR2 modes */ +#define PCF85363_TSR2_NONE 0x00 +#define PCF85363_TSR2_FB 0x01 +#define PCF85363_TSR2_LB 0x02 +#define PCF85363_TSR2_LV 0x03 +#define PCF85363_TSR2_FE 0x04 +#define PCF85363_TSR2_LE 0x05 + +/* TSR3 modes */ +#define PCF85363_TSR3_NONE 0x00 +#define PCF85363_TSR3_FB 0x01 +#define PCF85363_TSR3_LB 0x02 +#define PCF85363_TSR3_LV 0x03 + +#endif /* _DT_BINDINGS_RTC_PCF85363_TSR_H */ -- 2.25.1