Home | History | Annotate | Line # | Download | only in nvidia
      1  1.5  jmcneill /* $NetBSD: tegra_dcreg.h,v 1.5 2015/11/14 11:55:36 jmcneill Exp $ */
      2  1.1  jmcneill 
      3  1.1  jmcneill /*-
      4  1.1  jmcneill  * Copyright (c) 2015 Jared D. McNeill <jmcneill (at) invisible.ca>
      5  1.1  jmcneill  * All rights reserved.
      6  1.1  jmcneill  *
      7  1.1  jmcneill  * Redistribution and use in source and binary forms, with or without
      8  1.1  jmcneill  * modification, are permitted provided that the following conditions
      9  1.1  jmcneill  * are met:
     10  1.1  jmcneill  * 1. Redistributions of source code must retain the above copyright
     11  1.1  jmcneill  *    notice, this list of conditions and the following disclaimer.
     12  1.1  jmcneill  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  jmcneill  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  jmcneill  *    documentation and/or other materials provided with the distribution.
     15  1.1  jmcneill  *
     16  1.1  jmcneill  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1  jmcneill  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.1  jmcneill  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.1  jmcneill  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.1  jmcneill  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     21  1.1  jmcneill  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
     22  1.1  jmcneill  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     23  1.1  jmcneill  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     24  1.1  jmcneill  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     25  1.1  jmcneill  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     26  1.1  jmcneill  * SUCH DAMAGE.
     27  1.1  jmcneill  */
     28  1.1  jmcneill 
     29  1.1  jmcneill #ifndef _ARM_TEGRA_DCREG_H
     30  1.1  jmcneill #define _ARM_TEGRA_DCREG_H
     31  1.1  jmcneill 
     32  1.1  jmcneill /*
     33  1.1  jmcneill  * Display CMD registers
     34  1.1  jmcneill  */
     35  1.1  jmcneill #define DC_CMD_GENERAL_INCR_SYNCPT_REG			0x000
     36  1.1  jmcneill #define DC_CMD_GENERAL_INCR_SYNCPT_CNTRL_REG		0x004
     37  1.1  jmcneill #define DC_CMD_GENERAL_INCR_SYNCPT_ERROR_REG		0x008
     38  1.1  jmcneill #define DC_CMD_WIN_A_INCR_SYNCPT_REG			0x020
     39  1.1  jmcneill #define DC_CMD_WIN_A_INCR_SYNCPT_CNTRL_REG		0x024
     40  1.1  jmcneill #define DC_CMD_WIN_A_INCR_SYNCPT_ERROR_REG		0x028
     41  1.1  jmcneill #define DC_CMD_WIN_B_INCR_SYNCPT_REG			0x040
     42  1.1  jmcneill #define DC_CMD_WIN_B_INCR_SYNCPT_CNTRL_REG		0x044
     43  1.1  jmcneill #define DC_CMD_WIN_B_INCR_SYNCPT_ERROR_REG		0x048
     44  1.1  jmcneill #define DC_CMD_WIN_C_INCR_SYNCPT_REG			0x060
     45  1.1  jmcneill #define DC_CMD_WIN_C_INCR_SYNCPT_CNTRL_REG		0x064
     46  1.1  jmcneill #define DC_CMD_WIN_C_INCR_SYNCPT_ERROR_REG		0x068
     47  1.1  jmcneill #define DC_CMD_CONT_SYNCPT_VSYNC_REG			0x0a0
     48  1.1  jmcneill #define DC_CMD_CTXSW_REG				0x0c0
     49  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_OPTION0_REG		0x0c4
     50  1.1  jmcneill 
     51  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_REG			0x0c8
     52  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_RAISE_CHANNEL_ID		__BITS(30,27)
     53  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_RAISE_VECTOR		__BITS(26,22)
     54  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_DISPLAY_CTRL_MODE	__BITS(6,5)
     55  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_DISPLAY_CTRL_MODE_STOP		0
     56  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_DISPLAY_CTRL_MODE_C_DISPLAY	1
     57  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_DISPLAY_CTRL_MODE_NC_DISPLAY	2
     58  1.1  jmcneill #define DC_CMD_DISPLAY_COMMAND_RAISE			__BIT(0)
     59  1.1  jmcneill 
     60  1.1  jmcneill #define DC_CMD_SIGNAL_RAISE_REG				0x0cc
     61  1.1  jmcneill 
     62  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_REG		0x0d8
     63  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_HSPI_ENABLE	__BIT(25)
     64  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_SPI_ENABLE		__BIT(24)
     65  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PM1_ENABLE		__BIT(18)
     66  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PM0_ENABLE		__BIT(16)
     67  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PW4_ENABLE		__BIT(8)
     68  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PW3_ENABLE		__BIT(6)
     69  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PW2_ENABLE		__BIT(4)
     70  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PW1_ENABLE		__BIT(2)
     71  1.1  jmcneill #define DC_CMD_DISPLAY_POWER_CONTROL_PW0_ENABLE		__BIT(0)
     72  1.1  jmcneill 
     73  1.1  jmcneill #define DC_CMD_INT_STATUS_REG				0x0dc
     74  1.1  jmcneill #define DC_CMD_INT_MASK_REG				0x0e0
     75  1.1  jmcneill #define DC_CMD_INT_ENABLE_REG				0x0e4
     76  1.4  jmcneill #define DC_CMD_INT_V_BLANK				__BIT(2)
     77  1.4  jmcneill 
     78  1.1  jmcneill #define DC_CMD_INT_TYPE_REG				0x0e8
     79  1.1  jmcneill #define DC_CMD_INT_POLARITY_REG				0x0ec
     80  1.1  jmcneill #define DC_CMD_SIGNAL_RAISE1_REG			0x0f0
     81  1.1  jmcneill #define DC_CMD_SIGNAL_RAISE2_REG			0x0f4
     82  1.1  jmcneill #define DC_CMD_SIGNAL_RAISE3_REG			0x0f8
     83  1.2  jmcneill 
     84  1.1  jmcneill #define DC_CMD_STATE_ACCESS_REG				0x100
     85  1.2  jmcneill #define DC_CMD_STATE_ACCESS_WRITE_MUX			__BIT(2)
     86  1.2  jmcneill #define DC_CMD_STATE_ACCESS_READ_MUX			__BIT(0)
     87  1.1  jmcneill 
     88  1.1  jmcneill #define DC_CMD_STATE_CONTROL_REG			0x104
     89  1.1  jmcneill #define DC_CMD_STATE_CONTROL_NC_HOST_TRIG_ENABLE	__BIT(24)
     90  1.1  jmcneill #define DC_CMD_STATE_CONTROL_CURSOR_UPDATE		__BIT(15)
     91  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_D_UPDATE		__BIT(12)
     92  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_C_UPDATE		__BIT(11)
     93  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_B_UPDATE		__BIT(10)
     94  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_A_UPDATE		__BIT(9)
     95  1.1  jmcneill #define DC_CMD_STATE_CONTROL_GENERAL_UPDATE		__BIT(8)
     96  1.1  jmcneill #define DC_CMD_STATE_CONTROL_CURSOR_ACT_REQ		__BIT(7)
     97  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_D_ACT_REQ		__BIT(4)
     98  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_C_ACT_REQ		__BIT(3)
     99  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_B_ACT_REQ		__BIT(2)
    100  1.1  jmcneill #define DC_CMD_STATE_CONTROL_WIN_A_ACT_REQ		__BIT(1)
    101  1.1  jmcneill #define DC_CMD_STATE_CONTROL_GENERAL_ACT_REQ		__BIT(0)
    102  1.1  jmcneill 
    103  1.1  jmcneill #define DC_CMD_DISPLAY_WINDOW_HEADER_REG		0x108
    104  1.1  jmcneill #define DC_CMD_DISPLAY_WINDOW_HEADER_WINDOW_D_SELECT	__BIT(7)
    105  1.1  jmcneill #define DC_CMD_DISPLAY_WINDOW_HEADER_WINDOW_C_SELECT	__BIT(6)
    106  1.1  jmcneill #define DC_CMD_DISPLAY_WINDOW_HEADER_WINDOW_B_SELECT	__BIT(5)
    107  1.1  jmcneill #define DC_CMD_DISPLAY_WINDOW_HEADER_WINDOW_A_SELECT	__BIT(4)
    108  1.1  jmcneill 
    109  1.1  jmcneill #define DC_CMD_REG_ACT_CONTROL_REG			0x10c
    110  1.1  jmcneill #define DC_CMD_WIN_T_STATE_CONTROL_REG			0x110
    111  1.1  jmcneill #define DC_CMD_SECURE_CONTROL_REG			0x114
    112  1.1  jmcneill #define DC_CMD_WIN_D_INCR_SYNCPT_REG			0x130
    113  1.1  jmcneill #define DC_CMD_WIN_D_INCR_SYNCPT_CNTRL_REG		0x134
    114  1.1  jmcneill #define DC_CMD_WIN_D_INCR_SYNCPT_ERROR_REG		0x138
    115  1.1  jmcneill 
    116  1.1  jmcneill /*
    117  1.1  jmcneill  * Display COM registers
    118  1.1  jmcneill  */
    119  1.1  jmcneill #define DC_COM_CRC_CONTROL_REG				0xc00
    120  1.1  jmcneill #define DC_COM_CRC_CHECKSUM_REG				0xc04
    121  1.1  jmcneill #define DC_COM_PIN_MISC_CONTROL_REG			0xc6c
    122  1.1  jmcneill #define DC_COM_PM0_CONTROL_REG				0xc70
    123  1.1  jmcneill #define DC_COM_PM0_DUTY_CYCLE_REG			0xc74
    124  1.1  jmcneill #define DC_COM_SCRATCH_REGISTER_A_REG			0xc94
    125  1.1  jmcneill #define DC_COM_SCRATCH_REGISTER_B_REG			0xc98
    126  1.1  jmcneill #define DC_COM_CRC_CHECKSUM_LATCHED_REG			0xca4
    127  1.1  jmcneill #define DC_COM_CMU_CSC_KRR_REG				0xca8
    128  1.1  jmcneill #define DC_COM_CMU_CSC_KGR_REG				0xcac
    129  1.1  jmcneill #define DC_COM_CMU_CSC_KBR_REG				0xcb0
    130  1.1  jmcneill #define DC_COM_CMU_CSC_KRG_REG				0xcb4
    131  1.1  jmcneill #define DC_COM_CMU_CSC_KGG_REG				0xcb8
    132  1.1  jmcneill #define DC_COM_CMU_CSC_KBG_REG				0xcbc
    133  1.1  jmcneill #define DC_COM_CMU_CSC_KRB_REG				0xcc0
    134  1.1  jmcneill #define DC_COM_CMU_CSC_KGB_REG				0xcc4
    135  1.1  jmcneill #define DC_COM_CMU_CSC_KBB_REG				0xcc8
    136  1.1  jmcneill #define DC_COM_CMU_LUT_MASK_REG				0xccc
    137  1.1  jmcneill #define DC_COM_CMU_LUT1_REG				0xcd8
    138  1.1  jmcneill #define DC_COM_CMU_LUT2_REG				0xcdc
    139  1.1  jmcneill 
    140  1.1  jmcneill /*
    141  1.1  jmcneill  * Display DISP registers
    142  1.1  jmcneill  */
    143  1.1  jmcneill #define DC_DISP_DISP_SIGNAL_OPTIONS0_REG		0x1000
    144  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_M1_ENABLE		__BIT(26)
    145  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_M0_ENABLE		__BIT(24)
    146  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_V_PULSE3_ENABLE	__BIT(20)
    147  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_V_PULSE2_ENABLE	__BIT(19)
    148  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_V_PULSE1_ENABLE	__BIT(18)
    149  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_V_PULSE0_ENABLE	__BIT(16)
    150  1.2  jmcneill #define DC_DISP_DISP_SIGNAL_OPTIONS0_H_PULSE2_ENABLE	__BIT(12)
    151  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_H_PULSE1_ENABLE	__BIT(10)
    152  1.3     skrll #define DC_DISP_DISP_SIGNAL_OPTIONS0_H_PULSE0_ENABLE	__BIT(8)
    153  1.1  jmcneill 
    154  1.1  jmcneill #define DC_DISP_DISP_WIN_OPTIONS_REG			0x1008
    155  1.1  jmcneill #define DC_DISP_DISP_WIN_OPTIONS_HDMI_ENABLE		__BIT(30)
    156  1.1  jmcneill #define DC_DISP_DISP_WIN_OPTIONS_DSI_ENABLE		__BIT(29)
    157  1.3     skrll #define DC_DISP_DISP_WIN_OPTIONS_SOR_ENABLE		__BIT(25)
    158  1.1  jmcneill #define DC_DISP_DISP_WIN_OPTIONS_CURSOR_ENABLE		__BIT(16)
    159  1.1  jmcneill 
    160  1.1  jmcneill #define DC_DISP_DISP_TIMING_OPTIONS_REG			0x1014
    161  1.2  jmcneill #define DC_DISP_DISP_TIMING_OPTIONS_VSYNC_POS		__BITS(11,0)
    162  1.1  jmcneill 
    163  1.1  jmcneill #define DC_DISP_REF_TO_SYNC_REG				0x1018
    164  1.1  jmcneill #define DC_DISP_REF_TO_SYNC_V				__BITS(28,16)
    165  1.1  jmcneill #define DC_DISP_REF_TO_SYNC_H				__BITS(12,0)
    166  1.1  jmcneill 
    167  1.1  jmcneill #define DC_DISP_SYNC_WIDTH_REG				0x101c
    168  1.1  jmcneill #define DC_DISP_SYNC_WIDTH_V				__BITS(28,16)
    169  1.1  jmcneill #define DC_DISP_SYNC_WIDTH_H				__BITS(12,0)
    170  1.1  jmcneill 
    171  1.1  jmcneill #define DC_DISP_BACK_PORCH_REG				0x1020
    172  1.1  jmcneill #define DC_DISP_BACK_PORCH_V				__BITS(28,16)
    173  1.1  jmcneill #define DC_DISP_BACK_PORCH_H				__BITS(12,0)
    174  1.1  jmcneill 
    175  1.1  jmcneill #define DC_DISP_DISP_ACTIVE_REG				0x1024
    176  1.1  jmcneill #define DC_DISP_DISP_ACTIVE_V				__BITS(28,16)
    177  1.1  jmcneill #define DC_DISP_DISP_ACTIVE_H				__BITS(12,0)
    178  1.1  jmcneill 
    179  1.1  jmcneill #define DC_DISP_FRONT_PORCH_REG				0x1028
    180  1.1  jmcneill #define DC_DISP_FRONT_PORCH_V				__BITS(28,16)
    181  1.1  jmcneill #define DC_DISP_FRONT_PORCH_H				__BITS(12,0)
    182  1.1  jmcneill 
    183  1.1  jmcneill #define DC_DISP_H_PULSE0_CONTROL_REG			0x102c
    184  1.1  jmcneill #define DC_DISP_H_PULSE0_POSITION_A_REG			0x1030
    185  1.1  jmcneill #define DC_DISP_H_PULSE0_POSITION_B_REG			0x1034
    186  1.1  jmcneill #define DC_DISP_H_PULSE0_POSITION_C_REG			0x1038
    187  1.1  jmcneill #define DC_DISP_H_PULSE0_POSITION_D_REG			0x103c
    188  1.1  jmcneill #define DC_DISP_H_PULSE1_CONTROL_REG			0x1040
    189  1.1  jmcneill #define DC_DISP_H_PULSE1_POSITION_A_REG			0x1044
    190  1.1  jmcneill #define DC_DISP_H_PULSE1_POSITION_B_REG			0x1048
    191  1.1  jmcneill #define DC_DISP_H_PULSE1_POSITION_C_REG			0x104c
    192  1.1  jmcneill #define DC_DISP_H_PULSE1_POSITION_D_REG			0x1050
    193  1.2  jmcneill 
    194  1.1  jmcneill #define DC_DISP_H_PULSE2_CONTROL_REG			0x1054
    195  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_LAST			__BITS(11,8)
    196  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_LAST_END_A		1
    197  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_V_QUAL			__BITS(7,6)
    198  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_V_QUAL_VACTIVE		2
    199  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_POLARITY		__BIT(4)
    200  1.2  jmcneill #define DC_DISP_H_PULSE2_CONTROL_MODE			__BIT(3)
    201  1.2  jmcneill 
    202  1.1  jmcneill #define DC_DISP_H_PULSE2_POSITION_A_REG			0x1058
    203  1.2  jmcneill #define DC_DISP_H_PULSE2_POSITION_A_END			__BITS(28,16)
    204  1.2  jmcneill #define DC_DISP_H_PULSE2_POSITION_A_START		__BITS(12,0)
    205  1.2  jmcneill 
    206  1.1  jmcneill #define DC_DISP_H_PULSE2_POSITION_B_REG			0x105c
    207  1.1  jmcneill #define DC_DISP_H_PULSE2_POSITION_C_REG			0x1060
    208  1.1  jmcneill #define DC_DISP_H_PULSE2_POSITION_D_REG			0x1064
    209  1.1  jmcneill #define DC_DISP_V_PULSE0_CONTROL_REG			0x1068
    210  1.1  jmcneill #define DC_DISP_V_PULSE0_POSITION_A_REG			0x106c
    211  1.1  jmcneill #define DC_DISP_V_PULSE0_POSITION_B_REG			0x1070
    212  1.1  jmcneill #define DC_DISP_V_PULSE0_POSITION_C_REG			0x1074
    213  1.1  jmcneill #define DC_DISP_V_PULSE1_CONTROL_REG			0x1078
    214  1.1  jmcneill #define DC_DISP_V_PULSE1_POSITION_A_REG			0x107c
    215  1.1  jmcneill #define DC_DISP_V_PULSE1_POSITION_B_REG			0x1080
    216  1.1  jmcneill #define DC_DISP_V_PULSE1_POSITION_C_REG			0x1084
    217  1.1  jmcneill #define DC_DISP_V_PULSE2_CONTROL_REG			0x1088
    218  1.1  jmcneill #define DC_DISP_V_PULSE2_POSITION_A_REG			0x108c
    219  1.1  jmcneill #define DC_DISP_V_PULSE3_CONTROL_REG			0x1090
    220  1.1  jmcneill #define DC_DISP_V_PULSE3_POSITION_A_REG			0x1094
    221  1.2  jmcneill 
    222  1.1  jmcneill #define DC_DISP_DISP_CLOCK_CONTROL_REG			0x10b8
    223  1.2  jmcneill #define DC_DISP_DISP_CLOCK_CONTROL_PIXEL_CLK_DIVIDER	__BITS(11,8)
    224  1.2  jmcneill #define DC_DISP_DISP_CLOCK_CONTROL_SHIFT_CLK_DIVIDER	__BITS(7,0)
    225  1.2  jmcneill 
    226  1.1  jmcneill #define DC_DISP_DISP_INTERFACE_CONTROL_REG		0x10bc
    227  1.2  jmcneill 
    228  1.1  jmcneill #define DC_DISP_DISP_COLOR_CONTROL_REG			0x10c0
    229  1.2  jmcneill #define DC_DISP_DISP_COLOR_CONTROL_BASE_COLOR_SIZE	__BITS(3,0)
    230  1.2  jmcneill #define DC_DISP_DISP_COLOR_CONTROL_BASE_COLOR_SIZE_888	8
    231  1.2  jmcneill 
    232  1.1  jmcneill #define DC_DISP_COLOR_KEY0_LOWER_REG			0x10d8
    233  1.1  jmcneill #define DC_DISP_COLOR_KEY0_UPPER_REG			0x10dc
    234  1.1  jmcneill #define DC_DISP_COLOR_KEY1_LOWER_REG			0x10e0
    235  1.1  jmcneill #define DC_DISP_COLOR_KEY1_UPPER_REG			0x10e4
    236  1.1  jmcneill #define DC_DISP_CURSOR_FOREGROUND_REG			0x10f0
    237  1.1  jmcneill #define DC_DISP_CURSOR_BACKGROUND_REG			0x10f4
    238  1.5  jmcneill 
    239  1.1  jmcneill #define DC_DISP_CURSOR_START_ADDR_REG			0x10f8
    240  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_CLIPPING		__BITS(29,28)
    241  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_CLIPPING_DISPLAY	0
    242  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_CLIPPING_WA		1
    243  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_CLIPPING_WB		2
    244  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_CLIPPING_WC		3
    245  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_SIZE			__BITS(25,24)
    246  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_SIZE_32		0
    247  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_SIZE_64		1
    248  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_SIZE_128		2
    249  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_SIZE_256		3
    250  1.5  jmcneill #define DC_DISP_CURSOR_START_ADDR_ADDRESS_LO		__BITS(21,0)
    251  1.5  jmcneill 
    252  1.1  jmcneill #define DC_DISP_CURSOR_START_ADDR_NS_REG		0x10fc
    253  1.5  jmcneill 
    254  1.1  jmcneill #define DC_DISP_CURSOR_POSITION_REG			0x1100
    255  1.5  jmcneill #define DC_DISP_CURSOR_POSITION_V			__BITS(29,16)
    256  1.5  jmcneill #define DC_DISP_CURSOR_POSITION_H			__BITS(13,0)
    257  1.5  jmcneill 
    258  1.1  jmcneill #define DC_DISP_CURSOR_POSITION_NS_REG			0x1104
    259  1.1  jmcneill #define DC_DISP_DC_MCCIF_FIFOCTRL_REG			0x1200
    260  1.1  jmcneill #define DC_DISP_MCCIF_DISPLAY0A_HYST_REG		0x1204
    261  1.1  jmcneill #define DC_DISP_MCCIF_DISPLAY0B_HYST_REG		0x1208
    262  1.1  jmcneill #define DC_DISP_MCCIF_DISPLAY0C_HYST_REG		0x120c
    263  1.1  jmcneill #define DC_DISP_DISP_MISC_CONTROL_REG			0x1304
    264  1.1  jmcneill #define DC_DISP_SD_CONTROL_REG				0x1308
    265  1.1  jmcneill #define DC_DISP_SD_CSC_COEFF_REG			0x130c
    266  1.1  jmcneill #define DC_DISP_SD_LUT_REG				0x1310
    267  1.1  jmcneill #define DC_DISP_SD_FLICKER_CONTROL_REG			0x1334
    268  1.1  jmcneill #define DC_DISP_SD_PIXEL_COUNT_REG			0x1338
    269  1.1  jmcneill #define DC_DISP_SD_HISTOGRAM_REG			0x133c
    270  1.1  jmcneill #define DC_DISP_SD_BL_PARAMETERS_REG			0x135c
    271  1.1  jmcneill #define DC_DISP_SD_BL_TF_REG				0x1360
    272  1.1  jmcneill #define DC_DISP_SD_BL_CONTROL_REG			0x1370
    273  1.1  jmcneill #define DC_DISP_SD_HW_K_VALUES_REG			0x1374
    274  1.1  jmcneill #define DC_DISP_SD_MAN_K_VALUES_REG			0x1378
    275  1.1  jmcneill #define DC_DISP_SD_K_LIMIT_REG				0x137c
    276  1.1  jmcneill #define DC_DISP_SD_WINDOW_POSITION_REG			0x1380
    277  1.1  jmcneill #define DC_DISP_SD_WINDOW_SIZE_REG			0x1384
    278  1.1  jmcneill #define DC_DISP_SD_SOFT_CLIPPING_REG			0x1388
    279  1.1  jmcneill #define DC_DISP_SD_SMOOTH_K_REG				0x138c
    280  1.1  jmcneill #define DC_DISP_BLEND_BACKGROUND_COLOR_REG		0x1390
    281  1.1  jmcneill #define DC_DISP_INTERLACE_CONTROL_REG			0x1394
    282  1.1  jmcneill #define DC_DISP_INTERLACE_FIELD2_REF_TO_SYNC_REG	0x1398
    283  1.1  jmcneill #define DC_DISP_INTERLACE_FIELD2_SYNC_WIDTH_REG		0x139c
    284  1.1  jmcneill #define DC_DISP_INTERLACE_FIELD2_BACK_PORCH_REG		0x13a0
    285  1.1  jmcneill #define DC_DISP_INTERLACE_FIELD2_FRONT_PORCH_REG	0x13a4
    286  1.1  jmcneill #define DC_DISP_INTERLACE_FIELD2_DISP_ACTIVE_REG	0x13a8
    287  1.1  jmcneill #define DC_DISP_CURSOR_UNDERFLOW_CTRL_REG		0x13ac
    288  1.1  jmcneill #define DC_DISP_CURSOR_START_ADDR_HI_REG		0x13b0
    289  1.1  jmcneill #define DC_DISP_CURSOR_START_ADDR_HI_NS_REG		0x13b4
    290  1.1  jmcneill #define DC_DISP_CURSOR_INTERLACE_CONTROL_REG		0x13b8
    291  1.1  jmcneill #define DC_DISP_CSC2_CONTROL_REG			0x13bc
    292  1.5  jmcneill 
    293  1.1  jmcneill #define DC_DISP_BLEND_CURSOR_CONTROL_REG		0x13c4
    294  1.5  jmcneill #define DC_DISP_BLEND_CURSOR_CONTROL_MODE_SEL		__BIT(24)
    295  1.5  jmcneill #define DC_DISP_BLEND_CURSOR_CONTROL_DST_BLEND_FACTOR_SEL __BITS(17,16)
    296  1.5  jmcneill #define DC_DISP_BLEND_CURSOR_CONTROL_SRC_BLEND_FACTOR_SEL __BITS(9,8)
    297  1.5  jmcneill #define DC_DISP_BLEND_CURSOR_CONTROL_ALPHA		__BITS(7,0)
    298  1.5  jmcneill 
    299  1.1  jmcneill #define DC_DISP_DVFS_CURSOR_CONTROL_REG			0x13c8
    300  1.1  jmcneill #define DC_DISP_CURSOR_UFLOW_DBG_PIXEL_REG		0x13cc
    301  1.1  jmcneill #define DC_DISP_CURSOR_SPOOLUP_CONTROL_REG		0x13d0
    302  1.1  jmcneill #define DC_DISP_DISPLAY_CLK_GATE_OVERRIDE_REG		0x13d4
    303  1.1  jmcneill #define DC_DISP_DISPLAY_DBG_TIMING_REG			0x13d8
    304  1.1  jmcneill #define DC_DISP_DISPLAY_SPARE0_REG			0x13dc
    305  1.1  jmcneill #define DC_DISP_DISPLAY_SPARE1_REG			0x13e0
    306  1.1  jmcneill 
    307  1.1  jmcneill /*
    308  1.1  jmcneill  * Window A registers
    309  1.1  jmcneill  */
    310  1.1  jmcneill #define DC_WINC_A_COLOR_PALETTE_REG			0x1400
    311  1.1  jmcneill #define DC_WINC_A_PALETTE_COLOR_EXT_REG			0x1800
    312  1.1  jmcneill #define DC_WINC_A_H_FILTER_P00_REG			0x1804
    313  1.1  jmcneill #define DC_WINC_A_H_FILTER_P01_REG			0x1808
    314  1.1  jmcneill #define DC_WINC_A_H_FILTER_P02_REG			0x180c
    315  1.1  jmcneill #define DC_WINC_A_H_FILTER_P03_REG			0x1810
    316  1.1  jmcneill #define DC_WINC_A_H_FILTER_P04_REG			0x1814
    317  1.1  jmcneill #define DC_WINC_A_H_FILTER_P05_REG			0x1818
    318  1.1  jmcneill #define DC_WINC_A_H_FILTER_P06_REG			0x181c
    319  1.1  jmcneill #define DC_WINC_A_H_FILTER_P07_REG			0x1820
    320  1.1  jmcneill #define DC_WINC_A_H_FILTER_P08_REG			0x1824
    321  1.1  jmcneill #define DC_WINC_A_H_FILTER_P09_REG			0x1828
    322  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0A_REG			0x182c
    323  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0B_REG			0x1830
    324  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0C_REG			0x1834
    325  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0D_REG			0x1838
    326  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0E_REG			0x183c
    327  1.1  jmcneill #define DC_WINC_A_H_FILTER_P0F_REG			0x1840
    328  1.1  jmcneill #define DC_WINC_A_CSC_YOF_REG				0x1844
    329  1.1  jmcneill #define DC_WINC_A_CSC_KYRGB_REG				0x1848
    330  1.1  jmcneill #define DC_WINC_A_CSC_KUR_REG				0x184c
    331  1.1  jmcneill #define DC_WINC_A_CSC_KVR_REG				0x1850
    332  1.1  jmcneill #define DC_WINC_A_CSC_KUG_REG				0x1854
    333  1.1  jmcneill #define DC_WINC_A_CSC_KVG_REG				0x1858
    334  1.1  jmcneill #define DC_WINC_A_CSC_KUB_REG				0x185c
    335  1.1  jmcneill #define DC_WINC_A_CSC_KVB_REG				0x1860
    336  1.1  jmcneill #define DC_WINC_A_V_FILTER_P00_REG			0x1864
    337  1.1  jmcneill #define DC_WINC_A_V_FILTER_P01_REG			0x1868
    338  1.1  jmcneill #define DC_WINC_A_V_FILTER_P02_REG			0x186c
    339  1.1  jmcneill #define DC_WINC_A_V_FILTER_P03_REG			0x1870
    340  1.1  jmcneill #define DC_WINC_A_V_FILTER_P04_REG			0x1874
    341  1.1  jmcneill #define DC_WINC_A_V_FILTER_P05_REG			0x1878
    342  1.1  jmcneill #define DC_WINC_A_V_FILTER_P06_REG			0x187c
    343  1.1  jmcneill #define DC_WINC_A_V_FILTER_P07_REG			0x1880
    344  1.1  jmcneill #define DC_WINC_A_V_FILTER_P08_REG			0x1884
    345  1.1  jmcneill #define DC_WINC_A_V_FILTER_P09_REG			0x1888
    346  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0A_REG			0x188c
    347  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0B_REG			0x1890
    348  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0C_REG			0x1894
    349  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0D_REG			0x1898
    350  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0E_REG			0x189c
    351  1.1  jmcneill #define DC_WINC_A_V_FILTER_P0F_REG			0x18a0
    352  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P00_REG			0x18a4
    353  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P01_REG			0x18a8
    354  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P02_REG			0x18ac
    355  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P03_REG			0x18b0
    356  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P04_REG			0x18b4
    357  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P05_REG			0x18b8
    358  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P06_REG			0x18bc
    359  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P07_REG			0x18c0
    360  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P08_REG			0x18c4
    361  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P09_REG			0x18c8
    362  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0A_REG			0x18cc
    363  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0B_REG			0x18d0
    364  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0C_REG			0x18d4
    365  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0D_REG			0x18d8
    366  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0E_REG			0x18dc
    367  1.1  jmcneill #define DC_WINC_A_H_FILTER_HI_P0F_REG			0x18e0
    368  1.1  jmcneill 
    369  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_REG			0x1c00
    370  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_H_FILTER_MODE		__BIT(31)
    371  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_WIN_ENABLE		__BIT(30)
    372  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_INTERLACE_ENABLE		__BIT(23)
    373  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_YUV_RANGE_EXPAND		__BIT(22)
    374  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_DV_ENABLE			__BIT(20)
    375  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_CSC_ENABLE		__BIT(18)
    376  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_CP_ENABLE			__BIT(16)
    377  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_V_FILTER_UV_ALIGN		__BIT(14)
    378  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_V_FILTER_OPTIMIZE		__BIT(12)
    379  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_V_FILTER_ENABLE		__BIT(10)
    380  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_H_FILTER_ENABLE		__BIT(8)
    381  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_COLOR_EXPAND		__BIT(6)
    382  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_SCAN_COLUMN		__BIT(4)
    383  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_V_DIRECTION		__BIT(2)
    384  1.1  jmcneill #define DC_WINC_A_WIN_OPTIONS_H_DIRECTION		__BIT(0)
    385  1.1  jmcneill 
    386  1.1  jmcneill #define DC_WINC_A_BYTE_SWAP_REG				0x1c04
    387  1.1  jmcneill #define DC_WINC_A_BYTE_SWAP_SWAP			__BITS(2,0)
    388  1.1  jmcneill #define DC_WINC_A_BYTE_SWAP_SWAP_NOSWAP			0
    389  1.1  jmcneill 
    390  1.1  jmcneill #define DC_WINC_A_COLOR_DEPTH_REG			0x1c0c
    391  1.1  jmcneill #define DC_WINC_A_COLOR_DEPTH_DEPTH			__BITS(6,0)
    392  1.1  jmcneill #define DC_WINC_A_COLOR_DEPTH_DEPTH_T_A8R8G8B8		12
    393  1.2  jmcneill #define DC_WINC_A_COLOR_DEPTH_DEPTH_T_X8R8G8B8		37
    394  1.1  jmcneill 
    395  1.1  jmcneill #define DC_WINC_A_POSITION_REG				0x1c10
    396  1.1  jmcneill #define DC_WINC_A_POSITION_V				__BITS(28,16)
    397  1.1  jmcneill #define DC_WINC_A_POSITION_H				__BITS(12,0)
    398  1.1  jmcneill 
    399  1.1  jmcneill #define DC_WINC_A_SIZE_REG				0x1c14
    400  1.1  jmcneill #define DC_WINC_A_SIZE_V				__BITS(28,16)
    401  1.1  jmcneill #define DC_WINC_A_SIZE_H				__BITS(12,0)
    402  1.1  jmcneill 
    403  1.1  jmcneill #define DC_WINC_A_PRESCALED_SIZE_REG			0x1c18
    404  1.1  jmcneill #define DC_WINC_A_PRESCALED_SIZE_V			__BITS(28,16)
    405  1.1  jmcneill #define DC_WINC_A_PRESCALED_SIZE_H			__BITS(14,0)
    406  1.1  jmcneill 
    407  1.1  jmcneill #define DC_WINC_A_H_INITIAL_DDA_REG			0x1c1c
    408  1.1  jmcneill #define DC_WINC_A_V_INITIAL_DDA_REG			0x1c20
    409  1.1  jmcneill #define DC_WINC_A_DDA_INCREMENT_REG			0x1c24
    410  1.1  jmcneill 
    411  1.1  jmcneill #define DC_WINC_A_LINE_STRIDE_REG			0x1c28
    412  1.1  jmcneill #define DC_WINC_A_LINE_STRIDE_UV_LINE_STRIDE		__BITS(31,16)
    413  1.1  jmcneill #define DC_WINC_A_LINE_STRIDE_LINE_STRIDE		__BITS(15,0)
    414  1.1  jmcneill 
    415  1.1  jmcneill #define DC_WINC_A_DV_CONTROL_REG			0x1c38
    416  1.1  jmcneill #define DC_WINC_A_BLEND_LAYER_CONTROL_REG		0x1c58
    417  1.1  jmcneill #define DC_WINC_A_BLEND_MATCH_SELECT_REG		0x1c5c
    418  1.1  jmcneill #define DC_WINC_A_BLEND_NOMATCH_SELECT_REG		0x1c60
    419  1.1  jmcneill #define DC_WINC_A_BLEND_ALPHA_1BIT_REG			0x1c64
    420  1.1  jmcneill 
    421  1.1  jmcneill /*
    422  1.1  jmcneill  * WINBUF_A registers
    423  1.1  jmcneill  */
    424  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_REG			0x2000
    425  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_NS_REG			0x2004
    426  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_U_REG			0x2008
    427  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_U_NS_REG			0x200c
    428  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_V_REG			0x2010
    429  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_V_NS_REG			0x2014
    430  1.1  jmcneill #define DC_WINBUF_A_ADDR_H_OFFSET_REG			0x2018
    431  1.1  jmcneill #define DC_WINBUF_A_ADDR_H_OFFSET_NS_REG		0x201c
    432  1.1  jmcneill #define DC_WINBUF_A_ADDR_V_OFFSET_REG			0x2020
    433  1.1  jmcneill #define DC_WINBUF_A_ADDR_V_OFFSET_NS_REG		0x2024
    434  1.1  jmcneill #define DC_WINBUF_A_UFLOW_STATUS_REG			0x2028
    435  1.1  jmcneill 
    436  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_REG			0x202c
    437  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_BLOCK_HEIGHT		__BITS(6,4)
    438  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_SURFACE_KIND		__BITS(1,0)
    439  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_SURFACE_KIND_PITCH	0
    440  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_SURFACE_KIND_TILED	1
    441  1.1  jmcneill #define DC_WINBUF_A_SURFACE_KIND_SURFACE_KIND_BL_16B2	2
    442  1.1  jmcneill 
    443  1.1  jmcneill #define DC_WINBUF_A_SURFACE_WEIGHT_REG			0x2030
    444  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_REG			0x2034
    445  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_NS_REG		0x2038
    446  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_U_REG			0x203c
    447  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_U_NS_REG		0x2040
    448  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_V_REG			0x2044
    449  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_HI_V_NS_REG		0x2048
    450  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_REG		0x204c
    451  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_NS_REG		0x2050
    452  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_U_REG		0x2054
    453  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_U_NS_REG		0x2058
    454  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_V_REG		0x205c
    455  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_V_NS_REG		0x2060
    456  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_REG		0x2064
    457  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_NS_REG		0x2068
    458  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_U_REG		0x206c
    459  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_U_NS_REG	0x2070
    460  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_V_REG		0x2074
    461  1.1  jmcneill #define DC_WINBUF_A_START_ADDR_FIELD2_HI_V_NS_REG	0x2078
    462  1.1  jmcneill #define DC_WINBUF_A_ADDR_H_OFFSET_FIELD2_REG		0x207c
    463  1.1  jmcneill #define DC_WINBUF_A_ADDR_H_OFFSET_FIELD2_NS_REG		0x2080
    464  1.1  jmcneill #define DC_WINBUF_A_ADDR_V_OFFSET_FIELD2_REG		0x2084
    465  1.1  jmcneill #define DC_WINBUF_A_ADDR_V_OFFSET_FIELD2_NS_REG		0x2088
    466  1.1  jmcneill #define DC_WINBUF_A_UFLOW_CTRL_REG			0x2090
    467  1.1  jmcneill #define DC_WINBUF_A_UFLOW_DBG_PIXEL_REG			0x2094
    468  1.1  jmcneill #define DC_WINBUF_A_UFLOW_THRESHOLD_REG			0x2098
    469  1.1  jmcneill #define DC_WINBUF_A_SPOOL_UP_REG			0x209c
    470  1.1  jmcneill #define DC_WINBUF_A_SCALEFACTOR_THRESHOLD_REG		0x20a0
    471  1.1  jmcneill #define DC_WINBUF_A_LATENCY_THRESHOLD_REG		0x20a4
    472  1.1  jmcneill #define DC_WINBUF_A_MEMFETCH_DEBUG_STATUS_REG		0x20a8
    473  1.1  jmcneill #define DC_WINBUF_A_MEMFETCH_CONTROL_REG		0x20ac
    474  1.1  jmcneill #define DC_WINBUF_A_OCCUPANCY_THROTTLE_REG		0x20b0
    475  1.1  jmcneill #define DC_WINBUF_A_SCRATCH_REGISTER_0_REG		0x20b4
    476  1.1  jmcneill #define DC_WINBUF_A_SCRATCH_REGISTER_1_REG		0x20b8
    477  1.1  jmcneill 
    478  1.1  jmcneill 
    479  1.1  jmcneill #endif /* _ARM_TEGRA_DCREG_H */
    480