summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2016-06-28apalis/colibri_t30: vdd core pmic handlingMarcel Ziswiler
Just release TPS65911 GPIO1 (EN_CORE_DVFS_N) connected to TPS62362 VSEL1 to switch VDD_CORE back to boot set 1 defaulting to 1.200V. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-28i.mx 6/7 increase maximum temperature for booting linuxMax Krummenacher
On i.MX 6 and i.MX 7 U-Boot does wait until the measured SOC temperature is below a certain limit. On i.MX 6 this was 80°C, on i.MX7 85°C. Put this consistently to 90°C to allow the extended/industrial temperature rated modules to boot at elevated temperatures. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-06-22apalis/colibri_t30: fix cam_mclk_pcc0 pin muxing being lockedMarcel Ziswiler
Due to an undefined pin muxing function being used for CAM_MCLK_PCC0 that pin got locked and did no more allow for the Linux kernel and/or our GPIOConfig tool to make any further modifications. On Apalis T30 this pin is used as camera master clock CAM1_MCLK which was impossible to do due to it being locked while on Colibri T30 this pin is just multiplexed with the SD/MMC card clock MM_CLK which is tri-stated by default anyway. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22update.sh: make set<media>update self containedMax Krummenacher
'run setupdate' tries a number of update media to find an update script and then sources it. Each media is probed by its own run set<media>update, however if a script is found it is not sourced immediately but this task is delegated to 'run setupdate'. Thus one cannot just do a 'run setethupdate' to only try to update over Ethernet. This also unifies the functionality with Colibri VF and Colibri iMX7 were it has been implemented like this for a while now. While at it use consistently ${loadaddr}. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-06-22colibri_imx7: prepare environment to boot the M4 coreStefan Agner
Create a variable to boot the Cortex-M4 core. By default, the command is not doing anything. Flash a firmware into the UBI volume using: Colibri iMX7 # ubi part ubi Colibri iMX7 # fatload ${interface} 0:1 ${loadaddr} hello_world.bin Colibri iMX7 # ubi write ${loadaddr} m4firmware ${filesize} And set the command to boot the firmware automatically: Colibri iMX7 # setenv m4boot 'ubi read 0x7F8000 m4firmware && bootaux 0x7F8000' Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22net: increase maximum frame size to accomediate VLAN packetsStefan Agner
Ethernet packages with IEEE 802.1Q VLAN support may be up to 1522 bytes long. Increase the default size used to allocate packet storage by 4 bytes. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22apalis-tk1: change (file) names from apalis_tk1 to apalis-tk1Marcel Ziswiler
Change file and other names resp. strings to apalis-tk1 rather than apalis_tk1 due to upstream Linux kernel device tree maintainers no longer allowing any underscores to be used in any such. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22colibri_vf/imx6/7 apalis_imx6: synchronize/improve memory optionsStefan Agner
Synchronize initramfs related configuration options and improve memory layout. The memory layout with an offset of 16MiB allows to boot bigger kernels. With AUTO_ZRELADDR, which is pretty much the standard nowadays, the kernel relacates itself to PC masked with 0xf8000000 plus a text offset of 0x8000 (hence 0x80008000 for Vybrid/i.MX 7 or 0x10008000 for i.MX 6). To avoid that the kernel overwrites itself during uncompress, move the kernel further away from its decompressed location. With a 16MiB offset from the start of memory and a 16MiB distance to the device-tree, we allow kernel up to ~16MiB. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-06-22colibri_imx7: read kernel and device tree from static UBI volumesStefan Agner
With the next release our update scripts write the kernel and device tree in seperate UBI volumes. This allows to use a lot less UBI/UBIFS support in U-Boot, which should lower the risk of hitting bugs in this area. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22colibri_imx7: get rid of obsolete bootaux qspi stuffMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22apalis/colibri_imx6/imx7/vf: white space fixesMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22colibri_imx7: get rid of spurious val6 variableMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22apalis_tk1: fix apalis dap1 hda operationMarcel Ziswiler
Regular HDA mode requires the TK1 SoC being the master to drive the DAP1_BIT_CLK and DAP1_SYNC pins therefore do not tristate their outputs. Further more despite the level shifter direction of those pins being called Shift_CTRL_Dir_In[2] those need to be configured as output for regular HDA mode. Note: If connecting to a I2S codec operating in master mode (e.g. as on our i.MX 6 designs) the later would have to be changed to inputs again. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22colibri_imx7: make use of soc environment variable for dt fileStefan Agner
Use the exact SoC information from the soc environment variable to load the device tree file for the Colibri iMX7S or iMX7D. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22mx7: set soc environment according to exact SoC typeStefan Agner
This can be useful if the same U-Boot binary is used for boards available with a i.MX 7Solo and i.MX 7Dual. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-22colibri_imx7: remove old environmentStefan Agner
Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com>