Skip to content

Commit

Permalink
dt-bindings: rtc: max31335: Add max31331 support
Browse files Browse the repository at this point in the history
Add details to use max31331. The main difference between max31331
and max31335 is the I2C Slave Address. Max31331 uses 0x68 where as
max31335 uses 0x69.

Signed-off-by: Swaroop Kukkillaya <[email protected]>
  • Loading branch information
SwaroopPKADI authored and swaroop committed Oct 16, 2024
1 parent 7bd079d commit e697b9b
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions Documentation/devicetree/bindings/rtc/adi,max31335.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ description:
Analog Devices MAX31335 I2C RTC ±2ppm Automotive Real-Time Clock with
Integrated MEMS Resonator.

allOf:
- $ref: rtc.yaml#

properties:
compatible:
const: adi,max31335
enum:
- adi,max31331
- adi,max31335

reg:
maxItems: 1
items:
- enum: [0x68, 0x69]

interrupts:
maxItems: 1
Expand Down Expand Up @@ -50,6 +50,26 @@ required:

unevaluatedProperties: false

allOf:
- $ref: rtc.yaml#

- if:
properties:
compatible:
contains:
enum:
- adi,max31335
then:
properties:
reg:
items:
- const: 0x69
else:
properties:
reg:
items:
- const: 0x68

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
Expand All @@ -59,7 +79,7 @@ examples:
rtc@68 {
compatible = "adi,max31335";
reg = <0x68>;
reg = <0x69>;
pinctrl-0 = <&rtc_nint_pins>;
interrupts-extended = <&gpio1 16 IRQ_TYPE_LEVEL_HIGH>;
aux-voltage-chargeable = <1>;
Expand Down

0 comments on commit e697b9b

Please sign in to comment.