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