Message ID | 20190111151401.25047-2-jank@cadence.com |
---|---|
State | Changes Requested, archived |
Headers | show |
Series | rtc: Add a driver for Cadence RTC | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | success |
On Fri, Jan 11, 2019 at 03:14:00PM +0000, Jan Kotas wrote: > This patch adds a DT binding documentation for > Cadence RTC controller. > > Signed-off-by: Jan Kotas <jank@cadence.com> > --- > Documentation/devicetree/bindings/rtc/cdns,rtc.txt | 25 ++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/cdns,rtc.txt > > diff --git a/Documentation/devicetree/bindings/rtc/cdns,rtc.txt b/Documentation/devicetree/bindings/rtc/cdns,rtc.txt > new file mode 100644 > index 000000000..40713bbbe > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/cdns,rtc.txt > @@ -0,0 +1,25 @@ > +Cadence Real Time Clock > + > +The Cadence RTC controller with date, time and alarm capabilities. > +The alarm may wake the system from low-power state. > + > +Required properties: > +- compatible: Should be "cdns,rtc-r109v3" > +- reg: Specifies base physical address and size of the register area. > +- interrupts: A single interrupt specifier. > +- clocks: Must contain two entries: > + - pclk: APB registers clock > + - ref_clk: reference 1Hz of 100Hz clock, depending on IP configuration 1Hz OR 100Hz? > + See ../clocks/clock-bindings.txt for details. > + > +Example: > + rtc0: rtc@fd080000 { > + compatible = "cdns,rtc-r109v3"; > + reg = <0xfd080000 0x1000>; > + > + clock-names = "pclk", "ref_clk"; > + clocks = <&sysclock>, <&refclock>; > + > + interrupt-parent = <&gic>; > + interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; > + }; > -- > 2.15.0 >
> On 16 Jan 2019, at 22:08, Rob Herring <robh@kernel.org> wrote: > > > On Fri, Jan 11, 2019 at 03:14:00PM +0000, Jan Kotas wrote: >> This patch adds a DT binding documentation for >> Cadence RTC controller. >> +Required properties: >> +- compatible: Should be "cdns,rtc-r109v3" >> +- reg: Specifies base physical address and size of the register area. >> +- interrupts: A single interrupt specifier. >> +- clocks: Must contain two entries: >> + - pclk: APB registers clock >> + - ref_clk: reference 1Hz of 100Hz clock, depending on IP configuration > > 1Hz OR 100Hz? Hi, The IP has a configuration parameter at build time, which selects the reference clock frequency. It cannot be changed later, and there’s no register which tells the software which option was selected. In this version of the patch, both values are accepted. If it makes sense I can add a bool property, like refclock-100hz, which can be used to check the clock frequency. Regards, Jan
On 17/01/2019 10:46:50+0000, Jan Kotas wrote: > > > On 16 Jan 2019, at 22:08, Rob Herring <robh@kernel.org> wrote: > > > > > > On Fri, Jan 11, 2019 at 03:14:00PM +0000, Jan Kotas wrote: > >> This patch adds a DT binding documentation for > >> Cadence RTC controller. > >> +Required properties: > >> +- compatible: Should be "cdns,rtc-r109v3" > >> +- reg: Specifies base physical address and size of the register area. > >> +- interrupts: A single interrupt specifier. > >> +- clocks: Must contain two entries: > >> + - pclk: APB registers clock > >> + - ref_clk: reference 1Hz of 100Hz clock, depending on IP configuration > > > > 1Hz OR 100Hz? > > Hi, > > The IP has a configuration parameter at build time, > which selects the reference clock frequency. > > It cannot be changed later, and there’s no register which > tells the software which option was selected. > > In this version of the patch, both values are accepted. > If it makes sense I can add a bool property, like > refclock-100hz, which can be used to check the clock frequency. > I guess what rob suggested was s/of/or/
diff --git a/Documentation/devicetree/bindings/rtc/cdns,rtc.txt b/Documentation/devicetree/bindings/rtc/cdns,rtc.txt new file mode 100644 index 000000000..40713bbbe --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/cdns,rtc.txt @@ -0,0 +1,25 @@ +Cadence Real Time Clock + +The Cadence RTC controller with date, time and alarm capabilities. +The alarm may wake the system from low-power state. + +Required properties: +- compatible: Should be "cdns,rtc-r109v3" +- reg: Specifies base physical address and size of the register area. +- interrupts: A single interrupt specifier. +- clocks: Must contain two entries: + - pclk: APB registers clock + - ref_clk: reference 1Hz of 100Hz clock, depending on IP configuration + See ../clocks/clock-bindings.txt for details. + +Example: + rtc0: rtc@fd080000 { + compatible = "cdns,rtc-r109v3"; + reg = <0xfd080000 0x1000>; + + clock-names = "pclk", "ref_clk"; + clocks = <&sysclock>, <&refclock>; + + interrupt-parent = <&gic>; + interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>; + };
This patch adds a DT binding documentation for Cadence RTC controller. Signed-off-by: Jan Kotas <jank@cadence.com> --- Documentation/devicetree/bindings/rtc/cdns,rtc.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/cdns,rtc.txt