RTC: nuvoton: Add nuvoton real time clock driver
v5 cover RTC: nuvoton: Add nuvoton real time clock driver
Support Nuvoton NCT3018Y real time clock.
Changes since version 5:
- Add battery voltage level check by NCT3018Y_REG_ST.
- Remove disable clock output.
- Fix errors in rtc-nct3018y.c.
Changes since version 4:
- Fix warnings in rtc-nct3018y.c.
- Reduce the number of error messages.
- Add time vaild check.
- Add functionality check.
- Add maintainer.
Changes since version 3:
- Add part number in Kconfig.
- Refactor rtc-nct3018y.c.
Changes since version 2:
- Fix errors in rtc-nct3018y.c.
- Fix warnings in rtc-nct3018y.c.
Changes since version 1:
- Add nuvoton,nct3018y property in NPCM devicetree.
- Add new property in rtc binding document.
- Add new driver for nuvoton real time clock driver.
Mia Lin (3):
dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock
ARM: dts: nuvoton: Add nuvoton RTC3018Y node
RTC: nuvoton: Add NCT3018Y real time clock driver
.../bindings/rtc/nuvoton,nct3018y.yaml | 45 ++ MAINTAINERS | 2 + arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-nct3018y.c | 553 ++++++++++++++++++ 6 files changed, 615 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml create mode 100644 drivers/rtc/rtc-nct3018y.c
Signature · 1 line
2.17.1
PATCH v5 1/3 dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock
Document devicetree bindings for the Nuvoton NCT3018Y Real Time Clock.
--- .../bindings/rtc/nuvoton,nct3018y.yaml | 45 +++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml
Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/nuvoton,nct3018y.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NUVOTON NCT3018Y Real Time Clock + +allOf: + - $ref: "rtc.yaml#" + +maintainers: + - Medad CChien <[email protected]> + - Mia Lin <[email protected]> + +properties: + compatible: + const: nuvoton,nct3018y + + reg: + maxItems: 1 + + start-year: true + + reset-source: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + rtc@6f { + compatible = "nuvoton,nct3018y"; + reg = <0x6f>; + }; + }; + +...
MAINTAINERS +1 -0
@@ -2448,6 +2448,7 @@ S: Supported F: Documentation/devicetree/bindings/*/*/*npcm* F: Documentation/devicetree/bindings/*/*npcm* F: Documentation/devicetree/bindings/arm/npcm/* +F: Documentation/devicetree/bindings/rtc/nuvoton,nct3018y.yaml F: arch/arm/boot/dts/nuvoton-npcm* F: arch/arm/mach-npcm/ F: drivers/*/*npcm*
Signature · 1 line
2.17.1
Re: [PATCH v5 1/3] dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock
Quoted 3 lines · Mia Lin
Document devicetree bindings for the Nuvoton NCT3018Y Real Time Clock.
Signed-off-by Mia Lin <[email protected]>
Where is the review tag?
Best regards,
Krzysztof
Re: [PATCH v5 1/3] dt-bindings: rtc: nuvoton: add NCT3018Y Real Time Clock
Dear Krzysztof,
Thank you for your reminder.
I'm new to upstream. I will add the review tag in the next patch.
Thanks.
Best regards,
Mia
Krzysztof Kozlowski <[email protected]> 於 2022年7月12日 週二 下午3:43寫道:
Quoted 10 lines · Mia Lin
Quoted 3 lines
Document devicetree bindings for the Nuvoton NCT3018Y Real Time Clock.
Signed-off-by Mia Lin <[email protected]>Where is the review tag?
Best regards,
Krzysztof
PATCH v5 2/3 ARM: dts: nuvoton: Add nuvoton RTC3018Y node
In reply to Mia LinAdd nuvoton real time clock RTC3018Y in I2C node
--- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +4 -0
@@ -202,6 +202,10 @@ reg = <0x48>; status = "okay"; }; + rtc0: rtc@6f { + compatible = "nuvoton,nct3018y"; + reg = <0x6f>; + }; }; /* lm75 on EB */
Signature · 1 line
2.17.1
Re: [PATCH v5 2/3] ARM: dts: nuvoton: Add nuvoton RTC3018Y node
Quoted 12 lines · Mia Lin
Add nuvoton real time clock RTC3018Y in I2C node
Signed-off-by Mia Lin <[email protected]>--- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/nuvoton-npcm750-evb.dts +0
-0
arch/arm/boot/dts/nuvoton-npcm750-evb.dts line 204
Quoted 3 lines
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +0
-0@@ -202,6 +202,10 @@ reg = <0x48>; status = "okay"; };
Missing blank line.
arch/arm/boot/dts/nuvoton-npcm750-evb.dts line 211
Quoted 7 lines
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +4
-0+ rtc0: rtc@6f { + compatible = "nuvoton,nct3018y"; + reg = <0x6f>; + }; }; /* lm75 on EB */
Best regards,
Krzysztof
Re: [PATCH v5 2/3] ARM: dts: nuvoton: Add nuvoton RTC3018Y node
Dear Krzysztof,
Thank you for your comment.
I will fill blank line.
Thanks.
Best Regards,
Mia
Krzysztof Kozlowski <[email protected]> 於 2022年7月12日 週二 下午3:44寫道:
Quoted 31 lines · Mia Lin
Quoted 12 lines
Add nuvoton real time clock RTC3018Y in I2C node
Signed-off-by Mia Lin <[email protected]>--- arch/arm/boot/dts/nuvoton-npcm750-evb.dts | 4 ++++ 1 file changed, 4 insertions(+)arch/arm/boot/dts/nuvoton-npcm750-evb.dts +0
-0arch/arm/boot/dts/nuvoton-npcm750-evb.dts line 204
Quoted 3 lines
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +0
-0@@ -202,6 +202,10 @@ reg = <0x48>; status = "okay"; };Missing blank line.
arch/arm/boot/dts/nuvoton-npcm750-evb.dts line 211
Quoted 7 lines
arch/arm/boot/dts/nuvoton-npcm750-evb.dts +4
-0+ rtc0: rtc@6f { + compatible = "nuvoton,nct3018y"; + reg = <0x6f>; + }; }; /* lm75 on EB */Best regards,
Krzysztof
PATCH v5 3/3 RTC: nuvoton: Add NCT3018Y real time clock driver
In reply to Mia LinAdd real time clock support for NCT3018Y.
--- MAINTAINERS | 1 + drivers/rtc/Kconfig | 10 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-nct3018y.c | 553 +++++++++++++++++++++++++++++++++++++ 4 files changed, 565 insertions(+) create mode 100644 drivers/rtc/rtc-nct3018y.c
MAINTAINERS +1 -0
@@ -2453,6 +2453,7 @@ F: arch/arm/boot/dts/nuvoton-npcm* F: arch/arm/mach-npcm/ F: drivers/*/*npcm* F: drivers/*/*/*npcm* +F: drivers/rtc/rtc-nct3018y.c F: include/dt-bindings/clock/nuvoton,npcm7xx-clock.h ARM/NUVOTON WPCM450 ARCHITECTURE
drivers/rtc/Kconfig +10 -0
@@ -383,6 +383,16 @@ config RTC_DRV_MAX77686 This driver can also be built as a module. If so, the module will be called rtc-max77686. +config RTC_DRV_NCT3018Y + tristate "Nuvoton NCT3018Y" + depends on OF + help + If you say yes here you get support for the Nuvoton NCT3018Y I2C RTC + chip. + + This driver can also be built as a module, if so, the module will be + called "rtc-nct3018y". + config RTC_DRV_RK808 tristate "Rockchip RK805/RK808/RK809/RK817/RK818 RTC" depends on MFD_RK808
drivers/rtc/Makefile +1 -0
@@ -112,6 +112,7 @@ obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o obj-$(CONFIG_RTC_DRV_GAMECUBE) += rtc-gamecube.o +obj-$(CONFIG_RTC_DRV_NCT3018Y) += rtc-nct3018y.o obj-$(CONFIG_RTC_DRV_NTXEC) += rtc-ntxec.o obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o
drivers/rtc/rtc-nct3018y.c new file +553 -0
553 lines not on this page · raw message
Signature · 1 line
2.17.1