Skip to content

Commit

Permalink
rtc: snvs: add Freescale rtc-snvs driver
Browse files Browse the repository at this point in the history
Add an RTC driver for Freescale Secure Non-Volatile Storage (SNVS)
Low Power (LP) RTC.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Kim Phillips <kim.phillips@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Shawn Guo authored and Linus Torvalds committed Oct 5, 2012
1 parent 7418a11 commit 179a502
Show file tree
Hide file tree
Showing 5 changed files with 414 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Documentation/devicetree/bindings/crypto/fsl-sec4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Copyright (C) 2008-2011 Freescale Semiconductor Inc.
-Run Time Integrity Check (RTIC) Node
-Run Time Integrity Check (RTIC) Memory Node
-Secure Non-Volatile Storage (SNVS) Node
-Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node
-Full Example

NOTE: the SEC 4 is also known as Freescale's Cryptographic Accelerator
Expand Down Expand Up @@ -294,6 +295,27 @@ Secure Non-Volatile Storage (SNVS) Node
address and length of the SEC4 configuration
registers.

- #address-cells
Usage: required
Value type: <u32>
Definition: A standard property. Defines the number of cells
for representing physical addresses in child nodes. Must
have a value of 1.

- #size-cells
Usage: required
Value type: <u32>
Definition: A standard property. Defines the number of cells
for representing the size of physical addresses in
child nodes. Must have a value of 1.

- ranges
Usage: required
Value type: <prop-encoded-array>
Definition: A standard property. Specifies the physical address
range of the SNVS register space. A triplet that includes
the child address, parent address, & length.

- interrupts
Usage: required
Value type: <prop_encoded-array>
Expand All @@ -314,10 +336,33 @@ EXAMPLE
sec_mon@314000 {
compatible = "fsl,sec-v4.0-mon";
reg = <0x314000 0x1000>;
ranges = <0 0x314000 0x1000>;
interrupt-parent = <&mpic>;
interrupts = <93 2>;
};

=====================================================================
Secure Non-Volatile Storage (SNVS) Low Power (LP) RTC Node

A SNVS child node that defines SNVS LP RTC.

- compatible
Usage: required
Value type: <string>
Definition: Must include "fsl,sec-v4.0-mon-rtc-lp".

- reg
Usage: required
Value type: <prop-encoded-array>
Definition: A standard property. Specifies the physical
address and length of the SNVS LP configuration registers.

EXAMPLE
sec_mon_rtc_lp@314000 {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
reg = <0x34 0x58>;
};

=====================================================================
FULL EXAMPLE

Expand Down Expand Up @@ -390,8 +435,14 @@ FULL EXAMPLE
sec_mon: sec_mon@314000 {
compatible = "fsl,sec-v4.0-mon";
reg = <0x314000 0x1000>;
ranges = <0 0x314000 0x1000>;
interrupt-parent = <&mpic>;
interrupts = <93 2>;

sec_mon_rtc_lp@34 {
compatible = "fsl,sec-v4.0-mon-rtc-lp";
reg = <0x34 0x58>;
};
};

=====================================================================
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/rtc/snvs-rtc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See Documentation/devicetree/bindings/crypto/fsl-sec4.txt for details.
11 changes: 11 additions & 0 deletions drivers/rtc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1109,4 +1109,15 @@ config RTC_DRV_MXC
This driver can also be built as a module, if so, the module
will be called "rtc-mxc".

config RTC_DRV_SNVS
tristate "Freescale SNVS RTC support"
depends on HAS_IOMEM
depends on OF
help
If you say yes here you get support for the Freescale SNVS
Low Power (LP) RTC module.

This driver can also be built as a module, if so, the module
will be called "rtc-snvs".

endif # RTC_CLASS
1 change: 1 addition & 0 deletions drivers/rtc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ obj-$(CONFIG_RTC_DRV_S35390A) += rtc-s35390a.o
obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
obj-$(CONFIG_RTC_DRV_SA1100) += rtc-sa1100.o
obj-$(CONFIG_RTC_DRV_SH) += rtc-sh.o
obj-$(CONFIG_RTC_DRV_SNVS) += rtc-snvs.o
obj-$(CONFIG_RTC_DRV_SPEAR) += rtc-spear.o
obj-$(CONFIG_RTC_DRV_STARFIRE) += rtc-starfire.o
obj-$(CONFIG_RTC_DRV_STK17TA8) += rtc-stk17ta8.o
Expand Down
Loading

0 comments on commit 179a502

Please sign in to comment.