aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-11board: ti: board_detect: Add stub functions for EEPROM detection apisLokesh Vutla
Current usage of eeprom apis produce a build failure when CONFIG_TI_I2C_BOARD_DETECT is not defined. Add stub function for these apis to avoid build failures. Reviewed-by: Suman Anna <s-anna@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2020-08-11configs: Add new config for supporting USB mass storage bootFaiz Abbas
Because of space constraints, create a new USB defconfig for R5 to faciliate booting from USB mass storage devices Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11configs: Add defconfig for USB DFU bootmodeFaiz Abbas
Because of space constraints, create a new USB defconfig for R5 to faciliate booting in USB peripheral (DFU) bootmode Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11configs: am65x_evm_a53: Enable USB Mass storage and DFU boot modesFaiz Abbas
Enable configs to facilitate booting from USB Mass Storage devices as well as USB peripheral boot Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11configs: am65x_evm: Add support for DFU related configsFaiz Abbas
Add offset and environment related configs used for booting from DFU. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: dts: k3-am654-base-board: Add support for USB0 in SPLFaiz Abbas
Add nodes for USB0 in SPL to enable USB host boot mode Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: dts: k3-am654-r5-base-board: Add USB0 nodesFaiz Abbas
Add USB0 nodes and set them to host mode to support USB host and peripheral boot modes Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: mach-k3: am6_init: Add support for USB boot modeFaiz Abbas
Add support for identifying USB host and device boot modes Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: mach-k3: am6_init: Do USB fixups to facilitate host and device boot modesFaiz Abbas
U-boot only supports either USB host or device mode for a node at a time in dts. To support both host and dfu bootmodes, set "peripheral" as the default dr_mode but fixup property to "host" if host bootmode is detected. This needs to happen before the dwc3 generic layer binds the usb device to a host or device driver. Therefore, add an fdtdec_setup_board() implementation to fixup the dt based on the boot mode. Also use the same fixup function to set the USB-PCIe Serdes mux to PCIe in both the host and device cases. This is required for accessing the interface at USB 2.0 speeds. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: mach-k3: am6_init: Gate mmc related configurations with the appropriate ↵Faiz Abbas
config Gate mmc related system related configurations with DM_MMC to avoid build errors when MMC is not enabled Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: mach-k3: sysfw-loader: Add support to load SYSFW from USBFaiz Abbas
Add support for loading system firmware from a USB mass storage device Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11armv7R: K3: am654: Use full malloc in SPL both pre and post relocFaiz Abbas
In order to be able to use things like file system drivers early on in SPL (before relocation) in a memory-constrained environment when DDR is not yet available we cannot use the simple malloc scheme which does not implement the freeing of previously allocated memory blocks. To address this issue go ahead and enable the use of the full malloc by manually initializing the required functionality inside board_init_f by creating a full malloc pool inside the pre-relocation malloc pool. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11spl: usb: Only init usb onceFaiz Abbas
usb_init() may be called multiple times for fetching multiple images from SPL. Skip reinitializing USB if its already been done Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11spl: usb: Create an API spl_usb_load()Faiz Abbas
Create a new API spl_usb_load() that takes the filename as a parameter instead of taking the default U-boot PAYLOAD_NAME Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11board: ti: am65x: Update fdt fixup logic for interconnect nodesSuman Anna
The DT nodes on AM65x SoCs currently use a node name "interconnect" for the various interconnects. This name is not following the DT schema, and should simply be "bus". Update the fdt fixup logic to use both the current and the expected corrected path names so that this logic won't be broken with newer kernels. The logic also corrects the crypto node name as the DT node unit-addresses are all expected to be lower case. Signed-off-by: Suman Anna <s-anna@ti.com>
2020-08-11mmc: am654_sdhci: Use MMC_MODES_END value instead of hardcoded valueFaiz Abbas
The hardcoded array size leads to array overflows with changes in speed modes enum in mmc core. Use MMC_MODES_END for otap_del_sel array declaration to fix this. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2020-08-11arm: dts: k3-j721e: Fix interconnect node namesSuman Anna
The various CBASS interconnect nodes on K3 J721E SoCs are defined using the node name "interconnect". This is not a valid node name as per the dt-schema. Fix these node names to use the standard name used for SoC interconnects, "bus". Signed-off-by: Suman Anna <s-anna@ti.com>
2020-08-11arm: dts: k3-am65: Fix interconnect node namesSuman Anna
The various CBASS interconnect nodes on K3 AM65x SoCs are defined using the node name "interconnect". This is not a valid node name as per the dt-schema. Fix these node names to use the standard name used for SoC interconnects, "bus". Signed-off-by: Suman Anna <s-anna@ti.com>
2020-08-11ARM: omap3: evm: Complete DM_ETH and DM_USB migrationsDerald D. Woods
This commit completes the migrations for DM_ETH and DM_USB. The board is now consistent with omap3_beagle and other remaining OMAP3 boards. Cc: Tom Rini <trini@konsulko.com> Cc: Adam Ford <aford173@gmail.com> Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2020-08-11arm: mach-k3: Clean non-coherent lines out of L3 cacheAndrew F. Davis
When switching on or off the ARM caches some care must be taken to ensure existing cache line allocations are not left in an inconsistent state. An example of this is when cache lines are considered non-shared by and L3 controller even though the lines are shared. To prevent these and other issues all cache lines should be cleared before enabling or disabling a coherent master's cache. ARM cores and many L3 controllers provide a way to efficiently clean out all cache lines to allow for this, unfortunately there is no such easy way to do this on current K3 MSMC based systems. We could explicitly clean out every valid external address tracked by MSMC (all of DRAM), or we could attempt to identify only the set of addresses accessed by a given boot stage and flush only those specifically. This patch attempts the latter. We start with cleaning the SPL load address. More addresses can be added here later as they are identified. Note that we perform a flush operation for both the flush and invalidate operations, this is not a typo. We do this to avoid the situation that some ARM cores will promote an invalidate to a clean+invalidate, but only emit the invalidation operation externally, leading to a loss of data. Signed-off-by: Andrew F. Davis <afd@ti.com> Tested-by: Faiz Abbas <faiz_abbas@ti.com>
2020-08-11arm: dts: k3: Add RTI watchdogsJan Kiszka
Add DT entries for main domain watchdog0 and 1 instances on the J721e well as RTI1-based watchdog on the AM65x. RTI0 does not work for this purpose on the AM65x, so leave it out. On AM65x, we mark the power-domain as shared because RTI firmware such as https://github.com/siemens/k3-rti-wdt may request it as well in order to prevent accidental shutdown of the watchdog. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-08-11watchdog: Add support for K3 RTI watchdogJan Kiszka
This is based on the Linux kernel driver for the RTI watchdog. To actually reset the system on an AM65x, it requires firmware running on the R5 that accepts the NMI and issues the actual system reset via TISCI. Kind of an iTCO, except that this watchdog hardware has support for no-way-out, and only for that. On the J721E, reset works without extra firmware help when routing the RTI interrupt via the ESM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2020-08-10Prepare v2020.10-rc2Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-10configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-10test/py: fix SquashFS testsJoao Marcos Costa
Use "cons.config.build_dir" instead of writing to the source directory (read-only). This will fix the test failures in Azure. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-08Convert CONFIG_SYS_MMC_ENV_DEV et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_MMC_ENV_DEV CONFIG_SYS_MMC_ENV_PART Note that with this conversion we now have consistent behavior with respect to ensuring that we have always selected the correct MMC device and hardware partition. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-08Makefile: sunxi: Don't use binman to build ATF imageSimon Glass
At present with sunxi 64-bit, the Makefile builds u-boot-sunxi-with-spl.bin and then binman overwrites it with its own version. But the binman definition lacks some parts, in particular BL31. For now, work around this with a hack. Tested-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 42b18df80fd ("x86: Makefile: Drop explicit targets built by binman")
2020-08-08test/py: serial# cannot be overwritten on some devicesHeinrich Schuchardt
On some devices the environment variable serial# cannot be overwritten. Set the variable only if it is not set. For our unit test it is sufficient to test if any value for serial-number is set. Fixes: 8a5cdf601f8d ("test: efi_selftest: Do not force serial# setting") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-08Merge branch '2020-08-07-misc-improvements'Tom Rini
- SquashFS support - Assorted bugfixes
2020-08-07test: py: test_shell_run() with CONFIG_HUSH_PARSER=nHeinrich Schuchardt
The hush parser not enabled for some boards, e.g. sipeed_maix_bitm_defconfig. With CONFIG_HUSH_PARSER=n a double quotation mark is not interpreted as the beginning of a string. Use a single quotation mark instead. Furthermore without the hush parser variables have to be referenced as ${varname}. Add the missing braces. Reported-by: Sean Anderson <seanga2@gmail.com> Fixes: 8b86c609b860 ("test/py: add test of basic shell functionality") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-08-07tests: support mkfs.ext4 without metadata_csumStephen Warren
Modify various test/py filesystem creation routines to support systems that don't implement the metadata_csum ext4 feature. Signed-off-by: Stephen Warren <swarren@nvidia.com>
2020-08-07board: presidio: add LED supportJway Lin
Add LED support for Cortina Access Presidio Engineering Board Signed-off-by: Jway Lin <jway.lin@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Reviewed-by: Simon Glass <sjg@chromium.org> CC: Simon Glass <sjg@chromium.org>
2020-08-07led: led_cortina: Add CAxxx LED supportJway Lin
Add Cortina Access LED controller support for CAxxxx SOCs Signed-off-by: Jway Lin <jway.lin@cortina-access.com> Signed-off-by: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> CC: Simon Glass <sjg@chromium.org> Add head file fixed link error and remove unused flashing function Reviewed-by: Simon Glass <sjg@chromium.org>
2020-08-07Travis: Add squashfs-toolsTom Rini
So that the tests we now have for squashfs can run, add squashfs-tools for mksquashfs. Signed-off-by: Tom Rini <trini@konsulko.com>
2020-08-07test/py: Add tests for the SquashFS commandsJoao Marcos Costa
Add Python scripts to test 'ls' and 'load' commands. The scripts generate a SquashFS image and clean the directory after the assertions, or if an exception is raised. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07fs/fs.c: add symbolic link case to fs_ls_generic()Joao Marcos Costa
Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07fs/squashfs: add support for zlib decompressionJoao Marcos Costa
Add call to zlib's 'uncompress' function. Add function to display the right error message depending on the decompression's return value. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07include/u-boot, lib/zlib: add sources for zlib decompressionJoao Marcos Costa
Add zlib (v1.2.11) uncompr() function to U-Boot. SquashFS depends on this function to decompress data from a raw disk image. The actual support for zlib into SquashFS sources will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07fs/squashfs: add filesystem commandsJoao Marcos Costa
Add 'ls' and 'load' commands. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07fs/squashfs: new filesystemJoao Marcos Costa
Add support for SquashFS filesystem. Right now, it does not support compression but support for zlib will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
2020-08-07cmd: Update the memory-search commandSimon Glass
Add various fixes and improvements to this command that were missed in the original version. Unfortunately I forgot to send v2. - Fix Kconfig name - Use a separate variable for the remaining search length - Correct a minor bug - Move into a separate test suite - Add -q flag to the 'quiet' test to test operation when console is enabled - Enable the feature for sandbox Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07test: Add a flag for tests that need console recordingSimon Glass
Allow tests that need console recording to be marked, so they can be skipped if it is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07dm: Rename DM test flags to make them more genericSimon Glass
The test flags used by driver model are currently not available to other tests. Rather than creating two sets of flags, make these flags generic by changing the DM_ prefix to UT_ and moving them to the test.h header. This will allow adding other test flags without confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07console: Always define the console-recording functionsSimon Glass
On boards without console recording these function are currently missing. It is more convenient for them to be present but to return dummy values. That way if we know that a test needs recording, we can check if it is available, and skip the test if not, while avoiding #ifdefs. Update the header file according and adjust console_record_reset_enable() to return an error if recording is not available. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07test: Add a way to check part of a console line or skip itSimon Glass
Some lines of the output are not worth testing, or not worth testing in their entirety. For example, when checking a hex dump we know that the hex-dump routine can display ASCII so we only need to check the hex bytes, not the ASCII dump. Add a new test macros which can check only part of a console line. Sometimes it is useful to skip a line altogether, so add a macro for that also. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-07Merge branch '2020-08-07-mkimage-improvements'Tom Rini
- Assorted mkimage improvements related to FIT images and verified boot
2020-08-07mkimage: fit: fix import of external dataPatrick Oppenlander
The external data is located after the mmapped FDT pointed to by 'old_fdt', not in the newly created FDT we are importing into at 'fdt'. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com>
2020-08-07mkimage: fit: include image cipher in configuration signaturePatrick Oppenlander
This patch addresses issue #2 for signed configurations. -----8<----- Including the image cipher properties in the configuration signature prevents an attacker from modifying cipher, key or iv properties. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-08-07mkimage: fit: don't cipher ciphered dataPatrick Oppenlander
Previously, mkimage -F could be run multiple times causing already ciphered image data to be ciphered again. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>
2020-08-07mkimage: fit: handle FDT_ERR_NOSPACE when cipheringPatrick Oppenlander
Also replace fdt_delprop/fdt_setprop with fdt_setprop as fdt_setprop can replace an existing property value. Signed-off-by: Patrick Oppenlander <patrick.oppenlander@gmail.com> Reviewed-by: Philippe Reynes <philippe.reynes@softathome.com>