Commit Graph

42296 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 64b07727fb sysmobts-v2: Allow to remove the WP of the NAND flash
Starting from revision F we need to set nWP before writing to
flash. Create a new NAND command that can be used for that and
use it for fwup, booting and recovery mode. We assume that the
payload runs a RW filesystem so we set the GPIO before booting
the system.

sysmobts: ubifsmount might already write to the nand...

Remove the write protect a lot earlier as ubifsmount might already
try to grow the freshly flashed UBIFS and allocate UBIs for it.

sysmobts: Add a huge sleep to wait for the pin to be driven

Add some margin and wait for the pin to get high and such. I
can't easily measure if we sleep at all or if it is really 100ms
but it can't hurt and we don't optimize for boot times yet.

sysmobts: Toggle nWP on RevG and later as well

sysmobts-v2: ubi part appears to write as well

The ubi part command will write for the same reason. Move the
command line to the front.

(untested)
2017-03-28 15:59:47 +02:00
Holger Hans Peter Freyther 648cc337cd sysmobts_v2: Enable the HW watchdog in the bootloader
We want to deal/detect events like uboot getting stuck in the
ubi/ubifs code. Enable the watchdog feature of u-boot. We need
to start the watchdog once by ourselves and then trigger the
Davinci one. Once we have set the 60s it can not be changed
later on. This requires an updated kernel as well.

Fixes: SYS#374
2017-03-28 15:59:11 +02:00
Holger Hans Peter Freyther 0a964871c7 sysmobts-v2: Change the rootfs partitioning for bigger u-boot
We are flashing multiple copies of the UBL and U-Boot to be more
tolerant for too many bit flips in the early messages.
2017-03-28 15:59:10 +02:00
Alexander Couzens 8c2ff5295c recovery: improve command registration
- Reduce max arguments to 2 (cmd + 1 argument)
- Disable auto-repeat - doing recovery multiple time by enter doesn't makes sense

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-03-28 15:59:10 +02:00
Holger Hans Peter Freyther ef64beafdc sysmobts-v2: Introduce a recovery command to reflash the system image
When pressing the reset button on boot the system will enter the
recovery mode, this is done by setting a preboot command. Inside the
preboot command we will sleep and then check if the button is still
pressed, then tftp will be used to download the image and flash it. If
something fails after the DHCP state the network console will be
enabled.

recovery: Make it possible to force the recovery

For factory flashing it is the easiest if we can force the
recovery process. Parse the "force" from a potential second
argument and then skip the timeout.
2017-03-28 15:59:07 +02:00
Holger Hans Peter Freyther 14b386f1dc sysmobts: Increase FPGA turn-a-round time to help NAND
For the Toshiba NAND chip if both NAND (read) and FPGA CS the
time to switch might not be enough. Wait longer as discussed
by email.
2017-03-28 15:55:04 +02:00
Holger Hans Peter Freyther cea9019e5b sysmobts-v2: UBL is setting the right A1CR values right now
Remove the code to set the A1CR values. UBL is now doing it for all
the flash chips supported by the sysmobts.
2017-03-28 15:54:42 +02:00
Holger Hans Peter Freyther c532cbd899 sysmobts-v2: Correct the DAVINCI_A1CR_VAL8 value 2017-03-28 15:54:32 +02:00
Holger Hans Peter Freyther e75e499d67 sysmobts-v2: Update the mounting of the ubifs root volume
We now need to preifx ubi: to the filesystem to be mounted. This
means some users need to clear the environment. The following command
can be executed to delete the environment:

sysmoBTSv2 > mtdpart default; nand erase.part U-Boot-Environment

You need to clear the environment when you get this. The sysmocom
recovery will clear the environment as well.
UBIFS error (pid 0): ubifs_get_sb: cannot open "sysmobts-v2-rootfs", error -22
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'sysmobts-v2-rootfs' errno=-22!

