18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * linux/drivers/video/w100fb.h 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Frame Buffer Device for ATI w100 (Wallaby) 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 2002, ATI Corp. 88c2ecf20Sopenharmony_ci * Copyright (C) 2004-2005 Richard Purdie 98c2ecf20Sopenharmony_ci * Copyright (c) 2005 Ian Molton <spyro@f2s.com> 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * Modified to work with 2.6 by Richard Purdie <rpurdie@rpsys.net> 128c2ecf20Sopenharmony_ci * 138c2ecf20Sopenharmony_ci * w32xx support by Ian Molton 148c2ecf20Sopenharmony_ci */ 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#if !defined (_W100FB_H) 178c2ecf20Sopenharmony_ci#define _W100FB_H 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* Block CIF Start: */ 208c2ecf20Sopenharmony_ci#define mmCHIP_ID 0x0000 218c2ecf20Sopenharmony_ci#define mmREVISION_ID 0x0004 228c2ecf20Sopenharmony_ci#define mmWRAP_BUF_A 0x0008 238c2ecf20Sopenharmony_ci#define mmWRAP_BUF_B 0x000C 248c2ecf20Sopenharmony_ci#define mmWRAP_TOP_DIR 0x0010 258c2ecf20Sopenharmony_ci#define mmWRAP_START_DIR 0x0014 268c2ecf20Sopenharmony_ci#define mmCIF_CNTL 0x0018 278c2ecf20Sopenharmony_ci#define mmCFGREG_BASE 0x001C 288c2ecf20Sopenharmony_ci#define mmCIF_IO 0x0020 298c2ecf20Sopenharmony_ci#define mmCIF_READ_DBG 0x0024 308c2ecf20Sopenharmony_ci#define mmCIF_WRITE_DBG 0x0028 318c2ecf20Sopenharmony_ci#define cfgIND_ADDR_A_0 0x0000 328c2ecf20Sopenharmony_ci#define cfgIND_ADDR_A_1 0x0001 338c2ecf20Sopenharmony_ci#define cfgIND_ADDR_A_2 0x0002 348c2ecf20Sopenharmony_ci#define cfgIND_DATA_A 0x0003 358c2ecf20Sopenharmony_ci#define cfgREG_BASE 0x0004 368c2ecf20Sopenharmony_ci#define cfgINTF_CNTL 0x0005 378c2ecf20Sopenharmony_ci#define cfgSTATUS 0x0006 388c2ecf20Sopenharmony_ci#define cfgCPU_DEFAULTS 0x0007 398c2ecf20Sopenharmony_ci#define cfgIND_ADDR_B_0 0x0008 408c2ecf20Sopenharmony_ci#define cfgIND_ADDR_B_1 0x0009 418c2ecf20Sopenharmony_ci#define cfgIND_ADDR_B_2 0x000A 428c2ecf20Sopenharmony_ci#define cfgIND_DATA_B 0x000B 438c2ecf20Sopenharmony_ci#define cfgPM4_RPTR 0x000C 448c2ecf20Sopenharmony_ci#define cfgSCRATCH 0x000D 458c2ecf20Sopenharmony_ci#define cfgPM4_WRPTR_0 0x000E 468c2ecf20Sopenharmony_ci#define cfgPM4_WRPTR_1 0x000F 478c2ecf20Sopenharmony_ci/* Block CIF End: */ 488c2ecf20Sopenharmony_ci 498c2ecf20Sopenharmony_ci/* Block CP Start: */ 508c2ecf20Sopenharmony_ci#define mmSCRATCH_UMSK 0x0280 518c2ecf20Sopenharmony_ci#define mmSCRATCH_ADDR 0x0284 528c2ecf20Sopenharmony_ci#define mmGEN_INT_CNTL 0x0200 538c2ecf20Sopenharmony_ci#define mmGEN_INT_STATUS 0x0204 548c2ecf20Sopenharmony_ci/* Block CP End: */ 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci/* Block DISPLAY Start: */ 578c2ecf20Sopenharmony_ci#define mmLCD_FORMAT 0x0410 588c2ecf20Sopenharmony_ci#define mmGRAPHIC_CTRL 0x0414 598c2ecf20Sopenharmony_ci#define mmGRAPHIC_OFFSET 0x0418 608c2ecf20Sopenharmony_ci#define mmGRAPHIC_PITCH 0x041C 618c2ecf20Sopenharmony_ci#define mmCRTC_TOTAL 0x0420 628c2ecf20Sopenharmony_ci#define mmACTIVE_H_DISP 0x0424 638c2ecf20Sopenharmony_ci#define mmACTIVE_V_DISP 0x0428 648c2ecf20Sopenharmony_ci#define mmGRAPHIC_H_DISP 0x042C 658c2ecf20Sopenharmony_ci#define mmGRAPHIC_V_DISP 0x0430 668c2ecf20Sopenharmony_ci#define mmVIDEO_CTRL 0x0434 678c2ecf20Sopenharmony_ci#define mmGRAPHIC_KEY 0x0438 688c2ecf20Sopenharmony_ci#define mmBRIGHTNESS_CNTL 0x045C 698c2ecf20Sopenharmony_ci#define mmDISP_INT_CNTL 0x0488 708c2ecf20Sopenharmony_ci#define mmCRTC_SS 0x048C 718c2ecf20Sopenharmony_ci#define mmCRTC_LS 0x0490 728c2ecf20Sopenharmony_ci#define mmCRTC_REV 0x0494 738c2ecf20Sopenharmony_ci#define mmCRTC_DCLK 0x049C 748c2ecf20Sopenharmony_ci#define mmCRTC_GS 0x04A0 758c2ecf20Sopenharmony_ci#define mmCRTC_VPOS_GS 0x04A4 768c2ecf20Sopenharmony_ci#define mmCRTC_GCLK 0x04A8 778c2ecf20Sopenharmony_ci#define mmCRTC_GOE 0x04AC 788c2ecf20Sopenharmony_ci#define mmCRTC_FRAME 0x04B0 798c2ecf20Sopenharmony_ci#define mmCRTC_FRAME_VPOS 0x04B4 808c2ecf20Sopenharmony_ci#define mmGPIO_DATA 0x04B8 818c2ecf20Sopenharmony_ci#define mmGPIO_CNTL1 0x04BC 828c2ecf20Sopenharmony_ci#define mmGPIO_CNTL2 0x04C0 838c2ecf20Sopenharmony_ci#define mmLCDD_CNTL1 0x04C4 848c2ecf20Sopenharmony_ci#define mmLCDD_CNTL2 0x04C8 858c2ecf20Sopenharmony_ci#define mmGENLCD_CNTL1 0x04CC 868c2ecf20Sopenharmony_ci#define mmGENLCD_CNTL2 0x04D0 878c2ecf20Sopenharmony_ci#define mmDISP_DEBUG 0x04D4 888c2ecf20Sopenharmony_ci#define mmDISP_DB_BUF_CNTL 0x04D8 898c2ecf20Sopenharmony_ci#define mmDISP_CRC_SIG 0x04DC 908c2ecf20Sopenharmony_ci#define mmCRTC_DEFAULT_COUNT 0x04E0 918c2ecf20Sopenharmony_ci#define mmLCD_BACKGROUND_COLOR 0x04E4 928c2ecf20Sopenharmony_ci#define mmCRTC_PS2 0x04E8 938c2ecf20Sopenharmony_ci#define mmCRTC_PS2_VPOS 0x04EC 948c2ecf20Sopenharmony_ci#define mmCRTC_PS1_ACTIVE 0x04F0 958c2ecf20Sopenharmony_ci#define mmCRTC_PS1_NACTIVE 0x04F4 968c2ecf20Sopenharmony_ci#define mmCRTC_GCLK_EXT 0x04F8 978c2ecf20Sopenharmony_ci#define mmCRTC_ALW 0x04FC 988c2ecf20Sopenharmony_ci#define mmCRTC_ALW_VPOS 0x0500 998c2ecf20Sopenharmony_ci#define mmCRTC_PSK 0x0504 1008c2ecf20Sopenharmony_ci#define mmCRTC_PSK_HPOS 0x0508 1018c2ecf20Sopenharmony_ci#define mmCRTC_CV4_START 0x050C 1028c2ecf20Sopenharmony_ci#define mmCRTC_CV4_END 0x0510 1038c2ecf20Sopenharmony_ci#define mmCRTC_CV4_HPOS 0x0514 1048c2ecf20Sopenharmony_ci#define mmCRTC_ECK 0x051C 1058c2ecf20Sopenharmony_ci#define mmREFRESH_CNTL 0x0520 1068c2ecf20Sopenharmony_ci#define mmGENLCD_CNTL3 0x0524 1078c2ecf20Sopenharmony_ci#define mmGPIO_DATA2 0x0528 1088c2ecf20Sopenharmony_ci#define mmGPIO_CNTL3 0x052C 1098c2ecf20Sopenharmony_ci#define mmGPIO_CNTL4 0x0530 1108c2ecf20Sopenharmony_ci#define mmCHIP_STRAP 0x0534 1118c2ecf20Sopenharmony_ci#define mmDISP_DEBUG2 0x0538 1128c2ecf20Sopenharmony_ci#define mmDEBUG_BUS_CNTL 0x053C 1138c2ecf20Sopenharmony_ci#define mmGAMMA_VALUE1 0x0540 1148c2ecf20Sopenharmony_ci#define mmGAMMA_VALUE2 0x0544 1158c2ecf20Sopenharmony_ci#define mmGAMMA_SLOPE 0x0548 1168c2ecf20Sopenharmony_ci#define mmGEN_STATUS 0x054C 1178c2ecf20Sopenharmony_ci#define mmHW_INT 0x0550 1188c2ecf20Sopenharmony_ci/* Block DISPLAY End: */ 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci/* Block GFX Start: */ 1218c2ecf20Sopenharmony_ci#define mmDST_OFFSET 0x1004 1228c2ecf20Sopenharmony_ci#define mmDST_PITCH 0x1008 1238c2ecf20Sopenharmony_ci#define mmDST_Y_X 0x1038 1248c2ecf20Sopenharmony_ci#define mmDST_WIDTH_HEIGHT 0x1198 1258c2ecf20Sopenharmony_ci#define mmDP_GUI_MASTER_CNTL 0x106C 1268c2ecf20Sopenharmony_ci#define mmBRUSH_OFFSET 0x108C 1278c2ecf20Sopenharmony_ci#define mmBRUSH_Y_X 0x1074 1288c2ecf20Sopenharmony_ci#define mmDP_BRUSH_FRGD_CLR 0x107C 1298c2ecf20Sopenharmony_ci#define mmSRC_OFFSET 0x11AC 1308c2ecf20Sopenharmony_ci#define mmSRC_PITCH 0x11B0 1318c2ecf20Sopenharmony_ci#define mmSRC_Y_X 0x1034 1328c2ecf20Sopenharmony_ci#define mmDEFAULT_PITCH_OFFSET 0x10A0 1338c2ecf20Sopenharmony_ci#define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8 1348c2ecf20Sopenharmony_ci#define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC 1358c2ecf20Sopenharmony_ci#define mmSC_TOP_LEFT 0x11BC 1368c2ecf20Sopenharmony_ci#define mmSC_BOTTOM_RIGHT 0x11C0 1378c2ecf20Sopenharmony_ci#define mmSRC_SC_BOTTOM_RIGHT 0x11C4 1388c2ecf20Sopenharmony_ci#define mmGLOBAL_ALPHA 0x1210 1398c2ecf20Sopenharmony_ci#define mmFILTER_COEF 0x1214 1408c2ecf20Sopenharmony_ci#define mmMVC_CNTL_START 0x11E0 1418c2ecf20Sopenharmony_ci#define mmE2_ARITHMETIC_CNTL 0x1220 1428c2ecf20Sopenharmony_ci#define mmDP_CNTL 0x11C8 1438c2ecf20Sopenharmony_ci#define mmDP_CNTL_DST_DIR 0x11CC 1448c2ecf20Sopenharmony_ci#define mmDP_DATATYPE 0x12C4 1458c2ecf20Sopenharmony_ci#define mmDP_MIX 0x12C8 1468c2ecf20Sopenharmony_ci#define mmDP_WRITE_MSK 0x12CC 1478c2ecf20Sopenharmony_ci#define mmENG_CNTL 0x13E8 1488c2ecf20Sopenharmony_ci#define mmENG_PERF_CNT 0x13F0 1498c2ecf20Sopenharmony_ci/* Block GFX End: */ 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ci/* Block IDCT Start: */ 1528c2ecf20Sopenharmony_ci#define mmIDCT_RUNS 0x0C00 1538c2ecf20Sopenharmony_ci#define mmIDCT_LEVELS 0x0C04 1548c2ecf20Sopenharmony_ci#define mmIDCT_CONTROL 0x0C3C 1558c2ecf20Sopenharmony_ci#define mmIDCT_AUTH_CONTROL 0x0C08 1568c2ecf20Sopenharmony_ci#define mmIDCT_AUTH 0x0C0C 1578c2ecf20Sopenharmony_ci/* Block IDCT End: */ 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ci/* Block MC Start: */ 1608c2ecf20Sopenharmony_ci#define mmMEM_CNTL 0x0180 1618c2ecf20Sopenharmony_ci#define mmMEM_ARB 0x0184 1628c2ecf20Sopenharmony_ci#define mmMC_FB_LOCATION 0x0188 1638c2ecf20Sopenharmony_ci#define mmMEM_EXT_CNTL 0x018C 1648c2ecf20Sopenharmony_ci#define mmMC_EXT_MEM_LOCATION 0x0190 1658c2ecf20Sopenharmony_ci#define mmMEM_EXT_TIMING_CNTL 0x0194 1668c2ecf20Sopenharmony_ci#define mmMEM_SDRAM_MODE_REG 0x0198 1678c2ecf20Sopenharmony_ci#define mmMEM_IO_CNTL 0x019C 1688c2ecf20Sopenharmony_ci#define mmMC_DEBUG 0x01A0 1698c2ecf20Sopenharmony_ci#define mmMC_BIST_CTRL 0x01A4 1708c2ecf20Sopenharmony_ci#define mmMC_BIST_COLLAR_READ 0x01A8 1718c2ecf20Sopenharmony_ci#define mmTC_MISMATCH 0x01AC 1728c2ecf20Sopenharmony_ci#define mmMC_PERF_MON_CNTL 0x01B0 1738c2ecf20Sopenharmony_ci#define mmMC_PERF_COUNTERS 0x01B4 1748c2ecf20Sopenharmony_ci/* Block MC End: */ 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci/* Block BM Start: */ 1778c2ecf20Sopenharmony_ci#define mmBM_EXT_MEM_BANDWIDTH 0x0A00 1788c2ecf20Sopenharmony_ci#define mmBM_OFFSET 0x0A04 1798c2ecf20Sopenharmony_ci#define mmBM_MEM_EXT_TIMING_CNTL 0x0A08 1808c2ecf20Sopenharmony_ci#define mmBM_MEM_EXT_CNTL 0x0A0C 1818c2ecf20Sopenharmony_ci#define mmBM_MEM_MODE_REG 0x0A10 1828c2ecf20Sopenharmony_ci#define mmBM_MEM_IO_CNTL 0x0A18 1838c2ecf20Sopenharmony_ci#define mmBM_CONFIG 0x0A1C 1848c2ecf20Sopenharmony_ci#define mmBM_STATUS 0x0A20 1858c2ecf20Sopenharmony_ci#define mmBM_DEBUG 0x0A24 1868c2ecf20Sopenharmony_ci#define mmBM_PERF_MON_CNTL 0x0A28 1878c2ecf20Sopenharmony_ci#define mmBM_PERF_COUNTERS 0x0A2C 1888c2ecf20Sopenharmony_ci#define mmBM_PERF2_MON_CNTL 0x0A30 1898c2ecf20Sopenharmony_ci#define mmBM_PERF2_COUNTERS 0x0A34 1908c2ecf20Sopenharmony_ci/* Block BM End: */ 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_ci/* Block RBBM Start: */ 1938c2ecf20Sopenharmony_ci#define mmWAIT_UNTIL 0x1400 1948c2ecf20Sopenharmony_ci#define mmISYNC_CNTL 0x1404 1958c2ecf20Sopenharmony_ci#define mmRBBM_STATUS 0x0140 1968c2ecf20Sopenharmony_ci#define mmRBBM_CNTL 0x0144 1978c2ecf20Sopenharmony_ci#define mmNQWAIT_UNTIL 0x0150 1988c2ecf20Sopenharmony_ci/* Block RBBM End: */ 1998c2ecf20Sopenharmony_ci 2008c2ecf20Sopenharmony_ci/* Block CG Start: */ 2018c2ecf20Sopenharmony_ci#define mmCLK_PIN_CNTL 0x0080 2028c2ecf20Sopenharmony_ci#define mmPLL_REF_FB_DIV 0x0084 2038c2ecf20Sopenharmony_ci#define mmPLL_CNTL 0x0088 2048c2ecf20Sopenharmony_ci#define mmSCLK_CNTL 0x008C 2058c2ecf20Sopenharmony_ci#define mmPCLK_CNTL 0x0090 2068c2ecf20Sopenharmony_ci#define mmCLK_TEST_CNTL 0x0094 2078c2ecf20Sopenharmony_ci#define mmPWRMGT_CNTL 0x0098 2088c2ecf20Sopenharmony_ci#define mmPWRMGT_STATUS 0x009C 2098c2ecf20Sopenharmony_ci/* Block CG End: */ 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci/* default value definitions */ 2128c2ecf20Sopenharmony_ci#define defWRAP_TOP_DIR 0x00000000 2138c2ecf20Sopenharmony_ci#define defWRAP_START_DIR 0x00000000 2148c2ecf20Sopenharmony_ci#define defCFGREG_BASE 0x00000000 2158c2ecf20Sopenharmony_ci#define defCIF_IO 0x000C0902 2168c2ecf20Sopenharmony_ci#define defINTF_CNTL 0x00000011 2178c2ecf20Sopenharmony_ci#define defCPU_DEFAULTS 0x00000006 2188c2ecf20Sopenharmony_ci#define defHW_INT 0x00000000 2198c2ecf20Sopenharmony_ci#define defMC_EXT_MEM_LOCATION 0x07ff0000 2208c2ecf20Sopenharmony_ci#define defTC_MISMATCH 0x00000000 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_ci#define W100_CFG_BASE 0x0 2238c2ecf20Sopenharmony_ci#define W100_CFG_LEN 0x10 2248c2ecf20Sopenharmony_ci#define W100_REG_BASE 0x10000 2258c2ecf20Sopenharmony_ci#define W100_REG_LEN 0x2000 2268c2ecf20Sopenharmony_ci#define MEM_INT_BASE_VALUE 0x100000 2278c2ecf20Sopenharmony_ci#define MEM_EXT_BASE_VALUE 0x800000 2288c2ecf20Sopenharmony_ci#define MEM_INT_SIZE 0x05ffff 2298c2ecf20Sopenharmony_ci#define MEM_WINDOW_BASE 0x100000 2308c2ecf20Sopenharmony_ci#define MEM_WINDOW_SIZE 0xf00000 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci#define WRAP_BUF_BASE_VALUE 0x80000 2338c2ecf20Sopenharmony_ci#define WRAP_BUF_TOP_VALUE 0xbffff 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ci#define CHIP_ID_W100 0x57411002 2368c2ecf20Sopenharmony_ci#define CHIP_ID_W3200 0x56441002 2378c2ecf20Sopenharmony_ci#define CHIP_ID_W3220 0x57441002 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_ci/* Register structure definitions */ 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_cistruct wrap_top_dir_t { 2428c2ecf20Sopenharmony_ci u32 top_addr : 23; 2438c2ecf20Sopenharmony_ci u32 : 9; 2448c2ecf20Sopenharmony_ci} __attribute__((packed)); 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ciunion wrap_top_dir_u { 2478c2ecf20Sopenharmony_ci u32 val : 32; 2488c2ecf20Sopenharmony_ci struct wrap_top_dir_t f; 2498c2ecf20Sopenharmony_ci} __attribute__((packed)); 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_cistruct wrap_start_dir_t { 2528c2ecf20Sopenharmony_ci u32 start_addr : 23; 2538c2ecf20Sopenharmony_ci u32 : 9; 2548c2ecf20Sopenharmony_ci} __attribute__((packed)); 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ciunion wrap_start_dir_u { 2578c2ecf20Sopenharmony_ci u32 val : 32; 2588c2ecf20Sopenharmony_ci struct wrap_start_dir_t f; 2598c2ecf20Sopenharmony_ci} __attribute__((packed)); 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_cistruct cif_cntl_t { 2628c2ecf20Sopenharmony_ci u32 swap_reg : 2; 2638c2ecf20Sopenharmony_ci u32 swap_fbuf_1 : 2; 2648c2ecf20Sopenharmony_ci u32 swap_fbuf_2 : 2; 2658c2ecf20Sopenharmony_ci u32 swap_fbuf_3 : 2; 2668c2ecf20Sopenharmony_ci u32 pmi_int_disable : 1; 2678c2ecf20Sopenharmony_ci u32 pmi_schmen_disable : 1; 2688c2ecf20Sopenharmony_ci u32 intb_oe : 1; 2698c2ecf20Sopenharmony_ci u32 en_wait_to_compensate_dq_prop_dly : 1; 2708c2ecf20Sopenharmony_ci u32 compensate_wait_rd_size : 2; 2718c2ecf20Sopenharmony_ci u32 wait_asserted_timeout_val : 2; 2728c2ecf20Sopenharmony_ci u32 wait_masked_val : 2; 2738c2ecf20Sopenharmony_ci u32 en_wait_timeout : 1; 2748c2ecf20Sopenharmony_ci u32 en_one_clk_setup_before_wait : 1; 2758c2ecf20Sopenharmony_ci u32 interrupt_active_high : 1; 2768c2ecf20Sopenharmony_ci u32 en_overwrite_straps : 1; 2778c2ecf20Sopenharmony_ci u32 strap_wait_active_hi : 1; 2788c2ecf20Sopenharmony_ci u32 lat_busy_count : 2; 2798c2ecf20Sopenharmony_ci u32 lat_rd_pm4_sclk_busy : 1; 2808c2ecf20Sopenharmony_ci u32 dis_system_bits : 1; 2818c2ecf20Sopenharmony_ci u32 dis_mr : 1; 2828c2ecf20Sopenharmony_ci u32 cif_spare_1 : 4; 2838c2ecf20Sopenharmony_ci} __attribute__((packed)); 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ciunion cif_cntl_u { 2868c2ecf20Sopenharmony_ci u32 val : 32; 2878c2ecf20Sopenharmony_ci struct cif_cntl_t f; 2888c2ecf20Sopenharmony_ci} __attribute__((packed)); 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_cistruct cfgreg_base_t { 2918c2ecf20Sopenharmony_ci u32 cfgreg_base : 24; 2928c2ecf20Sopenharmony_ci u32 : 8; 2938c2ecf20Sopenharmony_ci} __attribute__((packed)); 2948c2ecf20Sopenharmony_ci 2958c2ecf20Sopenharmony_ciunion cfgreg_base_u { 2968c2ecf20Sopenharmony_ci u32 val : 32; 2978c2ecf20Sopenharmony_ci struct cfgreg_base_t f; 2988c2ecf20Sopenharmony_ci} __attribute__((packed)); 2998c2ecf20Sopenharmony_ci 3008c2ecf20Sopenharmony_cistruct cif_io_t { 3018c2ecf20Sopenharmony_ci u32 dq_srp : 1; 3028c2ecf20Sopenharmony_ci u32 dq_srn : 1; 3038c2ecf20Sopenharmony_ci u32 dq_sp : 4; 3048c2ecf20Sopenharmony_ci u32 dq_sn : 4; 3058c2ecf20Sopenharmony_ci u32 waitb_srp : 1; 3068c2ecf20Sopenharmony_ci u32 waitb_srn : 1; 3078c2ecf20Sopenharmony_ci u32 waitb_sp : 4; 3088c2ecf20Sopenharmony_ci u32 waitb_sn : 4; 3098c2ecf20Sopenharmony_ci u32 intb_srp : 1; 3108c2ecf20Sopenharmony_ci u32 intb_srn : 1; 3118c2ecf20Sopenharmony_ci u32 intb_sp : 4; 3128c2ecf20Sopenharmony_ci u32 intb_sn : 4; 3138c2ecf20Sopenharmony_ci u32 : 2; 3148c2ecf20Sopenharmony_ci} __attribute__((packed)); 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ciunion cif_io_u { 3178c2ecf20Sopenharmony_ci u32 val : 32; 3188c2ecf20Sopenharmony_ci struct cif_io_t f; 3198c2ecf20Sopenharmony_ci} __attribute__((packed)); 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_cistruct cif_read_dbg_t { 3228c2ecf20Sopenharmony_ci u32 unpacker_pre_fetch_trig_gen : 2; 3238c2ecf20Sopenharmony_ci u32 dly_second_rd_fetch_trig : 1; 3248c2ecf20Sopenharmony_ci u32 rst_rd_burst_id : 1; 3258c2ecf20Sopenharmony_ci u32 dis_rd_burst_id : 1; 3268c2ecf20Sopenharmony_ci u32 en_block_rd_when_packer_is_not_emp : 1; 3278c2ecf20Sopenharmony_ci u32 dis_pre_fetch_cntl_sm : 1; 3288c2ecf20Sopenharmony_ci u32 rbbm_chrncy_dis : 1; 3298c2ecf20Sopenharmony_ci u32 rbbm_rd_after_wr_lat : 2; 3308c2ecf20Sopenharmony_ci u32 dis_be_during_rd : 1; 3318c2ecf20Sopenharmony_ci u32 one_clk_invalidate_pulse : 1; 3328c2ecf20Sopenharmony_ci u32 dis_chnl_priority : 1; 3338c2ecf20Sopenharmony_ci u32 rst_read_path_a_pls : 1; 3348c2ecf20Sopenharmony_ci u32 rst_read_path_b_pls : 1; 3358c2ecf20Sopenharmony_ci u32 dis_reg_rd_fetch_trig : 1; 3368c2ecf20Sopenharmony_ci u32 dis_rd_fetch_trig_from_ind_addr : 1; 3378c2ecf20Sopenharmony_ci u32 dis_rd_same_byte_to_trig_fetch : 1; 3388c2ecf20Sopenharmony_ci u32 dis_dir_wrap : 1; 3398c2ecf20Sopenharmony_ci u32 dis_ring_buf_to_force_dec : 1; 3408c2ecf20Sopenharmony_ci u32 dis_addr_comp_in_16bit : 1; 3418c2ecf20Sopenharmony_ci u32 clr_w : 1; 3428c2ecf20Sopenharmony_ci u32 err_rd_tag_is_3 : 1; 3438c2ecf20Sopenharmony_ci u32 err_load_when_ful_a : 1; 3448c2ecf20Sopenharmony_ci u32 err_load_when_ful_b : 1; 3458c2ecf20Sopenharmony_ci u32 : 7; 3468c2ecf20Sopenharmony_ci} __attribute__((packed)); 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_ciunion cif_read_dbg_u { 3498c2ecf20Sopenharmony_ci u32 val : 32; 3508c2ecf20Sopenharmony_ci struct cif_read_dbg_t f; 3518c2ecf20Sopenharmony_ci} __attribute__((packed)); 3528c2ecf20Sopenharmony_ci 3538c2ecf20Sopenharmony_cistruct cif_write_dbg_t { 3548c2ecf20Sopenharmony_ci u32 packer_timeout_count : 2; 3558c2ecf20Sopenharmony_ci u32 en_upper_load_cond : 1; 3568c2ecf20Sopenharmony_ci u32 en_chnl_change_cond : 1; 3578c2ecf20Sopenharmony_ci u32 dis_addr_comp_cond : 1; 3588c2ecf20Sopenharmony_ci u32 dis_load_same_byte_addr_cond : 1; 3598c2ecf20Sopenharmony_ci u32 dis_timeout_cond : 1; 3608c2ecf20Sopenharmony_ci u32 dis_timeout_during_rbbm : 1; 3618c2ecf20Sopenharmony_ci u32 dis_packer_ful_during_rbbm_timeout : 1; 3628c2ecf20Sopenharmony_ci u32 en_dword_split_to_rbbm : 1; 3638c2ecf20Sopenharmony_ci u32 en_dummy_val : 1; 3648c2ecf20Sopenharmony_ci u32 dummy_val_sel : 1; 3658c2ecf20Sopenharmony_ci u32 mask_pm4_wrptr_dec : 1; 3668c2ecf20Sopenharmony_ci u32 dis_mc_clean_cond : 1; 3678c2ecf20Sopenharmony_ci u32 err_two_reqi_during_ful : 1; 3688c2ecf20Sopenharmony_ci u32 err_reqi_during_idle_clk : 1; 3698c2ecf20Sopenharmony_ci u32 err_global : 1; 3708c2ecf20Sopenharmony_ci u32 en_wr_buf_dbg_load : 1; 3718c2ecf20Sopenharmony_ci u32 en_wr_buf_dbg_path : 1; 3728c2ecf20Sopenharmony_ci u32 sel_wr_buf_byte : 3; 3738c2ecf20Sopenharmony_ci u32 dis_rd_flush_wr : 1; 3748c2ecf20Sopenharmony_ci u32 dis_packer_ful_cond : 1; 3758c2ecf20Sopenharmony_ci u32 dis_invalidate_by_ops_chnl : 1; 3768c2ecf20Sopenharmony_ci u32 en_halt_when_reqi_err : 1; 3778c2ecf20Sopenharmony_ci u32 cif_spare_2 : 5; 3788c2ecf20Sopenharmony_ci u32 : 1; 3798c2ecf20Sopenharmony_ci} __attribute__((packed)); 3808c2ecf20Sopenharmony_ci 3818c2ecf20Sopenharmony_ciunion cif_write_dbg_u { 3828c2ecf20Sopenharmony_ci u32 val : 32; 3838c2ecf20Sopenharmony_ci struct cif_write_dbg_t f; 3848c2ecf20Sopenharmony_ci} __attribute__((packed)); 3858c2ecf20Sopenharmony_ci 3868c2ecf20Sopenharmony_ci 3878c2ecf20Sopenharmony_cistruct intf_cntl_t { 3888c2ecf20Sopenharmony_ci unsigned char ad_inc_a : 1; 3898c2ecf20Sopenharmony_ci unsigned char ring_buf_a : 1; 3908c2ecf20Sopenharmony_ci unsigned char rd_fetch_trigger_a : 1; 3918c2ecf20Sopenharmony_ci unsigned char rd_data_rdy_a : 1; 3928c2ecf20Sopenharmony_ci unsigned char ad_inc_b : 1; 3938c2ecf20Sopenharmony_ci unsigned char ring_buf_b : 1; 3948c2ecf20Sopenharmony_ci unsigned char rd_fetch_trigger_b : 1; 3958c2ecf20Sopenharmony_ci unsigned char rd_data_rdy_b : 1; 3968c2ecf20Sopenharmony_ci} __attribute__((packed)); 3978c2ecf20Sopenharmony_ci 3988c2ecf20Sopenharmony_ciunion intf_cntl_u { 3998c2ecf20Sopenharmony_ci unsigned char val : 8; 4008c2ecf20Sopenharmony_ci struct intf_cntl_t f; 4018c2ecf20Sopenharmony_ci} __attribute__((packed)); 4028c2ecf20Sopenharmony_ci 4038c2ecf20Sopenharmony_cistruct cpu_defaults_t { 4048c2ecf20Sopenharmony_ci unsigned char unpack_rd_data : 1; 4058c2ecf20Sopenharmony_ci unsigned char access_ind_addr_a : 1; 4068c2ecf20Sopenharmony_ci unsigned char access_ind_addr_b : 1; 4078c2ecf20Sopenharmony_ci unsigned char access_scratch_reg : 1; 4088c2ecf20Sopenharmony_ci unsigned char pack_wr_data : 1; 4098c2ecf20Sopenharmony_ci unsigned char transition_size : 1; 4108c2ecf20Sopenharmony_ci unsigned char en_read_buf_mode : 1; 4118c2ecf20Sopenharmony_ci unsigned char rd_fetch_scratch : 1; 4128c2ecf20Sopenharmony_ci} __attribute__((packed)); 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_ciunion cpu_defaults_u { 4158c2ecf20Sopenharmony_ci unsigned char val : 8; 4168c2ecf20Sopenharmony_ci struct cpu_defaults_t f; 4178c2ecf20Sopenharmony_ci} __attribute__((packed)); 4188c2ecf20Sopenharmony_ci 4198c2ecf20Sopenharmony_cistruct crtc_total_t { 4208c2ecf20Sopenharmony_ci u32 crtc_h_total : 10; 4218c2ecf20Sopenharmony_ci u32 : 6; 4228c2ecf20Sopenharmony_ci u32 crtc_v_total : 10; 4238c2ecf20Sopenharmony_ci u32 : 6; 4248c2ecf20Sopenharmony_ci} __attribute__((packed)); 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_ciunion crtc_total_u { 4278c2ecf20Sopenharmony_ci u32 val : 32; 4288c2ecf20Sopenharmony_ci struct crtc_total_t f; 4298c2ecf20Sopenharmony_ci} __attribute__((packed)); 4308c2ecf20Sopenharmony_ci 4318c2ecf20Sopenharmony_cistruct crtc_ss_t { 4328c2ecf20Sopenharmony_ci u32 ss_start : 10; 4338c2ecf20Sopenharmony_ci u32 : 6; 4348c2ecf20Sopenharmony_ci u32 ss_end : 10; 4358c2ecf20Sopenharmony_ci u32 : 2; 4368c2ecf20Sopenharmony_ci u32 ss_align : 1; 4378c2ecf20Sopenharmony_ci u32 ss_pol : 1; 4388c2ecf20Sopenharmony_ci u32 ss_run_mode : 1; 4398c2ecf20Sopenharmony_ci u32 ss_en : 1; 4408c2ecf20Sopenharmony_ci} __attribute__((packed)); 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ciunion crtc_ss_u { 4438c2ecf20Sopenharmony_ci u32 val : 32; 4448c2ecf20Sopenharmony_ci struct crtc_ss_t f; 4458c2ecf20Sopenharmony_ci} __attribute__((packed)); 4468c2ecf20Sopenharmony_ci 4478c2ecf20Sopenharmony_cistruct active_h_disp_t { 4488c2ecf20Sopenharmony_ci u32 active_h_start : 10; 4498c2ecf20Sopenharmony_ci u32 : 6; 4508c2ecf20Sopenharmony_ci u32 active_h_end : 10; 4518c2ecf20Sopenharmony_ci u32 : 6; 4528c2ecf20Sopenharmony_ci} __attribute__((packed)); 4538c2ecf20Sopenharmony_ci 4548c2ecf20Sopenharmony_ciunion active_h_disp_u { 4558c2ecf20Sopenharmony_ci u32 val : 32; 4568c2ecf20Sopenharmony_ci struct active_h_disp_t f; 4578c2ecf20Sopenharmony_ci} __attribute__((packed)); 4588c2ecf20Sopenharmony_ci 4598c2ecf20Sopenharmony_cistruct active_v_disp_t { 4608c2ecf20Sopenharmony_ci u32 active_v_start : 10; 4618c2ecf20Sopenharmony_ci u32 : 6; 4628c2ecf20Sopenharmony_ci u32 active_v_end : 10; 4638c2ecf20Sopenharmony_ci u32 : 6; 4648c2ecf20Sopenharmony_ci} __attribute__((packed)); 4658c2ecf20Sopenharmony_ci 4668c2ecf20Sopenharmony_ciunion active_v_disp_u { 4678c2ecf20Sopenharmony_ci u32 val : 32; 4688c2ecf20Sopenharmony_ci struct active_v_disp_t f; 4698c2ecf20Sopenharmony_ci} __attribute__((packed)); 4708c2ecf20Sopenharmony_ci 4718c2ecf20Sopenharmony_cistruct graphic_h_disp_t { 4728c2ecf20Sopenharmony_ci u32 graphic_h_start : 10; 4738c2ecf20Sopenharmony_ci u32 : 6; 4748c2ecf20Sopenharmony_ci u32 graphic_h_end : 10; 4758c2ecf20Sopenharmony_ci u32 : 6; 4768c2ecf20Sopenharmony_ci} __attribute__((packed)); 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_ciunion graphic_h_disp_u { 4798c2ecf20Sopenharmony_ci u32 val : 32; 4808c2ecf20Sopenharmony_ci struct graphic_h_disp_t f; 4818c2ecf20Sopenharmony_ci} __attribute__((packed)); 4828c2ecf20Sopenharmony_ci 4838c2ecf20Sopenharmony_cistruct graphic_v_disp_t { 4848c2ecf20Sopenharmony_ci u32 graphic_v_start : 10; 4858c2ecf20Sopenharmony_ci u32 : 6; 4868c2ecf20Sopenharmony_ci u32 graphic_v_end : 10; 4878c2ecf20Sopenharmony_ci u32 : 6; 4888c2ecf20Sopenharmony_ci} __attribute__((packed)); 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_ciunion graphic_v_disp_u{ 4918c2ecf20Sopenharmony_ci u32 val : 32; 4928c2ecf20Sopenharmony_ci struct graphic_v_disp_t f; 4938c2ecf20Sopenharmony_ci} __attribute__((packed)); 4948c2ecf20Sopenharmony_ci 4958c2ecf20Sopenharmony_cistruct graphic_ctrl_t_w100 { 4968c2ecf20Sopenharmony_ci u32 color_depth : 3; 4978c2ecf20Sopenharmony_ci u32 portrait_mode : 2; 4988c2ecf20Sopenharmony_ci u32 low_power_on : 1; 4998c2ecf20Sopenharmony_ci u32 req_freq : 4; 5008c2ecf20Sopenharmony_ci u32 en_crtc : 1; 5018c2ecf20Sopenharmony_ci u32 en_graphic_req : 1; 5028c2ecf20Sopenharmony_ci u32 en_graphic_crtc : 1; 5038c2ecf20Sopenharmony_ci u32 total_req_graphic : 9; 5048c2ecf20Sopenharmony_ci u32 lcd_pclk_on : 1; 5058c2ecf20Sopenharmony_ci u32 lcd_sclk_on : 1; 5068c2ecf20Sopenharmony_ci u32 pclk_running : 1; 5078c2ecf20Sopenharmony_ci u32 sclk_running : 1; 5088c2ecf20Sopenharmony_ci u32 : 6; 5098c2ecf20Sopenharmony_ci} __attribute__((packed)); 5108c2ecf20Sopenharmony_ci 5118c2ecf20Sopenharmony_cistruct graphic_ctrl_t_w32xx { 5128c2ecf20Sopenharmony_ci u32 color_depth : 3; 5138c2ecf20Sopenharmony_ci u32 portrait_mode : 2; 5148c2ecf20Sopenharmony_ci u32 low_power_on : 1; 5158c2ecf20Sopenharmony_ci u32 req_freq : 4; 5168c2ecf20Sopenharmony_ci u32 en_crtc : 1; 5178c2ecf20Sopenharmony_ci u32 en_graphic_req : 1; 5188c2ecf20Sopenharmony_ci u32 en_graphic_crtc : 1; 5198c2ecf20Sopenharmony_ci u32 total_req_graphic : 10; 5208c2ecf20Sopenharmony_ci u32 lcd_pclk_on : 1; 5218c2ecf20Sopenharmony_ci u32 lcd_sclk_on : 1; 5228c2ecf20Sopenharmony_ci u32 pclk_running : 1; 5238c2ecf20Sopenharmony_ci u32 sclk_running : 1; 5248c2ecf20Sopenharmony_ci u32 : 5; 5258c2ecf20Sopenharmony_ci} __attribute__((packed)); 5268c2ecf20Sopenharmony_ci 5278c2ecf20Sopenharmony_ciunion graphic_ctrl_u { 5288c2ecf20Sopenharmony_ci u32 val : 32; 5298c2ecf20Sopenharmony_ci struct graphic_ctrl_t_w100 f_w100; 5308c2ecf20Sopenharmony_ci struct graphic_ctrl_t_w32xx f_w32xx; 5318c2ecf20Sopenharmony_ci} __attribute__((packed)); 5328c2ecf20Sopenharmony_ci 5338c2ecf20Sopenharmony_cistruct video_ctrl_t { 5348c2ecf20Sopenharmony_ci u32 video_mode : 1; 5358c2ecf20Sopenharmony_ci u32 keyer_en : 1; 5368c2ecf20Sopenharmony_ci u32 en_video_req : 1; 5378c2ecf20Sopenharmony_ci u32 en_graphic_req_video : 1; 5388c2ecf20Sopenharmony_ci u32 en_video_crtc : 1; 5398c2ecf20Sopenharmony_ci u32 video_hor_exp : 2; 5408c2ecf20Sopenharmony_ci u32 video_ver_exp : 2; 5418c2ecf20Sopenharmony_ci u32 uv_combine : 1; 5428c2ecf20Sopenharmony_ci u32 total_req_video : 9; 5438c2ecf20Sopenharmony_ci u32 video_ch_sel : 1; 5448c2ecf20Sopenharmony_ci u32 video_portrait : 2; 5458c2ecf20Sopenharmony_ci u32 yuv2rgb_en : 1; 5468c2ecf20Sopenharmony_ci u32 yuv2rgb_option : 1; 5478c2ecf20Sopenharmony_ci u32 video_inv_hor : 1; 5488c2ecf20Sopenharmony_ci u32 video_inv_ver : 1; 5498c2ecf20Sopenharmony_ci u32 gamma_sel : 2; 5508c2ecf20Sopenharmony_ci u32 dis_limit : 1; 5518c2ecf20Sopenharmony_ci u32 en_uv_hblend : 1; 5528c2ecf20Sopenharmony_ci u32 rgb_gamma_sel : 2; 5538c2ecf20Sopenharmony_ci} __attribute__((packed)); 5548c2ecf20Sopenharmony_ci 5558c2ecf20Sopenharmony_ciunion video_ctrl_u { 5568c2ecf20Sopenharmony_ci u32 val : 32; 5578c2ecf20Sopenharmony_ci struct video_ctrl_t f; 5588c2ecf20Sopenharmony_ci} __attribute__((packed)); 5598c2ecf20Sopenharmony_ci 5608c2ecf20Sopenharmony_cistruct disp_db_buf_cntl_rd_t { 5618c2ecf20Sopenharmony_ci u32 en_db_buf : 1; 5628c2ecf20Sopenharmony_ci u32 update_db_buf_done : 1; 5638c2ecf20Sopenharmony_ci u32 db_buf_cntl : 6; 5648c2ecf20Sopenharmony_ci u32 : 24; 5658c2ecf20Sopenharmony_ci} __attribute__((packed)); 5668c2ecf20Sopenharmony_ci 5678c2ecf20Sopenharmony_ciunion disp_db_buf_cntl_rd_u { 5688c2ecf20Sopenharmony_ci u32 val : 32; 5698c2ecf20Sopenharmony_ci struct disp_db_buf_cntl_rd_t f; 5708c2ecf20Sopenharmony_ci} __attribute__((packed)); 5718c2ecf20Sopenharmony_ci 5728c2ecf20Sopenharmony_cistruct disp_db_buf_cntl_wr_t { 5738c2ecf20Sopenharmony_ci u32 en_db_buf : 1; 5748c2ecf20Sopenharmony_ci u32 update_db_buf : 1; 5758c2ecf20Sopenharmony_ci u32 db_buf_cntl : 6; 5768c2ecf20Sopenharmony_ci u32 : 24; 5778c2ecf20Sopenharmony_ci} __attribute__((packed)); 5788c2ecf20Sopenharmony_ci 5798c2ecf20Sopenharmony_ciunion disp_db_buf_cntl_wr_u { 5808c2ecf20Sopenharmony_ci u32 val : 32; 5818c2ecf20Sopenharmony_ci struct disp_db_buf_cntl_wr_t f; 5828c2ecf20Sopenharmony_ci} __attribute__((packed)); 5838c2ecf20Sopenharmony_ci 5848c2ecf20Sopenharmony_cistruct gamma_value1_t { 5858c2ecf20Sopenharmony_ci u32 gamma1 : 8; 5868c2ecf20Sopenharmony_ci u32 gamma2 : 8; 5878c2ecf20Sopenharmony_ci u32 gamma3 : 8; 5888c2ecf20Sopenharmony_ci u32 gamma4 : 8; 5898c2ecf20Sopenharmony_ci} __attribute__((packed)); 5908c2ecf20Sopenharmony_ci 5918c2ecf20Sopenharmony_ciunion gamma_value1_u { 5928c2ecf20Sopenharmony_ci u32 val : 32; 5938c2ecf20Sopenharmony_ci struct gamma_value1_t f; 5948c2ecf20Sopenharmony_ci} __attribute__((packed)); 5958c2ecf20Sopenharmony_ci 5968c2ecf20Sopenharmony_cistruct gamma_value2_t { 5978c2ecf20Sopenharmony_ci u32 gamma5 : 8; 5988c2ecf20Sopenharmony_ci u32 gamma6 : 8; 5998c2ecf20Sopenharmony_ci u32 gamma7 : 8; 6008c2ecf20Sopenharmony_ci u32 gamma8 : 8; 6018c2ecf20Sopenharmony_ci} __attribute__((packed)); 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ciunion gamma_value2_u { 6048c2ecf20Sopenharmony_ci u32 val : 32; 6058c2ecf20Sopenharmony_ci struct gamma_value2_t f; 6068c2ecf20Sopenharmony_ci} __attribute__((packed)); 6078c2ecf20Sopenharmony_ci 6088c2ecf20Sopenharmony_cistruct gamma_slope_t { 6098c2ecf20Sopenharmony_ci u32 slope1 : 3; 6108c2ecf20Sopenharmony_ci u32 slope2 : 3; 6118c2ecf20Sopenharmony_ci u32 slope3 : 3; 6128c2ecf20Sopenharmony_ci u32 slope4 : 3; 6138c2ecf20Sopenharmony_ci u32 slope5 : 3; 6148c2ecf20Sopenharmony_ci u32 slope6 : 3; 6158c2ecf20Sopenharmony_ci u32 slope7 : 3; 6168c2ecf20Sopenharmony_ci u32 slope8 : 3; 6178c2ecf20Sopenharmony_ci u32 : 8; 6188c2ecf20Sopenharmony_ci} __attribute__((packed)); 6198c2ecf20Sopenharmony_ci 6208c2ecf20Sopenharmony_ciunion gamma_slope_u { 6218c2ecf20Sopenharmony_ci u32 val : 32; 6228c2ecf20Sopenharmony_ci struct gamma_slope_t f; 6238c2ecf20Sopenharmony_ci} __attribute__((packed)); 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_cistruct mc_ext_mem_location_t { 6268c2ecf20Sopenharmony_ci u32 mc_ext_mem_start : 16; 6278c2ecf20Sopenharmony_ci u32 mc_ext_mem_top : 16; 6288c2ecf20Sopenharmony_ci} __attribute__((packed)); 6298c2ecf20Sopenharmony_ci 6308c2ecf20Sopenharmony_ciunion mc_ext_mem_location_u { 6318c2ecf20Sopenharmony_ci u32 val : 32; 6328c2ecf20Sopenharmony_ci struct mc_ext_mem_location_t f; 6338c2ecf20Sopenharmony_ci} __attribute__((packed)); 6348c2ecf20Sopenharmony_ci 6358c2ecf20Sopenharmony_cistruct mc_fb_location_t { 6368c2ecf20Sopenharmony_ci u32 mc_fb_start : 16; 6378c2ecf20Sopenharmony_ci u32 mc_fb_top : 16; 6388c2ecf20Sopenharmony_ci} __attribute__((packed)); 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ciunion mc_fb_location_u { 6418c2ecf20Sopenharmony_ci u32 val : 32; 6428c2ecf20Sopenharmony_ci struct mc_fb_location_t f; 6438c2ecf20Sopenharmony_ci} __attribute__((packed)); 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_cistruct clk_pin_cntl_t { 6468c2ecf20Sopenharmony_ci u32 osc_en : 1; 6478c2ecf20Sopenharmony_ci u32 osc_gain : 5; 6488c2ecf20Sopenharmony_ci u32 dont_use_xtalin : 1; 6498c2ecf20Sopenharmony_ci u32 xtalin_pm_en : 1; 6508c2ecf20Sopenharmony_ci u32 xtalin_dbl_en : 1; 6518c2ecf20Sopenharmony_ci u32 : 7; 6528c2ecf20Sopenharmony_ci u32 cg_debug : 16; 6538c2ecf20Sopenharmony_ci} __attribute__((packed)); 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ciunion clk_pin_cntl_u { 6568c2ecf20Sopenharmony_ci u32 val : 32; 6578c2ecf20Sopenharmony_ci struct clk_pin_cntl_t f; 6588c2ecf20Sopenharmony_ci} __attribute__((packed)); 6598c2ecf20Sopenharmony_ci 6608c2ecf20Sopenharmony_cistruct pll_ref_fb_div_t { 6618c2ecf20Sopenharmony_ci u32 pll_ref_div : 4; 6628c2ecf20Sopenharmony_ci u32 : 4; 6638c2ecf20Sopenharmony_ci u32 pll_fb_div_int : 6; 6648c2ecf20Sopenharmony_ci u32 : 2; 6658c2ecf20Sopenharmony_ci u32 pll_fb_div_frac : 3; 6668c2ecf20Sopenharmony_ci u32 : 1; 6678c2ecf20Sopenharmony_ci u32 pll_reset_time : 4; 6688c2ecf20Sopenharmony_ci u32 pll_lock_time : 8; 6698c2ecf20Sopenharmony_ci} __attribute__((packed)); 6708c2ecf20Sopenharmony_ci 6718c2ecf20Sopenharmony_ciunion pll_ref_fb_div_u { 6728c2ecf20Sopenharmony_ci u32 val : 32; 6738c2ecf20Sopenharmony_ci struct pll_ref_fb_div_t f; 6748c2ecf20Sopenharmony_ci} __attribute__((packed)); 6758c2ecf20Sopenharmony_ci 6768c2ecf20Sopenharmony_cistruct pll_cntl_t { 6778c2ecf20Sopenharmony_ci u32 pll_pwdn : 1; 6788c2ecf20Sopenharmony_ci u32 pll_reset : 1; 6798c2ecf20Sopenharmony_ci u32 pll_pm_en : 1; 6808c2ecf20Sopenharmony_ci u32 pll_mode : 1; 6818c2ecf20Sopenharmony_ci u32 pll_refclk_sel : 1; 6828c2ecf20Sopenharmony_ci u32 pll_fbclk_sel : 1; 6838c2ecf20Sopenharmony_ci u32 pll_tcpoff : 1; 6848c2ecf20Sopenharmony_ci u32 pll_pcp : 3; 6858c2ecf20Sopenharmony_ci u32 pll_pvg : 3; 6868c2ecf20Sopenharmony_ci u32 pll_vcofr : 1; 6878c2ecf20Sopenharmony_ci u32 pll_ioffset : 2; 6888c2ecf20Sopenharmony_ci u32 pll_pecc_mode : 2; 6898c2ecf20Sopenharmony_ci u32 pll_pecc_scon : 2; 6908c2ecf20Sopenharmony_ci u32 pll_dactal : 4; 6918c2ecf20Sopenharmony_ci u32 pll_cp_clip : 2; 6928c2ecf20Sopenharmony_ci u32 pll_conf : 3; 6938c2ecf20Sopenharmony_ci u32 pll_mbctrl : 2; 6948c2ecf20Sopenharmony_ci u32 pll_ring_off : 1; 6958c2ecf20Sopenharmony_ci} __attribute__((packed)); 6968c2ecf20Sopenharmony_ci 6978c2ecf20Sopenharmony_ciunion pll_cntl_u { 6988c2ecf20Sopenharmony_ci u32 val : 32; 6998c2ecf20Sopenharmony_ci struct pll_cntl_t f; 7008c2ecf20Sopenharmony_ci} __attribute__((packed)); 7018c2ecf20Sopenharmony_ci 7028c2ecf20Sopenharmony_cistruct sclk_cntl_t { 7038c2ecf20Sopenharmony_ci u32 sclk_src_sel : 2; 7048c2ecf20Sopenharmony_ci u32 : 2; 7058c2ecf20Sopenharmony_ci u32 sclk_post_div_fast : 4; 7068c2ecf20Sopenharmony_ci u32 sclk_clkon_hys : 3; 7078c2ecf20Sopenharmony_ci u32 sclk_post_div_slow : 4; 7088c2ecf20Sopenharmony_ci u32 disp_cg_ok2switch_en : 1; 7098c2ecf20Sopenharmony_ci u32 sclk_force_reg : 1; 7108c2ecf20Sopenharmony_ci u32 sclk_force_disp : 1; 7118c2ecf20Sopenharmony_ci u32 sclk_force_mc : 1; 7128c2ecf20Sopenharmony_ci u32 sclk_force_extmc : 1; 7138c2ecf20Sopenharmony_ci u32 sclk_force_cp : 1; 7148c2ecf20Sopenharmony_ci u32 sclk_force_e2 : 1; 7158c2ecf20Sopenharmony_ci u32 sclk_force_e3 : 1; 7168c2ecf20Sopenharmony_ci u32 sclk_force_idct : 1; 7178c2ecf20Sopenharmony_ci u32 sclk_force_bist : 1; 7188c2ecf20Sopenharmony_ci u32 busy_extend_cp : 1; 7198c2ecf20Sopenharmony_ci u32 busy_extend_e2 : 1; 7208c2ecf20Sopenharmony_ci u32 busy_extend_e3 : 1; 7218c2ecf20Sopenharmony_ci u32 busy_extend_idct : 1; 7228c2ecf20Sopenharmony_ci u32 : 3; 7238c2ecf20Sopenharmony_ci} __attribute__((packed)); 7248c2ecf20Sopenharmony_ci 7258c2ecf20Sopenharmony_ciunion sclk_cntl_u { 7268c2ecf20Sopenharmony_ci u32 val : 32; 7278c2ecf20Sopenharmony_ci struct sclk_cntl_t f; 7288c2ecf20Sopenharmony_ci} __attribute__((packed)); 7298c2ecf20Sopenharmony_ci 7308c2ecf20Sopenharmony_cistruct pclk_cntl_t { 7318c2ecf20Sopenharmony_ci u32 pclk_src_sel : 2; 7328c2ecf20Sopenharmony_ci u32 : 2; 7338c2ecf20Sopenharmony_ci u32 pclk_post_div : 4; 7348c2ecf20Sopenharmony_ci u32 : 8; 7358c2ecf20Sopenharmony_ci u32 pclk_force_disp : 1; 7368c2ecf20Sopenharmony_ci u32 : 15; 7378c2ecf20Sopenharmony_ci} __attribute__((packed)); 7388c2ecf20Sopenharmony_ci 7398c2ecf20Sopenharmony_ciunion pclk_cntl_u { 7408c2ecf20Sopenharmony_ci u32 val : 32; 7418c2ecf20Sopenharmony_ci struct pclk_cntl_t f; 7428c2ecf20Sopenharmony_ci} __attribute__((packed)); 7438c2ecf20Sopenharmony_ci 7448c2ecf20Sopenharmony_ci 7458c2ecf20Sopenharmony_ci#define TESTCLK_SRC_PLL 0x01 7468c2ecf20Sopenharmony_ci#define TESTCLK_SRC_SCLK 0x02 7478c2ecf20Sopenharmony_ci#define TESTCLK_SRC_PCLK 0x03 7488c2ecf20Sopenharmony_ci/* 4 and 5 seem to by XTAL/M */ 7498c2ecf20Sopenharmony_ci#define TESTCLK_SRC_XTAL 0x06 7508c2ecf20Sopenharmony_ci 7518c2ecf20Sopenharmony_cistruct clk_test_cntl_t { 7528c2ecf20Sopenharmony_ci u32 testclk_sel : 4; 7538c2ecf20Sopenharmony_ci u32 : 3; 7548c2ecf20Sopenharmony_ci u32 start_check_freq : 1; 7558c2ecf20Sopenharmony_ci u32 tstcount_rst : 1; 7568c2ecf20Sopenharmony_ci u32 : 15; 7578c2ecf20Sopenharmony_ci u32 test_count : 8; 7588c2ecf20Sopenharmony_ci} __attribute__((packed)); 7598c2ecf20Sopenharmony_ci 7608c2ecf20Sopenharmony_ciunion clk_test_cntl_u { 7618c2ecf20Sopenharmony_ci u32 val : 32; 7628c2ecf20Sopenharmony_ci struct clk_test_cntl_t f; 7638c2ecf20Sopenharmony_ci} __attribute__((packed)); 7648c2ecf20Sopenharmony_ci 7658c2ecf20Sopenharmony_cistruct pwrmgt_cntl_t { 7668c2ecf20Sopenharmony_ci u32 pwm_enable : 1; 7678c2ecf20Sopenharmony_ci u32 : 1; 7688c2ecf20Sopenharmony_ci u32 pwm_mode_req : 2; 7698c2ecf20Sopenharmony_ci u32 pwm_wakeup_cond : 2; 7708c2ecf20Sopenharmony_ci u32 pwm_fast_noml_hw_en : 1; 7718c2ecf20Sopenharmony_ci u32 pwm_noml_fast_hw_en : 1; 7728c2ecf20Sopenharmony_ci u32 pwm_fast_noml_cond : 4; 7738c2ecf20Sopenharmony_ci u32 pwm_noml_fast_cond : 4; 7748c2ecf20Sopenharmony_ci u32 pwm_idle_timer : 8; 7758c2ecf20Sopenharmony_ci u32 pwm_busy_timer : 8; 7768c2ecf20Sopenharmony_ci} __attribute__((packed)); 7778c2ecf20Sopenharmony_ci 7788c2ecf20Sopenharmony_ciunion pwrmgt_cntl_u { 7798c2ecf20Sopenharmony_ci u32 val : 32; 7808c2ecf20Sopenharmony_ci struct pwrmgt_cntl_t f; 7818c2ecf20Sopenharmony_ci} __attribute__((packed)); 7828c2ecf20Sopenharmony_ci 7838c2ecf20Sopenharmony_ci#define SRC_DATATYPE_EQU_DST 3 7848c2ecf20Sopenharmony_ci 7858c2ecf20Sopenharmony_ci#define ROP3_SRCCOPY 0xcc 7868c2ecf20Sopenharmony_ci#define ROP3_PATCOPY 0xf0 7878c2ecf20Sopenharmony_ci 7888c2ecf20Sopenharmony_ci#define GMC_BRUSH_SOLID_COLOR 13 7898c2ecf20Sopenharmony_ci#define GMC_BRUSH_NONE 15 7908c2ecf20Sopenharmony_ci 7918c2ecf20Sopenharmony_ci#define DP_SRC_MEM_RECTANGULAR 2 7928c2ecf20Sopenharmony_ci 7938c2ecf20Sopenharmony_ci#define DP_OP_ROP 0 7948c2ecf20Sopenharmony_ci 7958c2ecf20Sopenharmony_cistruct dp_gui_master_cntl_t { 7968c2ecf20Sopenharmony_ci u32 gmc_src_pitch_offset_cntl : 1; 7978c2ecf20Sopenharmony_ci u32 gmc_dst_pitch_offset_cntl : 1; 7988c2ecf20Sopenharmony_ci u32 gmc_src_clipping : 1; 7998c2ecf20Sopenharmony_ci u32 gmc_dst_clipping : 1; 8008c2ecf20Sopenharmony_ci u32 gmc_brush_datatype : 4; 8018c2ecf20Sopenharmony_ci u32 gmc_dst_datatype : 4; 8028c2ecf20Sopenharmony_ci u32 gmc_src_datatype : 3; 8038c2ecf20Sopenharmony_ci u32 gmc_byte_pix_order : 1; 8048c2ecf20Sopenharmony_ci u32 gmc_default_sel : 1; 8058c2ecf20Sopenharmony_ci u32 gmc_rop3 : 8; 8068c2ecf20Sopenharmony_ci u32 gmc_dp_src_source : 3; 8078c2ecf20Sopenharmony_ci u32 gmc_clr_cmp_fcn_dis : 1; 8088c2ecf20Sopenharmony_ci u32 : 1; 8098c2ecf20Sopenharmony_ci u32 gmc_wr_msk_dis : 1; 8108c2ecf20Sopenharmony_ci u32 gmc_dp_op : 1; 8118c2ecf20Sopenharmony_ci} __attribute__((packed)); 8128c2ecf20Sopenharmony_ci 8138c2ecf20Sopenharmony_ciunion dp_gui_master_cntl_u { 8148c2ecf20Sopenharmony_ci u32 val : 32; 8158c2ecf20Sopenharmony_ci struct dp_gui_master_cntl_t f; 8168c2ecf20Sopenharmony_ci} __attribute__((packed)); 8178c2ecf20Sopenharmony_ci 8188c2ecf20Sopenharmony_cistruct rbbm_status_t { 8198c2ecf20Sopenharmony_ci u32 cmdfifo_avail : 7; 8208c2ecf20Sopenharmony_ci u32 : 1; 8218c2ecf20Sopenharmony_ci u32 hirq_on_rbb : 1; 8228c2ecf20Sopenharmony_ci u32 cprq_on_rbb : 1; 8238c2ecf20Sopenharmony_ci u32 cfrq_on_rbb : 1; 8248c2ecf20Sopenharmony_ci u32 hirq_in_rtbuf : 1; 8258c2ecf20Sopenharmony_ci u32 cprq_in_rtbuf : 1; 8268c2ecf20Sopenharmony_ci u32 cfrq_in_rtbuf : 1; 8278c2ecf20Sopenharmony_ci u32 cf_pipe_busy : 1; 8288c2ecf20Sopenharmony_ci u32 eng_ev_busy : 1; 8298c2ecf20Sopenharmony_ci u32 cp_cmdstrm_busy : 1; 8308c2ecf20Sopenharmony_ci u32 e2_busy : 1; 8318c2ecf20Sopenharmony_ci u32 rb2d_busy : 1; 8328c2ecf20Sopenharmony_ci u32 rb3d_busy : 1; 8338c2ecf20Sopenharmony_ci u32 se_busy : 1; 8348c2ecf20Sopenharmony_ci u32 re_busy : 1; 8358c2ecf20Sopenharmony_ci u32 tam_busy : 1; 8368c2ecf20Sopenharmony_ci u32 tdm_busy : 1; 8378c2ecf20Sopenharmony_ci u32 pb_busy : 1; 8388c2ecf20Sopenharmony_ci u32 : 6; 8398c2ecf20Sopenharmony_ci u32 gui_active : 1; 8408c2ecf20Sopenharmony_ci} __attribute__((packed)); 8418c2ecf20Sopenharmony_ci 8428c2ecf20Sopenharmony_ciunion rbbm_status_u { 8438c2ecf20Sopenharmony_ci u32 val : 32; 8448c2ecf20Sopenharmony_ci struct rbbm_status_t f; 8458c2ecf20Sopenharmony_ci} __attribute__((packed)); 8468c2ecf20Sopenharmony_ci 8478c2ecf20Sopenharmony_cistruct dp_datatype_t { 8488c2ecf20Sopenharmony_ci u32 dp_dst_datatype : 4; 8498c2ecf20Sopenharmony_ci u32 : 4; 8508c2ecf20Sopenharmony_ci u32 dp_brush_datatype : 4; 8518c2ecf20Sopenharmony_ci u32 dp_src2_type : 1; 8528c2ecf20Sopenharmony_ci u32 dp_src2_datatype : 3; 8538c2ecf20Sopenharmony_ci u32 dp_src_datatype : 3; 8548c2ecf20Sopenharmony_ci u32 : 11; 8558c2ecf20Sopenharmony_ci u32 dp_byte_pix_order : 1; 8568c2ecf20Sopenharmony_ci u32 : 1; 8578c2ecf20Sopenharmony_ci} __attribute__((packed)); 8588c2ecf20Sopenharmony_ci 8598c2ecf20Sopenharmony_ciunion dp_datatype_u { 8608c2ecf20Sopenharmony_ci u32 val : 32; 8618c2ecf20Sopenharmony_ci struct dp_datatype_t f; 8628c2ecf20Sopenharmony_ci} __attribute__((packed)); 8638c2ecf20Sopenharmony_ci 8648c2ecf20Sopenharmony_cistruct dp_mix_t { 8658c2ecf20Sopenharmony_ci u32 : 8; 8668c2ecf20Sopenharmony_ci u32 dp_src_source : 3; 8678c2ecf20Sopenharmony_ci u32 dp_src2_source : 3; 8688c2ecf20Sopenharmony_ci u32 : 2; 8698c2ecf20Sopenharmony_ci u32 dp_rop3 : 8; 8708c2ecf20Sopenharmony_ci u32 dp_op : 1; 8718c2ecf20Sopenharmony_ci u32 : 7; 8728c2ecf20Sopenharmony_ci} __attribute__((packed)); 8738c2ecf20Sopenharmony_ci 8748c2ecf20Sopenharmony_ciunion dp_mix_u { 8758c2ecf20Sopenharmony_ci u32 val : 32; 8768c2ecf20Sopenharmony_ci struct dp_mix_t f; 8778c2ecf20Sopenharmony_ci} __attribute__((packed)); 8788c2ecf20Sopenharmony_ci 8798c2ecf20Sopenharmony_cistruct eng_cntl_t { 8808c2ecf20Sopenharmony_ci u32 erc_reg_rd_ws : 1; 8818c2ecf20Sopenharmony_ci u32 erc_reg_wr_ws : 1; 8828c2ecf20Sopenharmony_ci u32 erc_idle_reg_wr : 1; 8838c2ecf20Sopenharmony_ci u32 dis_engine_triggers : 1; 8848c2ecf20Sopenharmony_ci u32 dis_rop_src_uses_dst_w_h : 1; 8858c2ecf20Sopenharmony_ci u32 dis_src_uses_dst_dirmaj : 1; 8868c2ecf20Sopenharmony_ci u32 : 6; 8878c2ecf20Sopenharmony_ci u32 force_3dclk_when_2dclk : 1; 8888c2ecf20Sopenharmony_ci u32 : 19; 8898c2ecf20Sopenharmony_ci} __attribute__((packed)); 8908c2ecf20Sopenharmony_ci 8918c2ecf20Sopenharmony_ciunion eng_cntl_u { 8928c2ecf20Sopenharmony_ci u32 val : 32; 8938c2ecf20Sopenharmony_ci struct eng_cntl_t f; 8948c2ecf20Sopenharmony_ci} __attribute__((packed)); 8958c2ecf20Sopenharmony_ci 8968c2ecf20Sopenharmony_cistruct dp_cntl_t { 8978c2ecf20Sopenharmony_ci u32 dst_x_dir : 1; 8988c2ecf20Sopenharmony_ci u32 dst_y_dir : 1; 8998c2ecf20Sopenharmony_ci u32 src_x_dir : 1; 9008c2ecf20Sopenharmony_ci u32 src_y_dir : 1; 9018c2ecf20Sopenharmony_ci u32 dst_major_x : 1; 9028c2ecf20Sopenharmony_ci u32 src_major_x : 1; 9038c2ecf20Sopenharmony_ci u32 : 26; 9048c2ecf20Sopenharmony_ci} __attribute__((packed)); 9058c2ecf20Sopenharmony_ci 9068c2ecf20Sopenharmony_ciunion dp_cntl_u { 9078c2ecf20Sopenharmony_ci u32 val : 32; 9088c2ecf20Sopenharmony_ci struct dp_cntl_t f; 9098c2ecf20Sopenharmony_ci} __attribute__((packed)); 9108c2ecf20Sopenharmony_ci 9118c2ecf20Sopenharmony_cistruct dp_cntl_dst_dir_t { 9128c2ecf20Sopenharmony_ci u32 : 15; 9138c2ecf20Sopenharmony_ci u32 dst_y_dir : 1; 9148c2ecf20Sopenharmony_ci u32 : 15; 9158c2ecf20Sopenharmony_ci u32 dst_x_dir : 1; 9168c2ecf20Sopenharmony_ci} __attribute__((packed)); 9178c2ecf20Sopenharmony_ci 9188c2ecf20Sopenharmony_ciunion dp_cntl_dst_dir_u { 9198c2ecf20Sopenharmony_ci u32 val : 32; 9208c2ecf20Sopenharmony_ci struct dp_cntl_dst_dir_t f; 9218c2ecf20Sopenharmony_ci} __attribute__((packed)); 9228c2ecf20Sopenharmony_ci 9238c2ecf20Sopenharmony_ci#endif 9248c2ecf20Sopenharmony_ci 925