03 Dec, 2019
2 commits
-
A number of board function belong in init.h with the others. Move them.
Signed-off-by: Simon Glass
Reviewed-by: Tom Rini -
Drop inclusion of crc.h in common.h and use the correct header directly
instead.With this we can drop the conflicting definition in fw_env.h and rely on
the crc.h header, which is already included.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini
12 Aug, 2019
3 commits
-
This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.Acked-by: Joe Hershberger
Signed-off-by: Simon Glass -
Move env_set() over to the new header file.
Acked-by: Joe Hershberger
Signed-off-by: Simon Glass -
Move env_set_ulong() over to the new header file.
Signed-off-by: Simon Glass
Acked-by: Joe Hershberger
11 Jul, 2019
3 commits
-
Rescue mode bootcmd currently only appends the "omniarescue" parameter
to the bootargs variable. We do not want the user to be able to change
rescue mode bootargs. Therefore change this so that bootcmd sets the
bootargs variable in an absolute way (adding console device information
and the omniarescue paramterer).Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
We always want to enumerate PCIe devices, because withouth this they
won't work in Linux.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
The board code reads MAC addresses from the ATSHA204A cryptochip.
For compatibility reasons the ethernet adapters on this SOC are not
enumerated in register address order. But when Omnia was first
manufactured this was done differently.Change setting of MAC addresses to conform to the description on the
stickers sticked on actual Omnias.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese
03 May, 2019
9 commits
-
There is a Factory RESET button on the back side of the Turris Omnia
router. When user presses this button before powering the device up and
keeps it pressed, the microcontroller prevents the main CPU from booting
and counts how long the RESET button is being pressed (and indicates
this by lighting up front LEDs).The idea behind this is that the user can boot the device into several
Factory RESET modes.This patch adds support for U-Boot to read into which Factory RESET mode
the user booted the device. The value is an integer stored into the
omnia_reset environment variable. It is 0 if the button was not pressed
at all during power up, otherwise it is the number identifying the
Factory RESET mode.This patch also changes bootcmd to a special hardcoded value if Factory
RESET button was pressed during device powerup. This special bootcmd
value sets the colors of all the LEDs on the front panel to green and
then tries to load the rescue image from the SPI flash memory and boot
it.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
The regdomain environment variable is set according to value read from
EEPROM. This has to be done in board_late_init, after the environment
variables are read from SPI. Select CONFIG_BOARD_LATE_INIT in Kconfig
for the Turris Omnia target.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Since board watchdog is now unified and not handled in board files,
remove the unnecessary includes.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Unify the way how Omnia and Mox print board information (RAM size and
serial number).Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Refactor RAM size reading from EEPROM in preparation for next patch.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
This driver is required for Turris Omnia to read ethernet addresses.
Move the dependency from turris_omnia_defconfig to Kconfig.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Refactor code which accesses the microcontroller and EEPROM via I2C.
Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
The i2c slave disabling is done by mvtwsi driver and is not needed here.
Signed-off-by: Marek Behún
Acked-by: Heiko Schocher
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese
26 Apr, 2019
2 commits
-
This patch tries to implement a generic watchdog_reset() function that
can be used by all boards that want to service the watchdog device in
U-Boot. This watchdog servicing is enabled via CONFIG_WATCHDOG.Without this approach, new boards or platforms needed to implement a
board specific version of this functionality, mostly copy'ing the same
code over and over again into their board or platforms code base.With this new generic function, the scattered other functions are now
removed to be replaced by the generic one. The new version also enables
the configuration of the watchdog timeout via the DT "timeout-sec"
property (if enabled via CONFIG_OF_CONTROL).This patch also adds a new flag to the GD flags, to flag that the
watchdog is ready to use and adds the pointer to the watchdog device
to the GD. This enables us to remove the global "watchdog_dev"
variable, which was prone to cause problems because of its potentially
very early use in watchdog_reset(), even before the BSS is cleared.Signed-off-by: Stefan Roese
Cc: Heiko Schocher
Cc: Tom Rini
Cc: Michal Simek
Cc: "Marek Behún"
Cc: Daniel Schwierzeck
Cc: Maxim Sloyko
Cc: Erik van Luijk
Cc: Ryder Lee
Cc: Weijie Gao
Cc: Simon Glass
Cc: "Álvaro Fernández Rojas"
Cc: Philippe Reynes
Cc: Christophe Leroy
Reviewed-by: Michal Simek
Tested-by: Michal Simek (on zcu100) -
Commit c4bd12a7dad4 ("i2c: mux: Generate longer i2c mux name") changed
the naming scheme of i2c devices within a mux. This broke references to
i2c@0 in the Turris Omnia board initialization code.Signed-off-by: Pierre Bourdon
Cc: Marek Behún
Reviewed-by: Stefan Roese
Reviewed-by: Marek Behún
Signed-off-by: Stefan Roese
12 Apr, 2019
1 commit
-
The generic wdt_start API expects to be called with the timeout in
milliseconds. Update the orion_wdt driver to accept a timeout in
milliseconds and use the clock rate specified in the dts to convert the
timeout to an appropriate value for the timer reload register.Signed-off-by: Chris Packham
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese
08 Apr, 2019
1 commit
-
This patch moves all instances of static "watchdog_dev" declarations to
the "data" section. This may be needed, as the BSS may not be cleared
in the early U-Boot phase, where watchdog_reset() is already beeing
called. This may result in incorrect pointer access, as the check to
"!watchdog_dev" in watchdog_reset() may not be true and the function
may continue to run.Signed-off-by: Stefan Roese
Cc: Heiko Schocher
Cc: Tom Rini
Cc: Michal Simek
Cc: "Marek Behún"
Cc: Daniel Schwierzeck
Tested-by: Michal Simek (on zcu100)
Reviewed-by: Michal Simek
21 Jan, 2019
5 commits
-
Use get_ram_size to determine if the RAM size on Turris Mox is 512 MiB
or 1 GiB.Signed-off-by: Marek Behún
Signed-off-by: Stefan Roese -
Add support for reading One-Time Programmable memory via mailbox, which
communicates with CZ.NIC's firmware on the Secure Processor (Cortex-M3)
of Armada 3720.Display product serial number and additional info, and also set MAC
addresses.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Check if Mox modules are connected in supported mode, then configure
the MDIO addresses of switch modules.Signed-off-by: Marek Behún
Signed-off-by: Stefan Roese -
When SFP module is connected directly to CPU module we want the SGMII
lane speed at 1.25 Gbps.This is a temporary solution till there is a comphy driver in the kernel
capable of changing SGMII speed at runtime.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese -
Restructure the board initialization source.
Remove the module_topology environment variable since it won't be
needed.Signed-off-by: Marek Behún
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese
08 Dec, 2018
1 commit
-
This syncs drivers/ddr/marvell/a38x/ with the mv_ddr-armada-18.09 branch
of https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git.
Specifically this syncs with commit 99d772547314 ("Bump mv_ddr to
release armada-18.09.2").The complete log of changes is best obtained from the mv-ddr-marvell.git
repository but some relevant highlights are:ddr3: add missing txsdll parameter
ddr3: fix tfaw timimg parameter
ddr3: fix trrd timimg parameter
merge ddr3 topology header file with mv_ddr_topology one
mv_ddr: a38x: fix zero memory size scrubbing issueThe upstream code is incorporated omitting the portions not relevant to
Armada-38x and DDR3. After that a semi-automated step is used to drop
unused features with unifdeffind drivers/ddr/marvell/a38x/ -name '*.[ch]' | \
xargs unifdef -m -UMV_DDR -UMV_DDR_ATF -UCONFIG_DDR4 \
-UCONFIG_APN806 -UCONFIG_MC_STATIC \
-UCONFIG_MC_STATIC_PRINT -UCONFIG_PHY_STATIC \
-UCONFIG_64BIT -UCONFIG_A3700 -UA3900 -UA80X0 \
-UA70X0Signed-off-by: Chris Packham
Reviewed-by: Stefan Roese
Tested-by: Baruch Siach
Signed-off-by: Stefan Roese
19 Sep, 2018
2 commits
-
If PCIe Mox module is connected we want to have PCIe node enabled
in U-Boot's device tree.Signed-off-by: Marek Behun
Signed-off-by: Stefan Roese -
The macro name CONFIG_WDT_ARMADA_3720 is called CONFIG_WDT_ARMADA_37XX
instead. Fix this so that watchdog really is enabled in board_init.Signed-off-by: Marek Behun
Signed-off-by: Stefan Roese
06 Aug, 2018
2 commits
-
Move the gdsys Controlcenter DC specific build time kwbimage.cfg
generation code into the mach-mvebu/ directory to be shared by all 32bit
mvebu platforms.Remove board specific kwbimage.cfg files, and use the generated one
instead. These files are all identical, with two exceptions. Clearfog
and Helios4 use the sdio boot device, whereas all others use spi. Update
the defconfigs for the exceptional boards to generate the same
kwbimage.cfg as before.Signed-off-by: Baruch Siach
Signed-off-by: Stefan Roese -
u-boot-spl.bin and u-boot-spl-dtb.bin are identical when building the
turris_omnia_defconfig. This commit makes Turris Omnia consistent with
all other mvebu boards.Signed-off-by: Baruch Siach
Signed-off-by: Stefan Roese
07 Jun, 2018
1 commit
-
Code that disables the i2c slave is now in the mvtwsi i2c driver.
Platform must enable DM_I2C to use that code. Add a comment in the code
as a reminder for the planned DM_I2C migration of Turris Omnia.Reviewed-by: Heiko Schocher
Signed-off-by: Baruch Siach
14 May, 2018
3 commits
-
This restores support for configuring the timing mode based on the
ddr_topology. This was originally implemented in commit 90bcc3d38d2b
("driver/ddr: Add support for setting timing in hws_topology_map") but
was removed as part of the upstream sync.Signed-off-by: Chris Packham
Signed-off-by: Stefan Roese -
This syncs drivers/ddr/marvell/a38x/ with the mv_ddr-armada-17.10 branch
of https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git.The upstream code is incorporated omitting the ddr4 and apn806 and
folding the nested a38x directory up one level. After that a
semi-automated step is used to drop unused features with unifdeffind drivers/ddr/marvell/a38x/ -name '*.[ch]' | \
xargs unifdef -m -UMV_DDR -UMV_DDR_ATF -UCONFIG_DDR4 \
-UCONFIG_APN806 -UCONFIG_MC_STATIC \
-UCONFIG_MC_STATIC_PRINT -UCONFIG_PHY_STATIC \
-UCONFIG_64BITINTER_REGS_BASE is updated to be defined as SOC_REGS_PHY_BASE.
Some now empty files are removed and the ternary license is replaced
with a SPDX GPL-2.0+ identifier.Signed-off-by: Chris Packham
Signed-off-by: Stefan Roese -
This adds basic support for the Turris Mox board from CZ.NIC, which is
currently being crowdfunded on Indiegogo.Turris Mox is as modular router based on the Armada 3720 SOC (same as
EspressoBin).The basic module can be extended by different modules. The device tree
binary for the kernel can be dependent on which modules are connected,
and in what order. Because of this, the board specific code creates
in U-Boot a variable called module_topology, which carries this
information.Signed-off-by: Marek Behun
Signed-off-by: Stefan Roese
07 May, 2018
1 commit
-
When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.Signed-off-by: Tom Rini
09 Apr, 2018
1 commit
-
In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.This fixes failures such as:
board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'which caters for use cases such as:
commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")when Ethernet is required in Linux, but not U-Boot.
Signed-off-by: Alex Kiernan
30 Nov, 2017
1 commit
-
The order of members in struct hws_topology_map is cas_wl, cas_l. The
comments in the original db-88f6820-gp.c had this wrong and have been
copied to other Armada-385 based boards. Practically this hasn't made a
difference since all these boards set both cas_wl and cas_l to 0
(autodetect) but if there were ever a board that did need to set these
explicitly they would run into unexpected issued.Update the comments to reflect the correct order of structure members.
Reported-by: Tobi Wulff
Signed-off-by: Chris Packham
Reviewed-by: Stefan Roese
Signed-off-by: Stefan Roese
06 Nov, 2017
1 commit
-
As part of my usual round of build testing, output about missing
MAINTAINERS information was not logged, and thus often overlooked.
Correct that mistake by ensuring that I log the output of
genboardscfg.py every time. As part of that, address a number of
missing MAINTAINERS entires. In the case of a missing file, I have put
the original submitter down. In the rest of the cases I have added the
config (and sometimes relevant header file) to the existing set of file
globs.Signed-off-by: Tom Rini
16 Aug, 2017
1 commit
-
Rename this function for consistency with env_set().
Signed-off-by: Simon Glass