Release Contents

See GSRD v13.1 - Release Notes

SoCFPGA Linux kernel

MAL

  1. Location (mach-SoCFPGA)

  2. Supported features

  3. Device tree entries

The SoCFPGA kernel enables SMP by default. Check out the next section to turn off SMP if you need.

Turning off SMP

There are two ways to achieve this.
Changing the kernel command line

The kernel reads a command line at boot time, the command line is a list of arguments that define the behavior of the kernel.

This includes:

  • the speed of the UART console,
  • the NFS settings (when the root file system is mounted over the network)
  • the number of CPU's the kernel can use
The number of CPU's the kernel can use at run time is defined by the command line argument 'maxcpus'.

So, to run the SoCFPGA Linux kernel in Uni-Processor mode, change the kernel command line as follows:
bootargs = "console=ttyS0,115200 maxcpus=1"

The command line can be found in the DTS (device tree source) file. That file is generated with the Device Tree Generator by using the board information XML file. You will need to edit the board configuration XML file, invoke the make utility in the GHRD folder to re-generate the Device Tree Source and compile it into the Device Tree Blob, then put it on the SD Card.

See Device Tree Generator User Guide for more information about the Device Tree Generator.
Changing the kernel configuration

The default !SoCFPGA kernel configuration enables SMP. This can be turned off by editing the configuration (see instructions below).

To modify the kernel configuration, following this procedure:
bitbake -c menuconfig -f virtual/kernel

This will open the configuration menu of the kernel. Turn off the option 'Symmetric Multiprocessing' (under 'Kernel Features'), save the configuration and rebuild the kernel
bitbake -f -c compile virtual/kernel && bitbake -f -c deploy virtual/kernel 

Clock tree

  1. location of the clock tree driver

  2. Features

  3. Device tree entries

Drivers

UART

  1. Location of the driver

    • linux/drivers/tty/serial/8250/8250_dw.c
  2. Integration into the kernel:

    • TTY
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/i2c/i2c-designware.txt
  4. Supported features

    • Unchanged from the community driver
  5. Defconfig settings

    • CONFIG_SERIAL_8250=y
    • CONFIG_SERIAL_8250_CONSOLE=y
    • CONFIG_SERIAL_8250_NR_UARTS=2
    • CONFIG_SERIAL_8250_RUNTIME_UARTS=2
    • CONFIG_SERIAL_8250_DW=y

I2C

  1. Location of the driver

    • linux/drivers/i2c/busses/i2c-designware-core.c
    • linux/drivers/i2c/busses/i2c-designware-core.h
    • linux/drivers/i2c/busses/i2c-designware-pcidrv.c
    • linux/drivers/i2c/busses/i2c-designware-platdrv.c
  2. Integration into the kernel:

    • I2C
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/i2c/i2c-designware.txt
  4. Supported features

    • Added speed setting to device tree.
    • I2C bus on DesignWare adapter.
  5. Defconfig settings

    • CONFIG_I2C=y
    • CONFIG_I2C_DESIGNWARE_CORE=y
    • CONFIG_I2C_DESIGNWARE_PLATFORM=y
    • CONFIG_I2C_CHARDEV=y

