summaryrefslogtreecommitdiff
path: root/board/solidrun
AgeCommit message (Collapse)AuthorFilesLines
2021-07-31arm: mvebu: Load U-Boot proper binary in SPL code based on kwbimage headerPali Rohár1-5/+0
Now that proper load and execution addresses are set in v1 kwbimage we can use it for loading and booting U-Boot proper. Use the new spl_parse_board_header() function to implement parsing the kwbimage v1 header. Use information from this header to locate offset and size of the U-Boot proper binary, instead of using the legacy U-Boot header which is prepended to the U-Boot proper binary stored at fixed offset. This has the advantage that we do not need to relay on legacy U-Boot header anymore and therefore U-Boot proper binary can be stored at any offset, as is the case when loading & booting U-Boot proper by BootROM. The CONFIG_SYS_U_BOOT_OFFS option is therefore not used by SPL code anymore. Also allow to compile U-Boot SPL without CONFIG_SPL_SPI_FLASH_SUPPORT, CONFIG_SPL_MMC_SUPPORT or CONFIG_SPL_SATA_SUPPORT set. In this case BootROM is used for loading and executing U-Boot proper. This reduces the size of U-Boot's SPL image. By default these config options are enabled and so BootROM loading is not used. In some cases BootROM reads from SPI NOR at lower speed than U-Boot SPL. So people can decide whether they want to have smaller SPL binary at the cost of slower boot. Therefore dependency on CONFIG_SPL_DM_SPI, CONFIG_SPL_SPI_FLASH_SUPPORT, CONFIG_SPL_SPI_LOAD, CONFIG_SPL_SPI_SUPPORT, CONFIG_SPL_DM_GPIO, CONFIG_SPL_DM_MMC, CONFIG_SPL_GPIO_SUPPORT, CONFIG_SPL_LIBDISK_SUPPORT, CONFIG_SPL_MMC_SUPPORT, CONFIG_SPL_SATA_SUPPORT and CONFIG_SPL_LIBDISK_SUPPORT is changed from strict to related "imply" (which can be selectivelly turned off and causes booting via BootROM). Options CONFIG_SYS_SPI_U_BOOT_OFFS, CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR and CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_DATA_PART_OFFSET have to to be set to zero as they define the location where kwbimage header starts. It is the location where BootROM expects start of the kwbimage from which it reads, parses and executes SPL part. The same applies to option CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR, which has to be set to one. Update all config files to set correct values of these options and set CONFIG_SYS_U_BOOT_OFFS to the correct value - the offset where U-Boot proper starts. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de>
2021-07-15mmc: mmc_get_op_cond: Allow quiet detection of eMMCPali Rohár1-1/+1
Add a new 'quiet' argument to mmc_get_op_cond() function which avoids printing error message when SD/eMMC card is not detected. Espressobin and mx6cuboxi boards use this function for detecting presence of eMMC and therefore it is expected and normal that eMMC does not have to be connected. So error message "Card did not respond to voltage select!" should be skipped in this case as it is not an error. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-08MAINTAINERS: Use my personal e-mail addressFabio Estevam1-1/+1
Use my personal e-mail address for U-Boot related work. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2021-02-26ddr: marvell: a38x: add support for twin-die combined memory deviceMoti Buskila1-0/+1
commit 6285efb8a118940877522c4c07bd7c64569b4f5f upstream. the twin-die combined memory device should be treatened as X8 device and not as X16 one Signed-off-by: Moti Buskila <motib@marvell.com> Reviewed-by: Kostya Porotchkin <kostap@marvell.com> [ - the default value for twin_die_combined is set to NOT_COMBINED for all boards, as this was default behaviour prior this change ] Signed-off-by: Marek Behún <marek.behun@nic.cz> Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass3-0/+3
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-01-27ARM: mvebu: ClearFog make sure that SATA and UART images are buildableDennis Gilmore1-2/+2
SATA and UART ClearFog imaages are not buildable as ENV_SECT_SIZE is not defined set values for both possible targets Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2020-09-24arm: mvebu: clearfog: don't override set fdtfile envBaruch Siach1-0/+3
Only set the fdtfile environment variable when not already set. Fixes: 867572f09ebe6 ("ARM: mvebu: clearfog: run-time selection of DT file") Cc: Joel Johnson <mrjoel@lixil.net> Reported-by: Andre Heider <a.heider@gmail.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Andre Heider <a.heider@gmail.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada1-1/+1
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-23mx6cuboxi: remove unused codeWalter Lozano1-65/+0
After enabling SPL_OF_CONTROL, SPL_DM and SPL_DM_MMC the MMC initialization code is not longer needed. This patch removes the unused code. Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
2020-06-23mx6cuboxi: customize board_boot_order to access eMMCWalter Lozano1-0/+48
In SPL legacy code only one MMC device is created, based on BOOT_CFG register, which can be either SD or eMMC. In this context board_boot_order return always MMC1 when configure to boot from SD/eMMC. After switching to DM both SD and eMMC devices are created based on the information available on DT, but as board_boot_order only returns MMC1 is not possible to boot from eMMC. This patch customizes board_boot_order taking into account BOOT_CFG register to point to correct MMC1 / MMC2 device. Additionally, handle IO mux for the desired boot device. Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
2020-06-22mx6cuboxi: Convert to DM_ETHFabio Estevam1-117/+17
Migration to DM_ETH is mandatory, so convert mx6cuboxi to Ethernet Driver Model. This also brings the benefit of restoring Ethernet functionality. Reported-by: Tom Rini <trini@konsulko.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Tom Rini <trini@konsulko.com>
2020-05-19common: Drop linux/bitops.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass2-0/+2
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19command: Remove the cmd_tbl_t typedefSimon Glass1-0/+1
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop init.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop image.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass2-0/+2
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18arm: Don't include common.h in header filesSimon Glass1-0/+1
It is bad practice to include common.h in other header files since it can bring in any number of superfluous definitions. It implies that some C files don't include it and thus may be missing CONFIG options that are set up by that file. The C files should include these themselves. Update some header files in arch/arm to drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-14arm: mvebu: clearfog: Use Pro DT by defaultJoel Johnson1-1/+1
Switch to explicitly using the Pro variant DT, which has been available since Linux 4.11. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: move ENV params to KconfigJoel Johnson1-0/+8
Migrate the values for ENV_SIZE and ENV_OFFSET into board specific Kconfig defaults so they're more accessible for configuration. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: add SPI offsetsJoel Johnson1-0/+12
Add reasonable default SPI offsets and ENV size when configured to boot from SPI flash. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: Unify DT selection pathsJoel Johnson1-0/+2
Unify the location of DT selection into board_late_init instead of split between detection and static configuration paths. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: Add SATA mode flagsJoel Johnson2-0/+31
The mPCIe slots on ClearFog Pro and ClearFog Base may be alternately configured for SATA usage. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: Add option for 2.5 Gbps SFPJoel Johnson2-0/+12
While newer Linux kernels provide autoconfiguration of SFP, provide an option for setting in U-Boot Kconfig for use prior to booting. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: initial ClearFog Base variantJoel Johnson2-6/+50
Add a unique entry for ClearFog Base variant, reflected in the board name and adjusted SerDes topology. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-04-14arm: mvebu: clearfog: use Pro name by defaultJoel Johnson1-1/+1
Make the board version printed indicate the Pro variant default. Also adjust static name casing to match what is expected for EEPROM product name to share string constants. Signed-off-by: Joel Johnson <mrjoel@lixil.net> Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-21ARM: mvebu: clearfog: add Clearfog Base serdes configurationBaruch Siach1-0/+6
Clearfog Base carrier uses serdes lane #5 as USB host. Use EEPROM stored device identification to configure the serdes accordingly when available. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-21ARM: mvebu: clearfog: add Clearfog GTR supportBaruch Siach1-0/+8
Select the serdes configuration table based on the platform identity read from EEPROM TLV data. Clearfog GTR needs a slightly different serdes configuration. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-21ARM: mvebu: clearfog: run-time selection of DT fileBaruch Siach1-0/+14
Set the kernel device-tree file (fdtfile environment variable) based on run-time detection of the platform. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-21ARM: mvebu: clearfog: print TLV stored product nameBaruch Siach1-1/+10
Use the data from EEPROM TLV to display the board identity. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-21ARM: mvebu: clearfog: read basic TLV dataBaruch Siach4-0/+153
Read RAM die capacity from the EEPROM TLV. Follow the ONIE standard that defines the Vendor Extension entry type for vendor specific data. We have no Private Enterprise Number at the moment as the standard requires. Use the dummy all 0xff value for now. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de>
2020-01-21arm: mvebu: clearfog: enable both DDR clocksBaruch Siach1-1/+4
Enabled both DDR clock signals to support Clearfog variants (currently, Clearfog GTR) that need both clocks. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2020-01-16arm: mvebu: clearfog: update eMMC documentationBaruch Siach1-6/+0
SPL now automatically selects the correct U-Boot image offset for both eMMC and SD card. No need to tweak CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR anymore. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2020-01-07mx6cuboxi: enable OF_CONTROL with DM_MMC and DM_USBBaruch Siach1-47/+72
Make first step in DT/DM migration. Enable OF_CONTROL only for the main U-Boot image for now. Remove mmc_init_main() because board_mmc_init() is not called when DM_MMC is enabled. DM_MMC requires DM_GPIO for card-detect to work. That in turn makes gpio request mandatory. Add code to request/free gpios in platform code. MMC devices are now numbered according to DT. The SD card is 1, and eMMC is 2. Account for that in board_mmc_get_env_dev(), BOOT_TARGET_DEVICES, and has_emmc(). DM_MMC requires BLK. However, the (BLK && !DM_USB) combination disables USB_STORAGE. Enable DM_USB to preserve USB functionality. Add also DM_REGULATORS for the USB power controller. This allows us to drop board_ehci_hcd_init() and setup_usb(). Runtime selection of DT is necessary because of the i.MX6QD vs i.MX6SDL incompatibility. DT selection does not rely on GPIOs, since DM_GPIO depends on DT. Instead, we take one "fully featured" DT of each variant. That should be enough to boot from both SD card and eMMC. Since we don't select the exact DT, override the generic show_board_info() that shows the selected DT 'model' field. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-12-06mx6cuboxi: Add Baruch as maintainerFabio Estevam1-0/+1
Add Baruch Siach as a mx6cuboxi maintainer. Signed-off-by: Fabio Estevam <festevam@gmail.com> Acked-by: Baruch Siach <baruch@tkos.co.il>
2019-12-03common: Move some board functions out of common.hSimon Glass1-0/+1
A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Move env_set() to env.hSimon Glass1-0/+1
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-11arm: mvebu: clearfog: document boot from SATABaruch Siach1-0/+6
Document the main U-Boot image offset when booting from SATA disk on the Clearfog board. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-06-23Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu1-1/+1
Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
2019-04-12arm: mvebu: clearfog: document eMMC installationBaruch Siach1-0/+23
Document build and install of U-Boot image on Clearfog with eMMC. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2019-01-21board: mvebu: drop unused ETH_PHY macro definitionsBaruch Siach1-4/+0
These macros are not used anywhere in the boards code. Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Mario Six <mario.six@gdsys.cc> Cc: Dennis Gilmore <dgilmore@redhat.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
2018-12-08ARM: mvebu: a38x: sync ddr training code with mv_ddr-armada-18.09.02Chris Packham1-1/+1
This syncs drivers/ddr/marvell/a38x/ with the mv_ddr-armada-18.09 branch of https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git. Specifically this syncs with commit 99d772547314 ("Bump mv_ddr to release armada-18.09.2"). The complete log of changes is best obtained from the mv-ddr-marvell.git repository but some relevant highlights are: ddr3: add missing txsdll parameter ddr3: fix tfaw timimg parameter ddr3: fix trrd timimg parameter merge ddr3 topology header file with mv_ddr_topology one mv_ddr: a38x: fix zero memory size scrubbing issue The upstream code is incorporated omitting the portions not relevant to Armada-38x and DDR3. After that a semi-automated step is used to drop unused features with unifdef find drivers/ddr/marvell/a38x/ -name '*.[ch]' | \ xargs unifdef -m -UMV_DDR -UMV_DDR_ATF -UCONFIG_DDR4 \ -UCONFIG_APN806 -UCONFIG_MC_STATIC \ -UCONFIG_MC_STATIC_PRINT -UCONFIG_PHY_STATIC \ -UCONFIG_64BIT -UCONFIG_A3700 -UA3900 -UA80X0 \ -UA70X0 Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-11-20Merge git://git.denx.de/u-boot-marvellTom Rini1-0/+1
- Clearfog GT-8K support added by Baruch / Raheeb - const and sizes cleanup (also in MIPS) from Baruch - Minor cleanup to db-88f6820 from Chris
2018-08-06mvebu: select boot device at SoC levelBaruch Siach1-12/+0
Move the gdsys Controlcenter DC specific build time kwbimage.cfg generation code into the mach-mvebu/ directory to be shared by all 32bit mvebu platforms. Remove board specific kwbimage.cfg files, and use the generated one instead. These files are all identical, with two exceptions. Clearfog and Helios4 use the sdio boot device, whereas all others use spi. Update the defconfigs for the exceptional boards to generate the same kwbimage.cfg as before. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
2018-07-23mx6cuboxi: Use mmc_get_op_cond() to check for an eMMCJon Nettleton1-1/+14
Previously we had just made broad assumptions with which of our boards had an eMMC or not even though this is a manufacturing time assembly option. This takes the guessing away and actually checks for the existence of an eMMC and sets up the has_emmc environment variable. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-07-23mx6cuboxi: Add support for eMMC bootingJon Nettleton1-8/+94
The HB2 boards as well as rev 1.5 soms support eMMC booting as well as SDHC. Add the infrastructure to support booting these devices. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2018-06-18mx6cuboxi: fix 4GB ddr memory detectionJon Nettleton1-2/+44
The soms with 4GB ddr have a rowaddr of 16 not 15, this allows the detection mechanism to properly identify them as 4GB. However these soms can be populated with whatever amount of memory the customer requests therefor we need a ram stride test. We can not use the get_ram_size() function because not all 4GB's of DDR is addressable on a 32-bit architecture. Therefore instead we use a memory stride of 128MB's and look for the address that the memory wraps. This function is used for all som types to catch most memory configurations. This is a revised version of Rabeeh Khoury's original code. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-06-18mx6cuboxi: consolidate board detection and add som revision checkingJon Nettleton1-50/+86
In order to properly detect the board the checks need to be done in a specific order. Move these tests back into a single enum function that will always return the proper the board it is checking. This also adds the best test we have for detecting the rev 1.5 som, and it simplifies the device-tree filename building. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-06-05arm: mvebu: switch clearfog to use device-tree i2c and gpioJon Nettleton1-22/+0
This switches the clearfog boards to use DM based gpio and i2c drivers. The io expanders are configured via their device-tree entries. Signed-off-by: Jon Nettleton <jon@solid-run.com> [baruch: add DT i2c aliases] Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>