summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tools/kwbimage: update the list of SoCs using v1 headerBaruch Siach2017-07-121-1/+1
| | | | | | | Armada 38x also uses image header v1. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
* arm64: mvebu: use single defconfig for Armada8K development boardsIgal Liberman2017-07-124-142/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Marvell Armada8k development board use 3 different defconfigs: mvebu_db-88f7040-nand_defconfig mvebu_db-88f7040_defconfig mvebu_db-88f8040_defconfig Having 3 different defconfigs makes maintenance difficult. This patch removes the defconfigs mentioned above and introduce a new defconfig which represents the Armada8k family. NOTE: In order not to break automatic tools compilation, a default device-tree is set in the defconfig (armada-8040-db). However, when compiling u-boot, the user MUST explicitly export the DEVICE_TREE for the requested board because using A80x0 device-tree on A70x0 might break the device. For more information, refer to "doc/README.marvell" (intoduced in this patch). Change-Id: I98515b6306498358f3722ecf7ac4c87f236ebbd8 Signed-off-by: Igal Liberman <igall@marvell.com> Signed-off-by: Stefan Roese <sr@denx.de>
* marvell: armada385: Add the Turris Omnia boardMarek Behún2017-07-126-0/+811
| | | | | | | | | | | | | | | | | | | | | | | | The Turris Omnia is a open-source router created by CZ.NIC. The code is based on the Marvell/db-88f6820-gp by Stefan Roese with modifications from Tomas Hlavacek in the CZ.NIC turris-omnia-uboot repository, which can be found at https://gitlab.labs.nic.cz/turris/turris-omnia-uboot By default, the Turris Omnia uses btrfs as the main and only filesystem, and also loads kernel and device tree from this filesystem. Since U-Boot does not yet support btrfs, you should not flash your Turris Omnia board with this unless you know what you are doing. Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 board/CZ.NIC/turris_omnia/Makefile create mode 100644 board/CZ.NIC/turris_omnia/kwbimage.cfg create mode 100644 board/CZ.NIC/turris_omnia/turris_omnia.c create mode 100644 configs/turris_omnia_defconfig create mode 100644 include/configs/turris_omnia.h Signed-off-by: Stefan Roese <sr@denx.de>
* drivers/misc: Add basic support for ATSHA204A Crypto moduleMarek Behún2017-07-124-0/+486
| | | | | | | | | | | | | | | | | | | | | | | | | | | This module can be found on the Turris Omnia board connected via the I2C interface. Among some cryptographic functions, the chip has a 512 bit One Time Programmable memory, 88 byte configuration memory and 512 byte general purpose memory. The Turris Omnia stores serial number and device MAC address in the OTP memory. This commit adds basic support for reading the EEPROM and also exposes the chips Random Number Generator. The driver is based on code by Josh Datko, Cryptotronix, jbd@cryptotronix.com and also Tomas Hlavacek, CZ.NIC, tomas.hlavacek@nic.cz Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 drivers/misc/atsha204a-i2c.c create mode 100644 include/atsha204a-i2c.h Signed-off-by: Stefan Roese <sr@denx.de>
* drivers/i2c/muxes/pca954x: Add pca9547 I2C mux supportMarek Behún2017-07-121-3/+39
| | | | | | | | This I2C mux is found, for example, on the Turris Omnia board. Signed-off-by: Marek Behun <marek.behun@nic.cz> Reviewed-by: Heiko Schocher <hs@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* arch/arm/dts: Add Turris Omnia device treeMarek Behún2017-07-122-0/+447
| | | | | | | | | | | | | | | | | | This device tree is taken from mainline Linux kernel commit 7b7db5ab. Added is also a -u-boot.dtsi file with these additions: - aliases for I2C and SPI devices are added, because i2cmux and SPI flash doesn't work otherwise - spi_flash node has been added so that the new DM API works - the ATSHA204A node is added in the i2c@5 node - "u-boot,dm-pre-reloc"s are added in needed nodes for SPL build to work correctly Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 arch/arm/dts/armada-385-turris-omnia-u-boot.dtsi create mode 100644 arch/arm/dts/armada-385-turris-omnia.dts Signed-off-by: Stefan Roese <sr@denx.de>
* orion_wdt: Support for the Orion WatchdogMarek Behún2017-07-123-0/+185
| | | | | | | | | | | | | | | | | | The Orion watchdog can be found on some Marvell Armada chips. This driver is based on the code by Tomas Hlavacek in the CZ.NIC turris-omnia-uboot repository, which can be found at https://gitlab.labs.nic.cz/turris/turris-omnia-uboot, and that one is based on code by Sylver Bruneau. His code is already in mainline Linux kernel. The code uses the new driver model API. Signed-off-by: Tomas Hlavacek <tomas.hlavacek@nic.cz> Signed-off-by: Marek Behun <marek.behun@nic.cz> create mode 100644 drivers/watchdog/orion_wdt.c Signed-off-by: Stefan Roese <sr@denx.de>
* driver/ddr: Add support for setting timing in hws_topology_mapMarek Behún2017-07-126-4/+23
| | | | | | | | | | | | | | | | | | | | | The DDR3 training code for Marvell A38X currently computes 1t timing when given board topology map of the Turris Omnia, but Omnia needs 2t. This patch adds support for enforcing the 2t timing in struct hws_topology_map, through a new enum hws_timing, which can assume following values: HWS_TIM_DEFAULT - default behaviour, compute whether to enable 2t from the number of CSs HWS_TIM_1T - enforce 1t HWS_TIM_2T - enforce 2t This patch also sets all the board topology maps (db-88f6820-amc, db-88f6820-gp, controlcenterdc and clearfog) to have timing set to HWS_TIM_DEFAULT. Signed-off-by: Marek Behun <marek.behun@nic.cz> Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge git://git.denx.de/u-boot-dmTom Rini2017-07-11282-1978/+3277
|\
| * dm: ofnode: use fdt32_t for DT property value to fix sparse warningMasahiro Yamada2017-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | DTB is encoded in big endian. When we retrieve property values, we need to use fdt32_to_cpu (aka be32_to_cpu) for endian conversion. This is a bit error-prone, but sparse is useful to detect endian mismatch. We need to use (fdt32_t *) instead of (u32 *) for a pointer of a property value. Otherwise sparse warns "cast to restricted __be32". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: include <dm/util.h> from driver/core/dump.cMasahiro Yamada2017-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | Include <dm/util.h> to fix sparse warnings: symbol 'dm_dump_all' was not declared. Should it be static? symbol 'dm_dump_uclass' was not declared. Should it be static? Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: ofnode: simplify ofnode_read_bool()Masahiro Yamada2017-07-111-9/+5
| | | | | | | | | | | | | | Reuse ofnode_get_property() to simplify the implementation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: ofnode: rename ofnode_read_prop() to ofnode_get_property()Masahiro Yamada2017-07-118-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | This function returns the pointer to the value of a node property. The current name ofnode_read_prop() is confusing. Follow the naming of_get_property() from Linux. The return type (const u32 *) is wrong. DT property values can be strings as well as integers. This is why of_get_property/fdt_getprop returns an opaque pointer. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: ofnode: simplify ofnode_read_prop()Masahiro Yamada2017-07-111-9/+3
| | | | | | | | | | | | | | The code inside the if-block is the same as of_get_property(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: ofnode: use ofnode_read_bool() to check property existenceMasahiro Yamada2017-07-111-5/+5
| | | | | | | | | | | | | | This will clarify the code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Simon Glass <sjg@chromium.org>
| * dm: include <dm/util.h> from drivers/core/util.cMasahiro Yamada2017-07-111-0/+5
| | | | | | | | | | | | | | | | | | Fix sparse warnings "... was not declared. Should it be static?" Also, fix redefinition of dm_warn/dm_dbg. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
| * fdt: Check for NULL return from fdt_getprop in 'fdt set'Tom Rini2017-07-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | While the previous pass through fixed one place where we knew that fdt_getprop would be given a positive len, in the case of 'fdt set' we do not, so check that we did no get NULL from fdt_getprop(). Cc: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 163249) Fixes 72c98ed1ab48 ("fdt: Add a check to do_fdt() for coverity") Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * tegra: fdt: Ensure that the console UART is enabledSimon Glass2017-07-1117-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many tegra boards have the console UART node disabled. With livetree this prevents serial from working since it does not 'force' the console to be bound. Updates the affected boards to fix this error. The boards were checked with: for b in $(grep tegra boards.cfg |grep -v integrator | \ awk '{print $7}' | sort); do echo $b; fdtgrep -c nvidia,tegra20-uart b/$b/u-boot.dtb |grep okay; done Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * tegra: Show a debug message if the LCD PMIC fails to startSimon Glass2017-07-111-1/+3
| | | | | | | | | | | | | | | | This error condition should have a debug() message. Add it. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: serial: Add livetree supportSimon Glass2017-07-111-3/+15
| | | | | | | | | | | | | | | | Add support for a live device tree to the core serial uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: serial: Separate out the core serial-device finding codeSimon Glass2017-07-111-40/+44
| | | | | | | | | | | | | | | | | | This function is quite long. Move the core code into a separate function in preparation for adding livetree support. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: serial: ns16550: Convert to livetreeSimon Glass2017-07-111-10/+5
| | | | | | | | | | | | | | | | Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * tegra: Fix up include file orderingSimon Glass2017-07-112-16/+10
| | | | | | | | | | | | | | | | Update these two files so include files in the right order. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * video: simple-panel: Add a little more debuggingSimon Glass2017-07-111-0/+2
| | | | | | | | | | | | | | | | | | Add some debugging to show when the backlight is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: video: Update pwm_backlight to support livetreeSimon Glass2017-07-111-10/+12
| | | | | | | | | | | | | | | | | | Update this driver to support a live device tree. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: video: Sync display on backspaceSimon Glass2017-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | We should sync the display (e.g. flush cache) when backspace is pressed to ensure that the character is erased correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * tegra: nyan-big: Enable bootstageSimon Glass2017-07-111-0/+5
| | | | | | | | | | | | | | | | Enable full bootstage support so we can time SPL and U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: Fix error handling when unflattening the DTSimon Glass2017-07-111-1/+6
| | | | | | | | | | | | | | | | | | The error handling code does not current detect an error right away. Adjust it to return immediately. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * tegra: nyan-big: Enable the debug UARTSimon Glass2017-07-111-0/+4
| | | | | | | | | | | | | | | | | | Enable this to allow debugging when the serial UART driver is misconfigured. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * tegra: video: Time the LCD initSimon Glass2017-07-111-0/+2
| | | | | | | | | | | | | | | | Calculate the time taken to set up the LCD. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: core: Add functions to obtain node's address/size cellsSimon Glass2017-07-118-6/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The of_n_addr_cells() and of_n_size_cells() functions are useful for getting the size of addresses in a node, but in a few places U-Boot needs to obtain the actual property value for a node without walking up the stack. Add functions for this and just the existing code to use it. Add a comment to the existing ofnode functions which do not do the right thing with a flat tree. This fixes a problem reading PCI addresses. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: core: Add dev_read_enabled() to check if a device is enabledSimon Glass2017-07-112-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | This function allows a device's status to be read. This indicates whether the device should be enabled or disabled. Note: In normal operation disabled devices will not be present in the driver-model tree. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: core: Add dev_read_resource() to read device resourcesSimon Glass2017-07-113-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a function which reads resources from a device, such as the device hardware address. This uses the "reg" property in the device. Unlike other functions there is little sense in inlining this when livetree is not being used because it has some logic in it and this would just bloat the code size. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * dm: core: Add ofnode_read_string_count()Simon Glass2017-07-113-1/+39
| | | | | | | | | | | | | | | | | | This provides a way to find the number of strings in a string list. Add it and also fix up the comment for ofnode_read_string_index(). Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Beaver, Jetson-TK1
| * binman: Put our local modules ahead of system modulesSimon Glass2017-07-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | If a system module is named the same as one of those used by binman we currently pick the system module. Adjust the ordering so that our modules are chosen instead. The module conflict reported was 'tools' from jira-python. I cannot access that package to test it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Kevin Hilman <khilman@baylibre.com> Acked-by: Kevin Hilman <khilman@baylibre.com>
| * dtoc: Add testsSimon Glass2017-07-117-4/+411
| | | | | | | | | | | | | | Add some tests of dtoc's functionality to make it easier to expand and enhance the tool. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Stop printing platdata at the start of SPLSimon Glass2017-07-112-40/+1
| | | | | | | | | | | | | | | | | | Currently we have code which prints out platform data at the start of SPL. Now that we have tests for dtoc this is probably not necessary. Drop it. Update test_ofplatdata to check for empty output since it is useful to check that sandbox_spl works as expected. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add a comment about string replace in conv_name_to_c()Simon Glass2017-07-111-0/+3
| | | | | | | | | | | | | | | | This function uses several separate string replaces where a regular expression might seem more reasonable. Add a comment justifying the way it is currently done. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Move the main logic into the dtb_platdata fileSimon Glass2017-07-112-17/+31
| | | | | | | | | | | | | | | | Collect the main logic of dtoc into a function and put it into dtb_platdata. This will allow tests to use this function instead of duplicating the code themselves. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Move static functions out of the classSimon Glass2017-07-111-62/+63
| | | | | | | | | | | | | | Rather than using static functions within the class, move them out of the class. This will make it slightly easier for tests to call them. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Pass include_disabled explicitlySimon Glass2017-07-112-5/+5
| | | | | | | | | | | | | | | | This option is the only one actually used by the dtb_platdata class. Pass it explicitly to avoid needing to pass the whole option object to the constructor. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Don't handle properties with / in themSimon Glass2017-07-111-1/+0
| | | | | | | | | | | | | | This conversion appears to not be needed as it does not occur in practice. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Fix pylint warningsSimon Glass2017-07-112-131/+144
| | | | | | | | | | | | | | Unfortunately I neglected to run pylint on this tool with its initial submission. Fix the warnings. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Split out the main class into its own fileSimon Glass2017-07-112-405/+414
| | | | | | | | | | | | | | | | To simplify running tests we should move this class into its own file. This allows the tests to import it without having to import dtoc.py, which runs the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add a comment at the topSimon Glass2017-07-111-0/+20
| | | | | | | | | | | | Add a description of the dtoc tool at the top of the file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Use self._options instead of the global optionsSimon Glass2017-07-111-2/+2
| | | | | | | | | | | | | | This class should use the options object passed to it rather than finding the global one. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
| * moveconfig: Allow automatic location and adding of 'imply'Simon Glass2017-07-111-9/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By using a Kconfig parser we can find the location of each option in the Kconfig tree. Using the information from the database we can then automatically add an 'imply' option into the right place if requested by the user. Add a -a option to support adding 'imply' options. Display the location of any existing 'imply' option so that progress can be examined. Add a -A option to hide any existing 'imply' options so that already-completed additions need not be considered further. Also add documentation for this feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| * moveconfig: Allow control of which implying configs are shownSimon Glass2017-07-111-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes it is useful to display CONFIG_TARGET or CONFIG_CMD configs. Add an option to control this. Also we generally ignore implying configs which affect fewer than 5 boards. But sometimes it is useful to show those those, so add an option that reduces the minimum to two. ERRATUM configs are never useful for implying things, so ignore those. Signed-off-by: Simon Glass <sjg@chromium.org>
| * moveconfig: Allow piping in 'git show --stat' outputSimon Glass2017-07-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is useful to be able to process only a subset of boards to save time. Often that subset is defined by the defconfig files in a git commit. This change allows things like: # Build the database ./tools.moveconfig.py -b # Find some implying configs ./tools/moveconfig.py -i CONFIG_X # Add some 'imply' statements to Kconfig files ./tools/moveconfig.py -i CONFIG_X -a CONFIG_A,CONFIG_B # Reprocess the defconfig files to see if we can drop some changes git show --stat | ./tools/moveconfig.py -s -d - # Update the commit, with fewer defconfig changes gii commit -au Where the commit contains defconfig files, this will reprocess them to take account of the imply statements that you added. Signed-off-by: Simon Glass <sjg@chromium.org>
| * sandbox: Drop special case console code for sandboxSimon Glass2017-07-111-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | At present sandbox has a special case where it directly calls os_putc() when it does not have a console yet. Now that we have the pre-console buffer enabled we can drop this. Any early characters will be buffered and output later. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>