LCD

  1. Location of the driver

    • linux/drivers/tty/newhaven_lcd.c
  2. Integration into the kernel:

    • I2C
    • TTY
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/tty/newhaven_lcd.txt
  4. Supported features

    • Supports the Newhaven NHD\x{2010}0216K3Z\x{2010}NSW\x{2010}BBW 2x16 LCD module as i2c slave.
    • Device will show up as /dev/ttyLCD0
    • Use 'printf' to print ('echo' messes up the required control characters).
    • Backspace is supported to the beginning of the current line.
      • i.e. printf '\b' > /dev/ttyLCD0
    • Erase whole display and reset cursor to home:
      • ESC [ 2 J
      • i.e. printf '\e[2J' > /dev/ttyLCD0
    • Erase current line and set cursor to beginning of line.
      • ESC [ 2 K
      • i.e. printf '\e[2K' > /dev/ttyLCD0
    • CR and LF are supported.
      • i.e. printf 'Hello\nlovely people' > /dev/ttyLCD0
    • Vertical scroll when cursor is on bottom line and receive end of line.
  5. Defconfig settings

    • CONFIG_NEWHAVEN_LCD=y

GPIO

  1. Location of the driver

    • linux/drivers/gpio/gpio-dw.c
    • linux/drivers/gpio/gpio-altera.c
  2. Integration into the kernel:

    • GPIO
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/gpio/gpio-altera.txt
  4. Supported features

    • Support Designware gpio and Altera FPGA soft gpio
  5. Defconfig settings

    • CONFIG_GPIOLIB=y
    • CONFIG_GPIO_SYSFS=y
    • CONFIG_GPIO_DW=m
    • CONFIG_GPIO_ALTERA=m

Ethernet

  1. Location of the driver

    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac100.h
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
    • linux/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
    • linux/drivers/net/ethernet/stmicro/stmmac/enh_desc.c
    • linux/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
    • linux/drivers/net/ethernet/stmicro/stmmac/mmc.h
    • linux/drivers/net/ethernet/stmicro/stmmac/norm_desc.c
    • linux/drivers/net/ethernet/stmicro/stmmac/descs_com.h
    • linux/drivers/net/ethernet/stmicro/stmmac/stmmac.h
    • linux/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
    • linux/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
    • linux/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
    • linux/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
  2. Integration into the kernel:

    • NET
    • ETHERNET
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/net/phy.txt
  4. Supported features

    • Mainline DesignWareEthernetdriverplusthesefixes:
      • FogBugz #97997: Fix inifinit interrupt was happening for large files
      • FogBugz #98759: Fix added NFS to kernel to support nfs mount.
  5. Defconfig settings

    • CONFIG_STMMAC_ETH

SD/MMC

  1. Location of the driver

    • linux/drivers/mmc/host/dw_mmc.c
    • linux/drivers/mmc/host/dw_mmc.h
    • linux/drivers/mmc/host/dw_mmc-pltfm.c
    • linux/drivers/mmc/host/dw_mmc-pltfm.h
  2. Integration into the kernel:

    • MMC
  3. Device tree bindings are documented in:

    • linux/Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt
  4. Supported features

    • Mainline DesignWareMMCdriverplusthesefixes:
      • FogBugz #91445: Fix intermittent data starvation for DMA on SD/MMC
      • FogBugz #90657: Fix SD/MMC driver for VT
  5. Defconfig settings

    • CONFIG_MMC=y
    • CONFIG_MMC_DW=y
    • CONFIG_MMC_DW_IDMAC=y

Boot Loader (U-Boot)

MAL

The version of bootloader (U-Boot) for this release is V2013.01.

Below are the features supported for this release:
  1. Support SDMMC boot include write support
  2. Support QSPI boot include write and erase support
  3. Ethernet TFTP support
  4. FPGA programming support
  5. Both instruction and data cache enabled
  6. Support Virtual Platform and Dev Kit
Note:
U-Boot will depend the clock information from the pll_config.h (handoff info provided by tools)
During the exit of Preloader, the watchdog is enabled. Bootloader need to pet or disable the watchdog upon entry.

Drivers

UART

  1. Location of the driver
    u-boot/drivers/serial/ns16550.c
    .
  2. Configuration
    Through macros defined at include/configs/SoCFPGA_cyclone5.h
    CONFIG_SYS_NS16550
    CONFIG_SYS_NS16550_SERIAL
    CONFIG_SYS_NS16550_REG_SIZE
    CONFIG_SYS_NS16550_CLK
    CONFIG_CONS_INDEX 1
    CONFIG_SYS_NS16550_COM1
    CONFIG_SYS_BAUDRATE_TABLE
    CONFIG_BAUDRATE
    .
    Through handoff info provided by tools
    CONFIG_HPS_CLK_L4_SP_HZ (from board/altera/SoCFPGA_cyclone5/pll_config.h)
    .
  3. Supported features
    Standard RS232 communication protocol

Ethernet

  1. Location of the driver
    u-boot/drivers/net/designware.c
    .
  2. Configuration macros
    Through macros defined at include/configs/SoCFPGA_cyclone5.h
    CONFIG_EMAC0_BASE
    CONFIG_EMAC1_BASE
    CONFIG_CMD_NET
    CONFIG_CMD_PING
    CONFIG_CMD_DHCP
    CONFIG_NET_MULTI
    CONFIG_DW_ALTDESCRIPTOR
    CONFIG_EPHY0_PHY_ADDR
    CONFIG_EPHY1_PHY_ADDR
    CONFIG_DW_SEARCH_PHY
    CONFIG_MII
    CONFIG_CMD_MII
    CONFIG_PHY_GIGE
    CONFIG_DW_AUTONEG
    CONFIG_AUTONEG_TIMEOUT
    .
  3. Supported features
    RGMII support

SD/MMC

  1. Location of the driver
    u-boot/drivers/mmc/dw_mmc.c
    .
  2. Configuration macros
    Through macros defined at include/configs/SoCFPGA_cyclone5.h
    CONFIG_MMC
    CONFIG_SDMMC_BASE
    CONFIG_SDMMC_HOST_HS
    CONFIG_GENERIC_MMC
    CONFIG_DW_MMC
    .
    Through handoff info provided by tools
    CONFIG_HPS_CLK_SDMMC_HZ (from board/altera/SoCFPGA_cyclone5/pll_config.h)
    CONFIG_HPS_SDMMC_BUSWIDTH(from board/altera/SoCFPGA_cyclone5/pinmux_config.h)
    .
  3. Supported features
    - Read and write support
    - Support SDHC, SD High Speed (not validated) and MMC (not validated)

QSPI

  1. Location of the driver
    u-boot/drivers/spi/cadence_qspi.c
    u-boot/drivers/spi/cadence_qspi_apb.c
    .
  2. Configuration macros
    Through macros defined at include/configs/SoCFPGA_cyclone5.h
    CONFIG_CADENCE_QSPI
    CONFIG_CQSPI_BASE
    CONFIG_CQSPI_AHB_BASE
    CONFIG_SPI_FLASH
    CONFIG_SPI_FLASH_STMICRO
    CONFIG_SF_DEFAULT_SPEED
    CONFIG_SF_DEFAULT_MODE
    CONFIG_SPI_FLASH_QUAD
    CONFIG_CQSPI_REF_CLK
    CONFIG_CQSPI_PAGE_SIZE
    CONFIG_CQSPI_BLOCK_SIZE
    CONFIG_CQSPI_DECODER
    CONFIG_CQSPI_4BYTE_ADDR

    /* QSPI Delay timing */
    CONFIG_CQSPI_TSHSL_NS
    CONFIG_CQSPI_TSD2D_NS
    CONFIG_CQSPI_TCHSH_NS
    CONFIG_CQSPI_TSLCH_NS
    CONFIG_CQSPI_READDATA_DELAY
    .
    Through handoff info provided by tools
    CONFIG_HPS_CLK_QSPI_HZ (from board/altera/SoCFPGA_cyclone5/pll_config.h)
    .
  3. Supported features
    - Read, write and erase support
    - Quad mode support
    - Support external decoder for chip select

FPGA

  1. Location of the driver
    u-boot/arch/arm/cpu/armv7/SoCFPGA/fpga_manager.c
    .
  2. Configuration macros
    Through macros defined at include/configs/SoCFPGA_cyclone5.h
    CONFIG_FPGA
    CONFIG_FPGA_ALTERA
    CONFIG_FPGA_SoCFPGA
    CONFIG_FPGA_COUNT
    CONFIG_CMD_FPGA
    .
  3. Supported features
    - FPGA programming
    - Support normal and compression FPGA configuration files

Configuration Support

Default configuration

Below are the U-Boot environment's default value. These environments was defined at include/configs/socfpga_cyclone5.h:
axibridge=ffd0501c
axibridge_handoff=0x00000000
baudrate=115200             
bootargs=console=ttyS0,115200
bootcmd=run callscript; run mmcload; run mmcboot
bootdelay=5                                     
bootimage=zImage                                
bootimagesize=0x600000                          
bridge_disable=mw $fpgaintf 0; mw $fpga2sdram 0; mw $axibridge 0; mw $l3remap 0x1; echo fpgaintf; md $fpgaintf 1; echo fpga2sdram; md $1
bridge_enable_handoff=mw $fpgaintf ${fpgaintf_handoff}; mw $fpga2sdram ${fpga2sdram_handoff}; mw $axibridge ${axibridge_handoff}; mw $l1
callscript=if fatload mmc 0:1 $fpgadata $scriptfile;then source $fpgadata; else echo Optional boot script not found. Continuing to boot;
ethact=mii0                                                                                                                             
fdtaddr=0x00000100                                                                                                                      
fdtimage=socfpga.dtb                                                                                                                    
fdtimagesize=0x5000
fpga=0
fpga2sdram=ffc25080
fpga2sdram_handoff=0x00000000
fpgadata=0x2000000
fpgadatasize=0x700000
fpgaintf=ffd08028
fpgaintf_handoff=0x00000000
l3remap=ff800000
l3remap_handoff=0x00000019
loadaddr=0x8000
micrel-ksz9021-clk-skew=0xf0f0
micrel-ksz9021-data-skew=0x0
mmcboot=setenv bootargs console=ttyS0,115200 root=${mmcroot} rw rootwait;bootz ${loadaddr} - ${fdtaddr}
mmcload=mmc rescan;${mmcloadcmd} mmc 0:${mmcloadpart} ${loadaddr} ${bootimage};${mmcloadcmd} mmc 0:${mmcloadpart} ${fdtaddr} ${fdtimage}
mmcloadcmd=fatload
mmcloadpart=1
mmcroot=/dev/mmcblk0p2
netboot=dhcp ${bootimage} ; tftp ${fdtaddr} ${fdtimage} ; run ramboot
qspiboot=setenv bootargs console=ttyS0,115200 root=${qspiroot} rw rootfstype=${qspirootfstype};bootz ${loadaddr} - ${fdtaddr}
qspibootimageaddr=0xa0000
qspifdtaddr=0x50000
qspiload=sf probe ${qspiloadcs};sf read ${loadaddr} ${qspibootimageaddr} ${bootimagesize};sf read ${fdtaddr} ${qspifdtaddr} ${fdtimages;
qspiloadcs=0
qspiroot=/dev/mtdblock1
qspirootfstype=jffs2
ramboot=setenv bootargs console=ttyS0,115200;bootz ${loadaddr} - ${fdtaddr}
scriptfile=u-boot.scr
stderr=serial
stdin=serial
stdout=serial
verify=n

Configuration modifications

You can modify the U-Boot configuration during run time.
To do that, you can use below commands
% env set <environment variable> <value>
% saveenv

Give us your feedback

© 1999-2017 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.