imxsnvsreg.h revision 1.1 1 1.1 ryo /* $NetBSD: imxsnvsreg.h,v 1.1 2016/05/17 06:44:45 ryo Exp $ */
2 1.1 ryo
3 1.1 ryo /*
4 1.1 ryo * Copyright (c) 2014 Ryo Shimizu <ryo (at) nerv.org>
5 1.1 ryo * All rights reserved.
6 1.1 ryo *
7 1.1 ryo * Redistribution and use in source and binary forms, with or without
8 1.1 ryo * modification, are permitted provided that the following conditions
9 1.1 ryo * are met:
10 1.1 ryo * 1. Redistributions of source code must retain the above copyright
11 1.1 ryo * notice, this list of conditions and the following disclaimer.
12 1.1 ryo * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 ryo * notice, this list of conditions and the following disclaimer in the
14 1.1 ryo * documentation and/or other materials provided with the distribution.
15 1.1 ryo *
16 1.1 ryo * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 1.1 ryo * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 1.1 ryo * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 1.1 ryo * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
20 1.1 ryo * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 1.1 ryo * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 1.1 ryo * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 1.1 ryo * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
24 1.1 ryo * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
25 1.1 ryo * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 ryo * POSSIBILITY OF SUCH DAMAGE.
27 1.1 ryo */
28 1.1 ryo #ifndef _IMXSNVSREG_H_
29 1.1 ryo #define _IMXSNVSREG_H_
30 1.1 ryo
31 1.1 ryo #define SVNS_COUNTER_HZ (32 * 1024) /* 32kHz */
32 1.1 ryo #define SVNS_COUNTER_SHIFT 15
33 1.1 ryo
34 1.1 ryo #define SNVS_HPLR 0x00000000
35 1.1 ryo #define SNVS_HPCOMR 0x00000004
36 1.1 ryo #define SNVS_HPCR 0x00000008
37 1.1 ryo #define SNVS_HPSR 0x00000014
38 1.1 ryo #define SNVS_HPRTCMR 0x00000024
39 1.1 ryo #define SNVS_HPRTCLR 0x00000028
40 1.1 ryo #define SNVS_HPTAMR 0x0000002c
41 1.1 ryo #define SNVS_HPTALR 0x00000030
42 1.1 ryo #define SNVS_LPLR 0x00000034
43 1.1 ryo #define SNVS_LPLR_GPR_HL __BIT(5)
44 1.1 ryo #define SNVS_LPLR_MC_HL __BIT(4)
45 1.1 ryo #define SNVS_LPLR_LPCALB_HL __BIT(3)
46 1.1 ryo #define SNVS_LPLR_SRTC_HL __BIT(2)
47 1.1 ryo #define SNVS_LPCR 0x00000038
48 1.1 ryo #define SNVS_LPCR_PK_OVERRIDE __BIT(23)
49 1.1 ryo #define SNVS_LPCR_PK_EN __BIT(22)
50 1.1 ryo #define SNVS_LPCR_ON_TIME __BITS(21, 20)
51 1.1 ryo #define SNVS_LPCR_DEBOUNCE __BITS(19, 18)
52 1.1 ryo #define SNVS_LPCR_BTN_PRESS_TIME __BITS(17, 16)
53 1.1 ryo #define SNVS_LPCR_LPCALB_VAL __BITS(14, 10)
54 1.1 ryo #define SNVS_LPCR_LPCALB_EN __BIT(8)
55 1.1 ryo #define SNVS_LPCR_PWR_GLITCH_EN __BIT(7)
56 1.1 ryo #define SNVS_LPCR_TOP __BIT(6)
57 1.1 ryo #define SNVS_LPCR_DP_EN __BIT(5)
58 1.1 ryo #define SNVS_LPCR_SRTC_INV_EN __BIT(4)
59 1.1 ryo #define SNVS_LPCR_LPWUI_EN __BIT(3)
60 1.1 ryo #define SNVS_LPCR_MC_ENV __BIT(2)
61 1.1 ryo #define SNVS_LPCR_LPTA_EN __BIT(1)
62 1.1 ryo #define SNVS_LPCR_SRTC_ENV __BIT(0)
63 1.1 ryo #define SNVS_LPSR 0x0000004c
64 1.1 ryo #define SNVS_LPSR_SPO __BIT(18)
65 1.1 ryo #define SNVS_LPSR_EO __BIT(17)
66 1.1 ryo #define SNVS_LPSR_MCR __BIT(2)
67 1.1 ryo #define SNVS_LPSR_SRTCR __BIT(1)
68 1.1 ryo #define SNVS_LPSR_LPTA __BIT(0)
69 1.1 ryo #define SNVS_LPSRTCMR 0x00000050
70 1.1 ryo #define SNVS_LPSRTCMR_SRTC __BITS(14, 0)
71 1.1 ryo #define SNVS_LPSRTCLR 0x00000054
72 1.1 ryo #define SNVS_LPTAR 0x00000058
73 1.1 ryo #define SNVS_LPSMCMR 0x0000005c
74 1.1 ryo #define SNVS_LPSMCMR_MC_ERA_BIT __BITS(31, 16)
75 1.1 ryo #define SNVS_LPSMCMR_MON_COUNTER __BITS(15, 0)
76 1.1 ryo #define SNVS_LPSMCLR 0x00000060
77 1.1 ryo #define SNVS_LPGPR 0x00000068
78 1.1 ryo #define SNVS_HPVIDR1 0x00000bf8
79 1.1 ryo #define SNVS_HPVIDR1_IP_ID __BITS(31, 16)
80 1.1 ryo #define SNVS_HPVIDR1_MAJOR_REV __BITS(15, 8)
81 1.1 ryo #define SNVS_HPVIDR1_MINOR_REV __BITS(7, 0)
82 1.1 ryo #define SNVS_HPVIDR2 0x00000bfc
83 1.1 ryo #define SNVS_HPVIDR2_IP_ERA __BITS(31, 24)
84 1.1 ryo #define SNVS_HPVIDR2_INTG_OPT __BITS(23, 16)
85 1.1 ryo #define SNVS_HPVIDR2_ECO_REV __BITS(15, 8)
86 1.1 ryo #define SNVS_HPVIDR2_CONFIG_OPT __BITS(7, 0)
87 1.1 ryo
88 1.1 ryo #endif /* _IMXSNVSREG_H_ */
89