summaryrefslogtreecommitdiff
path: root/arch/arm/include/asm/arch-tnetv107x/hardware.h
blob: 2a7ca4e00c137872682e7bbfc52cab39e071ce42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/*
 * TNETV107X: Hardware information
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#ifndef __ASM_ARCH_HARDWARE_H
#define __ASM_ARCH_HARDWARE_H

#ifndef __ASSEMBLY__

#include <linux/sizes.h>

#define ASYNC_EMIF_NUM_CS		4
#define ASYNC_EMIF_MODE_NOR		0
#define ASYNC_EMIF_MODE_NAND		1
#define ASYNC_EMIF_MODE_ONENAND		2
#define ASYNC_EMIF_PRESERVE		-1

struct async_emif_config {
	unsigned mode;
	unsigned select_strobe;
	unsigned extend_wait;
	unsigned wr_setup;
	unsigned wr_strobe;
	unsigned wr_hold;
	unsigned rd_setup;
	unsigned rd_strobe;
	unsigned rd_hold;
	unsigned turn_around;
	enum {
		ASYNC_EMIF_8	= 0,
		ASYNC_EMIF_16	= 1,
		ASYNC_EMIF_32	= 2,
	} width;
};

void init_async_emif(int num_cs, struct async_emif_config *config);

int wdt_start(unsigned long msecs);
int wdt_stop(void);
int wdt_kick(void);

#endif

/* Chip configuration unlock codes and registers */
#define TNETV107X_KICK0		(TNETV107X_CHIP_CONFIG_SYS_BASE+0x38)
#define TNETV107X_KICK1		(TNETV107X_CHIP_CONFIG_SYS_BASE+0x3c)
#define TNETV107X_PINMUX(n)	(TNETV107X_CHIP_CONFIG_SYS_BASE+0x150+(n)*4)
#define TNETV107X_KICK0_MAGIC	0x83e70b13
#define TNETV107X_KICK1_MAGIC	0x95a4f1e0

/* Module base addresses */
#define TNETV107X_TPCC_BASE			0x01C00000
#define TNETV107X_TPTC0_BASE			0x01C10000
#define TNETV107X_TPTC1_BASE			0x01C10400
#define TNETV107X_INTC_BASE			0x03000000
#define TNETV107X_LCD_CONTROLLER_BASE		0x08030000
#define TNETV107X_INTD_BASE			0x08038000
#define TNETV107X_INTD_IPC_BASE			0x08038000
#define TNETV107X_INTD_FAST_BASE		0x08039000
#define TNETV107X_INTD_ASYNC_BASE		0x0803A000
#define TNETV107X_INTD_SLOW_BASE		0x0803B000
#define TNETV107X_PKA_BASE			0x08040000
#define TNETV107X_RNG_BASE			0x08044000
#define TNETV107X_TIMER0_BASE			0x08086500
#define TNETV107X_TIMER1_BASE			0x08086600
#define TNETV107X_WDT0_ARM_BASE			0x08086700
#define TNETV107X_WDT1_DSP_BASE			0x08086800
#define TNETV107X_CHIP_CONFIG_SYS_BASE		0x08087000
#define TNETV107X_GPIO_BASE			0x08088000
#define TNETV107X_UART1_BASE			0x08088400
#define TNETV107X_TOUCHSCREEN_BASE		0x08088500
#define TNETV107X_SDIO0_BASE			0x08088700
#define TNETV107X_SDIO1_BASE			0x08088800
#define TNETV107X_MDIO_BASE			0x08088900
#define TNETV107X_KEYPAD_BASE			0x08088A00
#define TNETV107X_SSP_BASE			0x08088C00
#define TNETV107X_CLOCK_CONTROL_BASE		0x0808A000
#define TNETV107X_PSC_BASE			0x0808B000
#define TNETV107X_TDM0_BASE			0x08100000
#define TNETV107X_TDM1_BASE			0x08100100
#define TNETV107X_MCDMA_BASE			0x08108000
#define TNETV107X_UART0_DMA_BASE		0x08108200
#define TNETV107X_USBSS_BASE			0x08120000
#define TNETV107X_VLYNQ_CONTROL_BASE		0x0810D000
#define TNETV107X_ASYNC_EMIF_CNTRL_BASE		0x08200000
#define TNETV107X_VLYNQ_MEM_MAP_BASE		0x0C000000
#define TNETV107X_IMCOP_BASE			0x01CC0000
#define TNETV107X_MBX_LITE_BASE			0x07000000
#define TNETV107X_ETHSS_BASE			0x0803C000
#define TNETV107X_CPSW_BASE			0x0803C000
#define TNETV107X_SPF_BASE			0x0803C800
#define TNETV107X_IOPU_ETHSS_BASE		0x0803D000
#define TNETV107X_VTP_CNTRL_0			0x0803D800
#define TNETV107X_VTP_CNTRL_1			0x0803D900
#define TNETV107X_UART2_DMA_BASE		0x08108400
#define TNETV107X_INTERNAL_MEMORY		0x20000000
#define TNETV107X_ASYNC_EMIF_DATA_CE0_BASE	0x30000000
#define TNETV107X_ASYNC_EMIF_DATA_CE1_BASE	0x40000000
#define TNETV107X_ASYNC_EMIF_DATA_CE2_BASE	0x44000000
#define TNETV107X_ASYNC_EMIF_DATA_CE3_BASE	0x48000000
#define TNETV107X_DDR_EMIF_DATA_BASE		0x80000000
#define TNETV107X_DDR_EMIF_CONTROL_BASE		0x90000000

