- Mar 10, 2022
-
-
Now that sunxi uses CONFIG_SPI more sanely, and can also now properly load the environment from SPI flash, let's enable the symbol that actually considers the SPI flash when accessing the environment. As this symbol depends on CONFIG_SPI, which we now only enable if the board has a SPI flash, we can make if "default y" for all Allwinner boards. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
Currently we only support to load the environment from raw MMC or FAT locations on Allwinner boards. With the advent of SPI flash we probably also want to support using the environment there, so we need to become a bit more flexible. Change the environment priority function to take the boot source into account. When booted from eMMC or SD card, we use FAT or MMC, if configured, as before. If we are booted from SPI flash, we try to use the environment from there, if possible. The same is true for NAND flash booting, although this is somewhat theoretical right now (as untested). This way we can use the same image for SD and SPI flash booting, which allows us to simply copy a booted image from SD card to the SPI flash, for instance. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
To allow loading and storing the environment from SPI flash, adjust the raw offset variables for Allwinner boards to make sense there. U-Boot (including SPL and other blobs) is loaded from the beginning of SPI flash, so move the environment location as far back as possible, to not create unnecessary limits. As those offsets are shared with (now mostly unused) raw MMC environment, we should respect the common one megabyte limit, which also makes sense on SPI flash. So limit the environment for those raw locations to 64KB, and place it just below 1MB (@960KB). Those values are currently unused, unless someone forcibly enables the raw MMC environment. In this case it would break as of now, as the current offset of 544KB is far too low for the current (arm64) U-Boot proper. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
Commit 7945caf2 ("arm: sunxi: Enable SPI/SPI-FLASH support for A64") selected CONFIG_SPI by default on all Allwinner A64 boards, even though only 4 out of the 14 A64 boards have a SPI flash chip. All other SoCs had to manually select DM_SPI and friends, even though they are a platform property (the sunxi SPI driver is DM_SPI only). Clean this up to allow easy selection of SPI flash support in U-Boot proper, by selecting DM_SPI and DM_SPI_FLASH *if* CONFIG_SPI is selected, for *all* Allwinner SoCs. This simplifies the defconfig for two Libretech boards already. Also remove the forced CONFIG_SPI from the A64 Kconfig, instead let the four boards which allow SPI booting select this explicitly. Any board wishing to support SPI flash in U-Boot proper now just defines CONFIG_SPI and CONFIG_SPI_FLASH_<vendor> in its defconfig, Kconfig takes care of the rest. Signed-off-by:
Andre Przywara <andre.przywara@arm.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
- Feb 24, 2022
-
-
IPROC qspi driver supports both BSPI and MSPI modes. Signed-off-by:
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Signed-off-by:
Bharat Gooty <bharat.gooty@broadcom.com> Acked-by:
Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Signed-off-by:
Roman Bacik <roman.bacik@broadcom.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
The driver is currently using sizeof(op->cmd.opcode) in the op_len calculation. Commit d15de623 ("spi: spi-mem: allow specifying a command's extension") changed op->cmd.opcode from one byte to two. Instead, a new struct member op->cmd.nbytes is supposed to be used. For regular commands op->cmd.nbytes will be one. Commit d15de623 ("spi: spi-mem: allow specifying a command's extension") did update some drivers that overload the generic mem_ops() implementation, but forgot to update dw_spi_mem_ops(). Calculating op_len incorrectly causes dw_spi_mem_ops() to misbehave, since op_len is used to determine how many bytes that should be read/written. On the canaan k210 board, this causes the probe of the SPI flash to fail. Fix the op_len calculation in dw_spi_mem_ops(). Doing so results in working SPI flash on the canaan k210 board. Fixes: d15de623 ("spi: spi-mem: allow specifying a command's extension") Signed-off-by:
Niklas Cassel <niklas.cassel@wdc.com> Reviewed-by:
Pratyush Yadav <p.yadav@ti.com> Tested-by:
Damien Le Moal <damien.lemoal@opensource.wdc.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
In the TI am65 device tree files there is no reset defined. Also the Linux kernel driver uses devm_reset_control_get_optional_exclusive(..) to get the reset. Lets do the same as the kernel does and make thr reset optinal. Signed-off-by:
Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by:
Jagan Teki <jagan@amarulasolutions.com>
-
- Feb 23, 2022
-
-
-
https://gitlab.denx.de/u-boot/custodians/u-boot-dmTom Rini authored
binman fixes/improvements to FIT generator binman SPL fixes moveconfig support regex matches
-
With the Kconfig options being deleted, the references to OMAP_EHCI_PHY are useless. Remove them from the various defconfigs. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
With the omap-ehci driver now using the phy subsystem to enable and disable reset, the driver no longer needs to know which GPIO's are used, and they can be removed from Kconfig. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
There are a few boards that use hard-coded GPIO definitions in their respective defconfig files. If the GPIO's are listed in their device trees, the nop-phy can toggle the GPIO's, so the EHCI driver does not need to know anything about the GPIO's. Add functions for getting the phys and remove the GPIO toggles since the phy will now do that. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
The USB_EHCI_OMAP driver currently has a series of Kconfig options which let users specify a GPIO for the reset pin. Some devices may have only one reset, while others might have more. Since there is a nop phy driver, let's selct enable the PHY system, and imply the nop phy driver. The nop phy driver can now toggle the reset pins when putting the phy in and out of reset. If the gpio is listed under the phy, it will get toggled and the hard-coded config options specifying the GPIO numbers can eventually go away. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
The reset function should place the phy into reset, while the init function should take the phy out of reset. Currently the reset function takes it out of reset, and the init calls the reset. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
The OMAP3 hierarchy has the ehci node as a sub-node of the usbhshost. The usbhshost node contains an ohci and an ehci subnode. The configuration of the ehci belongs in the EHCI node and not its parent. Move it to the proper probe. usb start starting USB... Bus ehci@48064800: USB EHCI 1.00 Bus usb_otg_hs@480ab000: Port not available. scanning bus ehci@48064800 for devices... 3 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Signed-off-by:
Adam Ford <aford173@gmail.com>
-
omap_ehci_hcd_stop appears to be dead code, and omap_ehci_hcd_init is only called by the probe function, so it can be static to that function. Remove both from the header along with some additional checking for DM_USB. Signed-off-by:
Adam Ford <aford173@gmail.com>
-
- Feb 22, 2022
-
-
On some configs (like stm32mp15_dhcom_basic_defconfig), if configs SPL_LOAD_FIT_FULL and SPL_FIT_FULL_CHECK are enabled. Then the compilatio fails with the following error: arm-linux-gnueabi-ld.bfd: boot/image-fit.o: in function `fit_check_format': <PATH>/uboot/u-boot-stm/boot/image-fit.c:1641: undefined reference to `fdt_check_full' scripts/Makefile.spl:509: recipe for target 'spl/u-boot-spl' failed This issue happens because the function fdt_check_full is only defined if "!defined(FDT_ASSUME_MASK) || FDT_ASSUME_MASK != 0xff". But this function may be called even if this condition are not verified. To avoid this issue, the function fdt_check_full is always defined. Signed-off-by:
Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
The port/hub leaf nodes don't contain the phy definitions in some dts files so check the parents. Signed-off-by:
Angus Ainslie <angus@akkea.ca> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present we only support expanding out FDT nodes. Make the operation into an @operation property, so that others can be supported. Re-arrange and tidy up the documentation so that it has separate headings for each topic. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a few quotes and clarify the data property. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Split subnode and property processing into separate functions to make the _AddNode() function a little smaller. Tweak a few comments. This does not change any functionality. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Collecting the data from a list of entries and putting it in a file is a useful operation that will be needed by other entry types. Put this into a method in the Entry class. Add some documentation about how to collect data for an entry type. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a file that has two text sections at different addresses, so we can test this behaviour in binman, once added. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
At present the 'args' property of the mkimage entry type is a string. This makes it difficult to include CONFIG options in that property. In particular, this does not work: args = "-n CONFIG_SYS_SOC -E" since the preprocessor does not operate within strings, nor does this: args = "-n" CONFIG_SYS_SOC" "-E" since the device tree compiler does not understand string concatenation. With this new feature, we can do: args = "-n", CONFIG_SYS_SOC, "-E"; Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add some ideas that have come to mind recently. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Add an entry for OP-TEE Trusted OS 'BL32' payload. This is required by platforms using Cortex-A cores with TrustZone technology. Signed-off-by:
Roger Quadros <rogerq@kernel.org> Reviewed-by:
Simon Glass <sjg@chromium.org> Add missing-blob-help, renumber the test file, update entry-docs: Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a function which reads the segments and the entry address. Also fix a comment nit in the tests while we are here. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Now that there is a mkimage entry-type, update the docs to remove the future reference. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It is helpful to support a string or stringlist containing a list of space-separated arguments, for example: args = "-n fred", "-a", "123"; This resolves to the list: -n fred -a 123 which can be passed to a program as arguments. Add a helper to do the required processing. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This does not work at present, since the current algorithm assumes that either there are no nodes or all nodes have an offset. If a node is new, but an old node is still in the tree, then syncing fails due to this assumption. Fix it and add a test. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a function to delete a node. This is synced to the tree when requested. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Add a new function to add a string list. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
When CONFIG_SPL_FIT is enabled we do not access U-Boot directly in the image, since it is embedded in a FIT which is parsed at runtime. Provide a CONFIG option to drop the symbols in this case. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
These symbols are incorrect, meaning that binman cannot find the associated entry. This leads to errors like: binman: Section '/binman/simple-bin': Symbol '_binman_spl_prop_size' in entry '/binman/simple-bin/u-boot-spl/u-boot-spl-nodtb': Entry 'spl' not found in list (mkimage,u-boot-spl-nodtb, u-boot-spl-bss-pad,u-boot-spl-dtb,u-boot-spl,u-boot-img,main-section) Fix it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
It is useful to be able to search for CONFIG options that match a regex, such as this, which lists boards which define SPL_FIT_GENERATOR and anything not starting with ROCKCHIP: ./tools/moveconfig.py -f SPL_FIT_GENERATOR ~ROCKCHIP.* Add support for this. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
The _defconfig suffix is unnecessary when showing matching boards. Drop it. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
This shows an internal type at present, rather than the algorithm name. Fix it and update the test to catch this. Signed-off-by:
Simon Glass <sjg@chromium.org> Reviewed-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com>
-
Binman keeps track of positions of each entry in the final image, but currently this data is wrong for things included in FIT entries, especially since a previous patch makes FIT a subclass of Section and inherit its implementation. There are three ways to put data into a FIT image. It can be directly included as a "data" property, or it can be external to the FIT image represented by an offset-size pair of properties. This external offset is either "data-position" from the start of the FIT or "data-offset" from the end of the FIT, and the size is "data-size" for both. However, binman doesn't use the "data-offset" method while building FIT entries. According to the Section docstring, its subclasses should calculate and set the correct offsets and sizes in SetImagePos() method. Do this for FIT subentries for the three ways mentioned above, and add tests for the two ways binman can pack them in. Signed-off-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Binman's FIT entry type can have image subentries with "hash" subnodes intended to be processed by mkimage, but not binman. However, the Entry class and any subclass that reuses its implementation tries to process these unconditionally. This can lead to an error when boards specify hash algorithms that binman doesn't support, but mkimage supports. Let entries skip processing these "hash" subnodes based on an instance variable, and set this instance variable for FIT subsections. Also re-enable processing of calculated and missing properties of FIT entries which was disabled to mitigate this issue. Signed-off-by:
Alper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- Feb 21, 2022
-
-
Tom Rini authored
- Assorted updates / fixes for Apple, TI and Aspeed platforms
-