Commit Graph

10154 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
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 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 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
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
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
Lokesh Vutla 639892867a ti: common: board_detect: Rename EEPROM scratch start macro
Non OMAP platforms i.e. Keystone will also need to use the board
EEPROM helpers so let's make the macro platform independent.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-03-20 17:56:22 -04:00
Jean-Jacques Hiblot d5abcf94c7 ti: boot: Register the MMC controllers in SPL in the same way as in u-boot
To keep a consistent MMC device mapping in SPL and in u-boot, let's
register the MMC controllers the same way in u-boot and in the SPL.
In terms of boot time, it doesn't hurt to register more controllers than
needed because the MMC device is initialized only prior being accessed for
the first time.
Having the same device mapping in SPL and u-boot allows us to use the
environment in SPL whatever the MMC boot device.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2017-03-19 22:17:14 -04:00
Tom Rini 02ccab1908 Merge branch 'master' of git://www.denx.de/git/u-boot-imx
Signed-off-by: Tom Rini <trini@konsulko.com>

Conflicts:
	configs/bk4r1_defconfig
	configs/colibri_vf_defconfig
	configs/pcm052_defconfig
	include/configs/colibri_vf.h
	include/configs/pcm052.h
2017-03-19 15:13:38 -04:00
Tim Harvey d883fcc6bb imx: ventana: add EMMC configuration
Prepare for boards with EMMC instead of NAND flash

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2017-03-19 17:39:59 +01:00
Stefan Agner 7966b43778 ARM: vf610: move to standard arch/board approach
Move Freescale/NXP Vybrid to a standard arch/board approach, similar
to what has been done to i.MX 6 earlier in commit 89ebc82137 ("ARM:
mx6: move to a standard arch/board approach").

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19 17:30:11 +01:00
Tim Harvey f3a8546b8f imx: ventana: make SD3_VSELECT board specific
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:30:07 +01:00
Tim Harvey f938500f2c imx: ventana: make OTG VBUS power enable board specific
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:30:03 +01:00
Tim Harvey db1964cad7 imx: ventana: fix hwconfig
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:29:58 +01:00
Tim Harvey 095968f1b1 imx: ventana: change name of rs232_en to indicate polarity
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:29:54 +01:00
Tim Harvey 65da5c3b65 imx: ventana: move mmc_init to common
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:29:46 +01:00
Tim Harvey ad68d7b88e imx: ventana: add additional DRAM configurations
- 64bit 8gB density (4GiB) IMX6DQ
- 64bit 4gB density (2GiB) IMX6SDL

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Stefano Babic <sbabic@denx.de>
2017-03-19 17:29:37 +01:00
Stefan Agner 640957042d colibri_imx7: use device-tree for MTD partitions
Use device-tree fixup to communicate the MTD partitions to the
kernel. Remove mtdparts from the kernel command line.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19 17:29:28 +01:00
Stefan Agner 05ed964d75 colibri_imx7: setup PMIC sleep mode configuration
Disable 3.3V Ethernet and ARM rail when entering sleep mode.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19 17:29:24 +01:00
Stefan Agner 5a986dfeef colibri_imx7: implement board level USB PHY mode
Implement board level USB PHY mode callback. On USB OTG Port 1
the Colibri standard foresees GPIO USBC_DET to decide whether the
port should run in Host or Device mode.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2017-03-19 17:29:20 +01:00
Sébastien Szymanski 77f29293f1 arm: i.MX6UL: add Armadeus Systems OPOS6UL SoM and OPOS6ULDev carrier board
OPOS6UL is an i.MX6UL based SoM with 256MB RAM, 4GB eMMC and an ethernet
phy. OPOS6ULDev is carrier board for the OPOS6UL.

U-Boot SPL 2017.03-rc3-00002-g5085c26 (Mar 07 2017 - 09:48:09)
Trying to boot from MMC1

U-Boot 2017.03-rc3-00002-g5085c26 (Mar 07 2017 - 09:48:09 +0100)

CPU:   Freescale i.MX6UL rev1.0 528 MHz (running at 396 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 40C
Reset cause: POR
Model: Armadeus Systems OPOS6UL SoM on OPOS6ULDev board
DRAM:  256 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Video: 800x480x18
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-19 17:28:09 +01:00
Tom Rini f9515756b6 Merge git://git.denx.de/u-boot-rockchip
This includes support for rk3188 from Heiko Stübner and and rk3328 from
Kever Yang.  Also included is SPL support for rk3399 and a fix for
rk3288 to get it booting again (spl_early_init()).
2017-03-17 14:15:17 -04:00
Vikas Manocha e245f1a5db ARM: DT: stm32f7: add qspi pin contol node
It also removes the qspi pin configuration done during the
board initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-03-17 14:15:16 -04:00
Vikas Manocha c428a95833 ARM: DT: stm32f7: add ethernet pin contol node
It also removes the ethernet pin configuration done during the board
initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-03-17 14:15:16 -04:00
Vikas Manocha e34e19feb7 ARM: DT: stm32f7: add pin control node for serial port pins
And remove the uart pin configuration from board initialization.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-03-17 14:15:15 -04:00
Vikas Manocha b5be8f5ea8 stm32f7: clk: remove usart1 clock enable from board init
Before clock driver availability it was required to enable usart1 clock
for serial init but now with clock driver is taking care of usart1 clock.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
2017-03-17 14:15:14 -04:00
Vikas Manocha 42bf5e7c27 serial: stm32f7: add device tree support
This patch adds device tree support for stm32f7 serial driver & removes serial
platform data structure.

Signed-off-by: Vikas Manocha <vikas.manocha@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2017-03-17 14:15:12 -04:00
Markus Niebel 468fb1e4df arm: imx6: tqma6: add support for TQMa6DL variant
This adds support for TQMa6DL using i.MX6DL and 1GiB DRAM
Since The module will use the same devicetree, we patch
the ram size in ft_board_setup.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel d4b349e41b arm: imx6: tqma6: use CONFIG_TQM6x for SOM specific settings
We have a Kconfig name for the module types. Let's Use it.
Some feature selections and configurations are based on the
module. Module selection selects the CPU type.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Jagan Teki 2ea79a98c4 i.MX6Q: isiot: Switch the mmc env based on devno
Add board_mmc_get_env_dev

Switch the mmc env based on the mmc devno, instead of separately
defining a config item in include/configs using board_mmc_get_env_dev
- devno 0: sd/esd
- devno 1: mmc/emmc

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-03-17 09:27:08 +01:00
Jagan Teki d98fd1323c i.MX6Q: icorem6_rqs: Add mmc_late_init
Let the runtime code can set the mmcdev and mmcroot based
on the devno using mmc_get_env_dev instead of defining
separately in build-time configs using mmc_late_init func.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-03-17 09:27:08 +01:00
Jagan Teki 8c998a85a3 i.MX6Q: icorem6_rqs: Add modeboot env via board_late_init
Add runtime, modeboot env which is setting mmcboot based
on the bootdevice so-that conditional macros for MMC via
CONFIG_BOOTCOMMAND should be avoided in config files.

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-03-17 09:27:08 +01:00
Jagan Teki ffa11c3381 imx6: icorem6_rqs: Add eMMC boot support
Boot from eMMC:
--------------
U-Boot SPL 2017.01-00318-g8e243f8 (Jan 26 2017 - 11:53:21)
Trying to boot from MMC2

U-Boot 2017.01-00318-g8e243f8 (Jan 26 2017 - 11:53:21 +0100)

CPU:   Freescale i.MX6D rev1.2 at 792 MHz
Reset cause: POR
Model: Engicam i.CoreM6 Quad/Dual RQS Starter Kit
DRAM:  512 MiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
switch to partitions #0, OK
mmc1(part 0) is current device
Net:   No ethernet found.
Hit any key to stop autoboot:  0
Booting from mmc ...
switch to partitions #0, OK
mmc1(part 0) is current device

Cc: Stefano Babic <sbabic@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>
Cc: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
2017-03-17 09:27:08 +01:00
Markus Niebel 4ba811760a mx6: tqma6: clear enet clk sel for mba6
we have external ref clock from phy.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel d5fa17e6fa imx6: tqma6: adjust ethernet phy reset delay
fix the reset delay which was to short

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel e8548f820e imx6: tqma6: disable spi CS unused in U-Boot
Since the CS are not in use, do not map them. User of starterkit
mainboard is free to use them otherwise. When using these pins later
in the OS for instance as GPIO IRQ pin, they need to be input.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel 03cfff0e48 imx6: tqma6: use lower driver stength for I2C pins
The current driver stength is too high, leading to spec violations
on the falling edge. Fix it with values from HW

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00
Markus Niebel d7d8e8e413 imx6: tqma6: implement power_init_board
PMIC implements proper I2C bus switching,
implement power_init_board instead handling in
board_late_init.

Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
2017-03-17 09:27:08 +01:00