Commit Graph

5392 Commits

Author SHA1 Message Date
enjoy-digital 011773af8d
Merge pull request #435 from enjoy-digital/spi_master_clk_divider
soc/core/spi: add Clk Divider CSR (defaults to sys_clk_freq/spi_clk_f…
2020-03-21 09:25:37 +01:00
rob-ng15 2bf31a31da
Reclock spi sdcard access after initialisation
Depends upon https://github.com/enjoy-digital/litex/pull/435

After initialising the card, reclock the card, aiming for ~16MHz (divider is rounded up, as slower speed is safer), but a maximum of half of the processor speed.

Tested with the card being clocked to 12.5MHz on de10nano
2020-03-21 07:37:21 +00:00
Florent Kermarrec f03d862c06 targets: switch to add_ethernet method instead of EthernetSoC. 2020-03-20 23:46:15 +01:00
Florent Kermarrec 4e9a8ffe9c targets: switch to SoCCore/add_sdram instead of SoCSDRAM. 2020-03-20 22:02:36 +01:00
Florent Kermarrec 61c9e54a90 soc/core/spi: add Clk Divider CSR (defaults to sys_clk_freq/spi_clk_freq). 2020-03-20 19:49:42 +01:00
Florent Kermarrec dd7718b4fe targets/arty: use new ISERDESE2 MEMORY mode. 2020-03-20 18:58:31 +01:00
Florent Kermarrec fca52d110d Merge branch 'master' of http://github.com/enjoy-digital/litex 2020-03-20 18:54:51 +01:00
enjoy-digital 0f35664839
Merge pull request #434 from rob-ng15/master
Use <stdint.h> to provide structure sizes
2020-03-20 18:05:21 +01:00
rob-ng15 f3c233776e
Use <stdint.h> to provide structure sizes 2020-03-20 11:35:05 +00:00
rob-ng15 c2ebbcbf6c
Use <stdint.h> for structure sizes 2020-03-20 11:34:24 +00:00
Florent Kermarrec ccf7363932 integration/soc: add add_spi_flash method to add SPI Flash support to the SoC. 2020-03-20 10:24:31 +01:00
Florent Kermarrec ec3e068669 targets/nexys4ddr: use LiteXSoC's add_spi_sdcard method. 2020-03-20 09:58:09 +01:00
Florent Kermarrec d276036f24 integration/soc: add add_spi_sdcard method to add SPI mode SDCard support to the SoC. 2020-03-20 09:57:37 +01:00
enjoy-digital 6044570928
Merge pull request #433 from gsomlo/gls-rocket-spisdcard
Support SPI-mode SDCard booting on Litex+Rocket (64bit) configuration
2020-03-20 09:41:56 +01:00
Gabriel Somlo b960d7c574 targets/nexys4ddr: add '--with-spi-sdcard' build option 2020-03-19 21:51:44 -04:00
Gabriel Somlo 7a7b8905b7 platforms/nexys4ddr: add spisdcard pins.
Synchronize with litex-boards commit #57bcadb.
2020-03-19 21:51:44 -04:00
Gabriel Somlo af4de03fad targets/nexys4ddr: make sdcard reset conditional 2020-03-19 21:51:44 -04:00
Gabriel Somlo a33916bc6b software/libbase/spisdcard: fix 4-byte FAT fields on 64-bit CPUs
On 64-bit architectures (e.g., Rocket), 'unsigned long' means
eight (not four) bytes. Use 'unsigned int' wherever a FAT data
structure requires a four-byte field!

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-03-19 21:51:44 -04:00
Sean Cross fbadfa1764
Merge pull request #432 from esden/csr-doc-fix-int
Don't let python convert lane number to float.
2020-03-20 09:20:02 +08:00
Piotr Esden-Tempski 279886721b Don't let python convert lane number to float.
While at it also:
* Don't multilane for reg >= 8 bit width.
* Only check if we should switch to multilane after finding min field width.
2020-03-19 18:12:41 -07:00
Gabriel Somlo 1f90abea8e bios: make SPI SDCard boot configs other than linux-on-litex-vexriscv
When NOT on linux-on-litex-vexriscv, we load 'boot.bin' to MAIN_RAM_BASE,
and jump to it.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-03-19 19:37:47 -04:00
Gabriel Somlo c2938dc973 bios/boot.c: cosmetic: re-indent spisdcardboot() for consistency 2020-03-19 19:37:47 -04:00
enjoy-digital dd07a0ad2f
Merge pull request #431 from antmicro/hybrid-mac
litex_sim: add support for hybrid mac
2020-03-19 22:10:33 +01:00
Florent Kermarrec 37f25ed37a software/libbase/bios: rename spi.c/h to spisdcard.h, also rename functions. 2020-03-19 11:02:15 +01:00
Florent Kermarrec 939256340f software/bios/main: revert USDDRPHY_DEBUG (merge issue with SPI SD CARD PR). 2020-03-19 10:47:28 +01:00
enjoy-digital 8fe9e72f7b
Merge pull request #429 from rob-ng15/master
SPI hardware bitbanging from SD CARD
2020-03-19 10:41:09 +01:00
Piotr Binkowski 96a265a408 litex_sim: add support for hybrid mac 2020-03-19 10:04:08 +01:00
enjoy-digital 9e1cd84296
Merge pull request #430 from gsomlo/gls-sdclk-stub
bios/sdcard: provide sdclk_set_clk() stub for clocker-less targets
2020-03-19 09:05:02 +01:00
Gabriel Somlo b2103f4ad8 bios/sdcard: provide sdclk_set_clk() stub for clocker-less targets
Targets which lack an adjustable clocker will not expose the required
registers. Provide a stub sdclk_set_clk() routine for those situations.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
2020-03-18 15:11:23 -04:00
Florent Kermarrec e865162904 platforms/kcu105: fix pcie tx0 p/n swap. 2020-03-18 19:05:54 +01:00
rob-ng15 27720409ce
SPI hardware bitbanging from SD CARD 2020-03-17 09:51:11 +00:00
rob-ng15 d45dda731a
SPI hardware bitbanging from SD CARD 2020-03-17 09:50:45 +00:00
rob-ng15 50b6db6a6b
SPI hardware bitbanging from SD CARD 2020-03-17 09:50:16 +00:00
Florent Kermarrec 2c4b89639f soc/cores/clock: make sure specific clkoutn_divide_range is only used as a fallback solution. 2020-03-16 11:44:39 +01:00
Sean Cross 536ae0e619
Merge pull request #425 from esden/csr-cod-split-reg
Make CSR documentation diagrams, with more than 8 bits, be split into multiple lanes.
2020-03-14 18:08:24 +08:00
Piotr Esden-Tempski 57576fa8fc Add bit more logic to decide when to switch to multilane CSR documentation.
Now we only generate multilane bitfield documentation when the CSR has
fields, and the smallest field is less than 8bit long. As this is when
we start running into space problems with the field names.
2020-03-13 14:48:56 -07:00
Piotr Esden-Tempski dda7a8c5f3 Split CSR documentation diagrams with more than 8 bits into multiple lanes.
In cases when each CSR bit has a name and we use CSR with more than 8
bits, the register diagram quickly becomes crowded and hard to read.

With this patch we split the register into multiple lanes of 8 bits
each.
2020-03-13 14:48:23 -07:00
enjoy-digital c0f067c3cf
Merge pull request #427 from enjoy-digital/s7mmcm_fractional_divide
cores/clock: simplify Fractional Divide support on S7MMCM.
2020-03-13 18:06:23 +01:00
Florent Kermarrec aec1bfbeb4 cores/clock: simplify Fractional Divide support on S7MMCM.
Specific clkoutn_divide_range can now be provided by specialized XilinxClocking classes.
When provided, the specific range will be used. Floats are also now supported in the
range definition/iteration.
2020-03-13 15:56:39 +01:00
enjoy-digital f34593a17d
Merge pull request #421 from betrusted-io/clk0_fractional
add fractional division options to clk0 config on PLL
2020-03-13 14:15:24 +01:00
Florent Kermarrec eb9f54b2bc test: add initial (minimal) test for clock abstraction modules.
Also fix divclk_divide_range on S6DCM.
2020-03-13 12:38:23 +01:00
Florent Kermarrec c304c4db27 targets/icebreaker: add description of the board, link to crowdsupply campagin and to the more complete example. 2020-03-13 09:37:42 +01:00
Sean Cross b5bddc2332
Merge pull request #426 from esden/update-wavedrom
Updating the vendored wavedrom js files.
2020-03-13 13:44:13 +08:00
Piotr Esden-Tempski d063acb767 Updating the vendored wavedrom js files. 2020-03-12 22:35:04 -07:00
Florent Kermarrec a27385a79c soc/intergration: rename mr_memory_x parameter to memory_x. 2020-03-12 12:20:48 +01:00
enjoy-digital d5da9e0df4
Merge pull request #424 from esden/generate-memory-x
Add --mr-memory-x parameter to generate memory regions memory.x file
2020-03-12 12:12:48 +01:00
Piotr Esden-Tempski 4d02263223 Add --mr-memory-x parameter to generate memory regions memory.x file.
This file is used by rust embedded target pacs.
2020-03-11 18:12:18 -07:00
Florent Kermarrec e9f0ff68ce Merge branch 'master' of http://github.com/enjoy-digital/litex 2020-03-11 12:57:29 +01:00
Florent Kermarrec 979f98ea31 software: revert LTO changes (Disable it).
It seems LTO is not yet fully working with all configurations, so it's better
reverting the changes for now.
- cause issues with LM32 available compilers.
- seems to cause issues with min/lite variant of VexRiscv.
- seems to cause issues with some litex-buildenv configurations. (see https://github.com/enjoy-digital/litex/issues/417).
2020-03-11 12:57:00 +01:00
Sean Cross 01b6969375
Merge pull request #422 from xobs/core-doc-fixes
Core doc fixes
2020-03-11 19:38:42 +08:00