summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-12dt-bindings: pwm: pwm-at91: Add PWM bindings for A5D2Dan Sneddon
Document the bindings needed for the PWM device on the SAMA5D2. Signed-off-by: Dan Sneddon <dan.sneddon@microchip.com>
2021-10-12pwm: Add PWM driver for SAMA5D2Dan Sneddon
Add support for the PWM found on the SAMA5D2 family of devices. Signed-off-by: Dan Sneddon <dan.sneddon@microchip.com>
2021-10-11Merge branch '2021-10-11-TI-platform-updates'Tom Rini
- Assorted TI platform updates
2021-10-11arm: dts: Update IOT2050 device tree filesJan Kiszka
This fixes the usage of the USB 3.0-capable port under U-Boot as USB 2.0-only port. Original patch by Chao Zeng. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-10-11board: siemens: iot2050: Adjust to changes in DT and configurationJan Kiszka
Account for the changes done between merge proposal and the final merge. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2021-10-11ARM: omap3_logic: Cleanup usage of MUX_VALAdam Ford
The macro called MUX_VAL generates a writel instruction with semicolon at the end. This table was written to use semicolons, however one was missed: MUX_VAL(CP(SYS_BOOT2), (IEN | PTD | DIS | M4)) /* GPIO_4 */ Since the extra semicolon is unnecessary with the use of the macro, remove all of them, and cleanup whitespace. Reviewed-by: Wolfgang Denk <wd@denx.de> Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Adam Ford <aford173@gmail.com>
2021-10-11clk: ti: add am33xx/am43xx spread spectrum clock supportDario Binacchi
The patch enables spread spectrum clocking (SSC) for MPU and LCD PLLs. As reported by the TI spruh73x/spruhl7x RM, SSC is only supported for the DISP/LCD and MPU PLLs on am33xx/am43xx. SSC is not supported for DDR, PER, and CORE PLLs. Calculating the required values and setting the registers accordingly was taken from the set_mpu_spreadspectrum routine contained in the arch/arm/mach-omap2/am33xx/clock_am33xx.c file of the u-boot project. In locked condition, DPLL output clock = CLKINP *[M/N]. In case of SSC enabled, the reference manual explains that there is a restriction of range of M values. Since the clk_ti_am3_dpll_round_rate() attempts to select the minimum possible N, the value of M obtained is not guaranteed to be within the range required. With the new "ti,min-div" parameter it is possible to increase N and consequently M to satisfy the constraint imposed by SSC. Link: https://lore.kernel.org/r/20210606202253.31649-6-dariobin@libero.it Signed-off-by: Dario Binacchi <dariobin@libero.it>
2021-10-11ARM: dts: am43xx-clocks: add spread spectrum supportDario Binacchi
Registers for adjusting the spread spectrum clocking (SSC) have been added. As reported by the TI spruhl7x RM, SSC is supported only for LCD and MPU PLLs, but the PRCM_CM_SSC_DELTAMSTEP_DPLL_XXX and PRCM_CM_SSC_MODFREQDIV_DPLL_XXX registers, as well as the enable field in the PRCM_CM_CLKMODE_DPLL_XXX registers are mapped for all PLLs (CORE, MPU, DDR, PER, DISP, EXTDEV). Link: https://lore.kernel.org/r/20210606202253.31649-5-dariobin@libero.it Signed-off-by: Dario Binacchi <dariobin@libero.it>
2021-10-11ARM: dts: am33xx-clocks: add spread spectrum supportDario Binacchi
Registers for adjusting the spread spectrum clocking (SSC) have been added. As reported by the TI spruh73x RM, SSC is supported only for LCD and MPU PLLs, but the CM_SSC_DELTAMSTEP_DPLL_XXX and CM_SSC_MODFREQDIV_DPLL_XXX registers, as well as the enable field in the CM_CLKMODE_DPLL_XXX registers are mapped for all PLLs (CORE, MPU, DDR, PER, DISP). Link: https://lore.kernel.org/r/20210606202253.31649-4-dariobin@libero.it Signed-off-by: Dario Binacchi <dariobin@libero.it>
2021-10-11configs: omap3x_logic: Enable LTO on more LogicPD OMAP3 boardsAdam Ford
There are five omap3 based boards from LogicPD. Two of them have added LTO support. Add the remaining three to use LTO. Signed-off-by: Adam Ford <aford173@gmail.com>
2021-10-09Merge tag 'video-20211009' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video - add 30bpp support (EFI, simplefb, vidconsole) - fix video console name in CONSOLE_MUX Kconfig help - move mxsfb driver config option to Kconfig - remove unused mx3fb driver # gpg verification failed.
2021-10-09video: move MXS to KconfigAnatolij Gustschin
Move CONFIG_VIDEO_MXS from board headers to Kconfig and drop it from obsolete cfb_console driver. Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2021-10-09video: remove not used mx3fb driverAnatolij Gustschin
i.MX31 support was removed, and the non dm-video driver is obsolete and not used. Remove it. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2021-10-09common: Kconfig: use 'vidconsole' name instead of old 'video'Anatolij Gustschin
After DM_VIDEO conversion the 'vidconsole' is the correct name for the frame buffer console. 'video' will not work, so update the description of the config option. Signed-off-by: Anatolij Gustschin <agust@denx.de>
2021-10-09lz4: Use a private header for U-BootSimon Glass
At present U-Boot has a header file called lz4.h for its own use. If the host has its own lz4 header file installed (e.g. from the 'liblz4-dev' package) then host builds will use that instead. Move the U-Boot file into its own directory, as is done with various other headers with the same problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-09efi_loader: GOP: Fix 30bpp block transfer supportMark Kettenis
Convert pixel values when necessary like we do for 16bpp framebuffers. Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-10-09video: simplefb: Add 30bpp supportMark Kettenis
Recognize the canonical format strings for framebuffers in 30bpp mode and 32/24bpp mode. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-10-09efi_loader: GOP: Add 30bpp supportMark Kettenis
Provide correct framebuffer information for 30bpp modes. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-10-09video: Add 30bpp supportMark Kettenis
Add support for 30bpp mode where pixels are picked in 32-bit integers but use 10 bits instead of 8 bits for each component. Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2021-10-08Merge branch '2021-10-08-image-cleanups'Tom Rini
- A large number of image file and tooling related cleanups
2021-10-08image: Split up boot_get_fdt()Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the FDT into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Reduce variable scope in boot_get_fdt()Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Remove some #ifdefs from image-fit and image-fit-sigSimon Glass
Drop the #ifdefs which are easy to remove without refactoring. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Remove #ifdefs from select_ramdisk()Simon Glass
Use boolean variables to deal with the strange #ifdef logic of this function, so we can remove the #ifdefs. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Split up boot_get_ramdisk()Simon Glass
This function is far too long. Before trying to remove #ifdefs, split out the code that deals with selecting the ramdisk into a separate function. Leave the code indented as it was for easier review. The next patch cleans this up along with checkpatch violations. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Reduce variable scope in boot_get_ramdisk()Simon Glass
Move the variables declarations to where they are needed, to reduce the number of #ifdefs needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Drop most #ifdefs in image-board.cSimon Glass
Remove ifdefs in this file, so far as possible without too much refactoring. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Drop #ifdefs for fit_print_contents()Simon Glass
Use a simple return to drop the unwanted code. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Drop unnecessary #ifdefs from image.hSimon Glass
This file has a lot of conditional code and much of it is unnecessary. Clean this up to reduce the number of build combinations. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Tidy up fit_unsupported_reset()Simon Glass
This function is only used in one place and does not need to use the preprocessor. Move it to the C file and convert it to a normal function. Drop fit_unsupported() since it is not used. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08efi: Correct dependency on FIT_SIGNATURESimon Glass
At present EFI_SECURE BOOT selects RSA but does not necessarily enable FIT_SIGNATURE. Mostly this is fine, but a few boards do not enable it, so U-Boot tries to do RSA verification when loading FIT images, but it is not enabled. This worked because the condition for checking the RSA signature is wrong in the fit_image_verify_with_data() function. In order to fix it we need to fix this dependency. Make sure that FIT_SIGNATURE is enabled so that RSA can be used. It might be better to avoid using 'select' in this situation. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Drop IMAGE_ENABLE_IGNORESimon Glass
We can use the new host_build() function for this, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_OF_SYSTEM_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_OF_BOARD_SETUPSimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_BOOT_GET_CMDLINESimon Glass
This is not needed with Kconfig, since we can use IS_ENABLED() easily enough and the board code is now in a separate file. Update the only place where this is used and drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Use the correct checks for CRC32Simon Glass
Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32) directly in the host build, so drop the unnecessary indirection. Add a few more conditions to SPL_CRC32 to avoid build failures as well as TPL_CRC32. Also update hash.c to make crc32 optional and to actually take notice of SPL_CRC32. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Use Kconfig to enable FIT_RSASSA_PSS on hostSimon Glass
Add a host Kconfig for FIT_RSASSA_PSS. With this we can use CONFIG_IS_ENABLED(FIT_RSASSA_PSS) directly in the host build, so drop the forcing of this in the image.h header. Drop the #ifdef around padding_pss_verify() too since it is not needed. Use the compiler to check the config where possible, instead of the preprocessor. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Use Kconfig to enable CONFIG_FIT_VERBOSE on hostSimon Glass
Add a host Kconfig for FIT_VERBOSE. With this we can use CONFIG_IS_ENABLED(FIT_VERBOSE) directly in the tools build, so drop the forcing of this in the image.h header. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_ENABLE_OF_LIBFDTSimon Glass
Add a host Kconfig for OF_LIBFDT. With this we can use CONFIG_IS_ENABLED(OF_LIBFDT) directly in the tools build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Drop IMAGE_ENABLE_FITSimon Glass
Make use of the host Kconfig for FIT. With this we can use CONFIG_IS_ENABLED(FIT) directly in the host build, so drop the unnecessary indirection. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08hash: Drop some #ifdefs in hash.cSimon Glass
We can use the __maybe_unused attribute to avoid some of the #ifdefs in this file. Update the functions accordingly. Note: The actual hashing interface is still a mess, with four separate combinations and lots of #ifdefs. This should really use a driver approach, e.g. as is done with partition drivers. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08hash: Use Kconfig to enable hashing in host tools and SPLSimon Glass
At present when building host tools, we force CONFIG_SHAxxx to be enabled regardless of the board Kconfig setting. This is done in the image.h header file. For SPL we currently just assume the algorithm is desired if U-Boot proper enables it. Clean this up by adding new Kconfig options to enable hashing on the host, relying on CONFIG_IS_ENABLED() to deal with the different builds. Add new SPL Kconfigs for hardware-accelerated hashing, to maintain the current settings. This allows us to drop the image.h code and the I_WANT_MD5 hack. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08spl: cypto: Bring back SPL_ versions of SHASimon Glass
Unfortunately these were removed by mistake. This means that adding hash support to SPL brings in all software algorithms, with a substantial increase in code size. The origin of the problem was renaming them to SPL_FIT_xxx and then these were removed altogether in a later commit. Add them back. This aligns with CONFIG_MD5, for example, which has an SPL variant. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: f5bc9c25f31 ("image: Rename SPL_SHAxxx_SUPPORT to SPL_FIT_SHAxxx") Fixes: eb5171ddec9 ("common: Remove unused CONFIG_FIT_SHAxxx selectors") Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Add Kconfig options for FIT in the tools buildSimon Glass
In preparation for enabling CONFIG_IS_ENABLED() on the host build, add some options to enable the various FIT options expected in these tools. This will ensure that the code builds correctly when CONFIG_TOOLS_xxx is distinct from CONFIG_xxx. Drop some #ifdefs which are immediately unnecessary (many more are in later patches). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08kconfig: Add tools support to CONFIG_IS_ENABLED()Simon Glass
At present we must separately test for the host build for many options, since we force them to be enabled. For example, CONFIG_FIT is always enabled in the host tools, even if CONFIG_FIT is not enabled by the board itself. It would be more convenient if we could use, for example, CONFIG_IS_ENABLED(FIT) and get CONFIG_HOST_FIT, when building for the host. Add support for this. With this and the tools_build() function, we should be able to remove all the #ifdefs currently needed in code that is build by tools and targets. This will be even nicer when we move to using CONFIG(xxx) everywhere, since all the #ifdef and IS_ENABLED/CONFIG_IS_ENABLED stuff will go away. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> # b4f73886 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08compiler: Rename host_build() to tools_build()Simon Glass
With the new TOOLS_LIBCRYPTO and some other changes, it seems that we are heading towards calling this a tools build rather than a host build, although of course it does happen on the host. I cannot think of anything built by the host which cannot be described as a tool, so rename this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
2021-10-08image: Remove ifdefs around image_setup_linux() el atSimon Glass
Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c which calls into it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Avoid #ifdefs for manual relocationSimon Glass
Add a macro to handle manually relocating a pointer. Update the iamge code to use this to avoid needing #ifdefs. This also fixes a bug where the 'done' flag was not set. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Create a function to do manual relocationSimon Glass
Rather than adding an #ifdef and open-coding this calculation, add a helper function to handle it. Use this in the image code. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-08image: Split host code out into its own fileSimon Glass
To avoid having #ifdefs in a few functions which are completely different in the board and host code, create a new image-host.c file. Signed-off-by: Simon Glass <sjg@chromium.org>