diff mbox series

[v6,1/2] dt-bindings: rtc: add device-tree bindings for the Amlogic Meson RTC

Message ID 20190119144332.11984-2-martin.blumenstingl@googlemail.com (mailing list archive)
State New, archived
Headers show
Series Amlogic Meson6/8/8b/8m2 SoC RTC driver | expand

Commit Message

Martin Blumenstingl Jan. 19, 2019, 2:43 p.m. UTC
The 32-bit Amlogic Meson SoCs (Meson6, Meson8, Meson8b and Meson8m2)
have a built-in RTC block.
It has the following inputs:
- an 32.768kHz crystal oscillator
- an interrupt line
- a reset line
- 0.9V voltage input

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
[resurrected patches from Ben after 2 years]
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 .../devicetree/bindings/rtc/rtc-meson.txt     | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/rtc-meson.txt

Comments

Alexandre Belloni Feb. 6, 2019, 10:30 p.m. UTC | #1
Hi,

On 19/01/2019 15:43:31+0100, Martin Blumenstingl wrote:
> The 32-bit Amlogic Meson SoCs (Meson6, Meson8, Meson8b and Meson8m2)
> have a built-in RTC block.
> It has the following inputs:
> - an 32.768kHz crystal oscillator
> - an interrupt line
> - a reset line
> - 0.9V voltage input
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> [resurrected patches from Ben after 2 years]
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  .../devicetree/bindings/rtc/rtc-meson.txt     | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-meson.txt
> 
> diff --git a/Documentation/devicetree/bindings/rtc/rtc-meson.txt b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
> new file mode 100644
> index 000000000000..23df3cf2dd73
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
> @@ -0,0 +1,32 @@
> +* Amlogic Meson6, Meson8, Meson8b and Meson8m2 RTC
> +
> +Required properties:
> +- compatible: should be one of the following describing the hardware:
> +	* "amlogic,meson6-rtc"
> +	* "amlogic,meson8-rtc"
> +	* "amlogic,meson8b-rtc"
> +	* "amlogic,meson8m2-rtc"
> +
> +- reg: physical register space for the controller's memory mapped registers.
> +- interrupts: the interrupt line of the RTC block.
> +- clocks: reference to the external 32.768kHz crystal oscillator.
> +- vdd-supply: reference to the power supply of the RTC block.
> +- resets: reset controller reference to allow reset of the controller
> +
> +Optional properties:
> +- #address-cells: should be 1 to address the internal non-volatile memory
> +- #address-cells: should be 1 to reference the internal non-volatile memory

Shouldn't that one be #size-cells ?
Martin Blumenstingl Feb. 9, 2019, 12:10 a.m. UTC | #2
Hi,

On Wed, Feb 6, 2019 at 11:31 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hi,
>
> On 19/01/2019 15:43:31+0100, Martin Blumenstingl wrote:
> > The 32-bit Amlogic Meson SoCs (Meson6, Meson8, Meson8b and Meson8m2)
> > have a built-in RTC block.
> > It has the following inputs:
> > - an 32.768kHz crystal oscillator
> > - an interrupt line
> > - a reset line
> > - 0.9V voltage input
> >
> > Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> > [resurrected patches from Ben after 2 years]
> > Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> > ---
> >  .../devicetree/bindings/rtc/rtc-meson.txt     | 32 +++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/rtc/rtc-meson.txt
> >
> > diff --git a/Documentation/devicetree/bindings/rtc/rtc-meson.txt b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
> > new file mode 100644
> > index 000000000000..23df3cf2dd73
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
> > @@ -0,0 +1,32 @@
> > +* Amlogic Meson6, Meson8, Meson8b and Meson8m2 RTC
> > +
> > +Required properties:
> > +- compatible: should be one of the following describing the hardware:
> > +     * "amlogic,meson6-rtc"
> > +     * "amlogic,meson8-rtc"
> > +     * "amlogic,meson8b-rtc"
> > +     * "amlogic,meson8m2-rtc"
> > +
> > +- reg: physical register space for the controller's memory mapped registers.
> > +- interrupts: the interrupt line of the RTC block.
> > +- clocks: reference to the external 32.768kHz crystal oscillator.
> > +- vdd-supply: reference to the power supply of the RTC block.
> > +- resets: reset controller reference to allow reset of the controller
> > +
> > +Optional properties:
> > +- #address-cells: should be 1 to address the internal non-volatile memory
> > +- #address-cells: should be 1 to reference the internal non-volatile memory
>
> Shouldn't that one be #size-cells ?
indeed, thanks for spotting!


Martin
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/rtc/rtc-meson.txt b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
new file mode 100644
index 000000000000..23df3cf2dd73
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/rtc-meson.txt
@@ -0,0 +1,32 @@ 
+* Amlogic Meson6, Meson8, Meson8b and Meson8m2 RTC
+
+Required properties:
+- compatible: should be one of the following describing the hardware:
+	* "amlogic,meson6-rtc"
+	* "amlogic,meson8-rtc"
+	* "amlogic,meson8b-rtc"
+	* "amlogic,meson8m2-rtc"
+
+- reg: physical register space for the controller's memory mapped registers.
+- interrupts: the interrupt line of the RTC block.
+- clocks: reference to the external 32.768kHz crystal oscillator.
+- vdd-supply: reference to the power supply of the RTC block.
+- resets: reset controller reference to allow reset of the controller
+
+Optional properties:
+- #address-cells: should be 1 to address the internal non-volatile memory
+- #address-cells: should be 1 to reference the internal non-volatile memory
+
+Optional child nodes:
+- see ../nvmem/nvmem.txt
+
+Example:
+
+	rtc: rtc@740 {
+		compatible = "amlogic,meson6-rtc";
+		reg = <0x740 0x14>;
+		interrupts = <GIC_SPI 72 IRQ_TYPE_EDGE_RISING>;
+		clocks = <&rtc32k_xtal>;
+		vdd-supply = <&rtc_vdd>;
+		resets = <&reset RESET_RTC>;
+	};