18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef CARMINE_CARMINE_H 38c2ecf20Sopenharmony_ci#define CARMINE_CARMINE_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#define CARMINE_MEMORY_BAR 2 68c2ecf20Sopenharmony_ci#define CARMINE_CONFIG_BAR 3 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#define MAX_DISPLAY 2 98c2ecf20Sopenharmony_ci#define CARMINE_DISPLAY_MEM (800 * 600 * 4) 108c2ecf20Sopenharmony_ci#define CARMINE_TOTAL_DIPLAY_MEM (CARMINE_DISPLAY_MEM * MAX_DISPLAY) 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#define CARMINE_USE_DISPLAY0 (1 << 0) 138c2ecf20Sopenharmony_ci#define CARMINE_USE_DISPLAY1 (1 << 1) 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci/* 168c2ecf20Sopenharmony_ci * This values work on the eval card. Custom boards may use different timings, 178c2ecf20Sopenharmony_ci * here an example :) 188c2ecf20Sopenharmony_ci */ 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/* DRAM initialization values */ 218c2ecf20Sopenharmony_ci#ifdef CONFIG_FB_CARMINE_DRAM_EVAL 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_CLOCK_ENABLE (0x03ff) 248c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_ADD (0x05c3) 258c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_MODE (0x0121) 268c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_EMODE (0x8000) 278c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_SET_TIME1 (0x4749) 288c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_SET_TIME2 (0x2a22) 298c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_REFRESH (0x0042) 308c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_STATES (0x0003) 318c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_RESERVE0 (0x0020) 328c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_FIFO_DEPTH (0x000f) 338c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_RESERVE2 (0x0000) 348c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_DDRIF1 (0x6646) 358c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_DDRIF2 (0x0055) 368c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_MODE_AFT_RST (0x0021) 378c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_STATES_AFT_RST (0x0002) 388c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_IO_CONT0 (0x0555) 398c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_IO_CONT1 (0x0555) 408c2ecf20Sopenharmony_ci#define CARMINE_DCTL_DLL_RESET (1) 418c2ecf20Sopenharmony_ci#endif 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#ifdef CONFIG_CARMINE_DRAM_CUSTOM 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_CLOCK_ENABLE (0x03ff) 468c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_ADD (0x03b2) 478c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_MODE (0x0161) 488c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_EMODE (0x8000) 498c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_SET_TIME1 (0x2628) 508c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_SET_TIME2 (0x1a09) 518c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_REFRESH (0x00fe) 528c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_STATES (0x0003) 538c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_RESERVE0 (0x0020) 548c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_FIFO_DEPTH (0x000f) 558c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_RESERVE2 (0x0000) 568c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_DDRIF1 (0x0646) 578c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_DDRIF2 (0x55aa) 588c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_MODE_AFT_RST (0x0061) 598c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_STATES_AFT_RST (0x0002) 608c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_IO_CONT0 (0x0555) 618c2ecf20Sopenharmony_ci#define CARMINE_DFLT_IP_DCTL_IO_CONT1 (0x0555) 628c2ecf20Sopenharmony_ci#define CARMINE_DCTL_DLL_RESET (1) 638c2ecf20Sopenharmony_ci#endif 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci#endif 66