adrv9371x/a10soc: Misc changes for being able to run Linux

main
dbogdan 2016-08-16 11:56:25 +03:00
parent e754f0a46a
commit 4658686ae1
4 changed files with 190 additions and 26 deletions

View File

@ -41,6 +41,22 @@
type = "String"; type = "String";
} }
} }
element adrv9371x.avl_gpio_i
{
datum baseAddress
{
value = "222464";
type = "String";
}
}
element adrv9371x.avl_gpio_o
{
datum baseAddress
{
value = "222720";
type = "String";
}
}
element adrv9371x.avl_rx_jesd element adrv9371x.avl_rx_jesd
{ {
datum baseAddress datum baseAddress
@ -57,6 +73,14 @@
type = "String"; type = "String";
} }
} }
element adrv9371x.avl_spi
{
datum baseAddress
{
value = "222976";
type = "String";
}
}
element adrv9371x.avl_tx_jesd element adrv9371x.avl_tx_jesd
{ {
datum baseAddress datum baseAddress
@ -375,6 +399,8 @@
<parameter name="useTestBenchNamingPattern" value="false" /> <parameter name="useTestBenchNamingPattern" value="false" />
<instanceScript></instanceScript> <instanceScript></instanceScript>
<interface name="gpio" internal="adrv9371x.ad9371_gpio" type="conduit" dir="end" /> <interface name="gpio" internal="adrv9371x.ad9371_gpio" type="conduit" dir="end" />
<interface name="gpio_i" internal="adrv9371x.gpio_i" type="conduit" dir="end" />
<interface name="gpio_o" internal="adrv9371x.gpio_o" type="conduit" dir="end" />
<interface name="hps_ddr" internal="a10soc.hps_ddr" type="conduit" dir="end" /> <interface name="hps_ddr" internal="a10soc.hps_ddr" type="conduit" dir="end" />
<interface <interface
name="hps_ddr_oct" name="hps_ddr_oct"
@ -386,7 +412,7 @@
internal="a10soc.hps_ddr_ref_clk" internal="a10soc.hps_ddr_ref_clk"
type="clock" type="clock"
dir="end" /> dir="end" />
<interface name="hps_gpio" internal="a10soc.hps_gpio" type="conduit" dir="end" /> <interface name="hps_gpio" internal="a10soc.hps_gpio" />
<interface name="hps_io" internal="a10soc.hps_io" type="conduit" dir="end" /> <interface name="hps_io" internal="a10soc.hps_io" type="conduit" dir="end" />
<interface name="hps_spi0" internal="a10soc.hps_spi0" type="conduit" dir="end" /> <interface name="hps_spi0" internal="a10soc.hps_spi0" type="conduit" dir="end" />
<interface <interface
@ -427,6 +453,7 @@
internal="adrv9371x.rx_sysref" internal="adrv9371x.rx_sysref"
type="conduit" type="conduit"
dir="end" /> dir="end" />
<interface name="spi" internal="adrv9371x.spi" type="conduit" dir="end" />
<interface name="sys_clk" internal="sys_clk.clk_in" type="clock" dir="end" /> <interface name="sys_clk" internal="sys_clk.clk_in" type="clock" dir="end" />
<interface <interface
name="sys_reset" name="sys_reset"
@ -448,12 +475,12 @@
<parameter name="AUTO_HPS_DDR_REF_CLK_CLOCK_DOMAIN" value="1" /> <parameter name="AUTO_HPS_DDR_REF_CLK_CLOCK_DOMAIN" value="1" />
<parameter name="AUTO_HPS_DDR_REF_CLK_CLOCK_RATE" value="0" /> <parameter name="AUTO_HPS_DDR_REF_CLK_CLOCK_RATE" value="0" />
<parameter name="AUTO_HPS_DDR_REF_CLK_RESET_DOMAIN" value="1" /> <parameter name="AUTO_HPS_DDR_REF_CLK_RESET_DOMAIN" value="1" />
<parameter name="AUTO_HPS_IRQ0_INTERRUPTS_USED" value="15" /> <parameter name="AUTO_HPS_IRQ0_INTERRUPTS_USED" value="31" />
<parameter name="AUTO_HPS_IRQ1_INTERRUPTS_USED" value="0" /> <parameter name="AUTO_HPS_IRQ1_INTERRUPTS_USED" value="0" />
<parameter name="AUTO_SYS_CLK_CLOCK_DOMAIN" value="5" /> <parameter name="AUTO_SYS_CLK_CLOCK_DOMAIN" value="5" />
<parameter name="AUTO_SYS_CLK_CLOCK_RATE" value="100000000" /> <parameter name="AUTO_SYS_CLK_CLOCK_RATE" value="100000000" />
<parameter name="AUTO_SYS_CLK_RESET_DOMAIN" value="5" /> <parameter name="AUTO_SYS_CLK_RESET_DOMAIN" value="5" />
<parameter name="AUTO_SYS_CPU_M_AVL_ADDRESS_MAP"><![CDATA[<address-map><slave name='adrv9371x_axi_os_jesd_xcvr.s_axi' start='0x0' end='0x10000' /><slave name='adrv9371x_axi_jesd_xcvr.s_axi' start='0x10000' end='0x20000' /><slave name='adrv9371x_axi_dac_dma.s_axi' start='0x20000' end='0x24000' /><slave name='adrv9371x_axi_os_adc_dma.s_axi' start='0x24000' end='0x28000' /><slave name='adrv9371x_axi_adc_dma.s_axi' start='0x28000' end='0x2C000' /><slave name='adrv9371x_xcvr_tx_lane_pll.reconfig_avmm0' start='0x34000' end='0x35000' /><slave name='adrv9371x_xcvr_pll_reconfig.mgmt_avalon_slave' start='0x35000' end='0x35800' /><slave name='adrv9371x_xcvr_tx_core.jesd204_tx_avs' start='0x35800' end='0x35C00' /><slave name='adrv9371x_xcvr_rx_os_core.jesd204_rx_avs' start='0x35C00' end='0x36000' /><slave name='adrv9371x_xcvr_rx_core.jesd204_rx_avs' start='0x36000' end='0x36400' /><slave name='adrv9371x_ad9371_gpio.s1' start='0x36400' end='0x36420' /></address-map>]]></parameter> <parameter name="AUTO_SYS_CPU_M_AVL_ADDRESS_MAP"><![CDATA[<address-map><slave name='adrv9371x_axi_os_jesd_xcvr.s_axi' start='0x0' end='0x10000' /><slave name='adrv9371x_axi_jesd_xcvr.s_axi' start='0x10000' end='0x20000' /><slave name='adrv9371x_axi_dac_dma.s_axi' start='0x20000' end='0x24000' /><slave name='adrv9371x_axi_os_adc_dma.s_axi' start='0x24000' end='0x28000' /><slave name='adrv9371x_axi_adc_dma.s_axi' start='0x28000' end='0x2C000' /><slave name='adrv9371x_xcvr_tx_lane_pll.reconfig_avmm0' start='0x34000' end='0x35000' /><slave name='adrv9371x_xcvr_pll_reconfig.mgmt_avalon_slave' start='0x35000' end='0x35800' /><slave name='adrv9371x_xcvr_tx_core.jesd204_tx_avs' start='0x35800' end='0x35C00' /><slave name='adrv9371x_xcvr_rx_os_core.jesd204_rx_avs' start='0x35C00' end='0x36000' /><slave name='adrv9371x_xcvr_rx_core.jesd204_rx_avs' start='0x36000' end='0x36400' /><slave name='adrv9371x_ad9371_gpio.s1' start='0x36400' end='0x36420' /><slave name='adrv9371x_gpio_i.s1' start='0x36500' end='0x36510' /><slave name='adrv9371x_gpio_o.s1' start='0x36600' end='0x36620' /><slave name='adrv9371x_spi.spi_control_port' start='0x36700' end='0x36720' /></address-map>]]></parameter>
<parameter name="AUTO_SYS_CPU_M_AVL_ADDRESS_WIDTH" value="AddressWidth = 18" /> <parameter name="AUTO_SYS_CPU_M_AVL_ADDRESS_WIDTH" value="AddressWidth = 18" />
<parameter name="AUTO_UNIQUE_ID" value="$${FILENAME}_a10soc" /> <parameter name="AUTO_UNIQUE_ID" value="$${FILENAME}_a10soc" />
</module> </module>
@ -518,6 +545,24 @@
<parameter name="baseAddress" value="0x00036400" /> <parameter name="baseAddress" value="0x00036400" />
<parameter name="defaultConnection" value="false" /> <parameter name="defaultConnection" value="false" />
</connection> </connection>
<connection
kind="avalon"
version="15.1"
start="a10soc.sys_cpu_m_avl"
end="adrv9371x.avl_gpio_i">
<parameter name="arbitrationPriority" value="1" />
<parameter name="baseAddress" value="0x00036500" />
<parameter name="defaultConnection" value="false" />
</connection>
<connection
kind="avalon"
version="15.1"
start="a10soc.sys_cpu_m_avl"
end="adrv9371x.avl_gpio_o">
<parameter name="arbitrationPriority" value="1" />
<parameter name="baseAddress" value="0x00036600" />
<parameter name="defaultConnection" value="false" />
</connection>
<connection <connection
kind="avalon" kind="avalon"
version="15.1" version="15.1"
@ -536,6 +581,15 @@
<parameter name="baseAddress" value="0x00035c00" /> <parameter name="baseAddress" value="0x00035c00" />
<parameter name="defaultConnection" value="false" /> <parameter name="defaultConnection" value="false" />
</connection> </connection>
<connection
kind="avalon"
version="15.1"
start="a10soc.sys_cpu_m_avl"
end="adrv9371x.avl_spi">
<parameter name="arbitrationPriority" value="1" />
<parameter name="baseAddress" value="0x00036700" />
<parameter name="defaultConnection" value="false" />
</connection>
<connection <connection
kind="avalon" kind="avalon"
version="15.1" version="15.1"
@ -642,6 +696,13 @@
end="adrv9371x.axi_dac_dma_intr"> end="adrv9371x.axi_dac_dma_intr">
<parameter name="irqNumber" value="2" /> <parameter name="irqNumber" value="2" />
</connection> </connection>
<connection
kind="interrupt"
version="15.1"
start="a10soc.hps_irq0"
end="adrv9371x.spi_irq">
<parameter name="irqNumber" value="4" />
</connection>
<connection <connection
kind="reset" kind="reset"
version="15.1" version="15.1"

View File

@ -187,8 +187,6 @@ module system_top (
.hps_ddr_mem_dbi_n (hps_ddr_dbi_n), .hps_ddr_mem_dbi_n (hps_ddr_dbi_n),
.hps_ddr_oct_oct_rzqin (hps_ddr_rzq), .hps_ddr_oct_oct_rzqin (hps_ddr_rzq),
.hps_ddr_ref_clk_clk (hps_ddr_ref_clk), .hps_ddr_ref_clk_clk (hps_ddr_ref_clk),
.hps_gpio_gp_in (gpio_i),
.hps_gpio_gp_out (gpio_o),
.hps_io_hps_io_phery_emac0_TX_CLK (hps_eth_txclk), .hps_io_hps_io_phery_emac0_TX_CLK (hps_eth_txclk),
.hps_io_hps_io_phery_emac0_TXD0 (hps_eth_txd[0]), .hps_io_hps_io_phery_emac0_TXD0 (hps_eth_txd[0]),
.hps_io_hps_io_phery_emac0_TXD1 (hps_eth_txd[1]), .hps_io_hps_io_phery_emac0_TXD1 (hps_eth_txd[1]),
@ -233,15 +231,15 @@ module system_top (
.hps_io_hps_io_gpio_gpio1_io14 (hps_gpio[1]), .hps_io_hps_io_gpio_gpio1_io14 (hps_gpio[1]),
.hps_io_hps_io_gpio_gpio1_io16 (hps_gpio[2]), .hps_io_hps_io_gpio_gpio1_io16 (hps_gpio[2]),
.hps_io_hps_io_gpio_gpio1_io17 (hps_gpio[3]), .hps_io_hps_io_gpio_gpio1_io17 (hps_gpio[3]),
.hps_spi0_mosi_o (spi_mosi), .hps_spi0_mosi_o (),
.hps_spi0_miso_i (spi_miso), .hps_spi0_miso_i (),
.hps_spi0_ss_in_n (1'b1), .hps_spi0_ss_in_n (1'b1),
.hps_spi0_mosi_oe (), .hps_spi0_mosi_oe (),
.hps_spi0_ss0_n_o (spi_csn_ad9528), .hps_spi0_ss0_n_o (),
.hps_spi0_ss1_n_o (spi_csn_ad9371), .hps_spi0_ss1_n_o (),
.hps_spi0_ss2_n_o (), .hps_spi0_ss2_n_o (),
.hps_spi0_ss3_n_o (), .hps_spi0_ss3_n_o (),
.hps_spi0_sclk_clk (spi_clk), .hps_spi0_sclk_clk (),
.hps_spi1_mosi_o (), .hps_spi1_mosi_o (),
.hps_spi1_miso_i (1'b0), .hps_spi1_miso_i (1'b0),
.hps_spi1_ss_in_n (1'b1), .hps_spi1_ss_in_n (1'b1),
@ -252,17 +250,23 @@ module system_top (
.hps_spi1_ss3_n_o (), .hps_spi1_ss3_n_o (),
.hps_spi1_sclk_clk (), .hps_spi1_sclk_clk (),
.ref_clk_clk (ref_clk1), .ref_clk_clk (ref_clk1),
.rx_data_rx_serial_data (rx_data[1:0]), .rx_data_rx_serial_data (rx_data[1:0]),
.rx_os_data_rx_serial_data (rx_data[3:2]), .rx_os_data_rx_serial_data (rx_data[3:2]),
.rx_os_sync_rx_sync (rx_os_sync), .rx_os_sync_rx_sync (rx_os_sync),
.rx_os_sysref_rx_ext_sysref_in (sysref), .rx_os_sysref_rx_ext_sysref_in (sysref),
.rx_sync_rx_sync (rx_sync), .rx_sync_rx_sync (rx_sync),
.rx_sysref_rx_ext_sysref_in (sysref), .rx_sysref_rx_ext_sysref_in (sysref),
.sys_clk_clk (sys_clk), .sys_clk_clk (sys_clk),
.sys_reset_reset_n (sys_resetn), .sys_reset_reset_n (sys_resetn),
.tx_data_tx_serial_data (tx_data), .tx_data_tx_serial_data (tx_data),
.tx_sync_tx_sync (tx_sync), .tx_sync_tx_sync (tx_sync),
.tx_sysref_tx_ext_sysref_in (sysref)); .tx_sysref_tx_ext_sysref_in (sysref),
.gpio_i_export (gpio_i),
.gpio_o_export (gpio_o),
.spi_MISO (spi_miso),
.spi_MOSI (spi_mosi),
.spi_SCLK (spi_clk),
.spi_SS_n ({spi_csn_ad9528, spi_csn_ad9371}));
endmodule endmodule

View File

@ -181,6 +181,30 @@
type = "boolean"; type = "boolean";
} }
} }
element gpio_i
{
datum _sortIndex
{
value = "23";
type = "int";
}
}
element gpio_o
{
datum _sortIndex
{
value = "22";
type = "int";
}
}
element spi
{
datum _sortIndex
{
value = "24";
type = "int";
}
}
element sys_clk element sys_clk
{ {
datum _sortIndex datum _sortIndex
@ -313,6 +337,8 @@
internal="ad9371_gpio.s1" internal="ad9371_gpio.s1"
type="avalon" type="avalon"
dir="end" /> dir="end" />
<interface name="avl_gpio_i" internal="gpio_i.s1" type="avalon" dir="end" />
<interface name="avl_gpio_o" internal="gpio_o.s1" type="avalon" dir="end" />
<interface <interface
name="avl_rx_jesd" name="avl_rx_jesd"
internal="xcvr_rx_core.jesd204_rx_avs" internal="xcvr_rx_core.jesd204_rx_avs"
@ -325,6 +351,11 @@
dir="end" /> dir="end" />
<interface name="avl_rx_os_xcvr" internal="xcvr_rx_os_core.reconfig_avmm" /> <interface name="avl_rx_os_xcvr" internal="xcvr_rx_os_core.reconfig_avmm" />
<interface name="avl_rx_xcvr" internal="xcvr_rx_core.reconfig_avmm" /> <interface name="avl_rx_xcvr" internal="xcvr_rx_core.reconfig_avmm" />
<interface
name="avl_spi"
internal="spi.spi_control_port"
type="avalon"
dir="end" />
<interface <interface
name="avl_tx_jesd" name="avl_tx_jesd"
internal="xcvr_tx_core.jesd204_tx_avs" internal="xcvr_tx_core.jesd204_tx_avs"
@ -404,6 +435,16 @@
internal="axi_os_jesd_xcvr.s_axi" internal="axi_os_jesd_xcvr.s_axi"
type="axi4lite" type="axi4lite"
dir="end" /> dir="end" />
<interface
name="gpio_i"
internal="gpio_i.external_connection"
type="conduit"
dir="end" />
<interface
name="gpio_o"
internal="gpio_o.external_connection"
type="conduit"
dir="end" />
<interface <interface
name="rx_data" name="rx_data"
internal="xcvr_rx_core.rx_serial_data" internal="xcvr_rx_core.rx_serial_data"
@ -434,6 +475,8 @@
internal="axi_jesd_xcvr.if_rx_ext_sysref_in" internal="axi_jesd_xcvr.if_rx_ext_sysref_in"
type="conduit" type="conduit"
dir="end" /> dir="end" />
<interface name="spi" internal="spi.external" type="conduit" dir="end" />
<interface name="spi_irq" internal="spi.irq" type="interrupt" dir="end" />
<interface name="sys_clk" internal="sys_clk.in_clk" type="clock" dir="end" /> <interface name="sys_clk" internal="sys_clk.in_clk" type="clock" dir="end" />
<interface name="sys_rst" internal="sys_rst.in_reset" type="reset" dir="end" /> <interface name="sys_rst" internal="sys_rst.in_reset" type="reset" dir="end" />
<interface <interface
@ -558,6 +601,50 @@
<parameter name="CHANNEL_DATA_WIDTH" value="32" /> <parameter name="CHANNEL_DATA_WIDTH" value="32" />
<parameter name="NUM_OF_CHANNELS" value="4" /> <parameter name="NUM_OF_CHANNELS" value="4" />
</module> </module>
<module name="gpio_i" kind="altera_avalon_pio" version="15.1" enabled="1">
<parameter name="bitClearingEdgeCapReg" value="false" />
<parameter name="bitModifyingOutReg" value="false" />
<parameter name="captureEdge" value="false" />
<parameter name="clockRate" value="50000000" />
<parameter name="direction" value="Input" />
<parameter name="edgeType" value="RISING" />
<parameter name="generateIRQ" value="false" />
<parameter name="irqType" value="LEVEL" />
<parameter name="resetValue" value="0" />
<parameter name="simDoTestBenchWiring" value="false" />
<parameter name="simDrivenValue" value="0" />
<parameter name="width" value="32" />
</module>
<module name="gpio_o" kind="altera_avalon_pio" version="15.1" enabled="1">
<parameter name="bitClearingEdgeCapReg" value="false" />
<parameter name="bitModifyingOutReg" value="true" />
<parameter name="captureEdge" value="false" />
<parameter name="clockRate" value="50000000" />
<parameter name="direction" value="Output" />
<parameter name="edgeType" value="RISING" />
<parameter name="generateIRQ" value="false" />
<parameter name="irqType" value="LEVEL" />
<parameter name="resetValue" value="0" />
<parameter name="simDoTestBenchWiring" value="false" />
<parameter name="simDrivenValue" value="0" />
<parameter name="width" value="32" />
</module>
<module name="spi" kind="altera_avalon_spi" version="15.1" enabled="1">
<parameter name="avalonSpec" value="2.0" />
<parameter name="clockPhase" value="1" />
<parameter name="clockPolarity" value="1" />
<parameter name="dataWidth" value="8" />
<parameter name="disableAvalonFlowControl" value="false" />
<parameter name="inputClockRate" value="50000000" />
<parameter name="insertDelayBetweenSlaveSelectAndSClk" value="false" />
<parameter name="insertSync" value="false" />
<parameter name="lsbOrderedFirst" value="false" />
<parameter name="masterSPI" value="true" />
<parameter name="numberOfSlaves" value="2" />
<parameter name="syncRegDepth" value="2" />
<parameter name="targetClockRate" value="5000000" />
<parameter name="targetSlaveSelectToSClkDelay" value="0.0" />
</module>
<module name="sys_clk" kind="altera_clock_bridge" version="15.1" enabled="1"> <module name="sys_clk" kind="altera_clock_bridge" version="15.1" enabled="1">
<parameter name="DERIVED_CLOCK_RATE" value="0" /> <parameter name="DERIVED_CLOCK_RATE" value="0" />
<parameter name="EXPLICIT_CLOCK_RATE" value="50000000" /> <parameter name="EXPLICIT_CLOCK_RATE" value="50000000" />
@ -1240,6 +1327,9 @@
version="15.1" version="15.1"
start="sys_clk.out_clk" start="sys_clk.out_clk"
end="ad9371_gpio.clk" /> end="ad9371_gpio.clk" />
<connection kind="clock" version="15.1" start="sys_clk.out_clk" end="gpio_o.clk" />
<connection kind="clock" version="15.1" start="sys_clk.out_clk" end="gpio_i.clk" />
<connection kind="clock" version="15.1" start="sys_clk.out_clk" end="spi.clk" />
<connection <connection
kind="clock" kind="clock"
version="15.1" version="15.1"
@ -2134,6 +2224,17 @@
version="15.1" version="15.1"
start="sys_rst.out_reset" start="sys_rst.out_reset"
end="ad9371_gpio.reset" /> end="ad9371_gpio.reset" />
<connection
kind="reset"
version="15.1"
start="sys_rst.out_reset"
end="gpio_o.reset" />
<connection
kind="reset"
version="15.1"
start="sys_rst.out_reset"
end="gpio_i.reset" />
<connection kind="reset" version="15.1" start="sys_rst.out_reset" end="spi.reset" />
<connection <connection
kind="reset" kind="reset"
version="15.1" version="15.1"

View File

@ -311,9 +311,7 @@
dir="end" /> dir="end" />
<interface <interface
name="hps_gpio" name="hps_gpio"
internal="arria10_hps_0.h2f_gp" internal="arria10_hps_0.h2f_gp" />
type="conduit"
dir="end" />
<interface <interface
name="hps_io" name="hps_io"
internal="arria10_hps_0.hps_io" internal="arria10_hps_0.hps_io"
@ -470,7 +468,7 @@
<parameter name="FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM0_SCLK_OUT" value="100" /> <parameter name="FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM0_SCLK_OUT" value="100" />
<parameter name="FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM1_SCLK_OUT" value="100" /> <parameter name="FPGA_PERIPHERAL_OUTPUT_CLOCK_FREQ_SPIM1_SCLK_OUT" value="100" />
<parameter name="GPIO_REF_CLK" value="4" /> <parameter name="GPIO_REF_CLK" value="4" />
<parameter name="GP_Enable" value="true" /> <parameter name="GP_Enable" value="false" />
<parameter name="H2F_AXI_CLOCK_FREQ" value="100" /> <parameter name="H2F_AXI_CLOCK_FREQ" value="100" />
<parameter name="H2F_COLD_RST_Enable" value="false" /> <parameter name="H2F_COLD_RST_Enable" value="false" />
<parameter name="H2F_CTI_CLOCK_FREQ" value="100" /> <parameter name="H2F_CTI_CLOCK_FREQ" value="100" />
@ -1556,7 +1554,7 @@
<parameter name="PIPELINE_RESPONSE" value="1" /> <parameter name="PIPELINE_RESPONSE" value="1" />
<parameter name="SYMBOL_WIDTH" value="8" /> <parameter name="SYMBOL_WIDTH" value="8" />
<parameter name="SYSINFO_ADDR_WIDTH" value="10" /> <parameter name="SYSINFO_ADDR_WIDTH" value="10" />
<parameter name="USE_AUTO_ADDRESS_WIDTH" value="0" /> <parameter name="USE_AUTO_ADDRESS_WIDTH" value="1" />
<parameter name="USE_RESPONSE" value="0" /> <parameter name="USE_RESPONSE" value="0" />
</module> </module>
<module name="sys_rst" kind="altera_reset_bridge" version="15.1" enabled="1"> <module name="sys_rst" kind="altera_reset_bridge" version="15.1" enabled="1">