Skip to content

Commit 3de12ef

Browse files
author
kakkala
committed
2 parents 0f9d256 + 4759b53 commit 3de12ef

31 files changed

+26355
-15
lines changed
Binary file not shown.

board/mathworks/zynq/boards/adrv9361/boot/ccfmc_lvds_handoff/ps7_init_gpl.c

+12,936
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
2+
/******************************************************************************
3+
*
4+
* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
7+
* software and associated documentation files (the "Software"), to deal in the Software
8+
* without restriction, including without limitation the rights to use, copy, modify, merge,
9+
* publish, distribute, sublicense, and/or sell copies of the Software, and to permit
10+
* persons to whom the Software is furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all copies or
13+
* substantial portions of the Software.
14+
*
15+
* Use of the Software is limited solely to applications: (a) running on a Xilinx device, or
16+
* (b) that interact with a Xilinx device through a bus or interconnect.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
19+
* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
* NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23+
*
24+
* Except as contained in this notice, the name of the Xilinx shall not be used in advertising or
25+
* otherwise to promote the sale, use or other dealings in this Software without prior written
26+
* authorization from Xilinx.
27+
*
28+
*******************************************************************************/
29+
/****************************************************************************/
30+
/**
31+
*
32+
* @file ps7_init.h
33+
*
34+
* This file can be included in FSBL code
35+
* to get prototype of ps7_init() function
36+
* and error codes
37+
*
38+
*****************************************************************************/
39+
40+
#ifdef __cplusplus
41+
extern "C" {
42+
#endif
43+
44+
45+
//typedef unsigned int u32;
46+
47+
48+
/** do we need to make this name more unique ? **/
49+
//extern u32 ps7_init_data[];
50+
extern unsigned long * ps7_ddr_init_data;
51+
extern unsigned long * ps7_mio_init_data;
52+
extern unsigned long * ps7_pll_init_data;
53+
extern unsigned long * ps7_clock_init_data;
54+
extern unsigned long * ps7_peripherals_init_data;
55+
56+
57+
58+
#define OPCODE_EXIT 0U
59+
#define OPCODE_CLEAR 1U
60+
#define OPCODE_WRITE 2U
61+
#define OPCODE_MASKWRITE 3U
62+
#define OPCODE_MASKPOLL 4U
63+
#define OPCODE_MASKDELAY 5U
64+
#define NEW_PS7_ERR_CODE 1
65+
66+
/* Encode number of arguments in last nibble */
67+
#define EMIT_EXIT() ( (OPCODE_EXIT << 4 ) | 0 )
68+
#define EMIT_CLEAR(addr) ( (OPCODE_CLEAR << 4 ) | 1 ) , addr
69+
#define EMIT_WRITE(addr,val) ( (OPCODE_WRITE << 4 ) | 2 ) , addr, val
70+
#define EMIT_MASKWRITE(addr,mask,val) ( (OPCODE_MASKWRITE << 4 ) | 3 ) , addr, mask, val
71+
#define EMIT_MASKPOLL(addr,mask) ( (OPCODE_MASKPOLL << 4 ) | 2 ) , addr, mask
72+
#define EMIT_MASKDELAY(addr,mask) ( (OPCODE_MASKDELAY << 4 ) | 2 ) , addr, mask
73+
74+
/* Returns codes of PS7_Init */
75+
#define PS7_INIT_SUCCESS (0) // 0 is success in good old C
76+
#define PS7_INIT_CORRUPT (1) // 1 the data is corrupted, and slcr reg are in corrupted state now
77+
#define PS7_INIT_TIMEOUT (2) // 2 when a poll operation timed out
78+
#define PS7_POLL_FAILED_DDR_INIT (3) // 3 when a poll operation timed out for ddr init
79+
#define PS7_POLL_FAILED_DMA (4) // 4 when a poll operation timed out for dma done bit
80+
#define PS7_POLL_FAILED_PLL (5) // 5 when a poll operation timed out for pll sequence init
81+
82+
83+
/* Silicon Versions */
84+
#define PCW_SILICON_VERSION_1 0
85+
#define PCW_SILICON_VERSION_2 1
86+
#define PCW_SILICON_VERSION_3 2
87+
88+
/* This flag to be used by FSBL to check whether ps7_post_config() proc exixts */
89+
#define PS7_POST_CONFIG
90+
91+
/* Freq of all peripherals */
92+
93+
#define APU_FREQ 666666687
94+
#define DDR_FREQ 533333374
95+
#define DCI_FREQ 10158730
96+
#define QSPI_FREQ 200000000
97+
#define SMC_FREQ 10000000
98+
#define ENET0_FREQ 125000000
99+
#define ENET1_FREQ 125000000
100+
#define USB0_FREQ 60000000
101+
#define USB1_FREQ 60000000
102+
#define SDIO_FREQ 50000000
103+
#define UART_FREQ 100000000
104+
#define SPI_FREQ 166666672
105+
#define I2C_FREQ 111111115
106+
#define WDT_FREQ 111111115
107+
#define TTC_FREQ 50000000
108+
#define CAN_FREQ 10000000
109+
#define PCAP_FREQ 200000000
110+
#define TPIU_FREQ 200000000
111+
#define FPGA0_FREQ 100000000
112+
#define FPGA1_FREQ 200000000
113+
#define FPGA2_FREQ 200000000
114+
#define FPGA3_FREQ 10000000
115+
116+
117+
/* For delay calculation using global registers*/
118+
#define SCU_GLOBAL_TIMER_COUNT_L32 0xF8F00200
119+
#define SCU_GLOBAL_TIMER_COUNT_U32 0xF8F00204
120+
#define SCU_GLOBAL_TIMER_CONTROL 0xF8F00208
121+
#define SCU_GLOBAL_TIMER_AUTO_INC 0xF8F00218
122+
123+
int ps7_config( unsigned long*);
124+
int ps7_init();
125+
int ps7_post_config();
126+
int ps7_debug();
127+
char* getPS7MessageInfo(unsigned key);
128+
129+
void perf_start_clock(void);
130+
void perf_disable_clock(void);
131+
void perf_reset_clock(void);
132+
void perf_reset_and_start_timer();
133+
int get_number_of_cycles_for_delay(unsigned int delay);
134+
#ifdef __cplusplus
135+
}
136+
#endif
137+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<board name="adrv9361" platform="zynq">
2+
<default>
3+
<app name="default">
4+
</app>
5+
<dtsi dir="../../dts"/>
6+
<fsbl dir="ccfmc_lvds_handoff"/>
7+
</default>
8+
<image name="zynqsdr">
9+
<app name="fmc_axis">
10+
<dts file="fmc_axis.dts"/>
11+
<bit file="ccfmc_lvds.bit"/>
12+
</app>
13+
<app name="fmc">
14+
<dts file="fmc.dts"/>
15+
</app>
16+
<app name="fmc_axis64">
17+
<dts file="fmc_axis64.dts"/>
18+
</app>
19+
<app name="fmc_axis_XIL_DMA">
20+
<dts file="fmc_axis_XIL_DMA.dts"/>
21+
</app>
22+
<app name="fmc_axis64_XIL_DMA">
23+
<dts file="fmc_axis64_XIL_DMA.dts"/>
24+
</app>
25+
</image>
26+
</board>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
###########################################
2+
# ZC706 Options
3+
###########################################
4+
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="zynq_picozed_sdr2"
5+
BR2_PACKAGE_XILINX_BOOTLOADER_UBOOT_TARGET_DIR="board/xilinx/zynq/zynq-picozed-sdr2"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#ifndef __MW_AXI_DATASIZE_DMA__
2+
#define __MW_AXI_DATASIZE_DMA__
3+
4+
#define MW_DATAWIDTH_SELECT 64
5+
6+
#endif /* __MW_AXI_DATASIZE_DMA__ */
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
/delete-node/ &adv7511;
3+
/delete-node/ &axi_vdma_0;
4+
/delete-node/ &hdmi_clock;
5+
/delete-node/ &axi_spdif_tx_0;
6+
/ {
7+
/delete-node/ adv7511_hdmi_snd;
8+
};
9+
&fpga_axi {
10+
/delete-node/ axi_hdmi@70e00000;
11+
};
12+
13+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include "zynq-adrv9361-z7035-fmc.dts"
2+
#include "zynq-mw-ad9361.dtsi"
3+
#include "adrv9361-fmc-cleanup-adv7511.dtsi"
4+
5+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "fmc.dts"
2+
#include "zynq-mw-ad9361-axis.dtsi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "AXIS_DataSize.h"
2+
#include "fmc.dts"
3+
#include "zynq-mw-ad9361-axis.dtsi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include "AXIS_DataSize.h"
2+
#include "fmc.dts"
3+
#include "zynq-mw-ad9361-axis-xil.dtsi"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include "fmc.dts"
2+
#include "zynq-mw-ad9361-axis-xil.dtsi"
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)