platinumfbreg.h revision 1.3 1 1.1 macallan /*
2 1.1 macallan * Redistribution and use in source and binary forms, with or without
3 1.1 macallan * modification, are permitted provided that the following conditions
4 1.1 macallan * are met:
5 1.1 macallan * 1. Redistributions of source code must retain the above copyright
6 1.1 macallan * notice, this list of conditions and the following disclaimer.
7 1.1 macallan * 2. Redistributions in binary form must reproduce the above copyright
8 1.1 macallan * notice, this list of conditions and the following disclaimer in the
9 1.1 macallan * documentation and/or other materials provided with the distribution.
10 1.1 macallan *
11 1.1 macallan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
12 1.1 macallan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
13 1.1 macallan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
14 1.1 macallan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
15 1.1 macallan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
16 1.1 macallan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
17 1.1 macallan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
18 1.1 macallan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
19 1.1 macallan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
20 1.1 macallan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 1.1 macallan */
22 1.1 macallan
23 1.3 rin #include <sys/cdefs.h>
24 1.3 rin __KERNEL_RCSID(0, "$NetBSD: platinumfbreg.h,v 1.3 2020/04/16 23:29:52 rin Exp $");
25 1.3 rin
26 1.1 macallan #ifndef PLATINUMFBREG_H
27 1.1 macallan #define PLATINUMFBREG_H
28 1.1 macallan
29 1.1 macallan /*
30 1.1 macallan * platinum register address offsets.
31 1.1 macallan * registers are each 32 bits with 12*8bits of padding,
32 1.1 macallan * 128 registers total
33 1.1 macallan */
34 1.1 macallan #define PLATINUM_REG_OFFSET_ADDR(x) (x * 0x10)
35 1.1 macallan #define PLATINUM_REG_COUNT 128
36 1.1 macallan
37 1.1 macallan /*
38 1.1 macallan * colormap register addresses.
39 1.1 macallan * registers are each 8 bits with 15*8 bits of padding
40 1.1 macallan */
41 1.1 macallan #define PLATINUM_CMAP_BASE_ADDR 0xf301b000 /* XXX not in ofw ? */
42 1.1 macallan #define PLATINUM_CMAP_ADDR_OFFSET 0x00000000
43 1.1 macallan #define PLATINUM_CMAP_D1_OFFSET 0x00000010
44 1.1 macallan #define PLATINUM_CMAP_D2_OFFSET 0x00000020
45 1.1 macallan #define PLATINUM_CMAP_LUT_OFFSET 0x00000030
46 1.1 macallan #define PLATINUM_CMAP_SIZE 0x1000 /* XXX ofw says 0x800? */
47 1.1 macallan
48 1.1 macallan /* framebuffer */
49 1.1 macallan #define PLATINUM_FB_BANK_SIZE 0x100000
50 1.1 macallan #define PLATINUM_FB_MIN_SIZE (1 * PLATINUM_FB_BANK_SIZE)
51 1.1 macallan #define PLATINUM_FB_MAX_SIZE (4 * PLATINUM_FB_BANK_SIZE)
52 1.1 macallan
53 1.1 macallan /* depth/colormodes */
54 1.1 macallan #define PLATINUM_CMODE_8 0
55 1.1 macallan #define PLATINUM_CMODE_16 1
56 1.1 macallan #define PLATINUM_CMODE_32 2
57 1.1 macallan
58 1.1 macallan /* DACula types */
59 1.1 macallan #define PLATINUM_DAC_0 0x84
60 1.1 macallan #define PLATINUM_DAC_1 0x3c
61 1.1 macallan
62 1.1 macallan #endif /* PLATINUMFBREG_H */
63