Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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)
|
|
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)
|
|
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>
|
|
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>
|
|
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
(cherry picked from commit 10667e15f48613e264a4da78a36bbd7daf5c4ce8)
|
|
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Stefan Agner <stefan.agner@toradex.com>
|
|
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)
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
'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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
To properly reset a Colibri iMX7 the PMIC reset capabilities need
to be used.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
The command usb reset potentially requires to deregister USB keyboards,
hence enable it if USB Keyboards are enabled.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
The i.MX 7Solo only has one USB controller. Do not enable USB_PEN
but return a -ENODEV return code instead. This allows "usb start"
to work properly on Colibri iMX7S modules.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
There could be runtime determined board specific reason why a EHCI
initialization fails (e.g. ENODEV if a Port is not available). In
this case, properly return the error code.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
Read the number of cores in the fuses to distinguish between
the dual and solo versions.
Tested on a mx7d sabresd and on a mx7solo warp7.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e25a0656bac63c5fcd20ef4313dc09c409fc512d)
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
The management data input/output (MDIO) requires open-drain,
i.MX7D TO1.0 ENET MDIO pin has no open drain, but TO1.1 supports
this feature. So to TO1.1, need to enable open drain by setting
bits GPR0[8:7] for TO1.1.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
|
|
Enabled RDC (resource domain controller) to isolate peripherals between
the A7(s) and M4 core.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
In current design, if any peripheral was assigned to both A7 and M4,
it will receive ipg_stop or ipg_wait when any of the 2 platforms
enter low power mode. We will have a risk that, if A7 enter wait,
M4 enter stop, peripheral will have chance to get ipg_stop and ipg_wait
asserted same time.
There are 26 peripherals impacted by this IC issue:
SIM2(sim2/emvsim2)
SIM1(sim1/emvsim1)
UART1/UART2/UART3/UART4/UART5/UART6/UART7
SAI1/SAI2/SAI3
WDOG1/WDOG2/WDOG3/WDOG4
GPT1/GPT2/GPT3/GPT4
PWM1/PWM2/PWM3/PWM4
ENET1/ENET2
Software Workaround:
The solution is set M4 to a different domain with A core.
So the peripherals are not shared by them. This way requires
the uboot implemented the RDC driver and set the 26 IPs above to domain 0 only.
CM4 image will set the M4 to domain 1 only.
This patch enables the CONFIG_MXC_RDC for mx7d SABRESD board and ARM2 boards, and
setup the 26 IP resources to domain 0.
Signed-off-by: Ye.Li <B37916@freescale.com>
|
|
Add the peripherals/masters definitions and registers base addresses
for mx7d RDC. Enable the RDC driver by setting CONFIG_MXC_RDC.
Signed-off-by: Ye.Li <B37916@freescale.com>
|
|
We can rely on finish bit for temperature reading for TO1.1.
Also introduce CHIP_REV_xx macros for 7D.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
|
|
i.MX7D TO1.1 changes DDR retension mode control to IOMUXC_GPR,
add support to this change for LPSR which needs to exit from
DDR retension mode.
Signed-off-by: Anson Huang <Anson.Huang@freescale.com>
|
|
U-Boot on Apalis iMX6 has a known problem:
Apparently Apalis iMX6 does not works with Gigabit switches...
Limiting speed to 10/100Mbps, and setting master mode, seems to
be the only way to have a successful PHY auto negotiation.
How to fix: Understand why Linux kernel do not have this issue.
However, the current work around did not take effect since the
generic phy config function (which gets called after the board
level work-around) reenabled gigabit advertisment again.
Use the newly introduced environment variable to disable gigabit
Ethernet advertisement.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
|