ubifsmount - mount UBIFS volume
2017-03-28 15:41:47 +02:00
Holger Hans Peter Freyther e0b20eca6f sysmobts-v2: Enable the LED code with the GPIO LED driver.
LED0 is the "RF Active"/Yellow LED on the sysmobts-v2. We are not
using the 'yellow' LED alias as one needs to provide two functions
that call __led_set on led_yellow_on and led_yellow_off. Initialize
the GPIO direction in the board routine as the status_led code will
not be used.
2017-03-28 15:41:47 +02:00
Holger Hans Peter Freyther 8cb5cebedc boot: Enable the option to interrupt the boot with phrase
The serial console might be connected to other equipment,
do not let it interrupt the auto-boot.
2017-03-28 15:41:46 +02:00
Holger Hans Peter Freyther 7fa3734927 sysmobts_v2: Add RevisionD for the sysmoBTSv2 hardware
The only ARM/kernel visible change is the change of the EEPROM. U-Boot
sadly does not support to select EEPROM with different page sizes and
address length. This is why we need to patch the common epprom code.

Introduce a new command to allow dynamic configuration of the EEPROM,
move the eeprom parameters into variables and change the code. This sadly
copies the SPI_X code as well. The address creation could be moved to
a different variable.

This code has been tested on RevC and RevD hardware and an IP address
could be obtained in both cases.

Re-worked for eeprom.c changes and only patched the address code
2017-03-28 15:41:46 +02:00
Holger Hans Peter Freyther 8c0c131d00 sysmobts_v2: Add support for the sysmocom bts version two.
sysmobts-v2: Increase the malloc length to 10MB for ubifs recovery

Sometimes the ubifs can not be recovered and this is due not being
able to allocate enough memory. Increase the RAM size to something
that is hopefully 10MB of RAM.
2017-03-28 15:41:44 +02:00
Holger Hans Peter Freyther 616396f1dc Revert 6678cebc09
For the sysmoBTS we want to easily see the ARM and DSP speed
and the speed of the RAM as well. Invoking bdinfo is annoying
the reason the call was removed is not very clear.

Fixes: SYS#375
2017-03-28 13:59:33 +02:00
Tom Rini d0ffda8ed2 Merge git://git.denx.de/u-boot-dm 2017-03-23 12:19:07 -04:00
Philipp Tomsich 55bc080e79 dtoc: make ScanTree recurse into subnodes
Previously, dtoc could only process the top-level nodes which led to
device nodes in hierarchical trees to be ignored. E.g. the mmc0 node
in the following example would be ignored, as only the soc node was
processed:

  / {
	soc {
		mmc0 {
			/* ... */
		};
	};
  };

This introduces a recursive helper method ScanNode, which is used by
ScanTree to recursively parse the entire tree hierarchy.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-22 07:27:19 -06:00
Jean-Jacques Hiblot b06a381a69 drivers: ti_qspi: use syscon to get the address ctrl_mod_mmap register
We used to get the address of the optionnal ctrl_mod_mmap register as the
third memory range of the "reg" property. the linux driver moved to use a
syscon instead. In order to keep the DTS as close as possible to that of
linux, we move to using a syscon as well.

If SYSCON is not supported, the driver reverts to the old way of getting
the address from the 3rd memory range

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-03-22 07:27:19 -06:00
Jean-Jacques Hiblot 1804044f30 regmap: use fdt address translation
In the DTS, the addresses are defined relative to the parent bus. We need
to translate them to get the address as seen by the CPU core.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-03-22 07:27:19 -06:00
Lokesh Vutla b0d9512ab0 dm: core: Fix Handling of global_data moving in SPL
commit 2f11cd9121 ("dm: core: Handle global_data moving in SPL")
handles relocation of GD in SPL if spl_init() is called before
board_init_r(). So, uclass_root.next need not be initialized always
and accessing uclass_root.next->prev gives an abort. Update the
uclass_root only if it is available.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-22 07:27:19 -06:00
Tom Rini 5877d8f398 Merge branch 'master' of git://git.denx.de/u-boot-mmc 2017-03-21 14:10:15 -04:00
Stefan Roese de0359c21e mmc: xenon_sdhci: Add missing host->max_clk to Xenon SDHCI driver
The Xenon SDHCI driver just missed the integration of this patch:

