162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
462306a36Sopenharmony_ci * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#include "global.h"
962306a36Sopenharmony_ci
1062306a36Sopenharmony_cistruct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3324[] = {
1162306a36Sopenharmony_ci/*  ClkRange, DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
1262306a36Sopenharmony_ci					DVP1Driving, DFPHigh, DFPLow */
1362306a36Sopenharmony_ci/*  CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
1462306a36Sopenharmony_ci					SR65,        CR97,    CR99   */
1562306a36Sopenharmony_ci	/* LCK/VCK < 30000000 will use this value */
1662306a36Sopenharmony_ci	{DPA_CLK_RANGE_30M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
1762306a36Sopenharmony_ci	 0x00},
1862306a36Sopenharmony_ci	/* 30000000 < LCK/VCK < 50000000 will use this value */
1962306a36Sopenharmony_ci	{DPA_CLK_RANGE_30_50M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00,
2062306a36Sopenharmony_ci	 0x00},
2162306a36Sopenharmony_ci	/* 50000000 < LCK/VCK < 70000000 will use this value */
2262306a36Sopenharmony_ci	{DPA_CLK_RANGE_50_70M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
2362306a36Sopenharmony_ci	 0x00},
2462306a36Sopenharmony_ci	/* 70000000 < LCK/VCK < 100000000 will use this value */
2562306a36Sopenharmony_ci	{DPA_CLK_RANGE_70_100M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
2662306a36Sopenharmony_ci	 0x00},
2762306a36Sopenharmony_ci	/* 100000000 < LCK/VCK < 15000000 will use this value */
2862306a36Sopenharmony_ci	{DPA_CLK_RANGE_100_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
2962306a36Sopenharmony_ci	 0x00},
3062306a36Sopenharmony_ci	/* 15000000 < LCK/VCK will use this value */
3162306a36Sopenharmony_ci	{DPA_CLK_RANGE_150M, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0E, 0x00,
3262306a36Sopenharmony_ci	 0x00},
3362306a36Sopenharmony_ci};
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_cistruct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3327[] = {
3662306a36Sopenharmony_ci/*  ClkRange,DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
3762306a36Sopenharmony_ci					DVP1Driving, DFPHigh,   DFPLow */
3862306a36Sopenharmony_ci/*   CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
3962306a36Sopenharmony_ci					SR65,        CR97,      CR99   */
4062306a36Sopenharmony_ci/* LCK/VCK < 30000000 will use this value */
4162306a36Sopenharmony_ci{DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
4262306a36Sopenharmony_ci/* 30000000 < LCK/VCK < 50000000 will use this value */
4362306a36Sopenharmony_ci{DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
4462306a36Sopenharmony_ci/* 50000000 < LCK/VCK < 70000000 will use this value */
4562306a36Sopenharmony_ci{DPA_CLK_RANGE_50_70M, 0x06, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x01},
4662306a36Sopenharmony_ci/* 70000000 < LCK/VCK < 100000000 will use this value */
4762306a36Sopenharmony_ci{DPA_CLK_RANGE_70_100M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x08, 0x03},
4862306a36Sopenharmony_ci/* 100000000 < LCK/VCK < 15000000 will use this value */
4962306a36Sopenharmony_ci{DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x02},
5062306a36Sopenharmony_ci/* 15000000 < LCK/VCK will use this value */
5162306a36Sopenharmony_ci{DPA_CLK_RANGE_150M, 0x00, 0x20, 0x00, 0x10, 0x00, 0x03, 0x00, 0x0D, 0x03},
5262306a36Sopenharmony_ci};
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci/* For VT3364: */
5562306a36Sopenharmony_cistruct GFX_DPA_SETTING GFX_DPA_SETTING_TBL_VT3364[] = {
5662306a36Sopenharmony_ci/*  ClkRange,DVP0, DVP0DataDriving,  DVP0ClockDriving, DVP1,
5762306a36Sopenharmony_ci					DVP1Driving, DFPHigh,   DFPLow */
5862306a36Sopenharmony_ci/*   CR96, SR2A[5], SR1B[1], SR2A[4], SR1E[2], CR9B,
5962306a36Sopenharmony_ci					SR65,        CR97,      CR99   */
6062306a36Sopenharmony_ci/* LCK/VCK < 30000000 will use this value */
6162306a36Sopenharmony_ci{DPA_CLK_RANGE_30M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
6262306a36Sopenharmony_ci/* 30000000 < LCK/VCK < 50000000 will use this value */
6362306a36Sopenharmony_ci{DPA_CLK_RANGE_30_50M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
6462306a36Sopenharmony_ci/* 50000000 < LCK/VCK < 70000000 will use this value */
6562306a36Sopenharmony_ci{DPA_CLK_RANGE_50_70M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
6662306a36Sopenharmony_ci/* 70000000 < LCK/VCK < 100000000 will use this value */
6762306a36Sopenharmony_ci{DPA_CLK_RANGE_70_100M, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
6862306a36Sopenharmony_ci/* 100000000 < LCK/VCK < 15000000 will use this value */
6962306a36Sopenharmony_ci{DPA_CLK_RANGE_100_150M, 0x03, 0x00, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08},
7062306a36Sopenharmony_ci/* 15000000 < LCK/VCK will use this value */
7162306a36Sopenharmony_ci{DPA_CLK_RANGE_150M, 0x01, 0x00, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x08},
7262306a36Sopenharmony_ci};
73