Message ID | 20200620224222.1312520-6-j.neuschaefer@gmx.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | None | expand |
Hi, On 21/06/2020 00:42:18+0200, Jonathan Neuschäfer wrote: > The Netronix EC implements an RTC with the following functionality: > > - Calendar-based time keeping with single-second resolution > - Automatic power-on with single-minute resolution > - Alarm at single-second resolution > > This binding only supports timekeeping for now. > > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> > --- > .../bindings/mfd/netronix,ntxec.yaml | 7 +++++ > .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++ > 2 files changed, 34 insertions(+) > create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > index 6562c41c5a9a9..f6a32f46f47bb 100644 > --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > @@ -34,6 +34,9 @@ properties: > pwm: > $ref: ../pwm/netronix,ntxec-pwm.yaml > > + rtc: > + $ref: ../rtc/netronix,ntxec-rtc.yaml > + Shouldn't the node simply be documented here? Also, do you really need a compatible string to be able to proe the driver? What are the chances that you'll get a similar EC without an RTC? > required: > - compatible > - reg > @@ -61,6 +64,10 @@ examples: > compatible = "netronix,ntxec-pwm"; > #pwm-cells = <1>; > }; > + > + rtc { > + compatible = "netronix,ntxec-rtc"; > + }; > }; > }; > > diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml > new file mode 100644 > index 0000000000000..4b301ef7319c8 > --- /dev/null > +++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml > @@ -0,0 +1,27 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/rtc/netronix,ntxec-rtc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: RTC functionality in Netronix embedded controller > + > +maintainers: > + - Jonathan Neuschäfer <j.neuschaefer@gmx.net> > + > +description: | > + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > + > + The Netronix EC contains an RTC, which can be used for time-keeping, alarm, > + and automatic power-on. Note that not all of this functionality is currently > + supported in this binding. > + > +allOf: > + - $ref: "rtc.yaml#" > + > +properties: > + compatible: > + const: netronix,ntxec-rtc > + > +required: > + - compatible > -- > 2.27.0 >
On Sun, 21 Jun 2020 02:02:20 +0200 Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: > Hi, > > On 21/06/2020 00:42:18+0200, Jonathan Neuschäfer wrote: > > The Netronix EC implements an RTC with the following functionality: > > > > - Calendar-based time keeping with single-second resolution > > - Automatic power-on with single-minute resolution > > - Alarm at single-second resolution > > > > This binding only supports timekeeping for now. > > > > Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> > > --- > > .../bindings/mfd/netronix,ntxec.yaml | 7 +++++ > > .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++ > > 2 files changed, 34 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml > > > > diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > > index 6562c41c5a9a9..f6a32f46f47bb 100644 > > --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > > +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml > > @@ -34,6 +34,9 @@ properties: > > pwm: > > $ref: ../pwm/netronix,ntxec-pwm.yaml > > > > + rtc: > > + $ref: ../rtc/netronix,ntxec-rtc.yaml > > + > > Shouldn't the node simply be documented here? > > Also, do you really need a compatible string to be able to proe the > driver? What are the chances that you'll get a similar EC without an > RTC? > Tolino Shine 2 HD has the mentioned EC but the vendor kernel does not use its RTC (not checked whether it is present or functional). As a key for grepping in the vendor sources: gptNtxHwCfg->m_val.bPCB = 0x50 Tolino Shine 3 and Kobo Clara HD do not have that EC. Regrads, Andreas
On Fri, Jun 26, 2020 at 11:55:52PM +0200, Andreas Kemnade wrote: > On Sun, 21 Jun 2020 02:02:20 +0200 > Alexandre Belloni <alexandre.belloni@bootlin.com> wrote: [...] > > Also, do you really need a compatible string to be able to proe the > > driver? What are the chances that you'll get a similar EC without an > > RTC? > > > Tolino Shine 2 HD has the mentioned EC but the vendor kernel does not use > its RTC (not checked whether it is present or functional). > As a key for grepping in the vendor sources: > gptNtxHwCfg->m_val.bPCB = 0x50 Thanks for checking. (In the MMC dump from my Shine 2 HD, it's decimal 50 rather than hex) > Tolino Shine 3 and Kobo Clara HD do not have that EC. Fortunately, this set of drivers isn't needed at all in that case. Thanks, Jonathan
diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml index 6562c41c5a9a9..f6a32f46f47bb 100644 --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml @@ -34,6 +34,9 @@ properties: pwm: $ref: ../pwm/netronix,ntxec-pwm.yaml + rtc: + $ref: ../rtc/netronix,ntxec-rtc.yaml + required: - compatible - reg @@ -61,6 +64,10 @@ examples: compatible = "netronix,ntxec-pwm"; #pwm-cells = <1>; }; + + rtc { + compatible = "netronix,ntxec-rtc"; + }; }; }; diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml new file mode 100644 index 0000000000000..4b301ef7319c8 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/netronix,ntxec-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: RTC functionality in Netronix embedded controller + +maintainers: + - Jonathan Neuschäfer <j.neuschaefer@gmx.net> + +description: | + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml + + The Netronix EC contains an RTC, which can be used for time-keeping, alarm, + and automatic power-on. Note that not all of this functionality is currently + supported in this binding. + +allOf: + - $ref: "rtc.yaml#" + +properties: + compatible: + const: netronix,ntxec-rtc + +required: + - compatible
The Netronix EC implements an RTC with the following functionality: - Calendar-based time keeping with single-second resolution - Automatic power-on with single-minute resolution - Alarm at single-second resolution This binding only supports timekeeping for now. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> --- .../bindings/mfd/netronix,ntxec.yaml | 7 +++++ .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml -- 2.27.0