| Message ID | 20260807082855.3762394-2-shivprakash.gupta@nxp.com |
|---|---|
| State | New |
| Headers | show |
| Series | rtc: pcf8525: Add NXP PCF8525 RTC driver | expand |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] The `interrupt-names` schema strictly requires the first interrupt to be `inta`, incorrectly rejecting a configuration where only a single `intb` interrupt is connected. -- --- Patch [1]: [PATCH 1/4] dt-bindings: rtc: Add NXP PCF8525 RTC --- commit edd4cb5090a8c1765775edd3168f097a2f181903 Author: Shiv Prakash Gupta <shivprakash.gupta@nxp.com> dt-bindings: rtc: Add NXP PCF8525 RTC This commit adds a Devicetree binding for the NXP PCF8525 I2C RTC. It describes optional inta and intb interrupts alongside properties for external crystal load capacitance and temperature-compensation crystal models. > diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml > new file mode 100644 > index 0000000000000..bee71ec3da808 > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml [ ... ] > + interrupts: > + minItems: 1 > + maxItems: 2 > + description: > + INTA, followed by INTB when both interrupt outputs are connected. > + > + interrupt-names: > + minItems: 1 > + items: > + - const: inta > + - const: intb [Severity: Medium] Will this strictly require the first interrupt to be inta, rejecting a configuration where only a single intb interrupt is connected? If a board designer creates a device tree node with a single interrupt and sets interrupt-names to intb, the schema's items list imposes strict positional constraints requiring the first element to be inta. This would cause validation to fail for a valid hardware configuration where only the intb pin is connected.
On Fri, 07 Aug 2026 13:58:52 +0530, Shiv Prakash Gupta wrote: > Add a Devicetree binding for the NXP PCF8525 I2C RTC. Describe the > optional INTA interrupt used for RTC alarm and timestamp events, and > the INTB interrupt used by the watchdog. > > Add properties to select the external crystal load capacitance and > temperature-compensation crystal model. Also allow the common > start-year, wakeup-source and reset-source properties, with > reset-source enabling watchdog registration > > Signed-off-by: Lakshay Piplani <lakshay.piplani@nxp.com> > Signed-off-by: Shiv Prakash Gupta <shivprakash.gupta@nxp.com> > --- > .../devicetree/bindings/rtc/nxp,pcf8525.yaml | 86 +++++++++++++++++++ > 1 file changed, 86 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml > Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml new file mode 100644 index 000000000000..bee71ec3da80 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8525.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nxp,pcf8525.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP PCF8525 Real Time Clock + +description: + The PCF8525 is an I2C real-time clock with alarm, timestamp, watchdog, + backup battery switch-over, and temperature compensation for an external + 32.768 kHz crystal. + +allOf: + - $ref: rtc.yaml# + +maintainers: + - Lakshay Piplani <lakshay.piplani@nxp.com> + - Shiv Prakash Gupta <shivprakash.gupta@nxp.com> + +properties: + compatible: + enum: + - nxp,pcf8525 + + reg: + maxItems: 1 + + interrupts: + minItems: 1 + maxItems: 2 + description: + INTA, followed by INTB when both interrupt outputs are connected. + + interrupt-names: + minItems: 1 + items: + - const: inta + - const: intb + + quartz-load-femtofarads: + description: + Effective load capacitance of the external 32.768 kHz crystal. + enum: [6000, 7000] + default: 6000 + + nxp,xtal-type: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Crystal model used by the temperature compensation engine. + Value 1 selects -0.035 ppm/degC^2 and value 2 selects + -0.04 ppm/degC^2. + enum: [1, 2] + default: 1 + + start-year: true + + wakeup-source: true + + reset-source: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/irq.h> + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@51 { + compatible = "nxp,pcf8525"; + reg = <0x51>; + interrupt-parent = <&gpio2>; + interrupts = <2 IRQ_TYPE_EDGE_FALLING>, + <3 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "inta", "intb"; + quartz-load-femtofarads = <7000>; + nxp,xtal-type = <2>; + reset-source; + }; + };