Tom Rini [Wed, 21 May 2025 22:51:22 +0000 (16:51 -0600)]
global: Cleanup usage of "ETH_ALEN"
The value of "ETH_ALEN" is defined to 6 in <linux/if_ether.h>. This file
is included in <net.h>. In the places where we had ETH_ALEN but no
direct include of <net.h>, add <linux/if_ether.h>. In the places where
we had a custom name used, make use of ETH_ALEN instead.
Tom Rini [Wed, 21 May 2025 22:51:21 +0000 (16:51 -0600)]
include/mtd.h: Cleanup usage
There are only a few things found in <mtd.h> today. Go through and audit
the C files which include <mtd.h> and remove it when not required. Then,
add it to the files which had either missed it or had an indirect
inclusion of it.
Tom Rini [Wed, 21 May 2025 22:51:20 +0000 (16:51 -0600)]
include/mmc.h: Audit include list
This file does not need <linux/sizes.h> nor <linux/compiler.h> so remove
them. This exposes however that a number of other files had been relying
on this implicit include for <linux/sizes.h> so add that where needed.
Tom Rini [Wed, 21 May 2025 22:51:19 +0000 (16:51 -0600)]
include/ide.h: Cleanup usage
At this point in time, <ide.h> provides the IDE_BUS macro and the
function prototype for ide_set_reset, which is used with IDE_RESET. The
only files which should include this header are the ones that either use
that macro or that function. Remove <blk.h> from <ide.h> and remove
<ide.h> from places which do not need it.
Tom Rini [Wed, 21 May 2025 22:51:17 +0000 (16:51 -0600)]
include/efi_loader.h, include/efi_tcg2.h: Audit include list
In include/efi_loader.h we do not directly need <log.h>, <part_efi.h>,
<pe.h> nor <linux/oid_registry.h> so remove them. In include/efi_tcg2.h
we make use of <part_efi.h> but did not include it, so add it directly.
Tom Rini [Wed, 21 May 2025 22:51:08 +0000 (16:51 -0600)]
include/bios_emul.h: Audit include list
This file does not need <pc.h> but does directly need
<linux/types.h>. Furthermore, arch/x86/lib/bios.c was getting <pci.h>
via <bios_emul.h> so add it there.
Simon Glass [Thu, 1 May 2025 11:10:08 +0000 (05:10 -0600)]
strim: Sync up with Linux version
Linux changed the behaviour of strim() so that a string with only spaces
reduces places the terminator at the start of the string, rather than
returning a pointer to the end of the string.
Tom Rini [Thu, 1 May 2025 16:47:21 +0000 (10:47 -0600)]
fs.h: Switch to using rtc_def.h
This file only needs the definition of 'struct rtc_time' and that is
found in <rtc_def.h>. Use that instead of pulling in rtc.h to pull in
rtc_def.h as rtc.h includes many other include files.
Jonas Karlman [Sat, 10 May 2025 15:32:01 +0000 (15:32 +0000)]
clk: Fix clk_set_parent() regression
The commit ac30d90f3367 ("clk: Ensure the parent clocks are enabled
while reparenting") add a call to clk_enable() for the parent clock.
For clock drivers that do not implement the enable() ops, like most
Rockchip clock drivers, this now cause the set_parent() ops to never
be called when CLK_CCF=n (default for Rockchip).
clk_enable() typically return -ENOSYS when the enable() ops is not
implemented by the clock driver, with CLK_CCF=y clk_enable() instead
return 0 when the enable() ops is unimplemented.
Change to ignore -ENOSYS from the newly introduced clk_enable() call to
fix this regression and restore the old behavior of set_parent() ops
being called regardless of if enable() ops is implemented or not.
Fixes: ac30d90f3367 ("clk: Ensure the parent clocks are enabled while reparenting") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Tested-by: Dang Huynh <danct12@riseup.net> Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
* Improve the pytest documentation
* u-boot-test-reset: mention power cycling
* describe u-boot-test-release
* correct link to QEMU
* describe that RISC-V supports semihosting
UEFI:
* link libggc via PLATFORM_LIBGCC to EFI binaries
* allow suppressing ANSI output in dtbdump.efi
* test/py/test_efi_fit: test fdt and initrd
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmggj+IACgkQhO4vgnE3
# U0sjTBAAkWySSBNFoj12AyjO2h4kJecxiJJxyoMYTcsr3xdgV0WTPQFaWcSBqTsL
# NgKq5KFNe+ywUdDIqU1VLOTcQf298hofRrcp5Gfhv+syZaRCorCSoSJI6ZveZ5Bi
# 9N2pPvhEVrlFBF2XannJ5ilYtLAbiqIvVFmdLmFwRPbODv/gfEkSudSy0Za7t1tM
# c7RoRegpXziY4Y1XPfr3MpXgKpUQkOPnvXKUwtHhL055X/1Ggg87dzPg1fiU+DiQ
# AGAgvGD/KF/ym4aWQ3jWyji8Kxc5BLsurv083it7JAmL82wqNbU9j5cx3mS/f2Le
# uL7YWv1GANbq+MoBC5O3nkB+yUtHSLylFC3KKFiehmKhc/JO+Uj3cJY/Q/25+lxs
# aahG3C/5xgBTgM6YEqJfSqKYQVFsC2V/a7gWAFlX7OidYXm6oDBu4TeAHmAtBgcj
# pz0AVCYMWyhKE+zb+4U2mlKEQ8bJpFdC2Q+pTMciGAM3YyztotJ1yoM4IndDrh4q
# ScrIpXHSqWLlZfev+NnJDw1UKLWEJIMeXh0uzfpaT5M0cLEDeHTOSX9Fp3ZPj9Af
# +T3nNWSXWlOW0wc6C5igj4p0UiGSbHMMPOa54f/D0gdl/UkPZ1YPBYVBa/eX1yBy
# NlaJziLCmLqyWpYIVhaigKDtGWfgjoHGaABfyuSIj/HxmIHhD5w=
# =NbGi
# -----END PGP SIGNATURE-----
# gpg: Signature made Sun 11 May 2025 05:54:10 AM CST
# gpg: using RSA key 2BBC0A5EDDFF6ED2FAFF203E84EE2F827137534B
# gpg: Can't check signature: No public key
Adriano Cordova [Thu, 8 May 2025 18:30:33 +0000 (14:30 -0400)]
efi_loader: fix dtbdump output color and format
Imitate in dtbdump what initrddump does for color,
newlines and input handling. The output parsing in
the CI is strict and with the current output the CI
is not recongnizing the prompt '=>'.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Thu, 8 May 2025 21:34:44 +0000 (15:34 -0600)]
doc: pytest: Document the test_bootmenu test
Add this test to the documentation. There was already a function comment
that included the argument, so convert it to the right style to be
rendered correctly in output.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 23:23:02 +0000 (17:23 -0600)]
doc: pytest: Document the test_efi_loader test
Add this test to the documentation. We need to add a code-block
annotation to the example and indent it correctly. We also need to
document the do_test_efi_helloworld_net function and that in turn means
changing the documentation to test_efi_helloworld_net_http and
test_efi_helloworld_net_tftp to reflect what is and isn't done in those
functions themselves now.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 23:23:01 +0000 (17:23 -0600)]
doc: pytest: Document the test_bootstage test
Add this test to the documentation. We need to move the import to follow
the main comment so that it renders correctly, and add a code-block
annotation to the example and indent it correctly. Next, neither of the
functions had comments themselves, so document them now.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 23:23:00 +0000 (17:23 -0600)]
doc: pytest: Document the test_net test
Add this test to the documentation. While the diff appears large at
first, the only changes within the test are to move the imports to
follow the pydoc comment and then to code-block and indent the example
configuration.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 22:08:19 +0000 (16:08 -0600)]
doc: pytest: Document the test_net_boot test
Add the test_net_boot.py test to the generated documentation. While most
of this was already commented correctly for inclusion the biggest
problem was examples of code without a code-block notation. This in turn
broke parsing. Add the missing notations. We also must have the comment
prior to any import lines or it will not be seen as a comment on the
overall file and thus not included.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 22:08:18 +0000 (16:08 -0600)]
doc: pytest: Framework for documenting tests and document test_000_version
In order to easily document pytests, we need to include the autodoc
extension. We also need to make sure that for building the docs, CI
includes pytest and that we have PYTHONPATH configured such that it will
find all of the tests and related files. Finally, we need to have our
comments in the test file by in proper pydoc format in order to be
included in the output.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini [Wed, 7 May 2025 22:08:17 +0000 (16:08 -0600)]
doc: Start improving our pytest documentation
Begin the work of documenting all of our pytests. To do this, we should
have a directory under develop for it as there will be a large number of
new files. As the current document is referenced externally in a number
of locations, add the sphinx_reredirects module so that we can redirect
from the old location to the new.
Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Vincent Stehlé [Tue, 6 May 2025 12:36:22 +0000 (14:36 +0200)]
cmd: nvedit: fix efi env -e -i command help
The help string for the `setenv -e' command shows a comma being used as
the separator between address and size for the -i option, which deals
with UEFI Variables contents passed as a buffer in memory.
This is no longer the case since commit 2b3fbcb59f41 ("efi_loader: use
':' as separator for setenv -i") and commit 8f0ac536d493 ("efi: change
'env -e -i' usage syntax"), which changed the separator from a comma to
a colon.
Therefore fix this last bit of the help string accordingly.
While at it, fix the comment of function do_env_set_efi(), which also
mentions a comma as separator.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Tom Rini <trini@konsulko.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Maxim Uvarov <maxim.uvarov@linaro.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Andrew Davis [Mon, 5 May 2025 17:46:01 +0000 (12:46 -0500)]
board: ti: sec-cfg.yaml: Fix OTP write_host_id order
The write_host_id is the last element here and order does matter. This
may have gone unnoticed before as by default all elements are 0, but
if this is updated to a different host, it will not work. Update
the order so write_host_id is the last element in all current secure
board configs.
Reported-by: Prashant Shivhare <p-shivhare@ti.com> Signed-off-by: Andrew Davis <afd@ti.com>
Stephen Warren [Fri, 14 Mar 2025 18:10:31 +0000 (12:10 -0600)]
disable mail for swarren
I haven't been involved in U-Boot development for quite a while, so
CCing me on patches isn't currently useful. Add a .mailmap entry that I
believe will turn off patch CCs. This can always be removed if I become
active again! Remove myself from a few MAINTAINERS failed and the git
mailrc file too.
Tom Rini [Sat, 15 Mar 2025 01:28:45 +0000 (19:28 -0600)]
x86: Correct usage of FSP_VERSION2
As the code is today, we get a warning about "select" statements on
"choice" options not doing anything. In this case, we move to having a
"default FSP_VERSION2 if INTEL_APOLLOLAKE" in order to get the desired
outcome.
Naresh Solanki [Wed, 12 Mar 2025 09:01:15 +0000 (14:31 +0530)]
x86: spl: Add support for NVMe boot device
This change adds `BOOT_DEVICE_NVME` to the `enum` list in
`arch/x86/include/asm/spl.h`,
enabling NVMe as a recognized boot device for SPL (Secondary Program
Loader).
Tested x86 hardware with coreboot + U-Boot payload.
Verified successful boot to NVMe drive.
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Andy Shevchenko [Fri, 18 Oct 2024 15:55:57 +0000 (18:55 +0300)]
x86: cpu: Describe board final hooks in the header
The new two declarations board_final_init() and board_final_cleanup()
need a description. Add it here.
Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Simon Glass <sjg@chromium.org>
ARM: tegra: set default SYS_CONFIG_NAME from SoC Kconfig
Since most boards now use the same generic device config header, move its
setup to SoC Kconfig instead of setting SYS_CONFIG_NAME in each board's
Kconfig.
The LG Optimus 2X is a touchscreen-based, slate-sized smartphone designed
and manufactured by LG that runs the Android operating system. The
Optimus 2X features a 4" WVGA display, an Nvidia Tegra 2 dual-core chip,
512 MB of RAM and extendable 8 GB of internal storage. UART-B is default
debug port.
Tested-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
video: backlight: add Skyworks/Analogictech AAT2870 led controller driver
Add support for Skyworks AAT2870 LED Backlight Driver and Multiple LDO
Lighting Management Unit. Only backlight is supported as for now. Supported
backlight level range is from 2 to 255 with step of 1.
Tested-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Hitachi TX10D07VM0BAA is a color active matrix TFT (Thin Film Transistor)
liquid crystal display (LCD). The resolution of a 4" contains 480 x 800
pixels.
Tested-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
MAX8907 PMIC has embedded poweroff function used by some device to initiane
device power off. Implement it as optional sysreset driver guarded by
kconfig option and system-power-controller device tree property.
Tested-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Added a new regulator driver for the MAXIM MAX8907 PMIC, providing
essential regulator functionalities and incorporated the necessary binding
framework within the core PMIC driver.
Tested-by: Ion Agorria <ion@agorria.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Releasing a GPIO on Tegra necessitates changing its configuration to SFIO
to activate its special function. Without this reconfiguration, the special
function will be unavailable.
Christoph Fritz [Wed, 16 Apr 2025 11:45:35 +0000 (13:45 +0200)]
net: gmac_rockchip: Add RMII support for rk3288
Add RMII-specific handling to rk3288_gmac_fix_mac_speed() so that it
properly sets the RMII clock (2.5 MHz vs. 25 MHz) and speed bits
(10 Mbps vs. 100 Mbps). Also define a new rk3288_gmac_set_to_rmii()
function to set the PHY interface field and RMII_MODE bit.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Christoph Fritz [Wed, 16 Apr 2025 11:44:13 +0000 (13:44 +0200)]
rockchip: rk3288: grf: Unify speed/flowctrl fields for clarity
Update GMAC speed and flow control fields in GRF_SOC_CON1 to use
RK3288_GMAC_* prefix, ensuring a consistent naming convention. It also
shifts each mask/bit definition to match the actual hardware bits, which
makes future usage easier.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This patch adds U-Boot support for the LCKFB TaishanPi RK3566 board, including:
- U-Boot device tree
- Default defconfig
- Board documentation
- MAINTAINERS entry
Changes in v2:
- Removed unused configs from `lckfb-tspi-rk3566_defconfig`
- Reordered TaishanPi entry in `doc/board/rockchip/rockchip.rst` alphabetically
Link to v1:
https://lore.kernel.org/u-boot/tencent_95ED0C0545D87B6A8C4B62EC045D53AD2406@qq.com/
Signed-off-by: Jiehui He <jiehui.he@foxmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Daniel Schultz [Mon, 28 Apr 2025 14:49:04 +0000 (07:49 -0700)]
board: phytec: phycore_am62ax: Update Environment
Add fit_addr_r to the environment to allow us to boot from a FIT image.
Increase the maximum Image size from 23 MB to 26 MB by moving the
initramfs start address up. This gives us a bigger ranger to
provide kernel images which are not stripped down too much.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Wed, 23 Apr 2025 14:49:13 +0000 (08:49 -0600)]
bootstd: Rework BLK dependency
The bootstd code itself does not have any dependency on BLK in order to
build. However, in order to minimize size growth of non-migrated
platforms, change this from being "default y" to "default y if BLK".
This will make it easier to begin migration of platforms which do not
have any BLK-class device but do want to use bootstd.
mtd: spi-nor: Send write disable cmd after every write enable
Write enable(06h) command will be sent to a flash device to
set the write enable latch bit before every program, erase,
write command. After that write disable command (04h) needs
to be sent to clear the write enable latch.
This write_disable() is missing at the majority of the places
in the driver, add it to clear write enable latch.
Vaishnav Achath [Mon, 25 Nov 2024 10:49:47 +0000 (16:19 +0530)]
mtd: spi-nor-core: Fixup SNOR_F_IO_MODE_EN_VOLATILE for MT35X
MT35XU512ABA has only BFPT and 4-Byte Address Instruction Table
in SFDP. commit bebdc237507c ("mtd: spi-nor: Parse SFDP SCCR Map")
added checks in spi_nor_octal_dtr_enable() to bail out if the 22nd DWORD
in SCCR does not indicate DTR Octal Mode Enable, since MT35XU512ABA device
supports octal DTR mode, add this property in SFDP fixup.
Heiko Stuebner [Tue, 6 May 2025 08:55:31 +0000 (10:55 +0200)]
configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for px30 to rk3308/etc
Loading a FIT image for kernel, initrd and rootfs on px30 can result in an
memory overlap, resulting in the not 100% helpful message of
"This will not be a case any time" from lmb_fix_over_lap_regions().
Adding a bit of debug info to lmb_fix_over_lap_regions() brings:
lmb_fix_over_lap_regions: base1 0x280000-0x6005ac > base2 0x600000-0x6000d1
So this is because the FIT image gets loaded to the kernel_addr_r at
0x280000 while the pxe-file is already living at 0x600000, only 3.5MB
behind.
In commit 4acc8bb044a4 ("configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS
for rk3308, rk3328, and rk3399") FUKAUMI Naoki already brought the memory
layouts for the mentioned socs in sync.
Adjusting the env-layout on px30 to this scheme, magically solves the
overlap issue and also brings px30 more in line with the other mentioned
SoCs.
Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Quentin Schulz [Fri, 31 Jan 2025 10:31:29 +0000 (11:31 +0100)]
pinctrl: rockchip: fix bank's pin_base computing
The logic in the core reads the nr_pins of the controller and uses it as
the index of the first pin in the bank (pin_base) it currently parses.
It then increments the number of pins in the controller before going to
the next bank.
This works "fine" for controllers where nr_pins isn't defined in their
rockchip_pin_ctrl struct as it defaults to 0. However, when it is
already set, it'll make the index pin of each bank offset by the number
in nr_pins declared in the struct at initialization, and it'll keep
growing while adding banks, which means the total number of pins in the
controller will be misrepresented.
Additionally, U-Boot proper may probe this driver twice (pre-reloc and
true proper) and not reset nr_pins of the controller in-between meaning
the second probe will have an offset of the actual correct nr_pins.
Instead, let's just store locally the number of pins in the controller
and make sure it's reset between probes.
Finally, this stops modifying a const struct which will soon be
triggering a CPU abort at runtime.
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>