162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (C) 2010-2013 Bluecherry, LLC <https://www.bluecherrydvr.com>
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Original author:
662306a36Sopenharmony_ci * Ben Collins <bcollins@ubuntu.com>
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * Additional work by:
962306a36Sopenharmony_ci * John Brooks <john.brooks@bluecherry.net>
1062306a36Sopenharmony_ci */
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#ifndef __SOLO6X10_REGISTERS_H
1362306a36Sopenharmony_ci#define __SOLO6X10_REGISTERS_H
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#include <linux/bitops.h>
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#include "solo6x10-offsets.h"
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci/* Global 6010 system configuration */
2062306a36Sopenharmony_ci#define SOLO_SYS_CFG				0x0000
2162306a36Sopenharmony_ci#define   SOLO_SYS_CFG_FOUT_EN			0x00000001
2262306a36Sopenharmony_ci#define   SOLO_SYS_CFG_PLL_BYPASS		0x00000002
2362306a36Sopenharmony_ci#define   SOLO_SYS_CFG_PLL_PWDN			0x00000004
2462306a36Sopenharmony_ci#define   SOLO_SYS_CFG_OUTDIV(__n)		(((__n) & 0x003) << 3)
2562306a36Sopenharmony_ci#define   SOLO_SYS_CFG_FEEDBACKDIV(__n)		(((__n) & 0x1ff) << 5)
2662306a36Sopenharmony_ci#define   SOLO_SYS_CFG_INPUTDIV(__n)		(((__n) & 0x01f) << 14)
2762306a36Sopenharmony_ci#define   SOLO_SYS_CFG_CLOCK_DIV		0x00080000
2862306a36Sopenharmony_ci#define   SOLO_SYS_CFG_NCLK_DELAY(__n)		(((__n) & 0x003) << 24)
2962306a36Sopenharmony_ci#define   SOLO_SYS_CFG_PCLK_DELAY(__n)		(((__n) & 0x00f) << 26)
3062306a36Sopenharmony_ci#define   SOLO_SYS_CFG_SDRAM64BIT		0x40000000
3162306a36Sopenharmony_ci#define   SOLO_SYS_CFG_RESET			0x80000000
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci#define	SOLO_DMA_CTRL				0x0004
3462306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_REFRESH_CYCLE(n)	((n)<<8)
3562306a36Sopenharmony_ci/* 0=16/32MB, 1=32/64MB, 2=64/128MB, 3=128/256MB */
3662306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_SDRAM_SIZE(n)		((n)<<6)
3762306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_SDRAM_CLK_INVERT	BIT(5)
3862306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_STROBE_SELECT		BIT(4)
3962306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_READ_DATA_SELECT	BIT(3)
4062306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_READ_CLK_SELECT		BIT(2)
4162306a36Sopenharmony_ci#define	  SOLO_DMA_CTRL_LATENCY(n)		((n)<<0)
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci/* Some things we set in this are undocumented. Why Softlogic?!?! */
4462306a36Sopenharmony_ci#define SOLO_DMA_CTRL1				0x0008
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ci#define SOLO_SYS_VCLK				0x000C
4762306a36Sopenharmony_ci#define	  SOLO_VCLK_INVERT			BIT(22)
4862306a36Sopenharmony_ci/* 0=sys_clk/4, 1=sys_clk/2, 2=clk_in/2 of system input */
4962306a36Sopenharmony_ci#define	  SOLO_VCLK_SELECT(n)			((n)<<20)
5062306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN1415_DELAY(n)		((n)<<14)
5162306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN1213_DELAY(n)		((n)<<12)
5262306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN1011_DELAY(n)		((n)<<10)
5362306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN0809_DELAY(n)		((n)<<8)
5462306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN0607_DELAY(n)		((n)<<6)
5562306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN0405_DELAY(n)		((n)<<4)
5662306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN0203_DELAY(n)		((n)<<2)
5762306a36Sopenharmony_ci#define	  SOLO_VCLK_VIN0001_DELAY(n)		((n)<<0)
5862306a36Sopenharmony_ci
5962306a36Sopenharmony_ci#define SOLO_IRQ_STAT				0x0010
6062306a36Sopenharmony_ci#define SOLO_IRQ_MASK				0x0014
6162306a36Sopenharmony_ci#define	  SOLO_IRQ_P2M(n)			BIT((n) + 17)
6262306a36Sopenharmony_ci#define	  SOLO_IRQ_GPIO				BIT(16)
6362306a36Sopenharmony_ci#define	  SOLO_IRQ_VIDEO_LOSS			BIT(15)
6462306a36Sopenharmony_ci#define	  SOLO_IRQ_VIDEO_IN			BIT(14)
6562306a36Sopenharmony_ci#define	  SOLO_IRQ_MOTION			BIT(13)
6662306a36Sopenharmony_ci#define	  SOLO_IRQ_ATA_CMD			BIT(12)
6762306a36Sopenharmony_ci#define	  SOLO_IRQ_ATA_DIR			BIT(11)
6862306a36Sopenharmony_ci#define	  SOLO_IRQ_PCI_ERR			BIT(10)
6962306a36Sopenharmony_ci#define	  SOLO_IRQ_PS2_1			BIT(9)
7062306a36Sopenharmony_ci#define	  SOLO_IRQ_PS2_0			BIT(8)
7162306a36Sopenharmony_ci#define	  SOLO_IRQ_SPI				BIT(7)
7262306a36Sopenharmony_ci#define	  SOLO_IRQ_IIC				BIT(6)
7362306a36Sopenharmony_ci#define	  SOLO_IRQ_UART(n)			BIT((n) + 4)
7462306a36Sopenharmony_ci#define	  SOLO_IRQ_G723				BIT(3)
7562306a36Sopenharmony_ci#define	  SOLO_IRQ_DECODER			BIT(1)
7662306a36Sopenharmony_ci#define	  SOLO_IRQ_ENCODER			BIT(0)
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci#define SOLO_CHIP_OPTION			0x001C
7962306a36Sopenharmony_ci#define   SOLO_CHIP_ID_MASK			0x00000007
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci#define SOLO_PLL_CONFIG				0x0020 /* 6110 Only */
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci#define SOLO_EEPROM_CTRL			0x0060
8462306a36Sopenharmony_ci#define	  SOLO_EEPROM_ACCESS_EN			BIT(7)
8562306a36Sopenharmony_ci#define	  SOLO_EEPROM_CS			BIT(3)
8662306a36Sopenharmony_ci#define	  SOLO_EEPROM_CLK			BIT(2)
8762306a36Sopenharmony_ci#define	  SOLO_EEPROM_DO			BIT(1)
8862306a36Sopenharmony_ci#define	  SOLO_EEPROM_DI			BIT(0)
8962306a36Sopenharmony_ci#define	  SOLO_EEPROM_ENABLE (SOLO_EEPROM_ACCESS_EN | SOLO_EEPROM_CS)
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci#define SOLO_PCI_ERR				0x0070
9262306a36Sopenharmony_ci#define   SOLO_PCI_ERR_FATAL			0x00000001
9362306a36Sopenharmony_ci#define   SOLO_PCI_ERR_PARITY			0x00000002
9462306a36Sopenharmony_ci#define   SOLO_PCI_ERR_TARGET			0x00000004
9562306a36Sopenharmony_ci#define   SOLO_PCI_ERR_TIMEOUT			0x00000008
9662306a36Sopenharmony_ci#define   SOLO_PCI_ERR_P2M			0x00000010
9762306a36Sopenharmony_ci#define   SOLO_PCI_ERR_ATA			0x00000020
9862306a36Sopenharmony_ci#define   SOLO_PCI_ERR_P2M_DESC			0x00000040
9962306a36Sopenharmony_ci#define   SOLO_PCI_ERR_FSM0(__s)		(((__s) >> 16) & 0x0f)
10062306a36Sopenharmony_ci#define   SOLO_PCI_ERR_FSM1(__s)		(((__s) >> 20) & 0x0f)
10162306a36Sopenharmony_ci#define   SOLO_PCI_ERR_FSM2(__s)		(((__s) >> 24) & 0x1f)
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci#define SOLO_P2M_BASE				0x0080
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci#define SOLO_P2M_CONFIG(n)			(0x0080 + ((n)*0x20))
10662306a36Sopenharmony_ci#define	  SOLO_P2M_DMA_INTERVAL(n)		((n)<<6)/* N*32 clocks */
10762306a36Sopenharmony_ci#define	  SOLO_P2M_CSC_BYTE_REORDER		BIT(5)	/* BGR -> RGB */
10862306a36Sopenharmony_ci/* 0:r=[14:10] g=[9:5] b=[4:0], 1:r=[15:11] g=[10:5] b=[4:0] */
10962306a36Sopenharmony_ci#define	  SOLO_P2M_CSC_16BIT_565		BIT(4)
11062306a36Sopenharmony_ci#define	  SOLO_P2M_UV_SWAP			BIT(3)
11162306a36Sopenharmony_ci#define	  SOLO_P2M_PCI_MASTER_MODE		BIT(2)
11262306a36Sopenharmony_ci#define	  SOLO_P2M_DESC_INTR_OPT		BIT(1)	/* 1:Empty, 0:Each */
11362306a36Sopenharmony_ci#define	  SOLO_P2M_DESC_MODE			BIT(0)
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci#define SOLO_P2M_DES_ADR(n)			(0x0084 + ((n)*0x20))
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci#define SOLO_P2M_DESC_ID(n)			(0x0088 + ((n)*0x20))
11862306a36Sopenharmony_ci#define	  SOLO_P2M_UPDATE_ID(n)			((n)<<0)
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci#define SOLO_P2M_STATUS(n)			(0x008C + ((n)*0x20))
12162306a36Sopenharmony_ci#define	  SOLO_P2M_COMMAND_DONE			BIT(8)
12262306a36Sopenharmony_ci#define	  SOLO_P2M_CURRENT_ID(stat)		(0xff & (stat))
12362306a36Sopenharmony_ci
12462306a36Sopenharmony_ci#define SOLO_P2M_CONTROL(n)			(0x0090 + ((n)*0x20))
12562306a36Sopenharmony_ci#define	  SOLO_P2M_PCI_INC(n)			((n)<<20)
12662306a36Sopenharmony_ci#define	  SOLO_P2M_REPEAT(n)			((n)<<10)
12762306a36Sopenharmony_ci/* 0:512, 1:256, 2:128, 3:64, 4:32, 5:128(2page) */
12862306a36Sopenharmony_ci#define	  SOLO_P2M_BURST_SIZE(n)		((n)<<7)
12962306a36Sopenharmony_ci#define	    SOLO_P2M_BURST_512			0
13062306a36Sopenharmony_ci#define	    SOLO_P2M_BURST_256			1
13162306a36Sopenharmony_ci#define	    SOLO_P2M_BURST_128			2
13262306a36Sopenharmony_ci#define	    SOLO_P2M_BURST_64			3
13362306a36Sopenharmony_ci#define	    SOLO_P2M_BURST_32			4
13462306a36Sopenharmony_ci#define	  SOLO_P2M_CSC_16BIT			BIT(6)	/* 0:24bit, 1:16bit */
13562306a36Sopenharmony_ci/* 0:Y[0]<-0(OFF), 1:Y[0]<-1(ON), 2:Y[0]<-G[0], 3:Y[0]<-Bit[15] */
13662306a36Sopenharmony_ci#define	  SOLO_P2M_ALPHA_MODE(n)		((n)<<4)
13762306a36Sopenharmony_ci#define	  SOLO_P2M_CSC_ON			BIT(3)
13862306a36Sopenharmony_ci#define	  SOLO_P2M_INTERRUPT_REQ		BIT(2)
13962306a36Sopenharmony_ci#define	  SOLO_P2M_WRITE			BIT(1)
14062306a36Sopenharmony_ci#define	  SOLO_P2M_TRANS_ON			BIT(0)
14162306a36Sopenharmony_ci
14262306a36Sopenharmony_ci#define SOLO_P2M_EXT_CFG(n)			(0x0094 + ((n)*0x20))
14362306a36Sopenharmony_ci#define	  SOLO_P2M_EXT_INC(n)			((n)<<20)
14462306a36Sopenharmony_ci#define	  SOLO_P2M_COPY_SIZE(n)			((n)<<0)
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci#define SOLO_P2M_TAR_ADR(n)			(0x0098 + ((n)*0x20))
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci#define SOLO_P2M_EXT_ADR(n)			(0x009C + ((n)*0x20))
14962306a36Sopenharmony_ci
15062306a36Sopenharmony_ci#define SOLO_P2M_BUFFER(i)			(0x2000 + ((i)*4))
15162306a36Sopenharmony_ci
15262306a36Sopenharmony_ci#define SOLO_VI_CH_SWITCH_0			0x0100
15362306a36Sopenharmony_ci#define SOLO_VI_CH_SWITCH_1			0x0104
15462306a36Sopenharmony_ci#define SOLO_VI_CH_SWITCH_2			0x0108
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci#define	SOLO_VI_CH_ENA				0x010C
15762306a36Sopenharmony_ci#define	SOLO_VI_CH_FORMAT			0x0110
15862306a36Sopenharmony_ci#define	  SOLO_VI_FD_SEL_MASK(n)		((n)<<16)
15962306a36Sopenharmony_ci#define	  SOLO_VI_PROG_MASK(n)			((n)<<0)
16062306a36Sopenharmony_ci
16162306a36Sopenharmony_ci#define SOLO_VI_FMT_CFG				0x0114
16262306a36Sopenharmony_ci#define	  SOLO_VI_FMT_CHECK_VCOUNT		BIT(31)
16362306a36Sopenharmony_ci#define	  SOLO_VI_FMT_CHECK_HCOUNT		BIT(30)
16462306a36Sopenharmony_ci#define   SOLO_VI_FMT_TEST_SIGNAL		BIT(28)
16562306a36Sopenharmony_ci
16662306a36Sopenharmony_ci#define	SOLO_VI_PAGE_SW				0x0118
16762306a36Sopenharmony_ci#define	  SOLO_FI_INV_DISP_LIVE(n)		((n)<<8)
16862306a36Sopenharmony_ci#define	  SOLO_FI_INV_DISP_OUT(n)		((n)<<7)
16962306a36Sopenharmony_ci#define	  SOLO_DISP_SYNC_FI(n)			((n)<<6)
17062306a36Sopenharmony_ci#define	  SOLO_PIP_PAGE_ADD(n)			((n)<<3)
17162306a36Sopenharmony_ci#define	  SOLO_NORMAL_PAGE_ADD(n)		((n)<<0)
17262306a36Sopenharmony_ci
17362306a36Sopenharmony_ci#define	SOLO_VI_ACT_I_P				0x011C
17462306a36Sopenharmony_ci#define	SOLO_VI_ACT_I_S				0x0120
17562306a36Sopenharmony_ci#define	SOLO_VI_ACT_P				0x0124
17662306a36Sopenharmony_ci#define	  SOLO_VI_FI_INVERT			BIT(31)
17762306a36Sopenharmony_ci#define	  SOLO_VI_H_START(n)			((n)<<21)
17862306a36Sopenharmony_ci#define	  SOLO_VI_V_START(n)			((n)<<11)
17962306a36Sopenharmony_ci#define	  SOLO_VI_V_STOP(n)			((n)<<0)
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci#define SOLO_VI_STATUS0				0x0128
18262306a36Sopenharmony_ci#define   SOLO_VI_STATUS0_PAGE(__n)		((__n) & 0x07)
18362306a36Sopenharmony_ci#define SOLO_VI_STATUS1				0x012C
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci/* XXX: Might be better off in kernel level disp.h */
18662306a36Sopenharmony_ci#define DISP_PAGE(stat)				((stat) & 0x07)
18762306a36Sopenharmony_ci
18862306a36Sopenharmony_ci#define SOLO_VI_PB_CONFIG			0x0130
18962306a36Sopenharmony_ci#define	  SOLO_VI_PB_USER_MODE			BIT(1)
19062306a36Sopenharmony_ci#define	  SOLO_VI_PB_PAL			BIT(0)
19162306a36Sopenharmony_ci#define SOLO_VI_PB_RANGE_HV			0x0134
19262306a36Sopenharmony_ci#define	  SOLO_VI_PB_HSIZE(h)			((h)<<12)
19362306a36Sopenharmony_ci#define	  SOLO_VI_PB_VSIZE(v)			((v)<<0)
19462306a36Sopenharmony_ci#define SOLO_VI_PB_ACT_H			0x0138
19562306a36Sopenharmony_ci#define	  SOLO_VI_PB_HSTART(n)			((n)<<12)
19662306a36Sopenharmony_ci#define	  SOLO_VI_PB_HSTOP(n)			((n)<<0)
19762306a36Sopenharmony_ci#define SOLO_VI_PB_ACT_V			0x013C
19862306a36Sopenharmony_ci#define	  SOLO_VI_PB_VSTART(n)			((n)<<12)
19962306a36Sopenharmony_ci#define	  SOLO_VI_PB_VSTOP(n)			((n)<<0)
20062306a36Sopenharmony_ci
20162306a36Sopenharmony_ci#define	SOLO_VI_MOSAIC(ch)			(0x0140 + ((ch)*4))
20262306a36Sopenharmony_ci#define	  SOLO_VI_MOSAIC_SX(x)			((x)<<24)
20362306a36Sopenharmony_ci#define	  SOLO_VI_MOSAIC_EX(x)			((x)<<16)
20462306a36Sopenharmony_ci#define	  SOLO_VI_MOSAIC_SY(x)			((x)<<8)
20562306a36Sopenharmony_ci#define	  SOLO_VI_MOSAIC_EY(x)			((x)<<0)
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci#define	SOLO_VI_WIN_CTRL0(ch)			(0x0180 + ((ch)*4))
20862306a36Sopenharmony_ci#define	SOLO_VI_WIN_CTRL1(ch)			(0x01C0 + ((ch)*4))
20962306a36Sopenharmony_ci
21062306a36Sopenharmony_ci#define	  SOLO_VI_WIN_CHANNEL(n)		((n)<<28)
21162306a36Sopenharmony_ci
21262306a36Sopenharmony_ci#define	  SOLO_VI_WIN_PIP(n)			((n)<<27)
21362306a36Sopenharmony_ci#define	  SOLO_VI_WIN_SCALE(n)			((n)<<24)
21462306a36Sopenharmony_ci
21562306a36Sopenharmony_ci#define	  SOLO_VI_WIN_SX(x)			((x)<<12)
21662306a36Sopenharmony_ci#define	  SOLO_VI_WIN_EX(x)			((x)<<0)
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci#define	  SOLO_VI_WIN_SY(x)			((x)<<12)
21962306a36Sopenharmony_ci#define	  SOLO_VI_WIN_EY(x)			((x)<<0)
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ci#define	SOLO_VI_WIN_ON(ch)			(0x0200 + ((ch)*4))
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci#define SOLO_VI_WIN_SW				0x0240
22462306a36Sopenharmony_ci#define SOLO_VI_WIN_LIVE_AUTO_MUTE		0x0244
22562306a36Sopenharmony_ci
22662306a36Sopenharmony_ci#define	SOLO_VI_MOT_ADR				0x0260
22762306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_EN(mask)		((mask)<<16)
22862306a36Sopenharmony_ci#define	SOLO_VI_MOT_CTRL			0x0264
22962306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_FRAME_COUNT(n)		((n)<<24)
23062306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_SAMPLE_LENGTH(n)	((n)<<16)
23162306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_INTR_START_STOP	BIT(15)
23262306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_FREEZE_DATA		BIT(14)
23362306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_SAMPLE_COUNT(n)	((n)<<0)
23462306a36Sopenharmony_ci#define SOLO_VI_MOT_CLEAR			0x0268
23562306a36Sopenharmony_ci#define SOLO_VI_MOT_STATUS			0x026C
23662306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CNT(n)			((n)<<0)
23762306a36Sopenharmony_ci#define SOLO_VI_MOTION_BORDER			0x0270
23862306a36Sopenharmony_ci#define SOLO_VI_MOTION_BAR			0x0274
23962306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_SET			BIT(29)
24062306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_ADD			BIT(28)
24162306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_SET			BIT(27)
24262306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_ADD			BIT(26)
24362306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_SET			BIT(25)
24462306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_ADD			BIT(24)
24562306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_Y_VALUE(v)		((v)<<16)
24662306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CB_VALUE(v)		((v)<<8)
24762306a36Sopenharmony_ci#define	  SOLO_VI_MOTION_CR_VALUE(v)		((v)<<0)
24862306a36Sopenharmony_ci
24962306a36Sopenharmony_ci#define	SOLO_VO_FMT_ENC				0x0300
25062306a36Sopenharmony_ci#define	  SOLO_VO_SCAN_MODE_PROGRESSIVE		BIT(31)
25162306a36Sopenharmony_ci#define	  SOLO_VO_FMT_TYPE_PAL			BIT(30)
25262306a36Sopenharmony_ci#define   SOLO_VO_FMT_TYPE_NTSC			0
25362306a36Sopenharmony_ci#define	  SOLO_VO_USER_SET			BIT(29)
25462306a36Sopenharmony_ci
25562306a36Sopenharmony_ci#define	  SOLO_VO_FI_CHANGE			BIT(20)
25662306a36Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_VSYNC		BIT(19)
25762306a36Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_HSYNC		BIT(18)
25862306a36Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_NAH		BIT(17)
25962306a36Sopenharmony_ci#define	  SOLO_VO_USER_COLOR_SET_NAV		BIT(16)
26062306a36Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_Y(Y)			((Y)<<8)
26162306a36Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_CB(CB)		(((CB)/16)<<4)
26262306a36Sopenharmony_ci#define	  SOLO_VO_NA_COLOR_CR(CR)		(((CR)/16)<<0)
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci#define	SOLO_VO_ACT_H				0x0304
26562306a36Sopenharmony_ci#define	  SOLO_VO_H_BLANK(n)			((n)<<22)
26662306a36Sopenharmony_ci#define	  SOLO_VO_H_START(n)			((n)<<11)
26762306a36Sopenharmony_ci#define	  SOLO_VO_H_STOP(n)			((n)<<0)
26862306a36Sopenharmony_ci
26962306a36Sopenharmony_ci#define	SOLO_VO_ACT_V				0x0308
27062306a36Sopenharmony_ci#define	  SOLO_VO_V_BLANK(n)			((n)<<22)
27162306a36Sopenharmony_ci#define	  SOLO_VO_V_START(n)			((n)<<11)
27262306a36Sopenharmony_ci#define	  SOLO_VO_V_STOP(n)			((n)<<0)
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ci#define	SOLO_VO_RANGE_HV			0x030C
27562306a36Sopenharmony_ci#define	  SOLO_VO_SYNC_INVERT			BIT(24)
27662306a36Sopenharmony_ci#define	  SOLO_VO_HSYNC_INVERT			BIT(23)
27762306a36Sopenharmony_ci#define	  SOLO_VO_VSYNC_INVERT			BIT(22)
27862306a36Sopenharmony_ci#define	  SOLO_VO_H_LEN(n)			((n)<<11)
27962306a36Sopenharmony_ci#define	  SOLO_VO_V_LEN(n)			((n)<<0)
28062306a36Sopenharmony_ci
28162306a36Sopenharmony_ci#define	SOLO_VO_DISP_CTRL			0x0310
28262306a36Sopenharmony_ci#define	  SOLO_VO_DISP_ON			BIT(31)
28362306a36Sopenharmony_ci#define	  SOLO_VO_DISP_ERASE_COUNT(n)		((n&0xf)<<24)
28462306a36Sopenharmony_ci#define	  SOLO_VO_DISP_DOUBLE_SCAN		BIT(22)
28562306a36Sopenharmony_ci#define	  SOLO_VO_DISP_SINGLE_PAGE		BIT(21)
28662306a36Sopenharmony_ci#define	  SOLO_VO_DISP_BASE(n)			(((n)>>16) & 0xffff)
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ci#define SOLO_VO_DISP_ERASE			0x0314
28962306a36Sopenharmony_ci#define	  SOLO_VO_DISP_ERASE_ON			BIT(0)
29062306a36Sopenharmony_ci
29162306a36Sopenharmony_ci#define	SOLO_VO_ZOOM_CTRL			0x0318
29262306a36Sopenharmony_ci#define	  SOLO_VO_ZOOM_VER_ON			BIT(24)
29362306a36Sopenharmony_ci#define	  SOLO_VO_ZOOM_HOR_ON			BIT(23)
29462306a36Sopenharmony_ci#define	  SOLO_VO_ZOOM_V_COMP			BIT(22)
29562306a36Sopenharmony_ci#define	  SOLO_VO_ZOOM_SX(h)			(((h)/2)<<11)
29662306a36Sopenharmony_ci#define	  SOLO_VO_ZOOM_SY(v)			(((v)/2)<<0)
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_ci#define SOLO_VO_FREEZE_CTRL			0x031C
29962306a36Sopenharmony_ci#define	  SOLO_VO_FREEZE_ON			BIT(1)
30062306a36Sopenharmony_ci#define	  SOLO_VO_FREEZE_INTERPOLATION		BIT(0)
30162306a36Sopenharmony_ci
30262306a36Sopenharmony_ci#define	SOLO_VO_BKG_COLOR			0x0320
30362306a36Sopenharmony_ci#define	  SOLO_BG_Y(y)				((y)<<16)
30462306a36Sopenharmony_ci#define	  SOLO_BG_U(u)				((u)<<8)
30562306a36Sopenharmony_ci#define	  SOLO_BG_V(v)				((v)<<0)
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci#define	SOLO_VO_DEINTERLACE			0x0324
30862306a36Sopenharmony_ci#define	  SOLO_VO_DEINTERLACE_THRESHOLD(n)	((n)<<8)
30962306a36Sopenharmony_ci#define	  SOLO_VO_DEINTERLACE_EDGE_VALUE(n)	((n)<<0)
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci#define SOLO_VO_BORDER_LINE_COLOR		0x0330
31262306a36Sopenharmony_ci#define SOLO_VO_BORDER_FILL_COLOR		0x0334
31362306a36Sopenharmony_ci#define SOLO_VO_BORDER_LINE_MASK		0x0338
31462306a36Sopenharmony_ci#define SOLO_VO_BORDER_FILL_MASK		0x033c
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_ci#define SOLO_VO_BORDER_X(n)			(0x0340+((n)*4))
31762306a36Sopenharmony_ci#define SOLO_VO_BORDER_Y(n)			(0x0354+((n)*4))
31862306a36Sopenharmony_ci
31962306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_SET			0x0368
32062306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_START			0x036c
32162306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_STOP			0x0370
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_SET2			0x0374
32462306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_START2			0x0378
32562306a36Sopenharmony_ci#define SOLO_VO_CELL_EXT_STOP2			0x037c
32662306a36Sopenharmony_ci
32762306a36Sopenharmony_ci#define SOLO_VO_RECTANGLE_CTRL(n)		(0x0368+((n)*12))
32862306a36Sopenharmony_ci#define SOLO_VO_RECTANGLE_START(n)		(0x036c+((n)*12))
32962306a36Sopenharmony_ci#define SOLO_VO_RECTANGLE_STOP(n)		(0x0370+((n)*12))
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_ci#define SOLO_VO_CURSOR_POS			(0x0380)
33262306a36Sopenharmony_ci#define SOLO_VO_CURSOR_CLR			(0x0384)
33362306a36Sopenharmony_ci#define SOLO_VO_CURSOR_CLR2			(0x0388)
33462306a36Sopenharmony_ci#define SOLO_VO_CURSOR_MASK(id)			(0x0390+((id)*4))
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_ci#define SOLO_VO_EXPANSION(id)			(0x0250+((id)*4))
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ci#define	SOLO_OSG_CONFIG				0x03E0
33962306a36Sopenharmony_ci#define	  SOLO_VO_OSG_ON			BIT(31)
34062306a36Sopenharmony_ci#define	  SOLO_VO_OSG_COLOR_MUTE		BIT(28)
34162306a36Sopenharmony_ci#define	  SOLO_VO_OSG_ALPHA_RATE(n)		((n)<<22)
34262306a36Sopenharmony_ci#define	  SOLO_VO_OSG_ALPHA_BG_RATE(n)		((n)<<16)
34362306a36Sopenharmony_ci#define	  SOLO_VO_OSG_BASE(offset)		(((offset)>>16)&0xffff)
34462306a36Sopenharmony_ci
34562306a36Sopenharmony_ci#define SOLO_OSG_ERASE				0x03E4
34662306a36Sopenharmony_ci#define	  SOLO_OSG_ERASE_ON			(0x80)
34762306a36Sopenharmony_ci#define	  SOLO_OSG_ERASE_OFF			(0x00)
34862306a36Sopenharmony_ci
34962306a36Sopenharmony_ci#define SOLO_VO_OSG_BLINK			0x03E8
35062306a36Sopenharmony_ci#define	  SOLO_VO_OSG_BLINK_ON			BIT(1)
35162306a36Sopenharmony_ci#define	  SOLO_VO_OSG_BLINK_INTREVAL18		BIT(0)
35262306a36Sopenharmony_ci
35362306a36Sopenharmony_ci#define SOLO_CAP_BASE				0x0400
35462306a36Sopenharmony_ci#define	  SOLO_CAP_MAX_PAGE(n)			((n)<<16)
35562306a36Sopenharmony_ci#define	  SOLO_CAP_BASE_ADDR(n)			((n)<<0)
35662306a36Sopenharmony_ci#define SOLO_CAP_BTW				0x0404
35762306a36Sopenharmony_ci#define	  SOLO_CAP_PROG_BANDWIDTH(n)		((n)<<8)
35862306a36Sopenharmony_ci#define	  SOLO_CAP_MAX_BANDWIDTH(n)		((n)<<0)
35962306a36Sopenharmony_ci
36062306a36Sopenharmony_ci#define SOLO_DIM_SCALE1				0x0408
36162306a36Sopenharmony_ci#define SOLO_DIM_SCALE2				0x040C
36262306a36Sopenharmony_ci#define SOLO_DIM_SCALE3				0x0410
36362306a36Sopenharmony_ci#define SOLO_DIM_SCALE4				0x0414
36462306a36Sopenharmony_ci#define SOLO_DIM_SCALE5				0x0418
36562306a36Sopenharmony_ci#define	  SOLO_DIM_V_MB_NUM_FRAME(n)		((n)<<16)
36662306a36Sopenharmony_ci#define	  SOLO_DIM_V_MB_NUM_FIELD(n)		((n)<<8)
36762306a36Sopenharmony_ci#define	  SOLO_DIM_H_MB_NUM(n)			((n)<<0)
36862306a36Sopenharmony_ci
36962306a36Sopenharmony_ci#define SOLO_DIM_PROG				0x041C
37062306a36Sopenharmony_ci#define SOLO_CAP_STATUS				0x0420
37162306a36Sopenharmony_ci
37262306a36Sopenharmony_ci#define SOLO_CAP_CH_SCALE(ch)			(0x0440+((ch)*4))
37362306a36Sopenharmony_ci#define SOLO_CAP_CH_COMP_ENA_E(ch)		(0x0480+((ch)*4))
37462306a36Sopenharmony_ci#define SOLO_CAP_CH_INTV(ch)			(0x04C0+((ch)*4))
37562306a36Sopenharmony_ci#define SOLO_CAP_CH_INTV_E(ch)			(0x0500+((ch)*4))
37662306a36Sopenharmony_ci
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_ci#define SOLO_VE_CFG0				0x0610
37962306a36Sopenharmony_ci#define	  SOLO_VE_TWO_PAGE_MODE			BIT(31)
38062306a36Sopenharmony_ci#define	  SOLO_VE_INTR_CTRL(n)			((n)<<24)
38162306a36Sopenharmony_ci#define	  SOLO_VE_BLOCK_SIZE(n)			((n)<<16)
38262306a36Sopenharmony_ci#define	  SOLO_VE_BLOCK_BASE(n)			((n)<<0)
38362306a36Sopenharmony_ci
38462306a36Sopenharmony_ci#define SOLO_VE_CFG1				0x0614
38562306a36Sopenharmony_ci#define	  SOLO_VE_BYTE_ALIGN(n)			((n)<<24)
38662306a36Sopenharmony_ci#define	  SOLO_VE_INSERT_INDEX			BIT(18)
38762306a36Sopenharmony_ci#define	  SOLO_VE_MOTION_MODE(n)		((n)<<16)
38862306a36Sopenharmony_ci#define	  SOLO_VE_MOTION_BASE(n)		((n)<<0)
38962306a36Sopenharmony_ci#define   SOLO_VE_MPEG_SIZE_H(n)		((n)<<28) /* 6110 Only */
39062306a36Sopenharmony_ci#define   SOLO_VE_JPEG_SIZE_H(n)		((n)<<20) /* 6110 Only */
39162306a36Sopenharmony_ci#define   SOLO_VE_INSERT_INDEX_JPEG		BIT(19)   /* 6110 Only */
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_ci#define SOLO_VE_WMRK_POLY			0x061C
39462306a36Sopenharmony_ci#define SOLO_VE_VMRK_INIT_KEY			0x0620
39562306a36Sopenharmony_ci#define SOLO_VE_WMRK_STRL			0x0624
39662306a36Sopenharmony_ci#define SOLO_VE_ENCRYP_POLY			0x0628
39762306a36Sopenharmony_ci#define SOLO_VE_ENCRYP_INIT			0x062C
39862306a36Sopenharmony_ci#define SOLO_VE_ATTR				0x0630
39962306a36Sopenharmony_ci#define	  SOLO_VE_LITTLE_ENDIAN			BIT(31)
40062306a36Sopenharmony_ci#define	  SOLO_COMP_ATTR_RN			BIT(30)
40162306a36Sopenharmony_ci#define	  SOLO_COMP_ATTR_FCODE(n)		((n)<<27)
40262306a36Sopenharmony_ci#define	  SOLO_COMP_TIME_INC(n)			((n)<<25)
40362306a36Sopenharmony_ci#define	  SOLO_COMP_TIME_WIDTH(n)		((n)<<21)
40462306a36Sopenharmony_ci#define	  SOLO_DCT_INTERVAL(n)			((n)<<16)
40562306a36Sopenharmony_ci#define SOLO_VE_COMPT_MOT			0x0634 /* 6110 Only */
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ci#define SOLO_VE_STATE(n)			(0x0640+((n)*4))
40862306a36Sopenharmony_ci
40962306a36Sopenharmony_ci#define SOLO_VE_JPEG_QP_TBL			0x0670
41062306a36Sopenharmony_ci#define SOLO_VE_JPEG_QP_CH_L			0x0674
41162306a36Sopenharmony_ci#define SOLO_VE_JPEG_QP_CH_H			0x0678
41262306a36Sopenharmony_ci#define SOLO_VE_JPEG_CFG			0x067C
41362306a36Sopenharmony_ci#define SOLO_VE_JPEG_CTRL			0x0680
41462306a36Sopenharmony_ci#define SOLO_VE_CODE_ENCRYPT			0x0684 /* 6110 Only */
41562306a36Sopenharmony_ci#define SOLO_VE_JPEG_CFG1			0x0688 /* 6110 Only */
41662306a36Sopenharmony_ci#define SOLO_VE_WMRK_ENABLE			0x068C /* 6110 Only */
41762306a36Sopenharmony_ci#define SOLO_VE_OSD_CH				0x0690
41862306a36Sopenharmony_ci#define SOLO_VE_OSD_BASE			0x0694
41962306a36Sopenharmony_ci#define SOLO_VE_OSD_CLR				0x0698
42062306a36Sopenharmony_ci#define SOLO_VE_OSD_OPT				0x069C
42162306a36Sopenharmony_ci#define   SOLO_VE_OSD_V_DOUBLE			BIT(16) /* 6110 Only */
42262306a36Sopenharmony_ci#define   SOLO_VE_OSD_H_SHADOW			BIT(15)
42362306a36Sopenharmony_ci#define   SOLO_VE_OSD_V_SHADOW			BIT(14)
42462306a36Sopenharmony_ci#define   SOLO_VE_OSD_H_OFFSET(n)		((n & 0x7f)<<7)
42562306a36Sopenharmony_ci#define   SOLO_VE_OSD_V_OFFSET(n)		(n & 0x7f)
42662306a36Sopenharmony_ci
42762306a36Sopenharmony_ci#define SOLO_VE_CH_INTL(ch)			(0x0700+((ch)*4))
42862306a36Sopenharmony_ci#define SOLO_VE_CH_MOT(ch)			(0x0740+((ch)*4))
42962306a36Sopenharmony_ci#define SOLO_VE_CH_QP(ch)			(0x0780+((ch)*4))
43062306a36Sopenharmony_ci#define SOLO_VE_CH_QP_E(ch)			(0x07C0+((ch)*4))
43162306a36Sopenharmony_ci#define SOLO_VE_CH_GOP(ch)			(0x0800+((ch)*4))
43262306a36Sopenharmony_ci#define SOLO_VE_CH_GOP_E(ch)			(0x0840+((ch)*4))
43362306a36Sopenharmony_ci#define SOLO_VE_CH_REF_BASE(ch)			(0x0880+((ch)*4))
43462306a36Sopenharmony_ci#define SOLO_VE_CH_REF_BASE_E(ch)		(0x08C0+((ch)*4))
43562306a36Sopenharmony_ci
43662306a36Sopenharmony_ci#define SOLO_VE_MPEG4_QUE(n)			(0x0A00+((n)*8))
43762306a36Sopenharmony_ci#define SOLO_VE_JPEG_QUE(n)			(0x0A04+((n)*8))
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_ci#define SOLO_VD_CFG0				0x0900
44062306a36Sopenharmony_ci#define	  SOLO_VD_CFG_NO_WRITE_NO_WINDOW	BIT(24)
44162306a36Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_CODE		BIT(23)
44262306a36Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_REF		BIT(22)
44362306a36Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_RES		BIT(21)
44462306a36Sopenharmony_ci#define	  SOLO_VD_CFG_BUSY_WIAT_MS		BIT(20)
44562306a36Sopenharmony_ci#define	  SOLO_VD_CFG_SINGLE_MODE		BIT(18)
44662306a36Sopenharmony_ci#define	  SOLO_VD_CFG_SCAL_MANUAL		BIT(17)
44762306a36Sopenharmony_ci#define	  SOLO_VD_CFG_USER_PAGE_CTRL		BIT(16)
44862306a36Sopenharmony_ci#define	  SOLO_VD_CFG_LITTLE_ENDIAN		BIT(15)
44962306a36Sopenharmony_ci#define	  SOLO_VD_CFG_START_FI			BIT(14)
45062306a36Sopenharmony_ci#define	  SOLO_VD_CFG_ERR_LOCK			BIT(13)
45162306a36Sopenharmony_ci#define	  SOLO_VD_CFG_ERR_INT_ENA		BIT(12)
45262306a36Sopenharmony_ci#define	  SOLO_VD_CFG_TIME_WIDTH(n)		((n)<<8)
45362306a36Sopenharmony_ci#define	  SOLO_VD_CFG_DCT_INTERVAL(n)		((n)<<0)
45462306a36Sopenharmony_ci
45562306a36Sopenharmony_ci#define SOLO_VD_CFG1				0x0904
45662306a36Sopenharmony_ci
45762306a36Sopenharmony_ci#define	SOLO_VD_DEINTERLACE			0x0908
45862306a36Sopenharmony_ci#define	  SOLO_VD_DEINTERLACE_THRESHOLD(n)	((n)<<8)
45962306a36Sopenharmony_ci#define	  SOLO_VD_DEINTERLACE_EDGE_VALUE(n)	((n)<<0)
46062306a36Sopenharmony_ci
46162306a36Sopenharmony_ci#define SOLO_VD_CODE_ADR			0x090C
46262306a36Sopenharmony_ci
46362306a36Sopenharmony_ci#define SOLO_VD_CTRL				0x0910
46462306a36Sopenharmony_ci#define	  SOLO_VD_OPER_ON			BIT(31)
46562306a36Sopenharmony_ci#define	  SOLO_VD_MAX_ITEM(n)			((n)<<0)
46662306a36Sopenharmony_ci
46762306a36Sopenharmony_ci#define SOLO_VD_STATUS0				0x0920
46862306a36Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_ACK		BIT(22)
46962306a36Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_EMPTY		BIT(21)
47062306a36Sopenharmony_ci#define	  SOLO_VD_STATUS0_INTR_ERR		BIT(20)
47162306a36Sopenharmony_ci
47262306a36Sopenharmony_ci#define SOLO_VD_STATUS1				0x0924
47362306a36Sopenharmony_ci
47462306a36Sopenharmony_ci#define SOLO_VD_IDX0				0x0930
47562306a36Sopenharmony_ci#define	  SOLO_VD_IDX_INTERLACE			BIT(30)
47662306a36Sopenharmony_ci#define	  SOLO_VD_IDX_CHANNEL(n)		((n)<<24)
47762306a36Sopenharmony_ci#define	  SOLO_VD_IDX_SIZE(n)			((n)<<0)
47862306a36Sopenharmony_ci
47962306a36Sopenharmony_ci#define SOLO_VD_IDX1				0x0934
48062306a36Sopenharmony_ci#define	  SOLO_VD_IDX_SRC_SCALE(n)		((n)<<28)
48162306a36Sopenharmony_ci#define	  SOLO_VD_IDX_WINDOW(n)			((n)<<24)
48262306a36Sopenharmony_ci#define	  SOLO_VD_IDX_DEINTERLACE		BIT(16)
48362306a36Sopenharmony_ci#define	  SOLO_VD_IDX_H_BLOCK(n)		((n)<<8)
48462306a36Sopenharmony_ci#define	  SOLO_VD_IDX_V_BLOCK(n)		((n)<<0)
48562306a36Sopenharmony_ci
48662306a36Sopenharmony_ci#define SOLO_VD_IDX2				0x0938
48762306a36Sopenharmony_ci#define	  SOLO_VD_IDX_REF_BASE_SIDE		BIT(31)
48862306a36Sopenharmony_ci#define	  SOLO_VD_IDX_REF_BASE(n)		(((n)>>16)&0xffff)
48962306a36Sopenharmony_ci
49062306a36Sopenharmony_ci#define SOLO_VD_IDX3				0x093C
49162306a36Sopenharmony_ci#define	  SOLO_VD_IDX_DISP_SCALE(n)		((n)<<28)
49262306a36Sopenharmony_ci#define	  SOLO_VD_IDX_INTERLACE_WR		BIT(27)
49362306a36Sopenharmony_ci#define	  SOLO_VD_IDX_INTERPOL			BIT(26)
49462306a36Sopenharmony_ci#define	  SOLO_VD_IDX_HOR2X			BIT(25)
49562306a36Sopenharmony_ci#define	  SOLO_VD_IDX_OFFSET_X(n)		((n)<<12)
49662306a36Sopenharmony_ci#define	  SOLO_VD_IDX_OFFSET_Y(n)		((n)<<0)
49762306a36Sopenharmony_ci
49862306a36Sopenharmony_ci#define SOLO_VD_IDX4				0x0940
49962306a36Sopenharmony_ci#define	  SOLO_VD_IDX_DEC_WR_PAGE(n)		((n)<<8)
50062306a36Sopenharmony_ci#define	  SOLO_VD_IDX_DISP_RD_PAGE(n)		((n)<<0)
50162306a36Sopenharmony_ci
50262306a36Sopenharmony_ci#define SOLO_VD_WR_PAGE(n)			(0x03F0 + ((n) * 4))
50362306a36Sopenharmony_ci
50462306a36Sopenharmony_ci
50562306a36Sopenharmony_ci#define SOLO_GPIO_CONFIG_0			0x0B00
50662306a36Sopenharmony_ci#define SOLO_GPIO_CONFIG_1			0x0B04
50762306a36Sopenharmony_ci#define SOLO_GPIO_DATA_OUT			0x0B08
50862306a36Sopenharmony_ci#define SOLO_GPIO_DATA_IN			0x0B0C
50962306a36Sopenharmony_ci#define SOLO_GPIO_INT_ACK_STA			0x0B10
51062306a36Sopenharmony_ci#define SOLO_GPIO_INT_ENA			0x0B14
51162306a36Sopenharmony_ci#define SOLO_GPIO_INT_CFG_0			0x0B18
51262306a36Sopenharmony_ci#define SOLO_GPIO_INT_CFG_1			0x0B1C
51362306a36Sopenharmony_ci
51462306a36Sopenharmony_ci
51562306a36Sopenharmony_ci#define SOLO_IIC_CFG				0x0B20
51662306a36Sopenharmony_ci#define	  SOLO_IIC_ENABLE			BIT(8)
51762306a36Sopenharmony_ci#define	  SOLO_IIC_PRESCALE(n)			((n)<<0)
51862306a36Sopenharmony_ci
51962306a36Sopenharmony_ci#define SOLO_IIC_CTRL				0x0B24
52062306a36Sopenharmony_ci#define	  SOLO_IIC_AUTO_CLEAR			BIT(20)
52162306a36Sopenharmony_ci#define	  SOLO_IIC_STATE_RX_ACK			BIT(19)
52262306a36Sopenharmony_ci#define	  SOLO_IIC_STATE_BUSY			BIT(18)
52362306a36Sopenharmony_ci#define	  SOLO_IIC_STATE_SIG_ERR		BIT(17)
52462306a36Sopenharmony_ci#define	  SOLO_IIC_STATE_TRNS			BIT(16)
52562306a36Sopenharmony_ci#define	  SOLO_IIC_CH_SET(n)			((n)<<5)
52662306a36Sopenharmony_ci#define	  SOLO_IIC_ACK_EN			BIT(4)
52762306a36Sopenharmony_ci#define	  SOLO_IIC_START			BIT(3)
52862306a36Sopenharmony_ci#define	  SOLO_IIC_STOP				BIT(2)
52962306a36Sopenharmony_ci#define	  SOLO_IIC_READ				BIT(1)
53062306a36Sopenharmony_ci#define	  SOLO_IIC_WRITE			BIT(0)
53162306a36Sopenharmony_ci
53262306a36Sopenharmony_ci#define SOLO_IIC_TXD				0x0B28
53362306a36Sopenharmony_ci#define SOLO_IIC_RXD				0x0B2C
53462306a36Sopenharmony_ci
53562306a36Sopenharmony_ci/*
53662306a36Sopenharmony_ci *	UART REGISTER
53762306a36Sopenharmony_ci */
53862306a36Sopenharmony_ci#define SOLO_UART_CONTROL(n)			(0x0BA0 + ((n)*0x20))
53962306a36Sopenharmony_ci#define	  SOLO_UART_CLK_DIV(n)			((n)<<24)
54062306a36Sopenharmony_ci#define	  SOLO_MODEM_CTRL_EN			BIT(20)
54162306a36Sopenharmony_ci#define	  SOLO_PARITY_ERROR_DROP		BIT(18)
54262306a36Sopenharmony_ci#define	  SOLO_IRQ_ERR_EN			BIT(17)
54362306a36Sopenharmony_ci#define	  SOLO_IRQ_RX_EN			BIT(16)
54462306a36Sopenharmony_ci#define	  SOLO_IRQ_TX_EN			BIT(15)
54562306a36Sopenharmony_ci#define	  SOLO_RX_EN				BIT(14)
54662306a36Sopenharmony_ci#define	  SOLO_TX_EN				BIT(13)
54762306a36Sopenharmony_ci#define	  SOLO_UART_HALF_DUPLEX			BIT(12)
54862306a36Sopenharmony_ci#define	  SOLO_UART_LOOPBACK			BIT(11)
54962306a36Sopenharmony_ci
55062306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_230400			((0<<9)|(0<<6))
55162306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_115200			((0<<9)|(1<<6))
55262306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_57600			((0<<9)|(2<<6))
55362306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_38400			((0<<9)|(3<<6))
55462306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_19200			((0<<9)|(4<<6))
55562306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_9600			((0<<9)|(5<<6))
55662306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_4800			((0<<9)|(6<<6))
55762306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_2400			((1<<9)|(6<<6))
55862306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_1200			((2<<9)|(6<<6))
55962306a36Sopenharmony_ci#define	  SOLO_BAUDRATE_300			((3<<9)|(6<<6))
56062306a36Sopenharmony_ci
56162306a36Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_8			(3<<4)
56262306a36Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_7			(2<<4)
56362306a36Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_6			(1<<4)
56462306a36Sopenharmony_ci#define	  SOLO_UART_DATA_BIT_5			(0<<4)
56562306a36Sopenharmony_ci
56662306a36Sopenharmony_ci#define	  SOLO_UART_STOP_BIT_1			(0<<2)
56762306a36Sopenharmony_ci#define	  SOLO_UART_STOP_BIT_2			(1<<2)
56862306a36Sopenharmony_ci
56962306a36Sopenharmony_ci#define	  SOLO_UART_PARITY_NONE			(0<<0)
57062306a36Sopenharmony_ci#define	  SOLO_UART_PARITY_EVEN			(2<<0)
57162306a36Sopenharmony_ci#define	  SOLO_UART_PARITY_ODD			(3<<0)
57262306a36Sopenharmony_ci
57362306a36Sopenharmony_ci#define SOLO_UART_STATUS(n)			(0x0BA4 + ((n)*0x20))
57462306a36Sopenharmony_ci#define	  SOLO_UART_CTS				BIT(15)
57562306a36Sopenharmony_ci#define	  SOLO_UART_RX_BUSY			BIT(14)
57662306a36Sopenharmony_ci#define	  SOLO_UART_OVERRUN			BIT(13)
57762306a36Sopenharmony_ci#define	  SOLO_UART_FRAME_ERR			BIT(12)
57862306a36Sopenharmony_ci#define	  SOLO_UART_PARITY_ERR			BIT(11)
57962306a36Sopenharmony_ci#define	  SOLO_UART_TX_BUSY			BIT(5)
58062306a36Sopenharmony_ci
58162306a36Sopenharmony_ci#define	  SOLO_UART_RX_BUFF_CNT(stat)		(((stat)>>6) & 0x1f)
58262306a36Sopenharmony_ci#define	  SOLO_UART_RX_BUFF_SIZE		8
58362306a36Sopenharmony_ci#define	  SOLO_UART_TX_BUFF_CNT(stat)		(((stat)>>0) & 0x1f)
58462306a36Sopenharmony_ci#define	  SOLO_UART_TX_BUFF_SIZE		8
58562306a36Sopenharmony_ci
58662306a36Sopenharmony_ci#define SOLO_UART_TX_DATA(n)			(0x0BA8 + ((n)*0x20))
58762306a36Sopenharmony_ci#define	  SOLO_UART_TX_DATA_PUSH		BIT(8)
58862306a36Sopenharmony_ci#define SOLO_UART_RX_DATA(n)			(0x0BAC + ((n)*0x20))
58962306a36Sopenharmony_ci#define	  SOLO_UART_RX_DATA_POP			BIT(8)
59062306a36Sopenharmony_ci
59162306a36Sopenharmony_ci#define SOLO_TIMER_CLOCK_NUM			0x0be0
59262306a36Sopenharmony_ci#define SOLO_TIMER_USEC				0x0be8
59362306a36Sopenharmony_ci#define SOLO_TIMER_SEC				0x0bec
59462306a36Sopenharmony_ci#define SOLO_TIMER_USEC_LSB			0x0d20 /* 6110 Only */
59562306a36Sopenharmony_ci
59662306a36Sopenharmony_ci#define SOLO_AUDIO_CONTROL			0x0D00
59762306a36Sopenharmony_ci#define	  SOLO_AUDIO_ENABLE			BIT(31)
59862306a36Sopenharmony_ci#define	  SOLO_AUDIO_MASTER_MODE		BIT(30)
59962306a36Sopenharmony_ci#define	  SOLO_AUDIO_I2S_MODE			BIT(29)
60062306a36Sopenharmony_ci#define	  SOLO_AUDIO_I2S_LR_SWAP		BIT(27)
60162306a36Sopenharmony_ci#define	  SOLO_AUDIO_I2S_8BIT			BIT(26)
60262306a36Sopenharmony_ci#define	  SOLO_AUDIO_I2S_MULTI(n)		((n)<<24)
60362306a36Sopenharmony_ci#define	  SOLO_AUDIO_MIX_9TO0			BIT(23)
60462306a36Sopenharmony_ci#define	  SOLO_AUDIO_DEC_9TO0_VOL(n)		((n)<<20)
60562306a36Sopenharmony_ci#define	  SOLO_AUDIO_MIX_19TO10			BIT(19)
60662306a36Sopenharmony_ci#define	  SOLO_AUDIO_DEC_19TO10_VOL(n)		((n)<<16)
60762306a36Sopenharmony_ci#define	  SOLO_AUDIO_MODE(n)			((n)<<0)
60862306a36Sopenharmony_ci#define SOLO_AUDIO_SAMPLE			0x0D04
60962306a36Sopenharmony_ci#define	  SOLO_AUDIO_EE_MODE_ON			BIT(30)
61062306a36Sopenharmony_ci#define	  SOLO_AUDIO_EE_ENC_CH(ch)		((ch)<<25)
61162306a36Sopenharmony_ci#define	  SOLO_AUDIO_BITRATE(n)			((n)<<16)
61262306a36Sopenharmony_ci#define	  SOLO_AUDIO_CLK_DIV(n)			((n)<<0)
61362306a36Sopenharmony_ci#define SOLO_AUDIO_FDMA_INTR			0x0D08
61462306a36Sopenharmony_ci#define	  SOLO_AUDIO_FDMA_INTERVAL(n)		((n)<<19)
61562306a36Sopenharmony_ci#define	  SOLO_AUDIO_INTR_ORDER(n)		((n)<<16)
61662306a36Sopenharmony_ci#define	  SOLO_AUDIO_FDMA_BASE(n)		((n)<<0)
61762306a36Sopenharmony_ci#define SOLO_AUDIO_EVOL_0			0x0D0C
61862306a36Sopenharmony_ci#define SOLO_AUDIO_EVOL_1			0x0D10
61962306a36Sopenharmony_ci#define	  SOLO_AUDIO_EVOL(ch, value)		((value)<<((ch)%10))
62062306a36Sopenharmony_ci#define SOLO_AUDIO_STA				0x0D14
62162306a36Sopenharmony_ci
62262306a36Sopenharmony_ci/*
62362306a36Sopenharmony_ci * Watchdog configuration
62462306a36Sopenharmony_ci */
62562306a36Sopenharmony_ci#define SOLO_WATCHDOG				0x0be4
62662306a36Sopenharmony_ci#define SOLO_WATCHDOG_SET(status, sec)		(status << 8 | (sec & 0xff))
62762306a36Sopenharmony_ci
62862306a36Sopenharmony_ci#endif /* __SOLO6X10_REGISTERS_H */
629