18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * drivers/video/geode/video_cs5530.h
48c2ecf20Sopenharmony_ci *   -- CS5530 video device
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 2005 Arcom Control Systems Ltd.
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Based on AMD's original 2.4 driver:
98c2ecf20Sopenharmony_ci *   Copyright (C) 2004 Advanced Micro Devices, Inc.
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_ci#ifndef __VIDEO_CS5530_H__
128c2ecf20Sopenharmony_ci#define __VIDEO_CS5530_H__
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciextern const struct geode_vid_ops cs5530_vid_ops;
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci/* CS5530 Video device registers */
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#define CS5530_VIDEO_CONFIG	0x0000
198c2ecf20Sopenharmony_ci#  define CS5530_VCFG_VID_EN			0x00000001
208c2ecf20Sopenharmony_ci#  define CS5530_VCFG_VID_REG_UPDATE		0x00000002
218c2ecf20Sopenharmony_ci#  define CS5530_VCFG_VID_INP_FORMAT		0x0000000C
228c2ecf20Sopenharmony_ci#  define CS5530_VCFG_8_BIT_4_2_0		0x00000004
238c2ecf20Sopenharmony_ci#  define CS5530_VCFG_16_BIT_4_2_0		0x00000008
248c2ecf20Sopenharmony_ci#  define CS5530_VCFG_GV_SEL			0x00000010
258c2ecf20Sopenharmony_ci#  define CS5530_VCFG_CSC_BYPASS		0x00000020
268c2ecf20Sopenharmony_ci#  define CS5530_VCFG_X_FILTER_EN		0x00000040
278c2ecf20Sopenharmony_ci#  define CS5530_VCFG_Y_FILTER_EN		0x00000080
288c2ecf20Sopenharmony_ci#  define CS5530_VCFG_LINE_SIZE_LOWER_MASK	0x0000FF00
298c2ecf20Sopenharmony_ci#  define CS5530_VCFG_INIT_READ_MASK		0x01FF0000
308c2ecf20Sopenharmony_ci#  define CS5530_VCFG_EARLY_VID_RDY		0x02000000
318c2ecf20Sopenharmony_ci#  define CS5530_VCFG_LINE_SIZE_UPPER		0x08000000
328c2ecf20Sopenharmony_ci#  define CS5530_VCFG_4_2_0_MODE		0x10000000
338c2ecf20Sopenharmony_ci#  define CS5530_VCFG_16_BIT_EN			0x20000000
348c2ecf20Sopenharmony_ci#  define CS5530_VCFG_HIGH_SPD_INT		0x40000000
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#define CS5530_DISPLAY_CONFIG	0x0004
378c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DIS_EN			0x00000001
388c2ecf20Sopenharmony_ci#  define CS5530_DCFG_HSYNC_EN			0x00000002
398c2ecf20Sopenharmony_ci#  define CS5530_DCFG_VSYNC_EN			0x00000004
408c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DAC_BL_EN			0x00000008
418c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DAC_PWR_EN		0x00000020
428c2ecf20Sopenharmony_ci#  define CS5530_DCFG_FP_PWR_EN			0x00000040
438c2ecf20Sopenharmony_ci#  define CS5530_DCFG_FP_DATA_EN		0x00000080
448c2ecf20Sopenharmony_ci#  define CS5530_DCFG_CRT_HSYNC_POL		0x00000100
458c2ecf20Sopenharmony_ci#  define CS5530_DCFG_CRT_VSYNC_POL		0x00000200
468c2ecf20Sopenharmony_ci#  define CS5530_DCFG_FP_HSYNC_POL		0x00000400
478c2ecf20Sopenharmony_ci#  define CS5530_DCFG_FP_VSYNC_POL		0x00000800
488c2ecf20Sopenharmony_ci#  define CS5530_DCFG_XGA_FP			0x00001000
498c2ecf20Sopenharmony_ci#  define CS5530_DCFG_FP_DITH_EN		0x00002000
508c2ecf20Sopenharmony_ci#  define CS5530_DCFG_CRT_SYNC_SKW_MASK		0x0001C000
518c2ecf20Sopenharmony_ci#  define CS5530_DCFG_CRT_SYNC_SKW_INIT		0x00010000
528c2ecf20Sopenharmony_ci#  define CS5530_DCFG_PWR_SEQ_DLY_MASK		0x000E0000
538c2ecf20Sopenharmony_ci#  define CS5530_DCFG_PWR_SEQ_DLY_INIT		0x00080000
548c2ecf20Sopenharmony_ci#  define CS5530_DCFG_VG_CK			0x00100000
558c2ecf20Sopenharmony_ci#  define CS5530_DCFG_GV_PAL_BYP		0x00200000
568c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DDC_SCL			0x00400000
578c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DDC_SDA			0x00800000
588c2ecf20Sopenharmony_ci#  define CS5530_DCFG_DDC_OE			0x01000000
598c2ecf20Sopenharmony_ci#  define CS5530_DCFG_16_BIT_EN			0x02000000
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ci#define CS5530_VIDEO_X_POS	0x0008
628c2ecf20Sopenharmony_ci#define CS5530_VIDEO_Y_POS	0x000C
638c2ecf20Sopenharmony_ci#define CS5530_VIDEO_SCALE	0x0010
648c2ecf20Sopenharmony_ci#define CS5530_VIDEO_COLOR_KEY	0x0014
658c2ecf20Sopenharmony_ci#define CS5530_VIDEO_COLOR_MASK 0x0018
668c2ecf20Sopenharmony_ci#define CS5530_PALETTE_ADDRESS	0x001C
678c2ecf20Sopenharmony_ci#define CS5530_PALETTE_DATA	0x0020
688c2ecf20Sopenharmony_ci#define CS5530_DOT_CLK_CONFIG	0x0024
698c2ecf20Sopenharmony_ci#define CS5530_CRCSIG_TFT_TV	0x0028
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci#endif /* !__VIDEO_CS5530_H__ */
72