Lothar Waßmann [Fri, 9 Jan 2015 11:33:40 +0000 (12:33 +0100)]
karo: introduce variables 'safeboot' and 'wdreset'
The environment variable 'safeboot' will be set when <CTRL-C> is
detected early in the boot process.
'wdreset' is set when the last boot cause was a watchdog reset.
This makes it possible to handle these events from the boot scripts.
Lothar Waßmann [Fri, 9 Jan 2015 11:22:56 +0000 (12:22 +0100)]
net: phy: make autonegotiation configurable
Introduce environment variables to configure the use of
ethernet autonegotiation.
The variable names are derived from the ethernet device name
('FEC' for TX51,TX53,TX6; 'FEC0','FEC1' for TX28; 'cpsw' for TX48)
with the suffix '_aneg' appended.
If the '*_aneg' variable is unset or set to a string starting in
'y','t' or '1' autonegotiation will be enabled and the '*_speed' and
'*_duplex' variables have no meaning.
Otherwise autonegotiation is disabled and the link speed and duplex
settings can be configured with the variables: '*_speed' and
'*_duplex' (with '*' replaced with the prefix described above).
Lothar Waßmann [Fri, 9 Jan 2015 11:19:25 +0000 (12:19 +0100)]
karo: config: prevent conversion of numerical value '1' in header files to 'y' by define2mk.sed
The script 'tools/scripts/define2mk.sed' converts all defines with the
value '1' to 'y' to facilitate conditional compilation in Makefiles.
Prepend a '0x' prefix to values of '1' which should be kept as
numbers.
Lothar Waßmann [Fri, 9 Jan 2015 11:15:47 +0000 (12:15 +0100)]
karo: reset fdtaddr to the original value due to prevent overlap with linux kernel
Moving the FDT to low RAM leaves only 28KiB between the FDT start
address and the standard address to which the linux image is unpacked
during boot. Thus the linux kernel will overwrite portions of the FDT
if this is larger than 28KiB (which is already the case for TX6).
Put the FDT at the original address 16MiB from RAM start to prevent
this.
Lothar Waßmann [Fri, 9 Jan 2015 10:49:50 +0000 (11:49 +0100)]
karo: tx48: explicitly call tx48_phy_init()
The .phy_init callback in the cpsw_platform_data which hooks the
tx48_phy_init() function is not being used by the cpsw driver.
Call the function explicitly to make sure the ethernet phy is properly
initialized.
Also make sure the RESET_OUT pin of the TX48 module is activated
as early as possible.
Lothar Waßmann [Fri, 9 Jan 2015 10:49:53 +0000 (11:49 +0100)]
arm: mx6: update temperature calculation code
There are i.MX6 processors where the calibration values for the hot
points are not programmed. Use the temperature calculation code from
Linux kernel to accomodate this.
Lothar Waßmann [Fri, 9 Jan 2015 10:49:51 +0000 (11:49 +0100)]
karo: tx6: change CONFIG_SYS_TEXT_BASE to accomodate boards with less than 256MiB memory
The default address taken from the original Freescale BSP is beyond
256MiB. Thus modules with less than that amount of memory cannot work.
Change the address to be inside the first memory bank for all sensible
memory sizes.
Lothar Waßmann [Fri, 9 Jan 2015 10:49:51 +0000 (11:49 +0100)]
arm: mx6: fix definition of PLL2 PFD frequencies
i.MX6Q and i.MX6DL have different values for the PLL2 PFD0 and PFD1
frequencies. Furthermore the actual value for the PFD2 frequency is
396MHz rather than 400MHz.
karo: tx53: improve workaround for i.MX53 ROM code bug
Due to the alignment of the rel_dyn section to 4KiB has the ill side
effect of interpreting uninitialized data from RAM during relocation
when U-Boot is loaded via network. This may crash U-Boot after
displaying the message 'DRAM: ...'.
Create a dummy section placed after the rel_dyn section to provide the
image size alignment without affecting the size of the rel_dyn
partition.
Use the default value from commit 1375f044d96f "MX28: DMA: Prolong the DMA timeout",
but let users change it depending on the amount of data to be
transferred and the expected data rate.
karo: bootce: add option '-i' to bootce command to init global data struct
Loading a .nb0 image requires the global data struct for WinCe to be
initialized without the parsing of the image file. Calling 'bootce -i'
prior to starting the .nb0 image will do this.
TX28S has only 64MiB SDRAM. With the default loadaddr of 0x43000000
there is only ~8MiB space between ${loadaddr} and the start of U-Boot
in memory. Reduce the loadaddr to leave more space for downloads
without overwriting U-Boot code.
Lothar Waßmann [Mon, 25 Aug 2014 12:35:06 +0000 (14:35 +0200)]
karo: tx48: remove the 'interrupts' property from LTC3589 node for AM335x silicon rev. 0
This silicon rev. has the polarity of the EXTINTn pin inverted
wrt. the spec. with no useable workaround. Remove the 'interrupts'
property from the ltc3589 DT node, so that the LTC driver will operate
in polling mode.
Lothar Waßmann [Thu, 14 Aug 2014 08:11:50 +0000 (10:11 +0200)]
karo: tx53: fix DDR_SEL value
The current value is inappropriate for DDR3.
When adding support for the HW rev. 3 of the TX53 module that has DDR3
instead of DDR2 memory, the values for both memory type were
erroneously swapped, so that after removing DDR2 support lateron, the
wrong value was kept.
Lothar Waßmann [Thu, 14 Aug 2014 12:17:09 +0000 (14:17 +0200)]
karo: tx53: clear persistent bits in lpgr upon boot
Print the contents of the SRTC_LPGR and clear it upon boot.
Also print a warning, if PERSIST_SECONDARY_BOOT is set, meaning that
the processor was booted using the secondary boot image.
Lothar Waßmann [Thu, 14 Aug 2014 11:33:41 +0000 (13:33 +0200)]
karo: tx53: add 'romupdate' command to update the U-Boot image in flash
Implement the romupdate command, that is already in use on TX28 and
TX6.
The command searches for a sufficiently large area without bad blocks
inside the u-boot (or any given other) partition and dynmaically
creates the FCB that is required to boot from flash.
It is also possible to write a redundant image, that will be used if
the first block of the normal image cannot be read due to ECC errors.
Lothar Waßmann [Thu, 14 Aug 2014 12:21:48 +0000 (14:21 +0200)]
karo: tx53: prevent boot failure do to bad blocks inside the U-Boot partition
Currently booting from NAND will fail, if the u-boot partition
contains any bad block, since the image_len in the IVT is set to the
u-boot partition size. Apparently the ROM code has a bug and does not
load the last block of a flash image when the block does not end on a
4KiB boundary. This leads to boot failures or random U-Boot crashes,
because the relocation table is most affected by this bug.
Workaround this by padding the image_len stored in the IVT to the next
4KiB boundary.
Lothar Waßmann [Fri, 8 Aug 2014 08:59:21 +0000 (10:59 +0200)]
karo: tx51: init pad settings for SDRAM and NAND
Make sure the padctrl settings for SDRAM and NAND are explicitly
configured from the DCD after soft reset.
Also reduce the DSE values for NAND and SDRAM control lines to
improve error margins in NAND detection and SDRAM stress test.