/* LPSC module definitions */
#define TNETV107X_LPSC_ARM			0
#define TNETV107X_LPSC_GEM			1
#define TNETV107X_LPSC_DDR2_PHY			2
#define TNETV107X_LPSC_TPCC			3
#define TNETV107X_LPSC_TPTC0			4
#define TNETV107X_LPSC_TPTC1			5
#define TNETV107X_LPSC_RAM			6
#define TNETV107X_LPSC_MBX_LITE			7
#define TNETV107X_LPSC_LCD			8
#define TNETV107X_LPSC_ETHSS			9
#define TNETV107X_LPSC_AEMIF			10
#define TNETV107X_LPSC_CHIP_CFG			11
#define TNETV107X_LPSC_TSC			12
#define TNETV107X_LPSC_ROM			13
#define TNETV107X_LPSC_UART2			14
#define TNETV107X_LPSC_PKTSEC			15
#define TNETV107X_LPSC_SECCTL			16
#define TNETV107X_LPSC_KEYMGR			17
#define TNETV107X_LPSC_KEYPAD			18
#define TNETV107X_LPSC_GPIO			19
#define TNETV107X_LPSC_MDIO			20
#define TNETV107X_LPSC_SDIO0			21
#define TNETV107X_LPSC_UART0			22
#define TNETV107X_LPSC_UART1			23
#define TNETV107X_LPSC_TIMER0			24
#define TNETV107X_LPSC_TIMER1			25
#define TNETV107X_LPSC_WDT_ARM			26
#define TNETV107X_LPSC_WDT_DSP			27
#define TNETV107X_LPSC_SSP			28
#define TNETV107X_LPSC_TDM0			29
#define TNETV107X_LPSC_VLYNQ			30
#define TNETV107X_LPSC_MCDMA			31
#define TNETV107X_LPSC_USB0			32
#define TNETV107X_LPSC_TDM1			33
#define TNETV107X_LPSC_DEBUGSS			34
#define TNETV107X_LPSC_ETHSS_RGMII		35
#define TNETV107X_LPSC_SYSTEM			36
#define TNETV107X_LPSC_IMCOP			37
#define TNETV107X_LPSC_SPARE			38
#define TNETV107X_LPSC_SDIO1			39
#define TNETV107X_LPSC_USB1			40
#define TNETV107X_LPSC_USBSS			41
#define TNETV107X_LPSC_DDR2_EMIF1_VRST		42
#define TNETV107X_LPSC_DDR2_EMIF2_VCTL_RST	43
#define TNETV107X_LPSC_MAX			44

/* Interrupt controller */
#define INTC_GLB_EN			(TNETV107X_INTC_BASE + 0x10)
#define INTC_HINT_EN			(TNETV107X_INTC_BASE + 0x1500)
#define INTC_EN_CLR0			(TNETV107X_INTC_BASE + 0x380)

#endif /* __ASM_ARCH_HARDWARE_H */