Skip to content

Commit 4737a70

Browse files
pcercueialexandrebelloni
authored andcommitted
dt-bindings: rtc: Add #clock-cells property
The RTC in the JZ4770 is compatible with the JZ4760, but has an extra register that permits to configure the behaviour of the CLK32K pin. The same goes for the RTC in the JZ4780. With this change, the RTC node is now also a clock provider on these SoCs, so a #clock-cells property is added. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230129120442.22858-2-paul@crapouillou.net Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent e8c9efd commit 4737a70

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ maintainers:
1111

1212
allOf:
1313
- $ref: rtc.yaml#
14+
- if:
15+
not:
16+
properties:
17+
compatible:
18+
contains:
19+
enum:
20+
- ingenic,jz4770-rtc
21+
- ingenic,jz4780-rtc
22+
then:
23+
properties:
24+
"#clock-cells": false
1425

1526
properties:
1627
compatible:
@@ -39,6 +50,9 @@ properties:
3950
clock-names:
4051
const: rtc
4152

53+
"#clock-cells":
54+
const: 0
55+
4256
system-power-controller:
4357
description: |
4458
Indicates that the RTC is responsible for powering OFF
@@ -83,3 +97,18 @@ examples:
8397
clocks = <&cgu JZ4740_CLK_RTC>;
8498
clock-names = "rtc";
8599
};
100+
101+
- |
102+
#include <dt-bindings/clock/ingenic,jz4780-cgu.h>
103+
rtc: rtc@10003000 {
104+
compatible = "ingenic,jz4780-rtc", "ingenic,jz4760-rtc";
105+
reg = <0x10003000 0x4c>;
106+
107+
interrupt-parent = <&intc>;
108+
interrupts = <32>;
109+
110+
clocks = <&cgu JZ4780_CLK_RTCLK>;
111+
clock-names = "rtc";
112+
113+
#clock-cells = <0>;
114+
};

0 commit comments

Comments
 (0)