Blame view

arch/arm/include/asm/arch-socfpga/system_manager.h 3.72 KB
5d649d2b0   Chin Liang See   socfpga: Adding S...
1
  /*
665e4caf0   Marek Vasut   arm: socfpga: sys...
2
   * Copyright (C) 2013 Altera Corporation <www.altera.com>
5d649d2b0   Chin Liang See   socfpga: Adding S...
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
   *
   * SPDX-License-Identifier:	GPL-2.0+
   */
  
  #ifndef	_SYSTEM_MANAGER_H_
  #define	_SYSTEM_MANAGER_H_
  
  #ifndef __ASSEMBLY__
  
  void sysmgr_pinmux_init(void);
  
  /* declaration for handoff table type */
  extern unsigned long sys_mgr_init_table[CONFIG_HPS_PINMUX_NUM];
  
  #endif
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
18
  struct socfpga_system_manager {
665e4caf0   Marek Vasut   arm: socfpga: sys...
19
20
  	/* System Manager Module */
  	u32	siliconid1;			/* 0x00 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
21
22
  	u32	siliconid2;
  	u32	_pad_0x8_0xf[2];
665e4caf0   Marek Vasut   arm: socfpga: sys...
23
  	u32	wddbg;				/* 0x10 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
24
25
26
  	u32	bootinfo;
  	u32	hpsinfo;
  	u32	parityinj;
665e4caf0   Marek Vasut   arm: socfpga: sys...
27
28
  	/* FPGA Interface Group */
  	u32	fpgaintfgrp_gbl;		/* 0x20 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
29
30
31
  	u32	fpgaintfgrp_indiv;
  	u32	fpgaintfgrp_module;
  	u32	_pad_0x2c_0x2f;
665e4caf0   Marek Vasut   arm: socfpga: sys...
32
33
  	/* Scan Manager Group */
  	u32	scanmgrgrp_ctrl;		/* 0x30 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
34
  	u32	_pad_0x34_0x3f[3];
665e4caf0   Marek Vasut   arm: socfpga: sys...
35
36
  	/* Freeze Control Group */
  	u32	frzctrl_vioctrl;		/* 0x40 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
37
  	u32	_pad_0x44_0x4f[3];
665e4caf0   Marek Vasut   arm: socfpga: sys...
38
  	u32	frzctrl_hioctrl;		/* 0x50 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
39
40
41
  	u32	frzctrl_src;
  	u32	frzctrl_hwctrl;
  	u32	_pad_0x5c_0x5f;
665e4caf0   Marek Vasut   arm: socfpga: sys...
42
43
  	/* EMAC Group */
  	u32	emacgrp_ctrl;			/* 0x60 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
44
45
  	u32	emacgrp_l3master;
  	u32	_pad_0x68_0x6f[2];
665e4caf0   Marek Vasut   arm: socfpga: sys...
46
47
  	/* DMA Controller Group */
  	u32	dmagrp_ctrl;			/* 0x70 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
48
49
  	u32	dmagrp_persecurity;
  	u32	_pad_0x78_0x7f[2];
665e4caf0   Marek Vasut   arm: socfpga: sys...
50
51
52
53
54
  	/* Preloader (initial software) Group */
  	u32	iswgrp_handoff[8];		/* 0x80 */
  	u32	_pad_0xa0_0xbf[8];		/* 0xa0 */
  	/* Boot ROM Code Register Group */
  	u32	romcodegrp_ctrl;		/* 0xc0 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
55
56
57
  	u32	romcodegrp_cpu1startaddr;
  	u32	romcodegrp_initswstate;
  	u32	romcodegrp_initswlastld;
665e4caf0   Marek Vasut   arm: socfpga: sys...
58
  	u32	romcodegrp_bootromswstate;	/* 0xd0 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
59
  	u32	__pad_0xd4_0xdf[3];
665e4caf0   Marek Vasut   arm: socfpga: sys...
60
61
  	/* Warm Boot from On-Chip RAM Group */
  	u32	romcodegrp_warmramgrp_enable;	/* 0xe0 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
62
63
64
  	u32	romcodegrp_warmramgrp_datastart;
  	u32	romcodegrp_warmramgrp_length;
  	u32	romcodegrp_warmramgrp_execution;
665e4caf0   Marek Vasut   arm: socfpga: sys...
65
  	u32	romcodegrp_warmramgrp_crc;	/* 0xf0 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
66
  	u32	__pad_0xf4_0xff[3];
665e4caf0   Marek Vasut   arm: socfpga: sys...
67
68
  	/* Boot ROM Hardware Register Group */
  	u32	romhwgrp_ctrl;			/* 0x100 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
69
  	u32	_pad_0x104_0x107;
665e4caf0   Marek Vasut   arm: socfpga: sys...
70
  	/* SDMMC Controller Group */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
71
72
  	u32	sdmmcgrp_ctrl;
  	u32	sdmmcgrp_l3master;
665e4caf0   Marek Vasut   arm: socfpga: sys...
73
74
  	/* NAND Flash Controller Register Group */
  	u32	nandgrp_bootstrap;		/* 0x110 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
75
  	u32	nandgrp_l3master;
665e4caf0   Marek Vasut   arm: socfpga: sys...
76
  	/* USB Controller Group */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
77
78
  	u32	usbgrp_l3master;
  	u32	_pad_0x11c_0x13f[9];
665e4caf0   Marek Vasut   arm: socfpga: sys...
79
80
  	/* ECC Management Register Group */
  	u32	eccgrp_l2;			/* 0x140 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
81
82
83
  	u32	eccgrp_ocram;
  	u32	eccgrp_usb0;
  	u32	eccgrp_usb1;
665e4caf0   Marek Vasut   arm: socfpga: sys...
84
  	u32	eccgrp_emac0;			/* 0x150 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
85
86
87
  	u32	eccgrp_emac1;
  	u32	eccgrp_dma;
  	u32	eccgrp_can0;
665e4caf0   Marek Vasut   arm: socfpga: sys...
88
  	u32	eccgrp_can1;			/* 0x160 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
89
90
91
  	u32	eccgrp_nand;
  	u32	eccgrp_qspi;
  	u32	eccgrp_sdmmc;
665e4caf0   Marek Vasut   arm: socfpga: sys...
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
  	u32	_pad_0x170_0x3ff[164];
  	/* Pin Mux Control Group */
  	u32	emacio[20];			/* 0x400 */
  	u32	flashio[12];			/* 0x450 */
  	u32	generalio[28];			/* 0x480 */
  	u32	_pad_0x4f0_0x4ff[4];
  	u32	mixed1io[22];			/* 0x500 */
  	u32	mixed2io[8];			/* 0x558 */
  	u32	gplinmux[23];			/* 0x578 */
  	u32	gplmux[71];			/* 0x5d4 */
  	u32	nandusefpga;			/* 0x6f0 */
  	u32	_pad_0x6f4;
  	u32	rgmii1usefpga;			/* 0x6f8 */
  	u32	_pad_0x6fc_0x700[2];
  	u32	i2c0usefpga;			/* 0x704 */
  	u32	sdmmcusefpga;			/* 0x708 */
  	u32	_pad_0x70c_0x710[2];
  	u32	rgmii0usefpga;			/* 0x714 */
  	u32	_pad_0x718_0x720[3];
  	u32	i2c3usefpga;			/* 0x724 */
  	u32	i2c2usefpga;			/* 0x728 */
  	u32	i2c1usefpga;			/* 0x72c */
  	u32	spim1usefpga;			/* 0x730 */
  	u32	_pad_0x734;
  	u32	spim0usefpga;			/* 0x738 */
c5c1af217   Chin Liang See   socfpga/dwmmc: Ad...
117
  };