git ID 6d0e34bf
mmc: sdhci: Distinguish between base clock and maximum peripheral frequency

With this patch applied, the SDHCI subsystem complains now with this warning
while probing:

sdhci_setup_cfg: Hardware doesn't specify base clock frequency

This patch fixes this issue, by providing the missing host->max_clk
variable to the SDHCI subsystem.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Hu Ziji <huziji@marvell.com>
Cc: Victor Gu <xigu@marvell.com>
Cc: Konstantin Porotchkin <kostap@marvell.com>
Cc: Nadav Haklai <nadavh@marvell.com>
Cc: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
2017-03-21 21:06:59 +09:00
Xu Ziyuan 166c2b8fd9 mmc: drop unnecessary send_status request
It's redundant to send cmd13 after cmd9 whose response is not R1b. The
card devices will not be busy w/ cmd9.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
2017-03-21 21:04:17 +09:00
Kevin Liu fa7720b21e mmc: sdhci: only flush cache for data command
No need to flush cache for command without data.

Signed-off-by: Kevin Liu <kevinliu@asrmicro.com>
2017-03-21 21:03:14 +09:00
Felipe Balbi 83b3248e7e mmc: tangier: Add Intel Tangier eMMC/SDHCI driver
This patch adds Intel Tangier eMMC/SDHCI driver.

Intel Tangier SoC contains a hybrid of PCI and non-PCI devices. SDHCI
controller is one of the devices which are *not* on a PCI and, hence,
cannot be enumerated by standard PCI means. This driver, allows for
SDHCI controller on Tangier SoC to work in U-Boot.

Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2017-03-21 21:03:14 +09:00
Felipe Balbi b706b1c24d mmc: pci: Add CONFIG_MMC_PCI
We don't want pci_mmc to compile every time x86 compiles, only when
there's a platform that needs it. For that reason, we're adding a new
CONFIG_MMC_PCI which platforms can choose to enable.

Suggested-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2017-03-21 21:02:18 +09:00
Lokesh Vutla 19c1c700ec configs: am43xx_evm: Enable SPL_DM
Enable SPL_DM on all AM43xx based platforms

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-21 07:17:11 -04:00
Lokesh Vutla 6a59845581 ARM: AM43xx: Enable DM_I2C/SPI/ETH
Enable DM_I2C/SPI/ETH for all AM43XX based boards.
Enable it using imply keyword so that a user can
disable this when not needed.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:16:11 -04:00
Lokesh Vutla edb1297cc5 ARM: dts: am43xx: Add u-boot specific dtsi
Add u-boot specific dtsi for am43xx-gp-evm so
that it will be used for SPL.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:15:58 -04:00
Lokesh Vutla 0a3f407a7f configs: dra7xx_evm: Enable SPL_DM
Enable SPL_DM on all DRA7 based platforms.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:15:57 -04:00
Lokesh Vutla 881e7bccfb configs: am57xx_evm: Enable SPL_DM
Enable SPL_DM on all AM57xx based platforms.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:15:40 -04:00
Lokesh Vutla 954b07e6fb ARM: dts: OMAP5+: Add u-boot specific dtsi
Add u-boot specific dtsi so that this will be
included automatically while building dts.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:15:22 -04:00
Lokesh Vutla 4d451c0082 ARM: OMAP2+: define _image_binary_end to fix SPL_OF_CONTROL
To make SPL_OF_CONTROL work on OMAP2+ SoCs, _image_binary_end must be
defined in the linker script along with CONFIG_SPL_SEPARATE_BSS.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-21 07:15:21 -04:00
Tom Rini cf334edfbb spl: Correct call to spl_common_init() with SPL_STACK_R_MALLOC_SIMPLE_LEN
Calls to IS_ENABLED() on a non-y/n option will always be false, even
when set.  We can correct this by adding a new bool value that is set
based on the conditions required for SPL_STACK_R_MALLOC_SIMPLE_LEN to be
set instead.

