summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-01board: colibri_imx7: avoid using DDR reserved for Cortex-M42015.04-toradex-next2015.04-toradexStefan Agner
Using linux,usable-memory the board code carves out 1MiB of memory for the Cortex-M4 core at the end of the 256MiB block. However, in case a board has 256MiB of memory (Colibri iMX7S), that is the area where U-Boot gets relocated to... Use board_get_usable_ram_top to avoid using that area as relocation target. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-02-01board: colibri_imx7: reserve DDR memory for Cortex-M4Stefan Agner
i.MX 7's Cortex-M4 core can run from DDR and uses DDR memory for the rpmsg communication. Both use cases need a fixed location of memory reserved. For the rpmsg use case the reserved area needs to be in sync with the kernel's hardcoded vring descriptor location. Use the linux,usable-memory property to carve out 1MB of memory in case the M4 core is running. Also make sure that the i.MX 7 specific rpmsg driver does not get loaded in case we do not carve out memory. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-02-01common: fdt_support: Add support for setting usable memorySanchayan Maity
Add support for setting the linux,usable-memory in the memory node of device tree. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-02-01Revert "colibri_imx7: print warning about upcoming NAND change"Stefan Agner
This reverts commit 34fcaeec51fa3f519a13eb8d127abea1853e77e5. If you have this version of U-Boot running, the change we warned about has already been applied. No need to warn anymore. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2018-02-01colibri_imx7: split and resize firmware MTD partitionStefan Agner
Use two separate partitions for the two firmware instances. Also resize them to be of the same size which also makes the start of the UBI partition nicely aligned to 0x400000. In order to detect the new MTD layout and whether we run a U-Boot with the new BCB format or not, introduce a variable called "updlevel" which we can use in update/upgrade scripts. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-11-21cmd_writebcb_mx7: remove errata e9609 specific command writebootStefan Agner
The writeboot command has been used to write the bootloader in a format required by early boot ROM's do to errata e9609 (write 3/4 of a page only). Since U-Boot now writes also BCBs which use the full page, we can use standard U-Boot nand write commands to write the bootloader. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-11-21cmd_writebcb_mx7: create FCB without errata e9609 work-aroundStefan Agner
Create a FCB without work-around for errata e9609. With that FCB in place the firmware can be written using the standard nand write command like: nand write ${loadaddr} u-boot ${filesize} Using sectors_in_firmware{1|2} seems not to make any difference and is also not set on Vybrid, hence do not set it anymore. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-11-21nand: force BBT scan for controllers which need itStefan Agner
Commit 35c204d8a9d0 ("nand: reinstate lazy bad block scanning") introduced lazy BBT scanning. However, some controller do parts of the initialization (mxs_nand.c) during scan_bbt, hence for those controllers the BBT must be scanned at initialization time. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-11-21apalis-tk1: working sd card detect on v1.1 hwApalis_TK1_LinuxImageV2.6.1Beta2_20161122Marcel Ziswiler
Add sd card detect SD1_CD# applicable for V1.1 modules using GPIO_PV2. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: adjust pin muxing for v1.1 hwMarcel Ziswiler
Configure GPIO_PV2 as SD1_CD# according to latest V1.1 HW. Leave SDMMC3_CLK_LB_OUT muxed as SDMMC3 with output driver enabled aka not tristated and input driver enabled as well as it features some magic properties even though the external loopback is disabled and the internal loopback used as per SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1 bits being set to 0xfffd according to the TRM! This pin is now a not-connect on V1.1 HW in order to avoid any interference. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: optional displayport hot-plug detectMarcel Ziswiler
Configure DP_HPD_PFF0 pin as optional DisplayPort hot-plug detect. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: temp alert pull-upMarcel Ziswiler
Pull-up GPIO_PI6 connected to TMP451's ALERT#/THERM2#. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: clean-up as3722 pmic configurationMarcel Ziswiler
Get rid of obsolete non-Jetson configuration options. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: fix device tree pre-fix in dfu alt infoMarcel Ziswiler
Fix device tree pre-fix in DFU_ALT_EMMC_INFO. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
2016-11-21apalis-tk1: remove gpiosDominik Sliwa
Few GPIOs are being used as special function pins and should not be initialized as GPIOs. Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29apalis/colibri_t30: enable emmc boot specific commandsColibri_iMX7_LinuxImageV2.6.1Beta1_20160929Colibri_iMX6_LinuxImageV2.6.1Beta1_20160929Colibri_VF_LinuxImageV2.6.1Beta1_20161001Colibri_T30_LinuxImageV2.6.1Beta1_20160929Colibri_T20_LinuxImageV2.6.1Beta1_20160929Apalis_iMX6_LinuxImageV2.6.1Beta1_20160929Apalis_TK1_LinuxImageV2.6.1Beta1_20160929Apalis_T30_LinuxImageV2.6.1Beta1_20160929Marcel Ziswiler
Enable CONFIG_SUPPORT_EMMC_BOOT to provision for eMMC boot specific U-Boot commands. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29apalis-tk1: fix autoboot not prevented in recovery modeMarcel Ziswiler
Turns out CONFIG_ARCH_MISC_INIT was not defined therefore our arch_misc_init() function was never even called. While at it also enable the previously missing CONFIG_OF_LIBFDT. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29apalis-tk1: add note about non-working gpio initsMarcel Ziswiler
Add a note about the non-working apalis_tk1_gpio_inits table caused by a reservation failure. If it wouldn't be run in SPL without anything ever getting printed one would see the following: A: dir_input: error: gpio A1 not reserved Please note: The current workaround is to configure pull-up/downs in the apalis_tk1_pingrps table further below. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29apalis-tk1: add optional pcie evalboard initialisationMarcel Ziswiler
Implement optional PCIe EvalBoard initialisation which properly reset the PLX (now Avago) PEX 8605 PCIe switch plus PCIe devices on the Apalis Evaluation carrier board. Please note that you will have to enable the second PCIe port in the dts as well e.g.: diff --git a/arch/arm/dts/tegra124-apalis.dts b/arch/arm/dts/tegra124-apalis.dts index 595aae8..841c676 100644 --- a/arch/arm/dts/tegra124-apalis.dts +++ b/arch/arm/dts/tegra124-apalis.dts @@ -42,6 +42,10 @@ vddio-pex-ctl-supply = <&reg_3v3>; avdd-pll-erefe-supply = <&avdd_1v05>; + pci@1,0 { + status = "okay"; + }; + /* I210 Gigabit Ethernet Controller (on-module) */ pci@2,0 { status = "okay"; While at it also get rid of the DECLARE_GLOBAL_DATA_PTR which is probably a remnant of the Apalis T30 board file where we use it to get the memory size. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29apalis/colibri_t30: pull-down multiplexed camera input pins saves 100mWMarcel Ziswiler
Floating pins towards the camera input level-shifter cause it to consume at least 100mW of power even in idle. This patch fixes this by configuring pull-downs on all multiplexed camera input pins. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29toradex: common: add common code which avoids loading environmentStefan Agner
Add common code for i.MX SoC's which avoids loading the environment. This reimplements the functionaltiy lost with ("common: autoboot: do not reset environment") by not loading the environment from the beginning. The main difference will be that dynamically set environment variables such as "soc" in the i.MX 7 case will still be set. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29common: autoboot: do not reset environmentStefan Agner
Do not reset environment when using Serial Downloader. This is problematic for some modules where we set environment variables dynamically during boot (e.g. soc). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29common/board_r: make should_load_env weakStefan Agner
Make should_load_env a weak function. This allows a board to decide whether to load the environment or not. This can be useful when detecting recovery mode to avoid loading hostile environments. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29colibri_imx7: print warning about upcoming NAND changeStefan Agner
We plan to no longer support the work-around for errata e9609 since it does not allow to detect factory bad blocks. Print a warning to prepare customers of the upcoming change. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29configblock: skip over tags marked invalidMax Krummenacher
Skip over data which have the tag flag reporting invalid rather than abort parsing. Break parsing when the first tag id set to 0xffff is encountered or the maximum size of the config block is reached. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29configblock: add Apalis iMX6 Dual 1GB ITMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29board/toradex/apalis_imx6: whitespace fixupMax Krummenacher
Cleanup whitespace found when preparing patches for mainline. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29board/toradex/colibri_imx6: whitespace fixupMax Krummenacher
Cleanup whitespace found when preparing patches for mainline. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29board/toradex/common: whitespace fixupMax Krummenacher
Cleanup whitespace found when preparing patches for mainline. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29cmd_writebcb_mx7: fix skip bad block when writing bootloaderStefan Agner
Correctly skip bad blocks when writing boot loader. Despite this fix U-Boot will generate excessive amount of messages when hitting a bad block: Size of write exceeds partition or device limit However, the command continues to write page by page until writing succeeds. Note that despite the correct bad block skip schema in place, the current FCB uses DISBBM = 1 which seems to disable the skip bad block handling in Boot ROM. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29cmd_writebcb_mx7: parse first firmware offset tooStefan Agner
Use the correct array element for the first firmware offset argument. Due to that bug, so far only the second firmware has been used and set as the offset of the first firmware in the FCB. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29colibri_imx7: disable DCDC2 dischargeStefan Agner
Disable DCDC2 discharge as this leads to higher power consumption when turning off DCDC2 on Colibri iMX7S. This is likely due to backfeeding the DCDC2 through the VFB2 pin. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29colibri_imx7: configure sleep slotsStefan Agner
Configure sleep slots for LDO1 (Ethernet) and ARM CPU rail. This makes sure the rails get disabled when the SoC enters sleep mode. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29configs: Implement and unify use of fdt_fixup across modulesSanchayan Maity
u-boot allows modifying a device tree after it is loaded into memory. Add fdt_fixup hook in u-boot environment which can facilitate such modifications. Signed-off-by: Sanchayan Maity <sanchayan.maity@toradex.com> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-09-29tegra: lcd: video: add mem alloc for bmp colour conversion mapLeonardo Graboski Veiga
While trying to display a BMP image by running the command 'bmp display <address>' the Colibri T30 was getting stuck (while on iMX6, iMX7 and Vybrid it worked). After investigation on what was going wrong, I noticed that the function 'lcd_set_cmap' should get a pointer address for the cmap variable, but the function returned 00000000. After further investigation, I noticed that this value should be held in the structure.member 'panel_info.cmap', which memory was being dynamically allocated in the function 'lcd_ctrl_init' of the file 'drivers/video/sandbox_sdl.c' (which was not being called). After copying the allocation to the same function in the file 'drivers/video/tegra.c', the command 'bmp display' didn't break anymore. The Colibri T20 module was working without the patch, as the module does have valid memory at the address 0, and of course it kept working after the patch now properly allocating memory for it. Signed-off-by: Leonardo Graboski Veiga <leonardo.veiga@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29default environment: remove netdevwait from nfs boot argsMax Krummenacher
netdevwait was used in the 2.6.36 based Vibrante kernel for Colibri T20. None of our kernel trees evaluate that cmdline parameter. So drop it from the nfsargs environment variable. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29colibri_vf: Add board_usb_phy_mode functionSanchayan Maity
Add board_usb_phy_mode function for detecting whether a port is being used as host or client using a GPIO. On Colibri Vybrid we provide GPIO 102 for this very same purpose. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-09-29usb: host: ehci-vf: Implement board_usb_phy_mode weak functionSanchayan Maity
Add board_usb_phy_mode weak function on similar lines to ehci-mx6. However since Vybrid USB does not have a true OTG, make this weak functon just return 0. The function is supposed to be implemented by the individual boards using a GPIO for providing the OTG pin functionality. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-09-29usb: host: ehci-vf: Remove hardcoded USB host client configurationSanchayan Maity
The current ehci-vf USB driver for Vybrid hardcodes the USB host and client functionality. Remove this. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-09-29colibri_imx7: enable OF system setupStefan Agner
This makes sure that the common code passes the Toradex serial number, product id and revision to the device tree. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29nand: extend nand tortureMax Krummenacher
nand torture currently works on exactly one nand block which is specified by giving the byteoffset to the beginning of the block. Extend this by allowing for a second parameter specifying the byte size to be tested. e.g. ==> nand torture 1000000 NAND torture: device 0 offset 0x1000000 size 0x20000 (block size 0x20000) Passed: 1, failed: 0 ==> nand torture 1000000 40000 NAND torture: device 0 offset 0x1000000 size 0x40000 (block size 0x20000) Passed: 2, failed: 0 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com> [scottwood: fix usage to show size as optional, and add misssing braces] Signed-off-by: Scott Wood <oss@buserror.net> (cherry picked from commit 1866be7d28ce807397e4aedd93f70564ac8bebc0)
2016-09-29nand: fix nand torture to use changed mtd apiMax Krummenacher
The mtd subsystem deprecated and renamed the direct use of the mtd_info struct's functionpointers. Instead the corresponding mtd_xxx function should be used. See also: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3c3c10bba1e4ccb75b41442e45c1a072f6cded19 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 667067faa18334f1e28c01b47530b5cce1b6182f)
2016-09-29tools/env: allow negative offsetsStefan Agner
A negative value for the offset is treated as a backwards offset for from the end of the device/partition for block devices. This aligns the behavior of the config file with the syntax of CONFIG_ENV_OFFSET where the functionality has been introduced with commit 5c088ee841f9 ("env_mmc: allow negative CONFIG_ENV_OFFSET"). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29tools/env: complete environment device config earlyStefan Agner
Currently flash_read completes a crucial part of the environment device configuration, the device type (mtd_type). This is rather confusing as flash_io calls flash_read conditionally, and one might think flash_write, which also makes use of mtd_type, gets called before flash_read. But since flash_io is always called with O_RDONLY first, this is not actually the case in reality. However, it is much cleaner to complete and verify the config early in parse_config. This also prepares the code for further extension. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-07-14tools: env: replace WHITESPACE macro by isblankAndreas Fenkart
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com> (cherry picked from commit 10667e15f48613e264a4da78a36bbd7daf5c4ce8)
2016-07-14mx7: cfgblock create: follow renamed soc environment variableMax Krummenacher
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
2016-07-14compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6Tom Rini
Copy these from Linux v4.5-rc6 tag. This is needed so that we can keep up with newer gcc versions. Note that we don't have the uapi/ hierarchy from the kernel so continue to use <linux/types.h> Signed-off-by: Tom Rini <trini@konsulko.com> (cherry picked from commit 9b2c282b348dfe966bbba967dc7a45ce817cce50)
2016-06-28mx7: fix i.MX 7 detection where only MXC_CPU_MX7D was usedColibri_iMX7_LinuxImageV2.6Beta2_20160701Colibri_iMX6_LinuxImageV2.6Beta2_20160701Colibri_VF_LinuxImageV2.6Beta2_20160701Colibri_T30_LinuxImageV2.6Beta2_20160701Colibri_T20_LinuxImageV2.6Beta2_20160701Apalis_iMX6_LinuxImageV2.6Beta2_20160701Apalis_TK1_LinuxImageV2.6Beta2_20160701Apalis_T30_LinuxImageV2.6Beta2_20160701Stefan Agner
The i.MX 7 detection taken from upstream U-Boot adds a new macro MXC_CPU_MX7S. The downstream U-Boot still has one runtime occurence which currently checks for MXC_CPU_MX7D only. Fix this SoC detection to detect MXC_CPU_MX7S too. Note: While the GPT timer is available on i.MX 7, it is currently not configured (CONFIG_GPT_TIMER). Instead, the CPU internal syscounter timer is currently used (CONFIG_SYSCOUNTER_TIMER). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-28mxc_ocotp: simplify codeMax Krummenacher
For mx7 the code needn't make provisions, we can use the simple variant of fuse_bank_physical. Also U-Boot does not allow multi- platform (MX6/MX7) configurations, hence we can use compile time defines which select the simpler variant for MX7 always. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2016-06-28mx7: get_board_rev: simplify codeMax Krummenacher
Remove code which does not change anything. This also synchronizes this function with the upstream variant of it. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>