18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com>
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Original author:
68c2ecf20Sopenharmony_ci * Ben Collins <bcollins@ubuntu.com>
78c2ecf20Sopenharmony_ci *
88c2ecf20Sopenharmony_ci * Additional work by:
98c2ecf20Sopenharmony_ci * John Brooks <john.brooks@bluecherry.net>
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#ifndef __SOLO6X10_REGISTERS_H
138c2ecf20Sopenharmony_ci#define __SOLO6X10_REGISTERS_H
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#include <linux/bitops.h>
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#include "solo6x10-offsets.h"
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/* Global 6010 system configuration */
208c2ecf20Sopenharmony_ci#define SOLO_SYS_CFG				0x0000
218c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_FOUT_EN			0x00000001
228c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_PLL_BYPASS		0x00000002
238c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_PLL_PWDN			0x00000004
248c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_OUTDIV(__n)		(((__n) & 0x003) << 3)
258c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_FEEDBACKDIV(__n)		(((__n) & 0x1ff) << 5)
268c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_INPUTDIV(__n)		(((__n) & 0x01f) << 14)
278c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_CLOCK_DIV		0x00080000
288c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_NCLK_DELAY(__n)		(((__n) & 0x003) << 24)
298c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_PCLK_DELAY(__n)		(((__n) & 0x00f) << 26)
308c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_SDRAM64BIT		0x40000000
318c2ecf20Sopenharmony_ci#define   SOLO_SYS_CFG_RESET			0x80000000
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci#define	SOLO_DMA_CTRL				0x0004
348c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_REFRESH_CYCLE(n)	((n)<<8)
358c2ecf20Sopenharmony_ci/* 0=16/32MB, 1=32/64MB, 2=64/128MB, 3=128/256MB */
368c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_SDRAM_SIZE(n)		((n)<<6)
378c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_SDRAM_CLK_INVERT	BIT(5)
388c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_STROBE_SELECT		BIT(4)
398c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_READ_DATA_SELECT	BIT(3)
408c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_READ_CLK_SELECT		BIT(2)
418c2ecf20Sopenharmony_ci#define	  SOLO_DMA_CTRL_LATENCY(n)		((n)<<0)
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci/* Some things we set in this are undocumented. Why Softlogic?!?! */
448c2ecf20Sopenharmony_ci#define SOLO_DMA_CTRL1				0x0008
458c2ecf20Sopenharmony_ci
468c2ecf20Sopenharmony_ci#define SOLO_SYS_VCLK				0x000C
478c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_INVERT			BIT(22)
488c2ecf20Sopenharmony_ci/* 0=sys_clk/4, 1=sys_clk/2, 2=clk_in/2 of system input */
498c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_SELECT(n)			((n)<<20)
508c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN1415_DELAY(n)		((n)<<14)
518c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN1213_DELAY(n)		((n)<<12)
528c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN1011_DELAY(n)		((n)<<10)
538c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN0809_DELAY(n)		((n)<<8)
548c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN0607_DELAY(n)		((n)<<6)
558c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN0405_DELAY(n)		((n)<<4)
568c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN0203_DELAY(n)		((n)<<2)
578c2ecf20Sopenharmony_ci#define	  SOLO_VCLK_VIN0001_DELAY(n)		((n)<<0)
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci#define SOLO_IRQ_STAT				0x0010
608c2ecf20Sopenharmony_ci#define SOLO_IRQ_MASK				0x0014
618c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_P2M(n)			BIT((n) + 17)
628c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_GPIO				BIT(16)
638c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_VIDEO_LOSS			BIT(15)
648c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_VIDEO_IN			BIT(14)
658c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_MOTION			BIT(13)
668c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_ATA_CMD			BIT(12)
678c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_ATA_DIR			BIT(11)
688c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_PCI_ERR			BIT(10)
698c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_PS2_1			BIT(9)
708c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_PS2_0			BIT(8)
718c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_SPI				BIT(7)
728c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_IIC				BIT(6)
738c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_UART(n)			BIT((n) + 4)
748c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_G723				BIT(3)
758c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_DECODER			BIT(1)
768c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_ENCODER			BIT(0)
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_ci#define SOLO_CHIP_OPTION			0x001C
798c2ecf20Sopenharmony_ci#define   SOLO_CHIP_ID_MASK			0x00000007
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci#define SOLO_PLL_CONFIG				0x0020 /* 6110 Only */
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci#define SOLO_EEPROM_CTRL			0x0060
848c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_ACCESS_EN			BIT(7)
858c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_CS			BIT(3)
868c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_CLK			BIT(2)
878c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_DO			BIT(1)
888c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_DI			BIT(0)
898c2ecf20Sopenharmony_ci#define	  SOLO_EEPROM_ENABLE (SOLO_EEPROM_ACCESS_EN | SOLO_EEPROM_CS)
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci#define SOLO_PCI_ERR				0x0070
928c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_FATAL			0x00000001
938c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_PARITY			0x00000002
948c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_TARGET			0x00000004
958c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_TIMEOUT			0x00000008
968c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_P2M			0x00000010
978c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_ATA			0x00000020
988c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_P2M_DESC			0x00000040
998c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_FSM0(__s)		(((__s) >> 16) & 0x0f)
1008c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_FSM1(__s)		(((__s) >> 20) & 0x0f)
1018c2ecf20Sopenharmony_ci#define   SOLO_PCI_ERR_FSM2(__s)		(((__s) >> 24) & 0x1f)
1028c2ecf20Sopenharmony_ci
1038c2ecf20Sopenharmony_ci#define SOLO_P2M_BASE				0x0080
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci#define SOLO_P2M_CONFIG(n)			(0x0080 + ((n)*0x20))
1068c2ecf20Sopenharmony_ci#define	  SOLO_P2M_DMA_INTERVAL(n)		((n)<<6)/* N*32 clocks */
1078c2ecf20Sopenharmony_ci#define	  SOLO_P2M_CSC_BYTE_REORDER		BIT(5)	/* BGR -> RGB */
1088c2ecf20Sopenharmony_ci/* 0:r=[14:10] g=[9:5] b=[4:0], 1:r=[15:11] g=[10:5] b=[4:0] */
1098c2ecf20Sopenharmony_ci#define	  SOLO_P2M_CSC_16BIT_565		BIT(4)
1108c2ecf20Sopenharmony_ci#define	  SOLO_P2M_UV_SWAP			BIT(3)
1118c2ecf20Sopenharmony_ci#define	  SOLO_P2M_PCI_MASTER_MODE		BIT(2)
1128c2ecf20Sopenharmony_ci#define	  SOLO_P2M_DESC_INTR_OPT		BIT(1)	/* 1:Empty, 0:Each */
1138c2ecf20Sopenharmony_ci#define	  SOLO_P2M_DESC_MODE			BIT(0)
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci#define SOLO_P2M_DES_ADR(n)			(0x0084 + ((n)*0x20))
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci#define SOLO_P2M_DESC_ID(n)			(0x0088 + ((n)*0x20))
1188c2ecf20Sopenharmony_ci#define	  SOLO_P2M_UPDATE_ID(n)			((n)<<0)
1198c2ecf20Sopenharmony_ci
1208c2ecf20Sopenharmony_ci#define SOLO_P2M_STATUS(n)			(0x008C + ((n)*0x20))
1218c2ecf20Sopenharmony_ci#define	  SOLO_P2M_COMMAND_DONE			BIT(8)
1228c2ecf20Sopenharmony_ci#define	  SOLO_P2M_CURRENT_ID(stat)		(0xff & (stat))
1238c2ecf20Sopenharmony_ci
1248c2ecf20Sopenharmony_ci#define SOLO_P2M_CONTROL(n)			(0x0090 + ((n)*0x20))
1258c2ecf20Sopenharmony_ci#define	  SOLO_P2M_PCI_INC(n)			((n)<<20)
1268c2ecf20Sopenharmony_ci#define	  SOLO_P2M_REPEAT(n)			((n)<<10)
1278c2ecf20Sopenharmony_ci/* 0:512, 1:256, 2:128, 3:64, 4:32, 5:128(2page) */
1288c2ecf20Sopenharmony_ci#define	  SOLO_P2M_BURST_SIZE(n)		((n)<<7)
1298c2ecf20Sopenharmony_ci#define	    SOLO_P2M_BURST_512			0
1308c2ecf20Sopenharmony_ci#define	    SOLO_P2M_BURST_256			1
1318c2ecf20Sopenharmony_ci#define	    SOLO_P2M_BURST_128			2
1328c2ecf20Sopenharmony_ci#define	    SOLO_P2M_BURST_64			3
1338c2ecf20Sopenharmony_ci#define	    SOLO_P2M_BURST_32			4
1348c2ecf20Sopenharmony_ci#define	  SOLO_P2M_CSC_16BIT			BIT(6)	/* 0:24bit, 1:16bit */
1358c2ecf20Sopenharmony_ci/* 0:Y[0]<-0(OFF), 1:Y[0]<-1(ON), 2:Y[0]<-G[0], 3:Y[0]<-Bit[15] */
1368c2ecf20Sopenharmony_ci#define	  SOLO_P2M_ALPHA_MODE(n)		((n)<<4)
1378c2ecf20Sopenharmony_ci#define	  SOLO_P2M_CSC_ON			BIT(3)
1388c2ecf20Sopenharmony_ci#define	  SOLO_P2M_INTERRUPT_REQ		BIT(2)
1398c2ecf20Sopenharmony_ci#define	  SOLO_P2M_WRITE			BIT(1)
1408c2ecf20Sopenharmony_ci#define	  SOLO_P2M_TRANS_ON			BIT(0)
1418c2ecf20Sopenharmony_ci
1428c2ecf20Sopenharmony_ci#define SOLO_P2M_EXT_CFG(n)			(0x0094 + ((n)*0x20))
1438c2ecf20Sopenharmony_ci#define	  SOLO_P2M_EXT_INC(n)			((n)<<20)
1448c2ecf20Sopenharmony_ci#define	  SOLO_P2M_COPY_SIZE(n)			((n)<<0)
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci#define SOLO_P2M_TAR_ADR(n)			(0x0098 + ((n)*0x20))
1478c2ecf20Sopenharmony_ci
1488c2ecf20Sopenharmony_ci#define SOLO_P2M_EXT_ADR(n)			(0x009C + ((n)*0x20))
1498c2ecf20Sopenharmony_ci
1508c2ecf20Sopenharmony_ci#define SOLO_P2M_BUFFER(i)			(0x2000 + ((i)*4))
1518c2ecf20Sopenharmony_ci
1528c2ecf20Sopenharmony_ci#define SOLO_VI_CH_SWITCH_0			0x0100
1538c2ecf20Sopenharmony_ci#define SOLO_VI_CH_SWITCH_1			0x0104
1548c2ecf20Sopenharmony_ci#define SOLO_VI_CH_SWITCH_2			0x0108
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ci#define	SOLO_VI_CH_ENA				0x010C
1578c2ecf20Sopenharmony_ci#define	SOLO_VI_CH_FORMAT			0x0110
1588c2ecf20Sopenharmony_ci#define	  SOLO_VI_FD_SEL_MASK(n)		((n)<<16)
1598c2ecf20Sopenharmony_ci#define	  SOLO_VI_PROG_MASK(n)			((n)<<0)
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci#define SOLO_VI_FMT_CFG				0x0114
1628c2ecf20Sopenharmony_ci#define	  SOLO_VI_FMT_CHECK_VCOUNT		BIT(31)
1638c2ecf20Sopenharmony_ci#define	  SOLO_VI_FMT_CHECK_HCOUNT		BIT(30)
1648c2ecf20Sopenharmony_ci#define   SOLO_VI_FMT_TEST_SIGNAL		BIT(28)
1658c2ecf20Sopenharmony_ci
1668c2ecf20Sopenharmony_ci#define	SOLO_VI_PAGE_SW				0x0118
1678c2ecf20Sopenharmony_ci#define	  SOLO_FI_INV_DISP_LIVE(n)		((n)<<8)
1688c2ecf20Sopenharmony_ci#define	  SOLO_FI_INV_DISP_OUT(n)		((n)<<7)
1698c2ecf20Sopenharmony_ci#define	  SOLO_DISP_SYNC_FI(n)			((n)<<6)
1708c2ecf20Sopenharmony_ci#define	  SOLO_PIP_PAGE_ADD(n)			((n)<<3)
1718c2ecf20Sopenharmony_ci#define	  SOLO_NORMAL_PAGE_ADD(n)		((n)<<0)
1728c2ecf20Sopenharmony_ci
1738c2ecf20Sopenharmony_ci#define	SOLO_VI_ACT_I_P				0x011C
1748c2ecf20Sopenharmony_ci#define	SOLO_VI_ACT_I_S				0x0120
1758c2ecf20Sopenharmony_ci#define	SOLO_VI_ACT_P				0x0124
1768c2ecf20Sopenharmony_ci#define	  SOLO_VI_FI_INVERT			BIT(31)
1778c2ecf20Sopenharmony_ci#define	  SOLO_VI_H_START(n)			((n)<<21)
1788c2ecf20Sopenharmony_ci#define	  SOLO_VI_V_START(n)			((n)<<11)
1798c2ecf20Sopenharmony_ci#define	  SOLO_VI_V_STOP(n)			((n)<<0)
1808c2ecf20Sopenharmony_ci
1818c2ecf20Sopenharmony_ci#define SOLO_VI_STATUS0				0x0128
1828c2ecf20Sopenharmony_ci#define   SOLO_VI_STATUS0_PAGE(__n)		((__n) & 0x07)
1838c2ecf20Sopenharmony_ci#define SOLO_VI_STATUS1				0x012C
1848c2ecf20Sopenharmony_ci
1858c2ecf20Sopenharmony_ci/* XXX: Might be better off in kernel level disp.h */
1868c2ecf20Sopenharmony_ci#define DISP_PAGE(stat)				((stat) & 0x07)
1878c2ecf20Sopenharmony_ci
1888c2ecf20Sopenharmony_ci#define SOLO_VI_PB_CONFIG			0x0130
1898c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_USER_MODE			BIT(1)
1908c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_PAL			BIT(0)
1918c2ecf20Sopenharmony_ci#define SOLO_VI_PB_RANGE_HV			0x0134
1928c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_HSIZE(h)			((h)<<12)
1938c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_VSIZE(v)			((v)<<0)
1948c2ecf20Sopenharmony_ci#define SOLO_VI_PB_ACT_H			0x0138
1958c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_HSTART(n)			((n)<<12)
1968c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_HSTOP(n)			((n)<<0)
1978c2ecf20Sopenharmony_ci#define SOLO_VI_PB_ACT_V			0x013C
1988c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_VSTART(n)			((n)<<12)
1998c2ecf20Sopenharmony_ci#define	  SOLO_VI_PB_VSTOP(n)			((n)<<0)
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci#define	SOLO_VI_MOSAIC(ch)			(0x0140 + ((ch)*4))
2028c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOSAIC_SX(x)			((x)<<24)
2038c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOSAIC_EX(x)			((x)<<16)
2048c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOSAIC_SY(x)			((x)<<8)
2058c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOSAIC_EY(x)			((x)<<0)
2068c2ecf20Sopenharmony_ci
2078c2ecf20Sopenharmony_ci#define	SOLO_VI_WIN_CTRL0(ch)			(0x0180 + ((ch)*4))
2088c2ecf20Sopenharmony_ci#define	SOLO_VI_WIN_CTRL1(ch)			(0x01C0 + ((ch)*4))
2098c2ecf20Sopenharmony_ci
2108c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_CHANNEL(n)		((n)<<28)
2118c2ecf20Sopenharmony_ci
2128c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_PIP(n)			((n)<<27)
2138c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_SCALE(n)			((n)<<24)
2148c2ecf20Sopenharmony_ci
2158c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_SX(x)			((x)<<12)
2168c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_EX(x)			((x)<<0)
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_SY(x)			((x)<<12)
2198c2ecf20Sopenharmony_ci#define	  SOLO_VI_WIN_EY(x)			((x)<<0)
2208c2ecf20Sopenharmony_ci
2218c2ecf20Sopenharmony_ci#define	SOLO_VI_WIN_ON(ch)			(0x0200 + ((ch)*4))
2228c2ecf20Sopenharmony_ci
2238c2ecf20Sopenharmony_ci#define SOLO_VI_WIN_SW				0x0240
2248c2ecf20Sopenharmony_ci#define SOLO_VI_WIN_LIVE_AUTO_MUTE		0x0244
2258c2ecf20Sopenharmony_ci
2268c2ecf20Sopenharmony_ci#define	SOLO_VI_MOT_ADR				0x0260
2278c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_EN(mask)		((mask)<<16)
2288c2ecf20Sopenharmony_ci#define	SOLO_VI_MOT_CTRL			0x0264
2298c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_FRAME_COUNT(n)		((n)<<24)
2308c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_SAMPLE_LENGTH(n)	((n)<<16)
2318c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_INTR_START_STOP	BIT(15)
2328c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_FREEZE_DATA		BIT(14)
2338c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_SAMPLE_COUNT(n)	((n)<<0)
2348c2ecf20Sopenharmony_ci#define SOLO_VI_MOT_CLEAR			0x0268
2358c2ecf20Sopenharmony_ci#define SOLO_VI_MOT_STATUS			0x026C
2368c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CNT(n)			((n)<<0)
2378c2ecf20Sopenharmony_ci#define SOLO_VI_MOTION_BORDER			0x0270
2388c2ecf20Sopenharmony_ci#define SOLO_VI_MOTION_BAR			0x0274
2398c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_SET			BIT(29)
2408c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_ADD			BIT(28)
2418c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_SET			BIT(27)
2428c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_ADD			BIT(26)
2438c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_SET			BIT(25)
2448c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_ADD			BIT(24)
2458c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_VALUE(v)		((v)<<16)
2468c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_VALUE(v)		((v)<<8)
2478c2ecf20Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_VALUE(v)		((v)<<0)
2488c2ecf20Sopenharmony_ci
2498c2ecf20Sopenharmony_ci#define	SOLO_VO_FMT_ENC				0x0300
2508c2ecf20Sopenharmony_ci#define	  SOLO_VO_SCAN_MODE_PROGRESSIVE		BIT(31)
2518c2ecf20Sopenharmony_ci#define	  SOLO_VO_FMT_TYPE_PAL			BIT(30)
2528c2ecf20Sopenharmony_ci#define   SOLO_VO_FMT_TYPE_NTSC			0
2538c2ecf20Sopenharmony_ci#define	  SOLO_VO_USER_SET			BIT(29)
2548c2ecf20Sopenharmony_ci
2558c2ecf20Sopenharmony_ci#define	  SOLO_VO_FI_CHANGE			BIT(20)
2568c2ecf20Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_VSYNC		BIT(19)
2578c2ecf20Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_HSYNC		BIT(18)
2588c2ecf20Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_NAH		BIT(17)
2598c2ecf20Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_NAV		BIT(16)
2608c2ecf20Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_Y(Y)			((Y)<<8)
2618c2ecf20Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_CB(CB)		(((CB)/16)<<4)
2628c2ecf20Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_CR(CR)		(((CR)/16)<<0)
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci#define	SOLO_VO_ACT_H				0x0304
2658c2ecf20Sopenharmony_ci#define	  SOLO_VO_H_BLANK(n)			((n)<<22)
2668c2ecf20Sopenharmony_ci#define	  SOLO_VO_H_START(n)			((n)<<11)
2678c2ecf20Sopenharmony_ci#define	  SOLO_VO_H_STOP(n)			((n)<<0)
2688c2ecf20Sopenharmony_ci
2698c2ecf20Sopenharmony_ci#define	SOLO_VO_ACT_V				0x0308
2708c2ecf20Sopenharmony_ci#define	  SOLO_VO_V_BLANK(n)			((n)<<22)
2718c2ecf20Sopenharmony_ci#define	  SOLO_VO_V_START(n)			((n)<<11)
2728c2ecf20Sopenharmony_ci#define	  SOLO_VO_V_STOP(n)			((n)<<0)
2738c2ecf20Sopenharmony_ci
2748c2ecf20Sopenharmony_ci#define	SOLO_VO_RANGE_HV			0x030C
2758c2ecf20Sopenharmony_ci#define	  SOLO_VO_SYNC_INVERT			BIT(24)
2768c2ecf20Sopenharmony_ci#define	  SOLO_VO_HSYNC_INVERT			BIT(23)
2778c2ecf20Sopenharmony_ci#define	  SOLO_VO_VSYNC_INVERT			BIT(22)
2788c2ecf20Sopenharmony_ci#define	  SOLO_VO_H_LEN(n)			((n)<<11)
2798c2ecf20Sopenharmony_ci#define	  SOLO_VO_V_LEN(n)			((n)<<0)
2808c2ecf20Sopenharmony_ci
2818c2ecf20Sopenharmony_ci#define	SOLO_VO_DISP_CTRL			0x0310
2828c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_ON			BIT(31)
2838c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_ERASE_COUNT(n)		((n&0xf)<<24)
2848c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_DOUBLE_SCAN		BIT(22)
2858c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_SINGLE_PAGE		BIT(21)
2868c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_BASE(n)			(((n)>>16) & 0xffff)
2878c2ecf20Sopenharmony_ci
2888c2ecf20Sopenharmony_ci#define SOLO_VO_DISP_ERASE			0x0314
2898c2ecf20Sopenharmony_ci#define	  SOLO_VO_DISP_ERASE_ON			BIT(0)
2908c2ecf20Sopenharmony_ci
2918c2ecf20Sopenharmony_ci#define	SOLO_VO_ZOOM_CTRL			0x0318
2928c2ecf20Sopenharmony_ci#define	  SOLO_VO_ZOOM_VER_ON			BIT(24)
2938c2ecf20Sopenharmony_ci#define	  SOLO_VO_ZOOM_HOR_ON			BIT(23)
2948c2ecf20Sopenharmony_ci#define	  SOLO_VO_ZOOM_V_COMP			BIT(22)
2958c2ecf20Sopenharmony_ci#define	  SOLO_VO_ZOOM_SX(h)			(((h)/2)<<11)
2968c2ecf20Sopenharmony_ci#define	  SOLO_VO_ZOOM_SY(v)			(((v)/2)<<0)
2978c2ecf20Sopenharmony_ci
2988c2ecf20Sopenharmony_ci#define SOLO_VO_FREEZE_CTRL			0x031C
2998c2ecf20Sopenharmony_ci#define	  SOLO_VO_FREEZE_ON			BIT(1)
3008c2ecf20Sopenharmony_ci#define	  SOLO_VO_FREEZE_INTERPOLATION		BIT(0)
3018c2ecf20Sopenharmony_ci
3028c2ecf20Sopenharmony_ci#define	SOLO_VO_BKG_COLOR			0x0320
3038c2ecf20Sopenharmony_ci#define	  SOLO_BG_Y(y)				((y)<<16)
3048c2ecf20Sopenharmony_ci#define	  SOLO_BG_U(u)				((u)<<8)
3058c2ecf20Sopenharmony_ci#define	  SOLO_BG_V(v)				((v)<<0)
3068c2ecf20Sopenharmony_ci
3078c2ecf20Sopenharmony_ci#define	SOLO_VO_DEINTERLACE			0x0324
3088c2ecf20Sopenharmony_ci#define	  SOLO_VO_DEINTERLACE_THRESHOLD(n)	((n)<<8)
3098c2ecf20Sopenharmony_ci#define	  SOLO_VO_DEINTERLACE_EDGE_VALUE(n)	((n)<<0)
3108c2ecf20Sopenharmony_ci
3118c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_LINE_COLOR		0x0330
3128c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_FILL_COLOR		0x0334
3138c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_LINE_MASK		0x0338
3148c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_FILL_MASK		0x033c
3158c2ecf20Sopenharmony_ci
3168c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_X(n)			(0x0340+((n)*4))
3178c2ecf20Sopenharmony_ci#define SOLO_VO_BORDER_Y(n)			(0x0354+((n)*4))
3188c2ecf20Sopenharmony_ci
3198c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_SET			0x0368
3208c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_START			0x036c
3218c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_STOP			0x0370
3228c2ecf20Sopenharmony_ci
3238c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_SET2			0x0374
3248c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_START2			0x0378
3258c2ecf20Sopenharmony_ci#define SOLO_VO_CELL_EXT_STOP2			0x037c
3268c2ecf20Sopenharmony_ci
3278c2ecf20Sopenharmony_ci#define SOLO_VO_RECTANGLE_CTRL(n)		(0x0368+((n)*12))
3288c2ecf20Sopenharmony_ci#define SOLO_VO_RECTANGLE_START(n)		(0x036c+((n)*12))
3298c2ecf20Sopenharmony_ci#define SOLO_VO_RECTANGLE_STOP(n)		(0x0370+((n)*12))
3308c2ecf20Sopenharmony_ci
3318c2ecf20Sopenharmony_ci#define SOLO_VO_CURSOR_POS			(0x0380)
3328c2ecf20Sopenharmony_ci#define SOLO_VO_CURSOR_CLR			(0x0384)
3338c2ecf20Sopenharmony_ci#define SOLO_VO_CURSOR_CLR2			(0x0388)
3348c2ecf20Sopenharmony_ci#define SOLO_VO_CURSOR_MASK(id)			(0x0390+((id)*4))
3358c2ecf20Sopenharmony_ci
3368c2ecf20Sopenharmony_ci#define SOLO_VO_EXPANSION(id)			(0x0250+((id)*4))
3378c2ecf20Sopenharmony_ci
3388c2ecf20Sopenharmony_ci#define	SOLO_OSG_CONFIG				0x03E0
3398c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_ON			BIT(31)
3408c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_COLOR_MUTE		BIT(28)
3418c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_ALPHA_RATE(n)		((n)<<22)
3428c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_ALPHA_BG_RATE(n)		((n)<<16)
3438c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_BASE(offset)		(((offset)>>16)&0xffff)
3448c2ecf20Sopenharmony_ci
3458c2ecf20Sopenharmony_ci#define SOLO_OSG_ERASE				0x03E4
3468c2ecf20Sopenharmony_ci#define	  SOLO_OSG_ERASE_ON			(0x80)
3478c2ecf20Sopenharmony_ci#define	  SOLO_OSG_ERASE_OFF			(0x00)
3488c2ecf20Sopenharmony_ci
3498c2ecf20Sopenharmony_ci#define SOLO_VO_OSG_BLINK			0x03E8
3508c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_BLINK_ON			BIT(1)
3518c2ecf20Sopenharmony_ci#define	  SOLO_VO_OSG_BLINK_INTREVAL18		BIT(0)
3528c2ecf20Sopenharmony_ci
3538c2ecf20Sopenharmony_ci#define SOLO_CAP_BASE				0x0400
3548c2ecf20Sopenharmony_ci#define	  SOLO_CAP_MAX_PAGE(n)			((n)<<16)
3558c2ecf20Sopenharmony_ci#define	  SOLO_CAP_BASE_ADDR(n)			((n)<<0)
3568c2ecf20Sopenharmony_ci#define SOLO_CAP_BTW				0x0404
3578c2ecf20Sopenharmony_ci#define	  SOLO_CAP_PROG_BANDWIDTH(n)		((n)<<8)
3588c2ecf20Sopenharmony_ci#define	  SOLO_CAP_MAX_BANDWIDTH(n)		((n)<<0)
3598c2ecf20Sopenharmony_ci
3608c2ecf20Sopenharmony_ci#define SOLO_DIM_SCALE1				0x0408
3618c2ecf20Sopenharmony_ci#define SOLO_DIM_SCALE2				0x040C
3628c2ecf20Sopenharmony_ci#define SOLO_DIM_SCALE3				0x0410
3638c2ecf20Sopenharmony_ci#define SOLO_DIM_SCALE4				0x0414
3648c2ecf20Sopenharmony_ci#define SOLO_DIM_SCALE5				0x0418
3658c2ecf20Sopenharmony_ci#define	  SOLO_DIM_V_MB_NUM_FRAME(n)		((n)<<16)
3668c2ecf20Sopenharmony_ci#define	  SOLO_DIM_V_MB_NUM_FIELD(n)		((n)<<8)
3678c2ecf20Sopenharmony_ci#define	  SOLO_DIM_H_MB_NUM(n)			((n)<<0)
3688c2ecf20Sopenharmony_ci
3698c2ecf20Sopenharmony_ci#define SOLO_DIM_PROG				0x041C
3708c2ecf20Sopenharmony_ci#define SOLO_CAP_STATUS				0x0420
3718c2ecf20Sopenharmony_ci
3728c2ecf20Sopenharmony_ci#define SOLO_CAP_CH_SCALE(ch)			(0x0440+((ch)*4))
3738c2ecf20Sopenharmony_ci#define SOLO_CAP_CH_COMP_ENA_E(ch)		(0x0480+((ch)*4))
3748c2ecf20Sopenharmony_ci#define SOLO_CAP_CH_INTV(ch)			(0x04C0+((ch)*4))
3758c2ecf20Sopenharmony_ci#define SOLO_CAP_CH_INTV_E(ch)			(0x0500+((ch)*4))
3768c2ecf20Sopenharmony_ci
3778c2ecf20Sopenharmony_ci
3788c2ecf20Sopenharmony_ci#define SOLO_VE_CFG0				0x0610
3798c2ecf20Sopenharmony_ci#define	  SOLO_VE_TWO_PAGE_MODE			BIT(31)
3808c2ecf20Sopenharmony_ci#define	  SOLO_VE_INTR_CTRL(n)			((n)<<24)
3818c2ecf20Sopenharmony_ci#define	  SOLO_VE_BLOCK_SIZE(n)			((n)<<16)
3828c2ecf20Sopenharmony_ci#define	  SOLO_VE_BLOCK_BASE(n)			((n)<<0)
3838c2ecf20Sopenharmony_ci
3848c2ecf20Sopenharmony_ci#define SOLO_VE_CFG1				0x0614
3858c2ecf20Sopenharmony_ci#define	  SOLO_VE_BYTE_ALIGN(n)			((n)<<24)
3868c2ecf20Sopenharmony_ci#define	  SOLO_VE_INSERT_INDEX			BIT(18)
3878c2ecf20Sopenharmony_ci#define	  SOLO_VE_MOTION_MODE(n)		((n)<<16)
3888c2ecf20Sopenharmony_ci#define	  SOLO_VE_MOTION_BASE(n)		((n)<<0)
3898c2ecf20Sopenharmony_ci#define   SOLO_VE_MPEG_SIZE_H(n)		((n)<<28) /* 6110 Only */
3908c2ecf20Sopenharmony_ci#define   SOLO_VE_JPEG_SIZE_H(n)		((n)<<20) /* 6110 Only */
3918c2ecf20Sopenharmony_ci#define   SOLO_VE_INSERT_INDEX_JPEG		BIT(19)   /* 6110 Only */
3928c2ecf20Sopenharmony_ci
3938c2ecf20Sopenharmony_ci#define SOLO_VE_WMRK_POLY			0x061C
3948c2ecf20Sopenharmony_ci#define SOLO_VE_VMRK_INIT_KEY			0x0620
3958c2ecf20Sopenharmony_ci#define SOLO_VE_WMRK_STRL			0x0624
3968c2ecf20Sopenharmony_ci#define SOLO_VE_ENCRYP_POLY			0x0628
3978c2ecf20Sopenharmony_ci#define SOLO_VE_ENCRYP_INIT			0x062C
3988c2ecf20Sopenharmony_ci#define SOLO_VE_ATTR				0x0630
3998c2ecf20Sopenharmony_ci#define	  SOLO_VE_LITTLE_ENDIAN			BIT(31)
4008c2ecf20Sopenharmony_ci#define	  SOLO_COMP_ATTR_RN			BIT(30)
4018c2ecf20Sopenharmony_ci#define	  SOLO_COMP_ATTR_FCODE(n)		((n)<<27)
4028c2ecf20Sopenharmony_ci#define	  SOLO_COMP_TIME_INC(n)			((n)<<25)
4038c2ecf20Sopenharmony_ci#define	  SOLO_COMP_TIME_WIDTH(n)		((n)<<21)
4048c2ecf20Sopenharmony_ci#define	  SOLO_DCT_INTERVAL(n)			((n)<<16)
4058c2ecf20Sopenharmony_ci#define SOLO_VE_COMPT_MOT			0x0634 /* 6110 Only */
4068c2ecf20Sopenharmony_ci
4078c2ecf20Sopenharmony_ci#define SOLO_VE_STATE(n)			(0x0640+((n)*4))
4088c2ecf20Sopenharmony_ci
4098c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_QP_TBL			0x0670
4108c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_QP_CH_L			0x0674
4118c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_QP_CH_H			0x0678
4128c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_CFG			0x067C
4138c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_CTRL			0x0680
4148c2ecf20Sopenharmony_ci#define SOLO_VE_CODE_ENCRYPT			0x0684 /* 6110 Only */
4158c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_CFG1			0x0688 /* 6110 Only */
4168c2ecf20Sopenharmony_ci#define SOLO_VE_WMRK_ENABLE			0x068C /* 6110 Only */
4178c2ecf20Sopenharmony_ci#define SOLO_VE_OSD_CH				0x0690
4188c2ecf20Sopenharmony_ci#define SOLO_VE_OSD_BASE			0x0694
4198c2ecf20Sopenharmony_ci#define SOLO_VE_OSD_CLR				0x0698
4208c2ecf20Sopenharmony_ci#define SOLO_VE_OSD_OPT				0x069C
4218c2ecf20Sopenharmony_ci#define   SOLO_VE_OSD_V_DOUBLE			BIT(16) /* 6110 Only */
4228c2ecf20Sopenharmony_ci#define   SOLO_VE_OSD_H_SHADOW			BIT(15)
4238c2ecf20Sopenharmony_ci#define   SOLO_VE_OSD_V_SHADOW			BIT(14)
4248c2ecf20Sopenharmony_ci#define   SOLO_VE_OSD_H_OFFSET(n)		((n & 0x7f)<<7)
4258c2ecf20Sopenharmony_ci#define   SOLO_VE_OSD_V_OFFSET(n)		(n & 0x7f)
4268c2ecf20Sopenharmony_ci
4278c2ecf20Sopenharmony_ci#define SOLO_VE_CH_INTL(ch)			(0x0700+((ch)*4))
4288c2ecf20Sopenharmony_ci#define SOLO_VE_CH_MOT(ch)			(0x0740+((ch)*4))
4298c2ecf20Sopenharmony_ci#define SOLO_VE_CH_QP(ch)			(0x0780+((ch)*4))
4308c2ecf20Sopenharmony_ci#define SOLO_VE_CH_QP_E(ch)			(0x07C0+((ch)*4))
4318c2ecf20Sopenharmony_ci#define SOLO_VE_CH_GOP(ch)			(0x0800+((ch)*4))
4328c2ecf20Sopenharmony_ci#define SOLO_VE_CH_GOP_E(ch)			(0x0840+((ch)*4))
4338c2ecf20Sopenharmony_ci#define SOLO_VE_CH_REF_BASE(ch)			(0x0880+((ch)*4))
4348c2ecf20Sopenharmony_ci#define SOLO_VE_CH_REF_BASE_E(ch)		(0x08C0+((ch)*4))
4358c2ecf20Sopenharmony_ci
4368c2ecf20Sopenharmony_ci#define SOLO_VE_MPEG4_QUE(n)			(0x0A00+((n)*8))
4378c2ecf20Sopenharmony_ci#define SOLO_VE_JPEG_QUE(n)			(0x0A04+((n)*8))
4388c2ecf20Sopenharmony_ci
4398c2ecf20Sopenharmony_ci#define SOLO_VD_CFG0				0x0900
4408c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_NO_WRITE_NO_WINDOW	BIT(24)
4418c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_CODE		BIT(23)
4428c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_REF		BIT(22)
4438c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_RES		BIT(21)
4448c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_MS		BIT(20)
4458c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_SINGLE_MODE		BIT(18)
4468c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_SCAL_MANUAL		BIT(17)
4478c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_USER_PAGE_CTRL		BIT(16)
4488c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_LITTLE_ENDIAN		BIT(15)
4498c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_START_FI			BIT(14)
4508c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_ERR_LOCK			BIT(13)
4518c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_ERR_INT_ENA		BIT(12)
4528c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_TIME_WIDTH(n)		((n)<<8)
4538c2ecf20Sopenharmony_ci#define	  SOLO_VD_CFG_DCT_INTERVAL(n)		((n)<<0)
4548c2ecf20Sopenharmony_ci
4558c2ecf20Sopenharmony_ci#define SOLO_VD_CFG1				0x0904
4568c2ecf20Sopenharmony_ci
4578c2ecf20Sopenharmony_ci#define	SOLO_VD_DEINTERLACE			0x0908
4588c2ecf20Sopenharmony_ci#define	  SOLO_VD_DEINTERLACE_THRESHOLD(n)	((n)<<8)
4598c2ecf20Sopenharmony_ci#define	  SOLO_VD_DEINTERLACE_EDGE_VALUE(n)	((n)<<0)
4608c2ecf20Sopenharmony_ci
4618c2ecf20Sopenharmony_ci#define SOLO_VD_CODE_ADR			0x090C
4628c2ecf20Sopenharmony_ci
4638c2ecf20Sopenharmony_ci#define SOLO_VD_CTRL				0x0910
4648c2ecf20Sopenharmony_ci#define	  SOLO_VD_OPER_ON			BIT(31)
4658c2ecf20Sopenharmony_ci#define	  SOLO_VD_MAX_ITEM(n)			((n)<<0)
4668c2ecf20Sopenharmony_ci
4678c2ecf20Sopenharmony_ci#define SOLO_VD_STATUS0				0x0920
4688c2ecf20Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_ACK		BIT(22)
4698c2ecf20Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_EMPTY		BIT(21)
4708c2ecf20Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_ERR		BIT(20)
4718c2ecf20Sopenharmony_ci
4728c2ecf20Sopenharmony_ci#define SOLO_VD_STATUS1				0x0924
4738c2ecf20Sopenharmony_ci
4748c2ecf20Sopenharmony_ci#define SOLO_VD_IDX0				0x0930
4758c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_INTERLACE			BIT(30)
4768c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_CHANNEL(n)		((n)<<24)
4778c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_SIZE(n)			((n)<<0)
4788c2ecf20Sopenharmony_ci
4798c2ecf20Sopenharmony_ci#define SOLO_VD_IDX1				0x0934
4808c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_SRC_SCALE(n)		((n)<<28)
4818c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_WINDOW(n)			((n)<<24)
4828c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_DEINTERLACE		BIT(16)
4838c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_H_BLOCK(n)		((n)<<8)
4848c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_V_BLOCK(n)		((n)<<0)
4858c2ecf20Sopenharmony_ci
4868c2ecf20Sopenharmony_ci#define SOLO_VD_IDX2				0x0938
4878c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_REF_BASE_SIDE		BIT(31)
4888c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_REF_BASE(n)		(((n)>>16)&0xffff)
4898c2ecf20Sopenharmony_ci
4908c2ecf20Sopenharmony_ci#define SOLO_VD_IDX3				0x093C
4918c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_DISP_SCALE(n)		((n)<<28)
4928c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_INTERLACE_WR		BIT(27)
4938c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_INTERPOL			BIT(26)
4948c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_HOR2X			BIT(25)
4958c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_OFFSET_X(n)		((n)<<12)
4968c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_OFFSET_Y(n)		((n)<<0)
4978c2ecf20Sopenharmony_ci
4988c2ecf20Sopenharmony_ci#define SOLO_VD_IDX4				0x0940
4998c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_DEC_WR_PAGE(n)		((n)<<8)
5008c2ecf20Sopenharmony_ci#define	  SOLO_VD_IDX_DISP_RD_PAGE(n)		((n)<<0)
5018c2ecf20Sopenharmony_ci
5028c2ecf20Sopenharmony_ci#define SOLO_VD_WR_PAGE(n)			(0x03F0 + ((n) * 4))
5038c2ecf20Sopenharmony_ci
5048c2ecf20Sopenharmony_ci
5058c2ecf20Sopenharmony_ci#define SOLO_GPIO_CONFIG_0			0x0B00
5068c2ecf20Sopenharmony_ci#define SOLO_GPIO_CONFIG_1			0x0B04
5078c2ecf20Sopenharmony_ci#define SOLO_GPIO_DATA_OUT			0x0B08
5088c2ecf20Sopenharmony_ci#define SOLO_GPIO_DATA_IN			0x0B0C
5098c2ecf20Sopenharmony_ci#define SOLO_GPIO_INT_ACK_STA			0x0B10
5108c2ecf20Sopenharmony_ci#define SOLO_GPIO_INT_ENA			0x0B14
5118c2ecf20Sopenharmony_ci#define SOLO_GPIO_INT_CFG_0			0x0B18
5128c2ecf20Sopenharmony_ci#define SOLO_GPIO_INT_CFG_1			0x0B1C
5138c2ecf20Sopenharmony_ci
5148c2ecf20Sopenharmony_ci
5158c2ecf20Sopenharmony_ci#define SOLO_IIC_CFG				0x0B20
5168c2ecf20Sopenharmony_ci#define	  SOLO_IIC_ENABLE			BIT(8)
5178c2ecf20Sopenharmony_ci#define	  SOLO_IIC_PRESCALE(n)			((n)<<0)
5188c2ecf20Sopenharmony_ci
5198c2ecf20Sopenharmony_ci#define SOLO_IIC_CTRL				0x0B24
5208c2ecf20Sopenharmony_ci#define	  SOLO_IIC_AUTO_CLEAR			BIT(20)
5218c2ecf20Sopenharmony_ci#define	  SOLO_IIC_STATE_RX_ACK			BIT(19)
5228c2ecf20Sopenharmony_ci#define	  SOLO_IIC_STATE_BUSY			BIT(18)
5238c2ecf20Sopenharmony_ci#define	  SOLO_IIC_STATE_SIG_ERR		BIT(17)
5248c2ecf20Sopenharmony_ci#define	  SOLO_IIC_STATE_TRNS			BIT(16)
5258c2ecf20Sopenharmony_ci#define	  SOLO_IIC_CH_SET(n)			((n)<<5)
5268c2ecf20Sopenharmony_ci#define	  SOLO_IIC_ACK_EN			BIT(4)
5278c2ecf20Sopenharmony_ci#define	  SOLO_IIC_START			BIT(3)
5288c2ecf20Sopenharmony_ci#define	  SOLO_IIC_STOP				BIT(2)
5298c2ecf20Sopenharmony_ci#define	  SOLO_IIC_READ				BIT(1)
5308c2ecf20Sopenharmony_ci#define	  SOLO_IIC_WRITE			BIT(0)
5318c2ecf20Sopenharmony_ci
5328c2ecf20Sopenharmony_ci#define SOLO_IIC_TXD				0x0B28
5338c2ecf20Sopenharmony_ci#define SOLO_IIC_RXD				0x0B2C
5348c2ecf20Sopenharmony_ci
5358c2ecf20Sopenharmony_ci/*
5368c2ecf20Sopenharmony_ci *	UART REGISTER
5378c2ecf20Sopenharmony_ci */
5388c2ecf20Sopenharmony_ci#define SOLO_UART_CONTROL(n)			(0x0BA0 + ((n)*0x20))
5398c2ecf20Sopenharmony_ci#define	  SOLO_UART_CLK_DIV(n)			((n)<<24)
5408c2ecf20Sopenharmony_ci#define	  SOLO_MODEM_CTRL_EN			BIT(20)
5418c2ecf20Sopenharmony_ci#define	  SOLO_PARITY_ERROR_DROP		BIT(18)
5428c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_ERR_EN			BIT(17)
5438c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_RX_EN			BIT(16)
5448c2ecf20Sopenharmony_ci#define	  SOLO_IRQ_TX_EN			BIT(15)
5458c2ecf20Sopenharmony_ci#define	  SOLO_RX_EN				BIT(14)
5468c2ecf20Sopenharmony_ci#define	  SOLO_TX_EN				BIT(13)
5478c2ecf20Sopenharmony_ci#define	  SOLO_UART_HALF_DUPLEX			BIT(12)
5488c2ecf20Sopenharmony_ci#define	  SOLO_UART_LOOPBACK			BIT(11)
5498c2ecf20Sopenharmony_ci
5508c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_230400			((0<<9)|(0<<6))
5518c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_115200			((0<<9)|(1<<6))
5528c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_57600			((0<<9)|(2<<6))
5538c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_38400			((0<<9)|(3<<6))
5548c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_19200			((0<<9)|(4<<6))
5558c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_9600			((0<<9)|(5<<6))
5568c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_4800			((0<<9)|(6<<6))
5578c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_2400			((1<<9)|(6<<6))
5588c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_1200			((2<<9)|(6<<6))
5598c2ecf20Sopenharmony_ci#define	  SOLO_BAUDRATE_300			((3<<9)|(6<<6))
5608c2ecf20Sopenharmony_ci
5618c2ecf20Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_8			(3<<4)
5628c2ecf20Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_7			(2<<4)
5638c2ecf20Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_6			(1<<4)
5648c2ecf20Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_5			(0<<4)
5658c2ecf20Sopenharmony_ci
5668c2ecf20Sopenharmony_ci#define	  SOLO_UART_STOP_BIT_1			(0<<2)
5678c2ecf20Sopenharmony_ci#define	  SOLO_UART_STOP_BIT_2			(1<<2)
5688c2ecf20Sopenharmony_ci
5698c2ecf20Sopenharmony_ci#define	  SOLO_UART_PARITY_NONE			(0<<0)
5708c2ecf20Sopenharmony_ci#define	  SOLO_UART_PARITY_EVEN			(2<<0)
5718c2ecf20Sopenharmony_ci#define	  SOLO_UART_PARITY_ODD			(3<<0)
5728c2ecf20Sopenharmony_ci
5738c2ecf20Sopenharmony_ci#define SOLO_UART_STATUS(n)			(0x0BA4 + ((n)*0x20))
5748c2ecf20Sopenharmony_ci#define	  SOLO_UART_CTS				BIT(15)
5758c2ecf20Sopenharmony_ci#define	  SOLO_UART_RX_BUSY			BIT(14)
5768c2ecf20Sopenharmony_ci#define	  SOLO_UART_OVERRUN			BIT(13)
5778c2ecf20Sopenharmony_ci#define	  SOLO_UART_FRAME_ERR			BIT(12)
5788c2ecf20Sopenharmony_ci#define	  SOLO_UART_PARITY_ERR			BIT(11)
5798c2ecf20Sopenharmony_ci#define	  SOLO_UART_TX_BUSY			BIT(5)
5808c2ecf20Sopenharmony_ci
5818c2ecf20Sopenharmony_ci#define	  SOLO_UART_RX_BUFF_CNT(stat)		(((stat)>>6) & 0x1f)
5828c2ecf20Sopenharmony_ci#define	  SOLO_UART_RX_BUFF_SIZE		8
5838c2ecf20Sopenharmony_ci#define	  SOLO_UART_TX_BUFF_CNT(stat)		(((stat)>>0) & 0x1f)
5848c2ecf20Sopenharmony_ci#define	  SOLO_UART_TX_BUFF_SIZE		8
5858c2ecf20Sopenharmony_ci
5868c2ecf20Sopenharmony_ci#define SOLO_UART_TX_DATA(n)			(0x0BA8 + ((n)*0x20))
5878c2ecf20Sopenharmony_ci#define	  SOLO_UART_TX_DATA_PUSH		BIT(8)
5888c2ecf20Sopenharmony_ci#define SOLO_UART_RX_DATA(n)			(0x0BAC + ((n)*0x20))
5898c2ecf20Sopenharmony_ci#define	  SOLO_UART_RX_DATA_POP			BIT(8)
5908c2ecf20Sopenharmony_ci
5918c2ecf20Sopenharmony_ci#define SOLO_TIMER_CLOCK_NUM			0x0be0
5928c2ecf20Sopenharmony_ci#define SOLO_TIMER_USEC				0x0be8
5938c2ecf20Sopenharmony_ci#define SOLO_TIMER_SEC				0x0bec
5948c2ecf20Sopenharmony_ci#define SOLO_TIMER_USEC_LSB			0x0d20 /* 6110 Only */
5958c2ecf20Sopenharmony_ci
5968c2ecf20Sopenharmony_ci#define SOLO_AUDIO_CONTROL			0x0D00
5978c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_ENABLE			BIT(31)
5988c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_MASTER_MODE		BIT(30)
5998c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_I2S_MODE			BIT(29)
6008c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_I2S_LR_SWAP		BIT(27)
6018c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_I2S_8BIT			BIT(26)
6028c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_I2S_MULTI(n)		((n)<<24)
6038c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_MIX_9TO0			BIT(23)
6048c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_DEC_9TO0_VOL(n)		((n)<<20)
6058c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_MIX_19TO10			BIT(19)
6068c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_DEC_19TO10_VOL(n)		((n)<<16)
6078c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_MODE(n)			((n)<<0)
6088c2ecf20Sopenharmony_ci#define SOLO_AUDIO_SAMPLE			0x0D04
6098c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_EE_MODE_ON			BIT(30)
6108c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_EE_ENC_CH(ch)		((ch)<<25)
6118c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_BITRATE(n)			((n)<<16)
6128c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_CLK_DIV(n)			((n)<<0)
6138c2ecf20Sopenharmony_ci#define SOLO_AUDIO_FDMA_INTR			0x0D08
6148c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_FDMA_INTERVAL(n)		((n)<<19)
6158c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_INTR_ORDER(n)		((n)<<16)
6168c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_FDMA_BASE(n)		((n)<<0)
6178c2ecf20Sopenharmony_ci#define SOLO_AUDIO_EVOL_0			0x0D0C
6188c2ecf20Sopenharmony_ci#define SOLO_AUDIO_EVOL_1			0x0D10
6198c2ecf20Sopenharmony_ci#define	  SOLO_AUDIO_EVOL(ch, value)		((value)<<((ch)%10))
6208c2ecf20Sopenharmony_ci#define SOLO_AUDIO_STA				0x0D14
6218c2ecf20Sopenharmony_ci
6228c2ecf20Sopenharmony_ci/*
6238c2ecf20Sopenharmony_ci * Watchdog configuration
6248c2ecf20Sopenharmony_ci */
6258c2ecf20Sopenharmony_ci#define SOLO_WATCHDOG				0x0be4
6268c2ecf20Sopenharmony_ci#define SOLO_WATCHDOG_SET(status, sec)		(status << 8 | (sec & 0xff))
6278c2ecf20Sopenharmony_ci
6288c2ecf20Sopenharmony_ci#endif /* __SOLO6X10_REGISTERS_H */
629