Fixes: 340f418acd ("spl: Add spl_early_init()")
Reported-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Changes in v2:
- Fix thinko pointed out by Lokesh
2017-03-21 07:14:17 -04:00
Jon Mason 274bced86d board: ns2: Add support for Broadcom Northstar 2
Add support for the Broadcom Northstar2 SoC and SVK (bcm958712k).  The
BCM5871X is a series of quad-core 64-bit 2GHz ARMv8 Cortex-A57
processors targeting a broad range of networking applications.

Signed-off-by: Jon Mason <jon.mason@broadcom.com>
2017-03-20 18:04:43 -04:00
ahaslam@baylibre.com daa483debe da850: Add instructions to copy AIS image to NAND
Add instructions to write an AIS image to NAND
by using the u-boot nand tools.

Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
2017-03-20 18:04:43 -04:00
Max Filippov e5caec9a86 Pass empty CFLAGS on invocation of libfdt/setup.py
When building u-boot tools in cross-build environment CFLAGS environment
variable set up for target is taken into an account when building code
for host. Make it empty on invocation of python.

This fixes the following build errors when cross-compiling for xtensa:

  cc1: error: unrecognized command line option "-mlongcalls"
  cc1: error: unrecognized command line option "-mauto-litpools"

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 18:04:43 -04:00
George McCollister f4e9ff7135 Kconfig: Don't use RSA_FREESCALE_EXP on IMX
The CAAM in IMX parts doesn't support public key hardware acceleration
(PKHA), so don't use RSA_FREESCALE_EXP. If you try to use it on IMX
(assuming you have the clocks enabled first) you will get back an
"Invalid KEY Command" error since PKHA isn't a valid key destination for
these parts.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 18:04:42 -04:00
Tero Kristo a051a99f0d ARM: am43xx: fix SOC revision print outs
Currently, AM43xx just re-uses the version strings from AM33xx which is
wrong; the actual values for AM43xx are different. Fix this by adding
a separate version string array for AM43xx and use this instead.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Sekhar Nori <nsekhar@ti.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 18:04:42 -04:00
Robert P. J. Day b28c5fcc1c test-fit.py: Minor grammar/spelling/clarification tweaks
* Add note that execution needs Python development package installed
* Standardize on upper case "FIT", "FDT" as necessary for clarity
* Fix "tempoerary", "linex" typos

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2017-03-20 18:04:41 -04:00
Philipp Tomsich e7dd02e377 part_efi: document device-tree binding for part_efi configuration
This adds documentation on the u-boot,efi-partition-entries-offset
property (which overrides CONFIG_EFI_PARTITION_ENTRIES_OFF, if
present).

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-20 18:04:40 -04:00
Philipp Tomsich 399f3afa37 doc: move documentation for /config node into a separate file
This moves the description of the /config node from README.fdt-control
into a separate file doc/device-tree-bindings/config.txt.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-20 18:04:35 -04:00
Philipp Tomsich 02e43537b3 part_efi: support padding between the GPT header and partition entries
Some architectures require their SPL loader at a fixed address within
the first 16KB of the disk. To avoid an overlap with the partition
entries of the EFI partition table, the first safe offset (in bytes,
from the start of the device) for the entries can be set through
CONFIG_EFI_PARTITION_ENTRIES_OFF (via Kconfig)

When formatting a device with an EFI partition table, we may need to
leave a gap between the GPT header (always in LBA 1) and the partition
entries. The GPT header already contains a field to specify the
on-disk location, which has so far always been set to LBA 2. With this
change, a configurable offset will be translated into a LBA address
indicating where to put the entries.

Now also allows an override via device-tree using a config-node (see
doc/device-tree-bindings/config.txt for documentation).