665e4caf0   Marek Vasut   arm: socfpga: sys...
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  #define SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGPINMUX	(1 << 0)
  #define SYSMGR_ROMCODEGRP_CTRL_WARMRSTCFGIO	(1 << 1)
  #define SYSMGR_ECC_OCRAM_EN	(1 << 0)
  #define SYSMGR_ECC_OCRAM_SERR	(1 << 3)
  #define SYSMGR_ECC_OCRAM_DERR	(1 << 4)
  #define SYSMGR_FPGAINTF_USEFPGA	0x1
  #define SYSMGR_FPGAINTF_SPIM0	(1 << 0)
  #define SYSMGR_FPGAINTF_SPIM1	(1 << 1)
  #define SYSMGR_FPGAINTF_EMAC0	(1 << 2)
  #define SYSMGR_FPGAINTF_EMAC1	(1 << 3)
  #define SYSMGR_FPGAINTF_NAND	(1 << 4)
  #define SYSMGR_FPGAINTF_SDMMC	(1 << 5)
  
  /* FIXME: This is questionable macro. */
  #define SYSMGR_SDMMC_CTRL_SET(smplsel, drvsel)	\
  	((((drvsel) << 0) & 0x7) | (((smplsel) << 3) & 0x38))
5d649d2b0   Chin Liang See   socfpga: Adding S...
134
  #endif /* _SYSTEM_MANAGER_H_ */