162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * drivers/video/geode/video_cs5530.h
462306a36Sopenharmony_ci *   -- CS5530 video device
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Copyright (C) 2005 Arcom Control Systems Ltd.
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * Based on AMD's original 2.4 driver:
962306a36Sopenharmony_ci *   Copyright (C) 2004 Advanced Micro Devices, Inc.
1062306a36Sopenharmony_ci */
1162306a36Sopenharmony_ci#ifndef __VIDEO_CS5530_H__
1262306a36Sopenharmony_ci#define __VIDEO_CS5530_H__
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ciextern const struct geode_vid_ops cs5530_vid_ops;
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci/* CS5530 Video device registers */
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#define CS5530_VIDEO_CONFIG	0x0000
1962306a36Sopenharmony_ci#  define CS5530_VCFG_VID_EN			0x00000001
2062306a36Sopenharmony_ci#  define CS5530_VCFG_VID_REG_UPDATE		0x00000002
2162306a36Sopenharmony_ci#  define CS5530_VCFG_VID_INP_FORMAT		0x0000000C
2262306a36Sopenharmony_ci#  define CS5530_VCFG_8_BIT_4_2_0		0x00000004
2362306a36Sopenharmony_ci#  define CS5530_VCFG_16_BIT_4_2_0		0x00000008
2462306a36Sopenharmony_ci#  define CS5530_VCFG_GV_SEL			0x00000010
2562306a36Sopenharmony_ci#  define CS5530_VCFG_CSC_BYPASS		0x00000020
2662306a36Sopenharmony_ci#  define CS5530_VCFG_X_FILTER_EN		0x00000040
2762306a36Sopenharmony_ci#  define CS5530_VCFG_Y_FILTER_EN		0x00000080
2862306a36Sopenharmony_ci#  define CS5530_VCFG_LINE_SIZE_LOWER_MASK	0x0000FF00
2962306a36Sopenharmony_ci#  define CS5530_VCFG_INIT_READ_MASK		0x01FF0000
3062306a36Sopenharmony_ci#  define CS5530_VCFG_EARLY_VID_RDY		0x02000000
3162306a36Sopenharmony_ci#  define CS5530_VCFG_LINE_SIZE_UPPER		0x08000000
3262306a36Sopenharmony_ci#  define CS5530_VCFG_4_2_0_MODE		0x10000000
3362306a36Sopenharmony_ci#  define CS5530_VCFG_16_BIT_EN			0x20000000
3462306a36Sopenharmony_ci#  define CS5530_VCFG_HIGH_SPD_INT		0x40000000
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci#define CS5530_DISPLAY_CONFIG	0x0004
3762306a36Sopenharmony_ci#  define CS5530_DCFG_DIS_EN			0x00000001
3862306a36Sopenharmony_ci#  define CS5530_DCFG_HSYNC_EN			0x00000002
3962306a36Sopenharmony_ci#  define CS5530_DCFG_VSYNC_EN			0x00000004
4062306a36Sopenharmony_ci#  define CS5530_DCFG_DAC_BL_EN			0x00000008
4162306a36Sopenharmony_ci#  define CS5530_DCFG_DAC_PWR_EN		0x00000020
4262306a36Sopenharmony_ci#  define CS5530_DCFG_FP_PWR_EN			0x00000040
4362306a36Sopenharmony_ci#  define CS5530_DCFG_FP_DATA_EN		0x00000080
4462306a36Sopenharmony_ci#  define CS5530_DCFG_CRT_HSYNC_POL		0x00000100
4562306a36Sopenharmony_ci#  define CS5530_DCFG_CRT_VSYNC_POL		0x00000200
4662306a36Sopenharmony_ci#  define CS5530_DCFG_FP_HSYNC_POL		0x00000400
4762306a36Sopenharmony_ci#  define CS5530_DCFG_FP_VSYNC_POL		0x00000800
4862306a36Sopenharmony_ci#  define CS5530_DCFG_XGA_FP			0x00001000
4962306a36Sopenharmony_ci#  define CS5530_DCFG_FP_DITH_EN		0x00002000
5062306a36Sopenharmony_ci#  define CS5530_DCFG_CRT_SYNC_SKW_MASK		0x0001C000
5162306a36Sopenharmony_ci#  define CS5530_DCFG_CRT_SYNC_SKW_INIT		0x00010000
5262306a36Sopenharmony_ci#  define CS5530_DCFG_PWR_SEQ_DLY_MASK		0x000E0000
5362306a36Sopenharmony_ci#  define CS5530_DCFG_PWR_SEQ_DLY_INIT		0x00080000
5462306a36Sopenharmony_ci#  define CS5530_DCFG_VG_CK			0x00100000
5562306a36Sopenharmony_ci#  define CS5530_DCFG_GV_PAL_BYP		0x00200000
5662306a36Sopenharmony_ci#  define CS5530_DCFG_DDC_SCL			0x00400000
5762306a36Sopenharmony_ci#  define CS5530_DCFG_DDC_SDA			0x00800000
5862306a36Sopenharmony_ci#  define CS5530_DCFG_DDC_OE			0x01000000
5962306a36Sopenharmony_ci#  define CS5530_DCFG_16_BIT_EN			0x02000000
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#define CS5530_VIDEO_X_POS	0x0008
6262306a36Sopenharmony_ci#define CS5530_VIDEO_Y_POS	0x000C
6362306a36Sopenharmony_ci#define CS5530_VIDEO_SCALE	0x0010
6462306a36Sopenharmony_ci#define CS5530_VIDEO_COLOR_KEY	0x0014
6562306a36Sopenharmony_ci#define CS5530_VIDEO_COLOR_MASK 0x0018
6662306a36Sopenharmony_ci#define CS5530_PALETTE_ADDRESS	0x001C
6762306a36Sopenharmony_ci#define CS5530_PALETTE_DATA	0x0020
6862306a36Sopenharmony_ci#define CS5530_DOT_CLK_CONFIG	0x0024
6962306a36Sopenharmony_ci#define CS5530_CRCSIG_TFT_TV	0x0028
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci#endif /* !__VIDEO_CS5530_H__ */
72