RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
arm
include
bsp
arm-pl111-regs.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11
/*
12
* Copyright (c) 2013 embedded brains GmbH & Co. KG
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions
16
* are met:
17
* 1. Redistributions of source code must retain the above copyright
18
* notice, this list of conditions and the following disclaimer.
19
* 2. Redistributions in binary form must reproduce the above copyright
20
* notice, this list of conditions and the following disclaimer in the
21
* documentation and/or other materials provided with the distribution.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
#ifndef LIBBSP_ARM_SHARED_ARM_PL111_REGS_H
37
#define LIBBSP_ARM_SHARED_ARM_PL111_REGS_H
38
39
#include <
bsp/utility.h
>
40
41
typedef
struct
{
42
uint32_t timing0;
43
#define PL111_LCD_TIMING0_PPL(val) BSP_FLD32(val, 2, 7)
44
#define PL111_LCD_TIMING0_PPL_GET(reg) BSP_FLD32GET(reg, 2, 7)
45
#define PL111_LCD_TIMING0_PPL_SET(reg, val) BSP_FLD32SET(reg, val, 2, 7)
46
#define PL111_LCD_TIMING0_HSW(val) BSP_FLD32(val, 8, 15)
47
#define PL111_LCD_TIMING0_HSW_GET(reg) BSP_FLD32GET(reg, 8, 15)
48
#define PL111_LCD_TIMING0_HSW_SET(reg, val) BSP_FLD32SET(reg, val, 8, 15)
49
#define PL111_LCD_TIMING0_HFP(val) BSP_FLD32(val, 16, 23)
50
#define PL111_LCD_TIMING0_HFP_GET(reg) BSP_FLD32GET(reg, 16, 23)
51
#define PL111_LCD_TIMING0_HFP_SET(reg, val) BSP_FLD32SET(reg, val, 16, 23)
52
#define PL111_LCD_TIMING0_HBP(val) BSP_FLD32(val, 24, 31)
53
#define PL111_LCD_TIMING0_HBP_GET(reg) BSP_FLD32GET(reg, 24, 31)
54
#define PL111_LCD_TIMING0_HBP_SET(reg, val) BSP_FLD32SET(reg, val, 24, 31)
55
uint32_t timing1;
56
#define PL111_LCD_TIMING1_LPP(val) BSP_FLD32(val, 0, 9)
57
#define PL111_LCD_TIMING1_LPP_GET(reg) BSP_FLD32GET(reg, 0, 9)
58
#define PL111_LCD_TIMING1_LPP_SET(reg, val) BSP_FLD32SET(reg, val, 0, 9)
59
#define PL111_LCD_TIMING1_VSW(val) BSP_FLD32(val, 10, 15)
60
#define PL111_LCD_TIMING1_VSW_GET(reg) BSP_FLD32GET(reg, 10, 15)
61
#define PL111_LCD_TIMING1_VSW_SET(reg, val) BSP_FLD32SET(reg, val, 10, 15)
62
#define PL111_LCD_TIMING1_VFP(val) BSP_FLD32(val, 16, 23)
63
#define PL111_LCD_TIMING1_VFP_GET(reg) BSP_FLD32GET(reg, 16, 23)
64
#define PL111_LCD_TIMING1_VFP_SET(reg, val) BSP_FLD32SET(reg, val, 16, 23)
65
#define PL111_LCD_TIMING1_VBP(val) BSP_FLD32(val, 24, 31)
66
#define PL111_LCD_TIMING1_VBP_GET(reg) BSP_FLD32GET(reg, 24, 31)
67
#define PL111_LCD_TIMING1_VBP_SET(reg, val) BSP_FLD32SET(reg, val, 24, 31)
68
uint32_t timing2;
69
#define PL111_LCD_TIMING2_PCD_LO(val) BSP_FLD32(val, 0, 4)
70
#define PL111_LCD_TIMING2_PCD_LO_GET(reg) BSP_FLD32GET(reg, 0, 4)
71
#define PL111_LCD_TIMING2_PCD_LO_SET(reg, val) BSP_FLD32SET(reg, val, 0, 4)
72
#define PL111_LCD_TIMING2_CLKSEL BSP_BIT32(5)
73
#define PL111_LCD_TIMING2_ACB(val) BSP_FLD32(val, 6, 10)
74
#define PL111_LCD_TIMING2_ACB_GET(reg) BSP_FLD32GET(reg, 6, 10)
75
#define PL111_LCD_TIMING2_ACB_SET(reg, val) BSP_FLD32SET(reg, val, 6, 10)
76
#define PL111_LCD_TIMING2_IVS BSP_BIT32(11)
77
#define PL111_LCD_TIMING2_IHS BSP_BIT32(12)
78
#define PL111_LCD_TIMING2_IPC BSP_BIT32(13)
79
#define PL111_LCD_TIMING2_IOE BSP_BIT32(14)
80
#define PL111_LCD_TIMING2_CPL(val) BSP_FLD32(val, 16, 25)
81
#define PL111_LCD_TIMING2_CPL_GET(reg) BSP_FLD32GET(reg, 16, 25)
82
#define PL111_LCD_TIMING2_CPL_SET(reg, val) BSP_FLD32SET(reg, val, 16, 25)
83
#define PL111_LCD_TIMING2_BCD BSP_BIT32(26)
84
#define PL111_LCD_TIMING2_PCD_HI(val) BSP_FLD32(val, 27, 31)
85
#define PL111_LCD_TIMING2_PCD_HI_GET(reg) BSP_FLD32GET(reg, 27, 31)
86
#define PL111_LCD_TIMING2_PCD_HI_SET(reg, val) BSP_FLD32SET(reg, val, 27, 31)
87
uint32_t timing3;
88
#define PL111_LCD_TIMING3_LED(val) BSP_FLD32(val, 0, 6)
89
#define PL111_LCD_TIMING3_LED_GET(reg) BSP_FLD32GET(reg, 0, 6)
90
#define PL111_LCD_TIMING3_LED_SET(reg, val) BSP_FLD32SET(reg, val, 0, 6)
91
#define PL111_LCD_TIMING3_LEE BSP_BIT32(16)
92
uint32_t upbase;
93
uint32_t lpbase;
94
uint32_t control;
95
#define PL111_LCD_CONTROL_LCD_EN BSP_BIT32(0)
96
#define PL111_LCD_CONTROL_LCD_BPP(val) BSP_FLD32(val, 1, 3)
97
#define PL111_LCD_CONTROL_LCD_BPP_GET(reg) BSP_FLD32GET(reg, 1, 3)
98
#define PL111_LCD_CONTROL_LCD_BPP_SET(reg, val) BSP_FLD32SET(reg, val, 1, 3)
99
#define PL111_LCD_CONTROL_LCD_BPP_1 0x00U
100
#define PL111_LCD_CONTROL_LCD_BPP_2 0x01U
101
#define PL111_LCD_CONTROL_LCD_BPP_4 0x02U
102
#define PL111_LCD_CONTROL_LCD_BPP_8 0x03U
103
#define PL111_LCD_CONTROL_LCD_BPP_16 0x04U
104
#define PL111_LCD_CONTROL_LCD_BPP_24 0x05U
105
#define PL111_LCD_CONTROL_LCD_BPP_16_5_6_5 0x06U
106
#define PL111_LCD_CONTROL_LCD_BPP_12 0x07U
107
#define PL111_LCD_CONTROL_LCD_BW BSP_BIT32(4)
108
#define PL111_LCD_CONTROL_LCD_TFT BSP_BIT32(5)
109
#define PL111_LCD_CONTROL_LCD_MONO8 BSP_BIT32(6)
110
#define PL111_LCD_CONTROL_LCD_DUAL BSP_BIT32(7)
111
#define PL111_LCD_CONTROL_BGR BSP_BIT32(8)
112
#define PL111_LCD_CONTROL_BEBO BSP_BIT32(9)
113
#define PL111_LCD_CONTROL_BEPO BSP_BIT32(10)
114
#define PL111_LCD_CONTROL_LCD_PWR BSP_BIT32(11)
115
#define PL111_LCD_CONTROL_LCD_V_COMP(val) BSP_FLD32(val, 12, 13)
116
#define PL111_LCD_CONTROL_LCD_V_COMP_GET(reg) BSP_FLD32GET(reg, 12, 13)
117
#define PL111_LCD_CONTROL_LCD_V_COMP_SET(reg, val) BSP_FLD32SET(reg, val, 12, 13)
118
#define PL111_LCD_CONTROL_WATERMARK BSP_BIT32(16)
119
uint32_t imsc;
120
uint32_t ris;
121
uint32_t mis;
122
uint32_t icr;
123
#define PL111_LCD_I_FUF BSP_BIT32(1)
124
#define PL111_LCD_I_LNBU BSP_BIT32(2)
125
#define PL111_LCD_I_VCOMP BSP_BIT32(3)
126
#define PL111_LCD_I_MBERROR BSP_BIT32(4)
127
uint32_t upcurr;
128
uint32_t lpcurr;
129
uint32_t reserved_34[115];
130
uint16_t pal[256];
131
#define PL111_LCD_PAL_R(val) BSP_FLD16(val, 0, 4)
132
#define PL111_LCD_PAL_R_GET(reg) BSP_FLD16GET(reg, 0, 4)
133
#define PL111_LCD_PAL_R_SET(reg, val) BSP_FLD16SET(reg, val, 0, 4)
134
#define PL111_LCD_PAL_G(val) BSP_FLD16(val, 5, 9)
135
#define PL111_LCD_PAL_G_GET(reg) BSP_FLD16GET(reg, 5, 9)
136
#define PL111_LCD_PAL_G_SET(reg, val) BSP_FLD16SET(reg, val, 5, 9)
137
#define PL111_LCD_PAL_B(val) BSP_FLD16(val, 10, 14)
138
#define PL111_LCD_PAL_B_GET(reg) BSP_FLD16GET(reg, 10, 14)
139
#define PL111_LCD_PAL_B_SET(reg, val) BSP_FLD16SET(reg, val, 10, 14)
140
#define PL111_LCD_PAL_I BSP_BIT16(15)
141
}
pl111_lcd
;
142
143
typedef
struct
{
144
uint8_t image[1024];
145
uint32_t ctrl;
146
#define PL111_CRSR_CTRL_ON BSP_BIT32(0)
147
#define PL111_CRSR_CTRL_NUMBER(val) BSP_FLD32(val, 4, 5)
148
#define PL111_CRSR_CTRL_NUMBER_GET(reg) BSP_FLD32GET(reg, 4, 5)
149
#define PL111_CRSR_CTRL_NUMBER_SET(reg, val) BSP_FLD32SET(reg, val, 4, 5)
150
uint32_t config;
151
#define PL111_CRSR_CONFIG_SIZE BSP_BIT32(0)
152
#define PL111_CRSR_CONFIG_FRAME_SYNC BSP_BIT32(1)
153
uint32_t palette0;
154
uint32_t palette1;
155
#define PL111_CRSR_PALETTE_RED(val) BSP_FLD32(val, 0, 7)
156
#define PL111_CRSR_PALETTE_RED_GET(reg) BSP_FLD32GET(reg, 0, 7)
157
#define PL111_CRSR_PALETTE_RED_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
158
#define PL111_CRSR_PALETTE_GREEN(val) BSP_FLD32(val, 8, 15)
159
#define PL111_CRSR_PALETTE_GREEN_GET(reg) BSP_FLD32GET(reg, 8, 15)
160
#define PL111_CRSR_PALETTE_GREEN_SET(reg, val) BSP_FLD32SET(reg, val, 8, 15)
161
#define PL111_CRSR_PALETTE_BLUE(val) BSP_FLD32(val, 16, 23)
162
#define PL111_CRSR_PALETTE_BLUE_GET(reg) BSP_FLD32GET(reg, 16, 23)
163
#define PL111_CRSR_PALETTE_BLUE_SET(reg, val) BSP_FLD32SET(reg, val, 16, 23)
164
uint32_t xy;
165
#define PL111_CRSR_XY_X(val) BSP_FLD32(val, 0, 9)
166
#define PL111_CRSR_XY_X_GET(reg) BSP_FLD32GET(reg, 0, 9)
167
#define PL111_CRSR_XY_X_SET(reg, val) BSP_FLD32SET(reg, val, 0, 9)
168
#define PL111_CRSR_XY_X_EXP(val) BSP_FLD32(val, 10, 11)
169
#define PL111_CRSR_XY_X_EXP_GET(reg) BSP_FLD32GET(reg, 10, 11)
170
#define PL111_CRSR_XY_X_EXP_SET(reg, val) BSP_FLD32SET(reg, val, 10, 11)
171
#define PL111_CRSR_XY_Y(val) BSP_FLD32(val, 16, 25)
172
#define PL111_CRSR_XY_Y_GET(reg) BSP_FLD32GET(reg, 16, 25)
173
#define PL111_CRSR_XY_Y_SET(reg, val) BSP_FLD32SET(reg, val, 16, 25)
174
#define PL111_CRSR_XY_Y_EXP(val) BSP_FLD32(val, 25, 27)
175
#define PL111_CRSR_XY_Y_EXP_GET(reg) BSP_FLD32GET(reg, 25, 27)
176
#define PL111_CRSR_XY_Y_EXP_SET(reg, val) BSP_FLD32SET(reg, val, 25, 27)
177
uint32_t clip;
178
#define PL111_CRSR_CLIP_X(val) BSP_FLD32(val, 0, 5)
179
#define PL111_CRSR_CLIP_X_GET(reg) BSP_FLD32GET(reg, 0, 5)
180
#define PL111_CRSR_CLIP_X_SET(reg, val) BSP_FLD32SET(reg, val, 0, 5)
181
#define PL111_CRSR_CLIP_Y(val) BSP_FLD32(val, 8, 13)
182
#define PL111_CRSR_CLIP_Y_GET(reg) BSP_FLD32GET(reg, 8, 13)
183
#define PL111_CRSR_CLIP_Y_SET(reg, val) BSP_FLD32SET(reg, val, 8, 13)
184
uint32_t imsc;
185
uint32_t icr;
186
uint32_t ris;
187
uint32_t mis;
188
#define PL111_CRSR_I_CRSR BSP_BIT32(0)
189
}
pl111_crsr
;
190
191
typedef
struct
{
192
pl111_lcd
lcd;
193
uint32_t reserved_400[256];
194
pl111_crsr
crsr;
195
}
pl111
;
196
197
#endif
/* LIBBSP_ARM_SHARED_ARM_PL111_REGS_H */
utility.h
This header file provides utility macros for BSPs.
pl111_crsr
Definition
arm-pl111-regs.h:143
pl111_lcd
Definition
arm-pl111-regs.h:41
pl111
Definition
arm-pl111-regs.h:191
Generated by
1.18.0