153df6693Smacallan /* 253df6693Smacallan * Redistribution and use in source and binary forms, with or without 353df6693Smacallan * modification, are permitted provided that the following conditions 453df6693Smacallan * are met: 553df6693Smacallan * 1. Redistributions of source code must retain the above copyright 653df6693Smacallan * notice, this list of conditions and the following disclaimer. 753df6693Smacallan * 2. Redistributions in binary form must reproduce the above copyright 853df6693Smacallan * notice, this list of conditions and the following disclaimer in the 953df6693Smacallan * documentation and/or other materials provided with the distribution. 1053df6693Smacallan * 1153df6693Smacallan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1253df6693Smacallan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1353df6693Smacallan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1453df6693Smacallan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1553df6693Smacallan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 1653df6693Smacallan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1753df6693Smacallan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1853df6693Smacallan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1953df6693Smacallan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2053df6693Smacallan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2153df6693Smacallan */ 2253df6693Smacallan 23*72d26a2dSrin #include <sys/cdefs.h> 24*72d26a2dSrin __KERNEL_RCSID(0, "$NetBSD: platinumfbreg.h,v 1.3 2020/04/16 23:29:52 rin Exp $"); 25*72d26a2dSrin 2653df6693Smacallan #ifndef PLATINUMFBREG_H 2753df6693Smacallan #define PLATINUMFBREG_H 2853df6693Smacallan 2953df6693Smacallan /* 3053df6693Smacallan * platinum register address offsets. 3153df6693Smacallan * registers are each 32 bits with 12*8bits of padding, 3253df6693Smacallan * 128 registers total 3353df6693Smacallan */ 3453df6693Smacallan #define PLATINUM_REG_OFFSET_ADDR(x) (x * 0x10) 3553df6693Smacallan #define PLATINUM_REG_COUNT 128 3653df6693Smacallan 3753df6693Smacallan /* 3853df6693Smacallan * colormap register addresses. 3953df6693Smacallan * registers are each 8 bits with 15*8 bits of padding 4053df6693Smacallan */ 4153df6693Smacallan #define PLATINUM_CMAP_BASE_ADDR 0xf301b000 /* XXX not in ofw ? */ 4253df6693Smacallan #define PLATINUM_CMAP_ADDR_OFFSET 0x00000000 4353df6693Smacallan #define PLATINUM_CMAP_D1_OFFSET 0x00000010 4453df6693Smacallan #define PLATINUM_CMAP_D2_OFFSET 0x00000020 4553df6693Smacallan #define PLATINUM_CMAP_LUT_OFFSET 0x00000030 4653df6693Smacallan #define PLATINUM_CMAP_SIZE 0x1000 /* XXX ofw says 0x800? */ 4753df6693Smacallan 4853df6693Smacallan /* framebuffer */ 4953df6693Smacallan #define PLATINUM_FB_BANK_SIZE 0x100000 5053df6693Smacallan #define PLATINUM_FB_MIN_SIZE (1 * PLATINUM_FB_BANK_SIZE) 5153df6693Smacallan #define PLATINUM_FB_MAX_SIZE (4 * PLATINUM_FB_BANK_SIZE) 5253df6693Smacallan 5353df6693Smacallan /* depth/colormodes */ 5453df6693Smacallan #define PLATINUM_CMODE_8 0 5553df6693Smacallan #define PLATINUM_CMODE_16 1 5653df6693Smacallan #define PLATINUM_CMODE_32 2 5753df6693Smacallan 5853df6693Smacallan /* DACula types */ 5953df6693Smacallan #define PLATINUM_DAC_0 0x84 6053df6693Smacallan #define PLATINUM_DAC_1 0x3c 6153df6693Smacallan 6253df6693Smacallan #endif /* PLATINUMFBREG_H */ 63