Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Paul Cercueil and committed by
Alexandre Belloni
4737a703 e8c9efd5

+29
+29
Documentation/devicetree/bindings/rtc/ingenic,rtc.yaml
··· 11 11 12 12 allOf: 13 13 - $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 14 25 15 26 properties: 16 27 compatible: ··· 49 38 50 39 clock-names: 51 40 const: rtc 41 + 42 + "#clock-cells": 43 + const: 0 52 44 53 45 system-power-controller: 54 46 description: | ··· 96 82 97 83 clocks = <&cgu JZ4740_CLK_RTC>; 98 84 clock-names = "rtc"; 85 + }; 86 + 87 + - | 88 + #include <dt-bindings/clock/ingenic,jz4780-cgu.h> 89 + rtc: rtc@10003000 { 90 + compatible = "ingenic,jz4780-rtc", "ingenic,jz4760-rtc"; 91 + reg = <0x10003000 0x4c>; 92 + 93 + interrupt-parent = <&intc>; 94 + interrupts = <32>; 95 + 96 + clocks = <&cgu JZ4780_CLK_RTCLK>; 97 + clock-names = "rtc"; 98 + 99 + #clock-cells = <0>; 99 100 };