aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-21Merge tag 'clk-2023.04' of https://source.denx.de/u-boot/custodians/u-boot-clkWIP/21Jan2023Tom Rini14-64/+324
Clock patches for 2023.04 This adds support for USB clocks on SAM9X60, as well as various fixes for nuvoton, imx8mn, and clock core.
2023-01-21cmd: clk: probe the clock before dump themPatrick Delaunay1-10/+5
The clock UCLASS need to be probed to allow availability of the private data (struct clk *), get in show_clks() with dev_get_clk_ptr() before use them. Without this patch the clock dump can cause crash because all the private data are not available before calling the API clk_get_rate(). It is the case for the SCMI clocks, priv->channel is needed for scmi_clk_get_rate() and it is initialized only in scmi_clk_probe(). This issue causes a crash for "clk dump" command on STM32MP135F-DK board for SCMI clock not yet probed. Fixes: 1a725e229096 ("clk: fix clock tree dump to properly dump out every registered clock") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221213145708.v2.1.Ia0bc6b272f1e2e3f37873c61d79138c2663c4055@changeid
2023-01-21configs: at91: sam9x60: Add required configs for the USB clockSergiu Moga4-0/+4
Add the configs required to use the SAM9X60's USB clock. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221223123313.362676-6-sergiu.moga@microchip.com
2023-01-21clk: at91: sam9x60: Add initial setup of UPLL and USBCK ratesSergiu Moga1-0/+30
In order for some of the functionalities, such as the USB clocks, to work properly we need some clocks to be properly initialised at the very beginning of booting. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221223123313.362676-5-sergiu.moga@microchip.com
2023-01-21clk: at91: pmc: export clock setup to pmcClaudiu Beznea3-42/+64
Clock setup was intended for setting clocks at boot time on SAMA7G5, e.g. for root clocks like PLLs, that were used to feed IPs needed alive in u-boot (e.g. Ethernet clock feed by a PLL). Export this functionality to all at91 clocks as it may be necessary on other SoCs. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Link: https://lore.kernel.org/r/20221223123313.362676-4-sergiu.moga@microchip.com
2023-01-21clk: at91: sam9x60: Register the required clocks for USBSergiu Moga1-0/+33
Register into DM the clocks required to properly enable USB functionality within the bootloader. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221223123313.362676-3-sergiu.moga@microchip.com
2023-01-21clk: at91: Add support for sam9x60 USB clockSergiu Moga4-0/+176
Implement sam9x60 USB clock driver. This clock has three parents: PLLA, UPLL and MAINXTAL. The driver is aware of the three possible parents with the help of the two mux tables provied to the driver during the registration of the clock. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20221223123313.362676-2-sergiu.moga@microchip.com
2023-01-21clk: imx8mn: fix imx8mn_enet_phy_sels clocks listDario Binacchi1-1/+1
[backport from linux commit 2626cf67f20b28446dfc3a5b9493dd535cdb747b] According to the "Clock Root" table of the reference manual (document IMX8MNRM Rev 2, 07/2022): Clock Root offset Source Select (CCM_TARGET_ROOTn[MUX]) ... ... ... ENET_PHY_REF_CLK_ROOT 0xAA80 000 - 24M_REF_CLK 001 - SYSTEM_PLL2_DIV20 010 - SYSTEM_PLL2_DIV8 011 - SYSTEM_PLL2_DIV5 100 - SYSTEM_PLL2_DIV2 101 - AUDIO_PLL1_CLK 110 - VIDEO_PLL_CLK 111 - AUDIO_PLL2_CLK ... ... ... while the imx8mn_enet_phy_sels list didn't contained audio_pll1_out for source select bits 101b. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-4-dario.binacchi@amarulasolutions.com
2023-01-21clk: imx: rename video_pll1 to video_pllDario Binacchi1-10/+10
[backport from linux commit bedcf9d1dcf88ed38731f0ac9620e5a421e1e9d6] Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's rename "video_pll1" to "video_pll" to be consistent with the RM and avoid misunderstandings. No functional changes intended. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-3-dario.binacchi@amarulasolutions.com
2023-01-21clk: imx8mn: rename vpu_pll to m7_alt_pllDario Binacchi1-1/+1
[backport from linux commit a429c60baefd95ab43a2ce7f25d5b2d7a2e431df] The IMX8MN platform does not have any video processing unit (VPU), and indeed in the reference manual (document IMX8MNRM Rev 2, 07/2022) there is no occurrence of its pll. From an analysis of the code and the RM itself, I think vpu pll is used instead of m7 alternate pll, probably for copy and paste of code taken from modules of similar architectures. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221219113127.528282-2-dario.binacchi@amarulasolutions.com
2023-01-21clk: nuvoton: fix bug for calculate pll clockJim Liu1-1/+1
Fix bug for npcm7xx bmc calculate pll clock. PLLCON1 need to divide by 2. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Acked-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20221121091528.1351-1-JJLIU0@nuvoton.com
2023-01-20Merge tag 'efi-2023-04-rc1-2' of ↵WIP/20Jan2023Tom Rini16-30/+434
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc1-2 Documentation * man-pages for source, blkcache, bdinfo * fix references to distro documentation UEFI: * allow clear screen by scrolling * ensure that file ubootefi.var is created * fix CapsuleMax variable reporting Others: * reduce verbosity of fat_read_file()
2023-01-20Merge branch '2023-01-20-finish-CONFIG-migration-work'Tom Rini178-1394/+1208
- Merge in the final batch of CONFIG to Kconfig/CFG migration work. This includes a fix for a number of ns16550 or similar UARTs due to a migration bug. We also pull in a revert for enabling CONFIG_VIDEO on tools-only_defconfig.
2023-01-20Revert "config: tools only: add VIDEO to build bmp_logo"WIP/2023-01-20-finish-CONFIG-migration-workFabio Estevam1-1/+0
This reverts commit 1cfba53ca46cade2dbf4e067afc8c19e72909a4b. Since commit 1cfba53ca46c ("config: tools only: add VIDEO to build bmp_logo") the build of tools-only_defconfig fails: | /bin/sh: line 1: tools/bmp_logo: No such file or directory This has been noticed in OpenEmbedded and Debian [1]. Revert it for now. [1] https://lists.denx.de/pipermail/u-boot/2023-January/504758.html Signed-off-by: Fabio Estevam <festevam@denx.de>
2023-01-20CI: Make check for new defined CONFIG symbols even more robustTom Rini2-2/+4
Now that all remaining in-tree cases where we define or undef a CONFIG symbol have been migrated to Kconfig or renamed to CFG we can make the CI check more robust. We will exclude the doc, tools and arch/arm/dts directories from this check as they are special cases. Further, we can exclude the scripts/kconfig/lkc.h and include/linux/kconfig.h files as the CONFIG values they define are special tooling cases and not real symbols. In the case of docs, the only places that currently fail this test are old documentation that should be rewritten so that we can remove this special case. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini137-1087/+1087
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-20watchdog: Clean up defaults for imx_watchdog / ulp_wdogTom Rini3-10/+2
In imx_watchdog, clean up the comment to just note the range now, as we do not need to set the default here as Kconfig does this for us. For ulp_wdog, set the default value via Kconfig instead. Cc: Stefan Roese <sr@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Peng Fan <peng.fan@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de>
2023-01-20usbtty: Remove default CONFIG_USBD_* valuesTom Rini1-19/+0
For this legacy driver, the only user sets these values in Kconfig, so we can remove them from the header. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20nxp: Finish migration of SYS_FSL_SRDS_[12] to KconfigTom Rini5-29/+18
As this is used on both ARM and PowerPC platforms, this needs to be listed in arch/Kconfig.nxp and match how they're currently used by select'ing them under the required PowerPC ARCH_xxx options. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20nxp: Finish migration of SYS_FSL_IFC_BANK_COUNT to KconfigTom Rini5-29/+14
As this is used on both ARM and PowerPC platforms, this needs to be asked in arch/Kconfig.nxp. Set the PowerPC defaults based on arch/powerpc/include/asm/config_mpc85xx.h and remove the default set in drivers/mtd/nand/raw/fsl_ifc_nand.c Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20net: phy: mv88e61xx: Finish migration of MV88E61XX_FIXED_PORTSTom Rini2-8/+4
Set the default for MV88E61XX_FIXED_PORTS to 0x0 in Kconfig, and move the comment from code to the help to explain what this does. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-20fsl-layerscape: Rework usage of CONFIG_CLUSTER_CLK_FREQTom Rini1-3/+4
In the case where CONFIG_CLUSTER_CLK_FREQ is not defined, simply set cluster_clk to get_board_sys_clk(). Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20usb: musb: Rename CONFIG_USB_MUSB_TIMEOUT to MUSB_TIMEOUTTom Rini2-6/+4
This variable has never been configured to another value at present, and was not converted to Kconfig. Opt instead to rename this to MUSB_TIMEOUT. Cc: Marek Vasut <marex@denx.de> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Marek Vasut <marex@denx.de>
2023-01-20fpga: Migrate CONFIG_MAX_FPGA_DEVICES to KconfigTom Rini3-9/+5
This is always defined to 5, so use that as the default. Cc: Michal Simek <michal.simek@amd.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Michal Simek <michal.simek@amd.com>
2023-01-20common/update: Finish Kconfig migrationTom Rini2-25/+12
We can enforce the dependencies of this module via Kconfig now, so do so rather than with #error statements. Further, we can ensure that all required values are set to their defaults in Kconfig, and in fact already do so, so remove the tests here. The exception is CONFIG_UPDATE_LOAD_ADDR which needed to be migrated to Kconfig in the first place. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20spl: sata: Rework the loading case it not use IS_ENABLED(...)Tom Rini1-16/+9
In this case, using IS_ENABLED(...) to attempt to load the image results in harder to read and less useful code, along with having to define a CONFIG value that would be unused. To maintain the current albeit slightly odd behavior, maintain that if we have both SPL_FS_FAT and SPL_SATA_RAW_U_BOOT_USE_SECTOR enabled, we use SPL_FS_FAT for the load. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20autoboot: Rework CONFIG_AUTOBOOT_STOP_STR_* usageTom Rini1-6/+10
In order to not define a CONFIG value when the CONFIG_AUTOBOOT_STOP_STR_* functionality is not enabled, rework the assignment of empty and unused (as the code will be discarded under if 0, in the end) values to be AUTOBOOT_STOP_STR_* instead of CONFIG_AUTOBOOT_STOP_STR_*. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20arm: lib1funcs.S: Update compatibility with Linux comment slightlyTom Rini1-7/+2
At this point, the Linux code for "lib1funcs" has changed rather dramatically. While a resync would be beneficial, it's outside the scope of what we need here. Simply remove the define for CONFIG_AEABI and tests for it. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20dm: ns16550: Restore how we define UART_REGTom Rini1-6/+4
Prior to commit 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig") we had defined CONFIG_SYS_NS16550_REG_SIZE to -1 with DM_SERIAL such that we would then have a size 0 character array. This resulted in functionally no padding. The confusion on my part came from dealing with the constraints around platforms that do not use DM_SERIAL in SPL/TPL. After Andre Przywara reported that sunxi was broken, I've re-read the code and comments again and thought on this harder. What we want I believe is what this patch does now. If DM_SERIAL is defined for this stage, regardless of CONFIG_SYS_NS16550_REG_SIZE then we will dynamically handle reg shifts and 'struct ns16550' needs no padding (which is functionally what unsigned char foo[0] provides). This is the same case as NS16550_DYNAMIC and DEBUG_UART. Expand the existing comment here slightly. Otherwise, we will have CONFIG_SYS_NS16550_REG_SIZE set to a non-zero value, and handle padding within the struct. Cc: Simon Glass <sjg@chromium.org> Cc: Sergei Antonov <saproj@gmail.com> Cc: Quentin Schulz <quentin.schulz@theobroma-systems.com> Cc: Andre Przywara <andre.przywara@arm.com> Fixes: 9591b63531fa ("Convert CONFIG_SYS_NS16550_MEM32 et al to Kconfig") Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com> Tested-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2023-01-20arm: Rework usage of CONFIG_ARMV[78]_SECURE_BASE in linker scriptsTom Rini2-4/+8
In order to avoid defining CONFIG_ARMV[78_]SECURE_BASE as empty in the linker scripts, if not already defined, add and use __ARMV[78_]SECURE_BASE for when the base is not defined and we want the linker scripts to continue. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20i2c: fsl_i2c: Rework usage of CONFIG_SYS_IMMRTom Rini1-5/+7
This driver is used on both m68k, where CONFIG_SYS_IMMR is not used, and PowerPC an ARM where it is. Abstract this to a new value rather than re-defining a CONFIG symbol on m68k. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20arc: Migrate ARC_MMU_VER to KconfigTom Rini2-10/+7
Move this value to Kconfig. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20global: Remove unused CONFIG definesTom Rini17-112/+7
Remove some CONFIG symbols and related comments, etc, that are unused within the code itself at this point. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-20efi_loader: fix CapsuleMax variable reportingIlias Apalodimas1-1/+1
Currently the code that adds the CapsuleMax variable is under a Kconfig named 'EFI_HAVE_CAPSULE_UPDATE. Git history only shows a single occurrence of that. The IS_ENABLED should be checking for EFI_HAVE_CAPSULE_SUPPORT Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-20efi_loader: update the error message of TCG protocol installationIlias Apalodimas1-1/+1
"Unable to find TPMv2 device" doesn't explain much with regards to the error origin. Update it to match what we have in the RNG protocol installation. Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-20efi_loader: ensure that file ubootefi.var is createdHeinrich Schuchardt1-3/+5
Currently file ubootefi.var is only created if the user sets a non-volatile EFI variable. If the file is missing, a warning is written. With the change PlatformLang is always persisted. So the file will exist on second boot. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-20efi_loader: Avoid overwriting previous outputs on console screen clearingJan Kiszka2-1/+21
Before clearing the screen, ensure that no previous output of firmware or UEFI programs will be overwritten on serial devices or other streaming consoles. This helps generating complete boot logs. Tested regarding multi-output against qemu-x86_defconfig. Still, there were remaining concerns about side effects, so this is provided as an opt-in feature. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-20efi_loader: Set default console colors on efi_cout_clear_screen if neededJan Kiszka1-0/+6
Ensures a consistent background color of the whole screen for succeeding outputs as both demanded by the spec and implemented in EDK2 as well. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-20doc: fix references to distro documentationDario Binacchi5-5/+6
Commit 37c5195dfcd157 ("doc: Move distro boot doc to rST") renamed doc/README.distro to doc/develop/distro.rst. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Soeren Moch <smoch@web.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-01-20doc: man-page for bdinfoHeinrich Schuchardt2-0/+120
Provide a man-page for the bdinfo command Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-20doc: man-page for blkcacheHeinrich Schuchardt2-0/+75
Provide a man-page for the blkcache command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-20doc: man-page for source commandHeinrich Schuchardt2-0/+194
Provide a man-page for the source command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2023-01-20fs/fat: avoid noisy message fat_read_file()Heinrich Schuchardt2-19/+5
UEFI applications call file system functions to determine if a file exists. The return codes are evaluated to show appropriate messages. U-Boot's file system layer should not interfere with the output. Rename file_fat_read_at() to fat_read_file() adjusting the parameter sequence and names and eliminate the old wrapper function. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-20Merge tag 'tpm-20012023' of https://source.denx.de/u-boot/custodians/u-boot-tpmTom Rini3-2/+8
TPM fixes and state reporting
2023-01-20tee: optee: fix uuid comparisons on service discoveryIlias Apalodimas1-1/+1
When comparing UUIDs for discovered services we only compare up to the ptr size instead of the entire UUID Fixes: 94ccfb78a4d61 ("drivers: tee: optee: discover OP-TEE services") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
2023-01-20tpm2: ftpm: add the device in the OP-TEE services listIlias Apalodimas1-0/+3
commit fe8a4ed0111073 ("tee: optee: discover services dependent on tee-supplicant") is trying to automatically scan and add TAs that are presented on pseudo bus from the secure world. In order to be able to list and compare the scanned devices the available drivers have to register themselves on the op-tee service list. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-20MAINTAINERS: add a new entry on TEE MAINTAINERSIlias Apalodimas1-0/+3
Since I do have a look on TEE patches regardless and Jens doesn't have his own tree, add myself as a co-maintainer. I'll be carrying over the TEE related patches from now on. While at it add the maintenance tree for TPM Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-20tee: optee: fix a print error on rng probingIlias Apalodimas1-1/+1
If we fail to probe the optee-rng device, we print a wrong message referring to the firmware tpm. Fixes: 476a3d58dfeb ("tee: optee: don't fail probe because of optee-rng") Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-01-19Merge tag 'dm-pull-18jan23' of ↵WIP/19Jan2023Tom Rini78-537/+1617
https://source.denx.de/u-boot/custodians/u-boot-dm convert rockchip to use binman patman fix for checkpatch binman optional entries, improved support for ELF symbols trace improvements minor fdt refactoring
2023-01-19Merge branch '2022-01-18-assorted-updates'Tom Rini88-7605/+14085
- A few TI platform fixes, compression test cleanup and zstd update, npcm7xx update, add "part type" subcommand, VBE bugfix on some platforms, cleanup EVENT related Kconfig option logic (and fix some platforms), other minor cleanups.