diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-06-14 08:16:35 -0400 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-08-09 17:17:49 -0400 |
commit | ef2d84bec6a02c4536cab1e0a8f13792ad86a7bc (patch) | |
tree | cc3d63910ca91f770651752dae7e81871e5d6ede | |
parent | 2fd22dba23e3847651bffa1d9cc37acea05cc351 (diff) |
drm/rcar-du: Add support for the R8A7790 DU
The DU revision in the R8A7790 SoC uses one IRQ and clock per CRTC. Add
a corresponding entry in the module platform ID table.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/rcar-du/rcar_du_regs.h | 66 |
2 files changed, 68 insertions, 3 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index fd7cdda375b6..381dbad05e58 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c | |||
@@ -220,8 +220,13 @@ static const struct rcar_du_device_info rcar_du_r8a7779_info = { | |||
220 | .features = 0, | 220 | .features = 0, |
221 | }; | 221 | }; |
222 | 222 | ||
223 | static const struct rcar_du_device_info rcar_du_r8a7790_info = { | ||
224 | .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK, | ||
225 | }; | ||
226 | |||
223 | static const struct platform_device_id rcar_du_id_table[] = { | 227 | static const struct platform_device_id rcar_du_id_table[] = { |
224 | { "rcar-du-r8a7779", (kernel_ulong_t)&rcar_du_r8a7779_info }, | 228 | { "rcar-du-r8a7779", (kernel_ulong_t)&rcar_du_r8a7779_info }, |
229 | { "rcar-du-r8a7790", (kernel_ulong_t)&rcar_du_r8a7790_info }, | ||
225 | { } | 230 | { } |
226 | }; | 231 | }; |
227 | 232 | ||
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_regs.h b/drivers/gpu/drm/rcar-du/rcar_du_regs.h index 195ed7e1756e..f62a9f36041a 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_regs.h +++ b/drivers/gpu/drm/rcar-du/rcar_du_regs.h | |||
@@ -196,6 +196,68 @@ | |||
196 | #define DEFR6_DEFAULT (DEFR6_CODE | DEFR6_TCNE2) | 196 | #define DEFR6_DEFAULT (DEFR6_CODE | DEFR6_TCNE2) |
197 | 197 | ||
198 | /* ----------------------------------------------------------------------------- | 198 | /* ----------------------------------------------------------------------------- |
199 | * R8A7790-only Control Registers | ||
200 | */ | ||
201 | |||
202 | #define DD1SSR 0x20008 | ||
203 | #define DD1SSR_TVR (1 << 15) | ||
204 | #define DD1SSR_FRM (1 << 14) | ||
205 | #define DD1SSR_BUF (1 << 12) | ||
206 | #define DD1SSR_VBK (1 << 11) | ||
207 | #define DD1SSR_RINT (1 << 9) | ||
208 | #define DD1SSR_HBK (1 << 8) | ||
209 | #define DD1SSR_ADC(n) (1 << ((n)-1)) | ||
210 | |||
211 | #define DD1SRCR 0x2000c | ||
212 | #define DD1SRCR_TVR (1 << 15) | ||
213 | #define DD1SRCR_FRM (1 << 14) | ||
214 | #define DD1SRCR_BUF (1 << 12) | ||
215 | #define DD1SRCR_VBK (1 << 11) | ||
216 | #define DD1SRCR_RINT (1 << 9) | ||
217 | #define DD1SRCR_HBK (1 << 8) | ||
218 | #define DD1SRCR_ADC(n) (1 << ((n)-1)) | ||
219 | |||
220 | #define DD1IER 0x20010 | ||
221 | #define DD1IER_TVR (1 << 15) | ||
222 | #define DD1IER_FRM (1 << 14) | ||
223 | #define DD1IER_BUF (1 << 12) | ||
224 | #define DD1IER_VBK (1 << 11) | ||
225 | #define DD1IER_RINT (1 << 9) | ||
226 | #define DD1IER_HBK (1 << 8) | ||
227 | #define DD1IER_ADC(n) (1 << ((n)-1)) | ||
228 | |||
229 | #define DEFR8 0x20020 | ||
230 | #define DEFR8_CODE (0x7790 << 16) | ||
231 | #define DEFR8_VSCS (1 << 6) | ||
232 | #define DEFR8_DRGBS_DU(n) ((n) << 4) | ||
233 | #define DEFR8_DRGBS_MASK (3 << 4) | ||
234 | #define DEFR8_DEFE8 (1 << 0) | ||
235 | |||
236 | #define DOFLR 0x20024 | ||
237 | #define DOFLR_CODE (0x7790 << 16) | ||
238 | #define DOFLR_HSYCFL1 (1 << 13) | ||
239 | #define DOFLR_VSYCFL1 (1 << 12) | ||
240 | #define DOFLR_ODDFL1 (1 << 11) | ||
241 | #define DOFLR_DISPFL1 (1 << 10) | ||
242 | #define DOFLR_CDEFL1 (1 << 9) | ||
243 | #define DOFLR_RGBFL1 (1 << 8) | ||
244 | #define DOFLR_HSYCFL0 (1 << 5) | ||
245 | #define DOFLR_VSYCFL0 (1 << 4) | ||
246 | #define DOFLR_ODDFL0 (1 << 3) | ||
247 | #define DOFLR_DISPFL0 (1 << 2) | ||
248 | #define DOFLR_CDEFL0 (1 << 1) | ||
249 | #define DOFLR_RGBFL0 (1 << 0) | ||
250 | |||
251 | #define DIDSR 0x20028 | ||
252 | #define DIDSR_CODE (0x7790 << 16) | ||
253 | #define DIDSR_LCDS_DCLKIN(n) (0 << (8 + (n) * 2)) | ||
254 | #define DIDSR_LCDS_LVDS0(n) (2 << (8 + (n) * 2)) | ||
255 | #define DIDSR_LCDS_LVDS1(n) (3 << (8 + (n) * 2)) | ||
256 | #define DIDSR_LCDS_MASK(n) (3 << (8 + (n) * 2)) | ||
257 | #define DIDSR_PCDS_CLK(n, clk) (clk << ((n) * 2)) | ||
258 | #define DIDSR_PCDS_MASK(n) (3 << ((n) * 2)) | ||
259 | |||
260 | /* ----------------------------------------------------------------------------- | ||
199 | * Display Timing Generation Registers | 261 | * Display Timing Generation Registers |
200 | */ | 262 | */ |
201 | 263 | ||
@@ -364,12 +426,10 @@ | |||
364 | * Display Capture Registers | 426 | * Display Capture Registers |
365 | */ | 427 | */ |
366 | 428 | ||
429 | #define DCMR 0x0c100 | ||
367 | #define DCMWR 0x0c104 | 430 | #define DCMWR 0x0c104 |
368 | #define DC2MWR 0x0c204 | ||
369 | #define DCSAR 0x0c120 | 431 | #define DCSAR 0x0c120 |
370 | #define DC2SAR 0x0c220 | ||
371 | #define DCMLR 0x0c150 | 432 | #define DCMLR 0x0c150 |
372 | #define DC2MLR 0x0c250 | ||
373 | 433 | ||
374 | /* ----------------------------------------------------------------------------- | 434 | /* ----------------------------------------------------------------------------- |
375 | * Color Palette Registers | 435 | * Color Palette Registers |