18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  GOVR registers list for WM8505 chips
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 2010 Ed Spiridonov <edo.rus@gmail.com>
68c2ecf20Sopenharmony_ci *   Based on VIA/WonderMedia wm8510-govrh-reg.h
78c2ecf20Sopenharmony_ci *   http://github.com/projectgus/kernel_wm8505/blob/wm8505_2.6.29/
88c2ecf20Sopenharmony_ci *         drivers/video/wmt/register/wm8510/wm8510-govrh-reg.h
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef _WM8505FB_REGS_H
128c2ecf20Sopenharmony_ci#define _WM8505FB_REGS_H
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/*
158c2ecf20Sopenharmony_ci * Color space select register, default value 0x1c
168c2ecf20Sopenharmony_ci *   BIT0 GOVRH_DVO_YUV2RGB_ENABLE
178c2ecf20Sopenharmony_ci *   BIT1 GOVRH_VGA_YUV2RGB_ENABLE
188c2ecf20Sopenharmony_ci *   BIT2 GOVRH_RGB_MODE
198c2ecf20Sopenharmony_ci *   BIT3 GOVRH_DAC_CLKINV
208c2ecf20Sopenharmony_ci *   BIT4 GOVRH_BLANK_ZERO
218c2ecf20Sopenharmony_ci */
228c2ecf20Sopenharmony_ci#define WMT_GOVR_COLORSPACE	0x1e4
238c2ecf20Sopenharmony_ci/*
248c2ecf20Sopenharmony_ci * Another colorspace select register, default value 1
258c2ecf20Sopenharmony_ci *   BIT0 GOVRH_DVO_RGB
268c2ecf20Sopenharmony_ci *   BIT1 GOVRH_DVO_YUV422
278c2ecf20Sopenharmony_ci */
288c2ecf20Sopenharmony_ci#define WMT_GOVR_COLORSPACE1	 0x30
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci#define WMT_GOVR_CONTRAST	0x1b8
318c2ecf20Sopenharmony_ci#define WMT_GOVR_BRGHTNESS	0x1bc /* incompatible with RGB? */
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/* Framubeffer address */
348c2ecf20Sopenharmony_ci#define WMT_GOVR_FBADDR		 0x90
358c2ecf20Sopenharmony_ci#define WMT_GOVR_FBADDR1	 0x94 /* UV offset in YUV mode */
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci/* Offset of visible window */
388c2ecf20Sopenharmony_ci#define WMT_GOVR_XPAN		 0xa4
398c2ecf20Sopenharmony_ci#define WMT_GOVR_YPAN		 0xa0
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#define WMT_GOVR_XRES		 0x98
428c2ecf20Sopenharmony_ci#define WMT_GOVR_XRES_VIRTUAL	 0x9c
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci#define WMT_GOVR_MIF_ENABLE	 0x80
458c2ecf20Sopenharmony_ci#define WMT_GOVR_FHI		 0xa8
468c2ecf20Sopenharmony_ci#define WMT_GOVR_REG_UPDATE	 0xe4
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci/*
498c2ecf20Sopenharmony_ci *   BIT0 GOVRH_DVO_OUTWIDTH
508c2ecf20Sopenharmony_ci *   BIT1 GOVRH_DVO_SYNC_POLAR
518c2ecf20Sopenharmony_ci *   BIT2 GOVRH_DVO_ENABLE
528c2ecf20Sopenharmony_ci */
538c2ecf20Sopenharmony_ci#define WMT_GOVR_DVO_SET	0x148
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci/* Timing generator? */
568c2ecf20Sopenharmony_ci#define WMT_GOVR_TG		0x100
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci/* Timings */
598c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_H_ALL	0x108
608c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_V_ALL	0x10c
618c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_V_START	0x110
628c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_V_END	0x114
638c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_H_START	0x118
648c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_H_END	0x11c
658c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_V_SYNC	0x128
668c2ecf20Sopenharmony_ci#define WMT_GOVR_TIMING_H_SYNC	0x12c
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci#endif /* _WM8505FB_REGS_H */
69