Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * drivers/video/geode/display_gx1.h
0004  *   -- Geode GX1 display controller
0005  *
0006  * Copyright (C) 2005 Arcom Control Systems Ltd.
0007  *
0008  * Based on AMD's original 2.4 driver:
0009  *   Copyright (C) 2004 Advanced Micro Devices, Inc.
0010  */
0011 #ifndef __DISPLAY_GX1_H__
0012 #define __DISPLAY_GX1_H__
0013 
0014 unsigned gx1_gx_base(void);
0015 int gx1_frame_buffer_size(void);
0016 
0017 extern const struct geode_dc_ops gx1_dc_ops;
0018 
0019 /* GX1 configuration I/O registers */
0020 
0021 #define CONFIG_CCR3 0xc3
0022 #  define CONFIG_CCR3_MAPEN 0x10
0023 #define CONFIG_GCR  0xb8
0024 
0025 /* Memory controller registers */
0026 
0027 #define MC_BANK_CFG     0x08
0028 #  define MC_BCFG_DIMM0_SZ_MASK     0x00000700
0029 #  define MC_BCFG_DIMM0_PG_SZ_MASK  0x00000070
0030 #  define MC_BCFG_DIMM0_PG_SZ_NO_DIMM   0x00000070
0031 
0032 #define MC_GBASE_ADD        0x14
0033 #  define MC_GADD_GBADD_MASK        0x000003ff
0034 
0035 /* Display controller registers */
0036 
0037 #define DC_PAL_ADDRESS      0x70
0038 #define DC_PAL_DATA     0x74
0039 
0040 #define DC_UNLOCK       0x00
0041 #  define DC_UNLOCK_CODE        0x00004758
0042 
0043 #define DC_GENERAL_CFG      0x04
0044 #  define DC_GCFG_DFLE          0x00000001
0045 #  define DC_GCFG_CURE          0x00000002
0046 #  define DC_GCFG_VCLK_DIV      0x00000004
0047 #  define DC_GCFG_PLNO          0x00000004
0048 #  define DC_GCFG_PPC           0x00000008
0049 #  define DC_GCFG_CMPE          0x00000010
0050 #  define DC_GCFG_DECE          0x00000020
0051 #  define DC_GCFG_DCLK_MASK     0x000000C0
0052 #  define DC_GCFG_DCLK_DIV_1        0x00000080
0053 #  define DC_GCFG_DFHPSL_MASK       0x00000F00
0054 #  define DC_GCFG_DFHPSL_POS             8
0055 #  define DC_GCFG_DFHPEL_MASK       0x0000F000
0056 #  define DC_GCFG_DFHPEL_POS            12
0057 #  define DC_GCFG_CIM_MASK      0x00030000
0058 #  define DC_GCFG_CIM_POS           16
0059 #  define DC_GCFG_FDTY          0x00040000
0060 #  define DC_GCFG_RTPM          0x00080000
0061 #  define DC_GCFG_DAC_RS_MASK       0x00700000
0062 #  define DC_GCFG_DAC_RS_POS            20
0063 #  define DC_GCFG_CKWR          0x00800000
0064 #  define DC_GCFG_LDBL          0x01000000
0065 #  define DC_GCFG_DIAG          0x02000000
0066 #  define DC_GCFG_CH4S          0x04000000
0067 #  define DC_GCFG_SSLC          0x08000000
0068 #  define DC_GCFG_VIDE          0x10000000
0069 #  define DC_GCFG_VRDY          0x20000000
0070 #  define DC_GCFG_DPCK          0x40000000
0071 #  define DC_GCFG_DDCK          0x80000000
0072 
0073 #define DC_TIMING_CFG       0x08
0074 #  define DC_TCFG_FPPE          0x00000001
0075 #  define DC_TCFG_HSYE          0x00000002
0076 #  define DC_TCFG_VSYE          0x00000004
0077 #  define DC_TCFG_BLKE          0x00000008
0078 #  define DC_TCFG_DDCK          0x00000010
0079 #  define DC_TCFG_TGEN          0x00000020
0080 #  define DC_TCFG_VIEN          0x00000040
0081 #  define DC_TCFG_BLNK          0x00000080
0082 #  define DC_TCFG_CHSP          0x00000100
0083 #  define DC_TCFG_CVSP          0x00000200
0084 #  define DC_TCFG_FHSP          0x00000400
0085 #  define DC_TCFG_FVSP          0x00000800
0086 #  define DC_TCFG_FCEN          0x00001000
0087 #  define DC_TCFG_CDCE          0x00002000
0088 #  define DC_TCFG_PLNR          0x00002000
0089 #  define DC_TCFG_INTL          0x00004000
0090 #  define DC_TCFG_PXDB          0x00008000
0091 #  define DC_TCFG_BKRT          0x00010000
0092 #  define DC_TCFG_PSD_MASK      0x000E0000
0093 #  define DC_TCFG_PSD_POS           17
0094 #  define DC_TCFG_DDCI          0x08000000
0095 #  define DC_TCFG_SENS          0x10000000
0096 #  define DC_TCFG_DNA           0x20000000
0097 #  define DC_TCFG_VNA           0x40000000
0098 #  define DC_TCFG_VINT          0x80000000
0099 
0100 #define DC_OUTPUT_CFG       0x0C
0101 #  define DC_OCFG_8BPP          0x00000001
0102 #  define DC_OCFG_555           0x00000002
0103 #  define DC_OCFG_PCKE          0x00000004
0104 #  define DC_OCFG_FRME          0x00000008
0105 #  define DC_OCFG_DITE          0x00000010
0106 #  define DC_OCFG_2PXE          0x00000020
0107 #  define DC_OCFG_2XCK          0x00000040
0108 #  define DC_OCFG_2IND          0x00000080
0109 #  define DC_OCFG_34ADD         0x00000100
0110 #  define DC_OCFG_FRMS          0x00000200
0111 #  define DC_OCFG_CKSL          0x00000400
0112 #  define DC_OCFG_PRMP          0x00000800
0113 #  define DC_OCFG_PDEL          0x00001000
0114 #  define DC_OCFG_PDEH          0x00002000
0115 #  define DC_OCFG_CFRW          0x00004000
0116 #  define DC_OCFG_DIAG          0x00008000
0117 
0118 #define DC_FB_ST_OFFSET     0x10
0119 #define DC_CB_ST_OFFSET     0x14
0120 #define DC_CURS_ST_OFFSET   0x18
0121 #define DC_ICON_ST_OFFSET   0x1C
0122 #define DC_VID_ST_OFFSET    0x20
0123 #define DC_LINE_DELTA       0x24
0124 #define DC_BUF_SIZE     0x28
0125 
0126 #define DC_H_TIMING_1       0x30
0127 #define DC_H_TIMING_2       0x34
0128 #define DC_H_TIMING_3       0x38
0129 #define DC_FP_H_TIMING      0x3C
0130 
0131 #define DC_V_TIMING_1       0x40
0132 #define DC_V_TIMING_2       0x44
0133 #define DC_V_TIMING_3       0x48
0134 #define DC_FP_V_TIMING      0x4C
0135 
0136 #define DC_CURSOR_X     0x50
0137 #define DC_ICON_X       0x54
0138 #define DC_V_LINE_CNT       0x54
0139 #define DC_CURSOR_Y     0x58
0140 #define DC_ICON_Y       0x5C
0141 #define DC_SS_LINE_CMP      0x5C
0142 #define DC_CURSOR_COLOR     0x60
0143 #define DC_ICON_COLOR       0x64
0144 #define DC_BORDER_COLOR     0x68
0145 #define DC_PAL_ADDRESS      0x70
0146 #define DC_PAL_DATA     0x74
0147 #define DC_DFIFO_DIAG       0x78
0148 #define DC_CFIFO_DIAG       0x7C
0149 
0150 #endif /* !__DISPLAY_GX1_H__ */