Tested (exporting an internal MMC formatted with this) against Linux,
MacOS X and Windows.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: __maybe_unused on config_offset to avoid warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-03-20 18:04:18 -04:00
Roger Quadros ee6fdfadaa net: don't override ethernet address environment
If the ethernet address environment is set with a valid
ethernet address prevent overriding it as it is most likely
set by the user and he/she doesn't want board code to
automatically override it whatsoever.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:57:16 -04:00
Roger Quadros 752a8311e9 ARM: k2g: setup PRU ethernet MAC addresses
PRU ethernet MAC address range is present in the
board EEPROM. Parse it and setup eth?addr
environment variables.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:57:15 -04:00
Roger Quadros 66e04fb503 ARM: Use Kconfig for board EEPROM's I2C bus and chip address
In stead of defining the board EEPROM address in the board headers
let's define them in the board config files and make them
configurable by Kconfig.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:57:15 -04:00
Nishanth Menon fcb185244b board: ti: am57xx-idk: Auto detect LCD Panel
AM571x IDK and AM572x IDK have optional LCD Kits that can be purchased.
These can be one of OSD101T2045 or the newer OSD101T2587. The LCD panel
itself has no registers that can be used to identify the panel, however,
the touchscreen controllers on the panels are different.

Hence to ease user experience, we can use the touch screen controller's
ID information to detect what kind of panel we use and select the
appropriate kernel dtb for the platform configuration.

NOTE: AM572x IDK default configuration is for LCD Connectivity, however
the AM571x IDK has a jumper (J51) that needs to be mounted for the IDK
to operate with LCD (Vs two PRUSS ethernet port option).

Touchscreen ID information is documented in:
http://www.osddisplays.com/TI/OSD101T2587-53TS_A.1.pdf

Acked-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:56:22 -04:00
Roger Quadros 629101294f board: ti: am571x-idk: Update pinmux for ICSS2 Ethernet
Use the same convention that was used for ICSS1 Ethernet
- If pin is output, set as PIN_OUTPUT
- If pin is input and external pull resistor present set as PIN_INPUT
- If pin is input and external pull resistor absent, set pull to same
as that of the external PHY's internall pull.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-20 17:56:22 -04:00
Roger Quadros 376110525e board: ti: am571x-idk: Support 6 port Ethernet or 4 port Ethernet with LCD
The board can support either ICSS1 Ethernet ports or LCD
based on J51 jumper. Factory default is ICSS1 Ethernet ports
(i.e. Jumper not populated).

Use the GPIO to detect the jumper setting and configure the
pinmux accordingly. Also select the right DT blob based on
the chosen configuration.

J51 absent -> ICSS1 Ethernet, no LCD on VOUT -> am571x-idk.dtb
J51 present -> LCD on VOUT, no ICSS1 Ethernet -> am571x-idk-lcd-osd.dtb

At present we only support the assume it is the Legacy LCD.
LCD detection mechanism needs to be added later to differentiate
between legacy vs new LCD.

For ICSS1 Ethernet pins use the following convention to set the pinmux
as PMT data is not yet finalized.

- If pin is output, set as PIN_OUTPUT
- If pin is input and external pull resistor present set as PIN_INPUT
- If pin is input and external pull resistor absent, set pull to same
as that of the external PHY's internall pull.
- Do not use SLEW_CONTROLon any pin.

Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2017-03-20 17:56:22 -04:00
Roger Quadros 38f719ea5e ti: common: board_detect: commodify ethaddr environment setting code
Keystone and OMAP platforms will need this to set ethernet
MAC addresses from board EEPROM.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:56:22 -04:00
Franklin S Cooper Jr a4562d0640 ti_armv7_keystone2: Define scratch space in SRAM
Scratch space can be used for features such as board detection. Define
an area within SRAM that can be used for this purpose.

[rogerq@ti.com] Rename EEPROM macro

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
2017-03-20 17:56:22 -04:00