summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h')
-rw-r--r--firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h153
1 files changed, 153 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h b/firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h
new file mode 100644
index 0000000000..4d7b385d10
--- /dev/null
+++ b/firmware/target/arm/imx233/regs/stmp3700/regs-pwm.h
@@ -0,0 +1,153 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * This file was automatically generated by headergen, DO NOT EDIT it.
9 * headergen version: 2.1.7
10 * XML versions: stmp3700:3.2.0
11 *
12 * Copyright (C) 2013 by Amaury Pouly
13 *
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
18 *
19 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 * KIND, either express or implied.
21 *
22 ****************************************************************************/
23#ifndef __HEADERGEN__STMP3700__PWM__H__
24#define __HEADERGEN__STMP3700__PWM__H__
25
26#define REGS_PWM_BASE (0x80064000)
27
28#define REGS_PWM_VERSION "3.2.0"
29
30/**
31 * Register: HW_PWM_CTRL
32 * Address: 0
33 * SCT: yes
34*/
35#define HW_PWM_CTRL (*(volatile unsigned long *)(REGS_PWM_BASE + 0x0 + 0x0))
36#define HW_PWM_CTRL_SET (*(volatile unsigned long *)(REGS_PWM_BASE + 0x0 + 0x4))
37#define HW_PWM_CTRL_CLR (*(volatile unsigned long *)(REGS_PWM_BASE + 0x0 + 0x8))
38#define HW_PWM_CTRL_TOG (*(volatile unsigned long *)(REGS_PWM_BASE + 0x0 + 0xc))
39#define BP_PWM_CTRL_SFTRST 31
40#define BM_PWM_CTRL_SFTRST 0x80000000
41#define BF_PWM_CTRL_SFTRST(v) (((v) << 31) & 0x80000000)
42#define BP_PWM_CTRL_CLKGATE 30
43#define BM_PWM_CTRL_CLKGATE 0x40000000
44#define BF_PWM_CTRL_CLKGATE(v) (((v) << 30) & 0x40000000)
45#define BP_PWM_CTRL_PWM4_PRESENT 29
46#define BM_PWM_CTRL_PWM4_PRESENT 0x20000000
47#define BF_PWM_CTRL_PWM4_PRESENT(v) (((v) << 29) & 0x20000000)
48#define BP_PWM_CTRL_PWM3_PRESENT 28
49#define BM_PWM_CTRL_PWM3_PRESENT 0x10000000
50#define BF_PWM_CTRL_PWM3_PRESENT(v) (((v) << 28) & 0x10000000)
51#define BP_PWM_CTRL_PWM2_PRESENT 27
52#define BM_PWM_CTRL_PWM2_PRESENT 0x8000000
53#define BF_PWM_CTRL_PWM2_PRESENT(v) (((v) << 27) & 0x8000000)
54#define BP_PWM_CTRL_PWM1_PRESENT 26
55#define BM_PWM_CTRL_PWM1_PRESENT 0x4000000
56#define BF_PWM_CTRL_PWM1_PRESENT(v) (((v) << 26) & 0x4000000)
57#define BP_PWM_CTRL_PWM0_PRESENT 25
58#define BM_PWM_CTRL_PWM0_PRESENT 0x2000000
59#define BF_PWM_CTRL_PWM0_PRESENT(v) (((v) << 25) & 0x2000000)
60#define BP_PWM_CTRL_PWM2_ANA_CTRL_ENABLE 5
61#define BM_PWM_CTRL_PWM2_ANA_CTRL_ENABLE 0x20
62#define BF_PWM_CTRL_PWM2_ANA_CTRL_ENABLE(v) (((v) << 5) & 0x20)
63#define BP_PWM_CTRL_PWM4_ENABLE 4
64#define BM_PWM_CTRL_PWM4_ENABLE 0x10
65#define BF_PWM_CTRL_PWM4_ENABLE(v) (((v) << 4) & 0x10)
66#define BP_PWM_CTRL_PWM3_ENABLE 3
67#define BM_PWM_CTRL_PWM3_ENABLE 0x8
68#define BF_PWM_CTRL_PWM3_ENABLE(v) (((v) << 3) & 0x8)
69#define BP_PWM_CTRL_PWM2_ENABLE 2
70#define BM_PWM_CTRL_PWM2_ENABLE 0x4
71#define BF_PWM_CTRL_PWM2_ENABLE(v) (((v) << 2) & 0x4)
72#define BP_PWM_CTRL_PWM1_ENABLE 1
73#define BM_PWM_CTRL_PWM1_ENABLE 0x2
74#define BF_PWM_CTRL_PWM1_ENABLE(v) (((v) << 1) & 0x2)
75#define BP_PWM_CTRL_PWM0_ENABLE 0
76#define BM_PWM_CTRL_PWM0_ENABLE 0x1
77#define BF_PWM_CTRL_PWM0_ENABLE(v) (((v) << 0) & 0x1)
78
79/**
80 * Register: HW_PWM_ACTIVEn
81 * Address: 0x10+n*0x20
82 * SCT: yes
83*/
84#define HW_PWM_ACTIVEn(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x10+(n)*0x20 + 0x0))
85#define HW_PWM_ACTIVEn_SET(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x10+(n)*0x20 + 0x4))
86#define HW_PWM_ACTIVEn_CLR(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x10+(n)*0x20 + 0x8))
87#define HW_PWM_ACTIVEn_TOG(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x10+(n)*0x20 + 0xc))
88#define BP_PWM_ACTIVEn_INACTIVE 16
89#define BM_PWM_ACTIVEn_INACTIVE 0xffff0000
90#define BF_PWM_ACTIVEn_INACTIVE(v) (((v) << 16) & 0xffff0000)
91#define BP_PWM_ACTIVEn_ACTIVE 0
92#define BM_PWM_ACTIVEn_ACTIVE 0xffff
93#define BF_PWM_ACTIVEn_ACTIVE(v) (((v) << 0) & 0xffff)
94
95/**
96 * Register: HW_PWM_PERIODn
97 * Address: 0x20+n*0x20
98 * SCT: yes
99*/
100#define HW_PWM_PERIODn(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x20+(n)*0x20 + 0x0))
101#define HW_PWM_PERIODn_SET(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x20+(n)*0x20 + 0x4))
102#define HW_PWM_PERIODn_CLR(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x20+(n)*0x20 + 0x8))
103#define HW_PWM_PERIODn_TOG(n) (*(volatile unsigned long *)(REGS_PWM_BASE + 0x20+(n)*0x20 + 0xc))
104#define BP_PWM_PERIODn_MATT 23
105#define BM_PWM_PERIODn_MATT 0x800000
106#define BF_PWM_PERIODn_MATT(v) (((v) << 23) & 0x800000)
107#define BP_PWM_PERIODn_CDIV 20
108#define BM_PWM_PERIODn_CDIV 0x700000
109#define BV_PWM_PERIODn_CDIV__DIV_1 0x0
110#define BV_PWM_PERIODn_CDIV__DIV_2 0x1
111#define BV_PWM_PERIODn_CDIV__DIV_4 0x2
112#define BV_PWM_PERIODn_CDIV__DIV_8 0x3
113#define BV_PWM_PERIODn_CDIV__DIV_16 0x4
114#define BV_PWM_PERIODn_CDIV__DIV_64 0x5
115#define BV_PWM_PERIODn_CDIV__DIV_256 0x6
116#define BV_PWM_PERIODn_CDIV__DIV_1024 0x7
117#define BF_PWM_PERIODn_CDIV(v) (((v) << 20) & 0x700000)
118#define BF_PWM_PERIODn_CDIV_V(v) ((BV_PWM_PERIODn_CDIV__##v << 20) & 0x700000)
119#define BP_PWM_PERIODn_INACTIVE_STATE 18
120#define BM_PWM_PERIODn_INACTIVE_STATE 0xc0000
121#define BV_PWM_PERIODn_INACTIVE_STATE__HI_Z 0x0
122#define BV_PWM_PERIODn_INACTIVE_STATE__0 0x2
123#define BV_PWM_PERIODn_INACTIVE_STATE__1 0x3
124#define BF_PWM_PERIODn_INACTIVE_STATE(v) (((v) << 18) & 0xc0000)
125#define BF_PWM_PERIODn_INACTIVE_STATE_V(v) ((BV_PWM_PERIODn_INACTIVE_STATE__##v << 18) & 0xc0000)
126#define BP_PWM_PERIODn_ACTIVE_STATE 16
127#define BM_PWM_PERIODn_ACTIVE_STATE 0x30000
128#define BV_PWM_PERIODn_ACTIVE_STATE__HI_Z 0x0
129#define BV_PWM_PERIODn_ACTIVE_STATE__0 0x2
130#define BV_PWM_PERIODn_ACTIVE_STATE__1 0x3
131#define BF_PWM_PERIODn_ACTIVE_STATE(v) (((v) << 16) & 0x30000)
132#define BF_PWM_PERIODn_ACTIVE_STATE_V(v) ((BV_PWM_PERIODn_ACTIVE_STATE__##v << 16) & 0x30000)
133#define BP_PWM_PERIODn_PERIOD 0
134#define BM_PWM_PERIODn_PERIOD 0xffff
135#define BF_PWM_PERIODn_PERIOD(v) (((v) << 0) & 0xffff)
136
137/**
138 * Register: HW_PWM_VERSION
139 * Address: 0xb0
140 * SCT: no
141*/
142#define HW_PWM_VERSION (*(volatile unsigned long *)(REGS_PWM_BASE + 0xb0))
143#define BP_PWM_VERSION_MAJOR 24
144#define BM_PWM_VERSION_MAJOR 0xff000000
145#define BF_PWM_VERSION_MAJOR(v) (((v) << 24) & 0xff000000)
146#define BP_PWM_VERSION_MINOR 16
147#define BM_PWM_VERSION_MINOR 0xff0000
148#define BF_PWM_VERSION_MINOR(v) (((v) << 16) & 0xff0000)
149#define BP_PWM_VERSION_STEP 0
150#define BM_PWM_VERSION_STEP 0xffff
151#define BF_PWM_VERSION_STEP(v) (((v) << 0) & 0xffff)
152
153#endif /* __HEADERGEN__STMP3700__PWM__H__ */