usb: gadget: cdns3: Fix missing cache operations for non-zero Endpoints
Transfer initiation and completion for the non-zero Endpoints are
handled by cdns3_ep_run_transfer() and cdns3_transfer_completed()
respectively.
Failing to flush the cache associated with the TRB Pool within
cdns3_ep_run_transfer() results in the transfers never being initiated.
Similarly, failing to invalidate the cache associated with the TRB pool
within cdns3_transfer_completed() results in the transfers never being
completed.
Fix this.
Fixes: 7e91f6ccdc84 ("usb: Add Cadence USB3 host and gadget driver") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Marek Vasut <marex@denx.de>
Jonas Karlman [Tue, 17 Sep 2024 20:59:17 +0000 (20:59 +0000)]
regulator: rk8xx: Fix buck get and set enabled state on RK806
Wrong POWER_EN reg is used to get and set enabled state for the RK806
buck 4 and 8 regulators, also wrong POWER_SLP_EN0 bit is used for
suspend state for the RK806 buck 1-8 regulators.
Fix this by not adding one to the zero based buck variable.
Fixes: f172575d92cd ("power: rk8xx: add support for RK806") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Marek Vasut [Tue, 24 Sep 2024 22:08:23 +0000 (00:08 +0200)]
arm: imx: Enable always-on regulators using board specific workaround on DHCOM SoM
U-Boot is currently unable to automatically enable regulators which
contain DT property regulator-always-on or regulator-boot-on. There
is an ongoing work to add this functionality to regulator core code,
but until the proper solution lands, add this awful workaround code
to force these regulators on. This is specifically needed to assure
the VIO regulator used to supply ethernet magnetics is enabled.
Marek Vasut [Mon, 8 Jul 2024 11:43:23 +0000 (13:43 +0200)]
ARM: stm32: Fix secure_waitbits() mask check
Do not apply bitwise AND to register value and expected value, only
apply bitwise AND to register value and mask, and only then compare
the result with expected value that the function polls for.
Fixes: b49105320a5b ("stm32mp: psci: Implement PSCI system suspend and DRAM SSR") Signed-off-by: Marek Vasut <marex@denx.de>
Marek Vasut [Tue, 18 Jun 2024 22:57:25 +0000 (00:57 +0200)]
ARM: stm32: Fix TAMP_SMCR BKP..PROT fields on STM32MP15xx
Update the TAMP_SMCR BKP..PROT fields to put first 10 registers
into protection zone 1 and next 5 into zone 2. This fixes use of
boot counter which is often in zone 3 and has to be updated from
Linux, which runs in NS.
Fixes: 73f7fc944cf6 ("ARM: stm32: Initialize TAMP_SMCR BKP..PROT fields on STM32MP15xx") Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Udit Kumar [Thu, 29 Aug 2024 08:34:53 +0000 (14:04 +0530)]
ram: k3-ddrss: Handle error properly in lpddr4_start
In lpddr4_start function error returned by lpddr4_enablepiinitiator
may go undetected due to overwrite of return code.
Add support to handle error in above case.
Tom Rini [Mon, 26 Aug 2024 17:01:40 +0000 (11:01 -0600)]
doc/develop/sending_patches.rst: Reword where our git tree is slightly
We shouldn't have had the link to our git tree be contained within "``"
as that meant that it did not work as a link, so remove those. And
rather than make this a link plus text, keep this as a link within the
text for overall clarity.
Suggested-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Tom Rini <trini@konsulko.com>
Fix link errors caused by missing Kconfig dependencies:
1. DFU_OVER_USB compiles common/dfu.c which calls g_dnl_clear_detach()
which is implemented in drivers/usb/gadget/g_dnl.c which needs
USB_GADGET_DOWNLOAD. Test case:
$ printf "CONFIG_USB_GADGET_DOWNLOAD=n\nCONFIG_USB_FUNCTION_FASTBOOT=n" \
>>configs/am62px_evm_a53_defconfig
$ make am62px_evm_a53_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-
[...]
common/dfu.c:34:(.text.run_usb_dnl_gadget+0x68): undefined reference to `g_dnl_clear_detach
[...]
2. With the above fixed, the same build causes:
common/spl/spl_dfu.c:29:(.text.spl_dfu_cmd+0xb0): undefined reference to `run_usb_dnl_gadget'
This is because SPL_DFU compiles common/spl/spl_dfu.c which calls
run_usb_dnl_gadget() which is implemented in common/dfu.c which needs
DFU_OVER_USB.
Tom Rini [Fri, 13 Sep 2024 14:18:54 +0000 (08:18 -0600)]
Merge tag 'doc-2024-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request doc-2024-10-rc4
* doc/develop/sending_patches.rst: Clarify when to use which branch
* doc/arch/m68k.rst: Update toolchain comment
* doc/arch/mips.rst: Update toolchain list
* doc: Update rST to not reference the old wiki
* doc/mkeficapsule.1: Update homepage link
* bootcount: Update to point to current documentation
* binman: Update links for sending patches
Tom Rini [Mon, 26 Aug 2024 16:49:54 +0000 (10:49 -0600)]
doc: Update rST to not reference the old wiki
In two places we had references to the old wiki pages instead of links
to the relevant part of our documentation. Update (and slightly reword)
these spots.
Tom Rini [Mon, 26 Aug 2024 16:39:17 +0000 (10:39 -0600)]
doc/develop/sending_patches.rst: Clarify when to use which branch
The previous wording on the paragraph about what branch to use when
submitting patches did not reflect how / when the next branch is
currently used. Reword this to note that master should be used for bug
and regression fixes, always, and that next should be used once it
opens, with -rc2.
Reported-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
scripts/Makefile.lib: do not include CONFIG_DEVICE_TREE_INCLUDES in dtsi_include_list
The commit mentioned in Fixes broke the
CONFIG_DEVICE_TREE_INCLUDES feature, with the result that any board
setting any non-empty value for that fails to build.
The parent of the mentioned commit refactoring a bit by introducing
the dtsi_include_list variable and changing cmd_dtc to loop over that
was fine.
However, the .dtsi files mentioned in CONFIG_DEVICE_TREE_INCLUDES are
not supposed to be generated via the build system. They are meant for
e.g. including a public key for verified boot (generated with the
key2dtsi script), or for injecting some stuff to the /config
node (say, a bootcmd or a load-environment setting or things like
that). The files can either live in-tree in a private branch or
completely outside, e.g. in some Yocto metadata.
But regardless, U-Boot's build system will never know anything about
them, so when the mentioned commit did
things broke, because if CONFIG_DEVICE_TREE_INCLUDES is for example
"/path/to/public_key.dtsi", this would add a dependency on
$(obj)//path/to/public_key.dtsi to each $(obj)/*.dtb target, yielding
make[3]: *** No rule to make target 'arch/arm/dts/imx6dl-aristainetos2c_7.dtb', needed by 'dtbs'. Stop.
To fix that while preserving the introduced
CONFIG_EFI_CAPSULE_ESL_FILE behaviour, disentangle
CONFIG_DEVICE_TREE_INCLUDES from dtsi_include_list from which
dtsi_include_list_deps is built, and instead just add the items
directly to the $(foreach) loop.
Fixes: a958988b62 ("scripts/Makefile.lib: Add dtsi include files as deps for building DTB") Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Tested-by: Emil Kronborg <emil.kronborg@protonmail.com>
riscv: CONFIG_SPL_FRAMEPOINTER must depend on CONFIG_SPL
The CONFIG_SPL_FRAMEPOINTER symbol is only relevant in SPL.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Ben Dooks <ben.dooks@codethink.co.uk>
For the Milk-V Mars CM (lite) we have only been copying sizeof(void *)
bytes to the compatible property instead of the whole string list.
Fixes: de3229599d4f ("board: add support for Milk-V Mars CM") Reported-by: E Shattow <lucent@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
clk: sifive: avoid declaring static variables in includes
The existing code is unnecessarily convoluted:
Arrays __prci_init_clocks_fu[5|7]40 are initialized with data.
In separate includes fu[5|7]40-prci.h the size of the arrays is provided as
constants.
By moving the structures prci_clk_fu[5|7]40 to the respective code modules
we can directly use ARRAY_SIZE() to access the size of the data used for
initialization.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
The RPC SPI DT node is now part of mainline Linux DT, remove the
duplicate content from U-Boot DT extras. The SPI flash DT node name
has been changed from "spi-flash@0" to "flash@0", reflect this change
in this patch. Retain "bank-width" and "num-cs" DT properties which
are used by U-Boot. Retain "spi-rx-bus-width" and "spi-tx-bus-width"
DT properties to indicate the bus should always be operated in 1-1-1
mode as the U-Boot RPC SPI driver does not support higher bus width
modes yet.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Make sure RPC PHY timing registers are configured before performing
bus access. These registers might have been left unconfigured or may
have been configured by a prior stage bootloader and leaving them
unconfigured or misconfigured would interfere with U-Boot operation.
Set PHYOFFSET1 DDRTMG field to 3 which enables DDR timing adjustment
when SPIDRE or DRDRE = 0 and set PHYOFFSET2 OCTTMG field to 4 which
makes the interface operate in Serial flash or HyperFlash mode.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 31 Aug 2024 20:31:46 +0000 (22:31 +0200)]
mtd: spi: renesas: Configure DRDRENR register
Make sure DRDRENR register is configured before performing external
address space read. This register might have been configured by a
prior stage bootloader and leaving it unconfigured would interfere
with U-Boot operation. Since U-Boot RPC SPI driver does not support
DDR data transfer mode yet, set this register unconditionally to 0.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 31 Aug 2024 20:31:45 +0000 (22:31 +0200)]
mtd: spi: renesas: Write DRDMCR register once
Instead of writing DRDMCR with 0 first and then overwriting DRDMCR again
in case any dummy bytes have to be sent out, write DRDMCR in every case
with the amount of dummy bytes that have to be sent out. In case no dummy
bytes have to be sent out, the value written into DRDMCR is zero, so no
dummy bytes are sent out. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sat, 31 Aug 2024 20:31:44 +0000 (22:31 +0200)]
mtd: spi: renesas: Write DREAR register once
Instead of writing DREAR with 0 first and then overwriting DREAR again
in case of 4 byte addressing mode, write DREAR in every case once with
the correct content right away. No functional change.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Joshua Watt [Wed, 28 Aug 2024 14:37:57 +0000 (08:37 -0600)]
android_ab: Fixes: Fix backup offset calculation
The backup offset is in bytes, but was incorrectly be interpreted as
blocks, leading to it being written to the wrong location. Fix the
calculation, clarify that ANDROID_AB_BACKUP_OFFSET is in bytes and must
be a multiple of the block size, and add a runtime check to validate the
offset.
Marek BehĂșn [Thu, 29 Aug 2024 08:08:49 +0000 (10:08 +0200)]
arm: mvebu: turris_omnia: Switch DDR speed to 1333H when reset 9 is selected
Users experiencing random kernel crashes due to new versions of
Marvell's DDR training algorithm can solve the issue by setting DDR
speed to 1333H.
But if kernel crashes, it has to be done in U-Boot, which is impossible
without UART connection.
In order to make it easier for users, use the rescue button mechanism:
when rescue mode 9 is selected (that is when 10 LEDs are ON), U-Boot
will train DDR in 1333H mode and also update EEPROM so that subsequent
boot will use this mode.
User has to use the `eeprom` command in U-Boot or `omnia-eeprom` command
in OS to switch back to 1600K mode.
Signed-off-by: Marek BehĂșn <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Marek BehĂșn [Thu, 29 Aug 2024 08:08:48 +0000 (10:08 +0200)]
arm: mvebu: turris_omnia: Use the i2c_eeprom misc driver for EEPROM reading in U-Boot proper
Use the i2c_eeprom miscellaneous driver for reading Turris Omnia EEPROM
in U-Boot proper. Keep using dm_i2c_read() in SPL build, since adding
the i2c_eeprom driver to SPL build increases the image by 1.5 KiB.
Signed-off-by: Marek BehĂșn <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
Brian Norris [Fri, 26 Jul 2024 19:02:33 +0000 (12:02 -0700)]
patman: Resolve python string vs. regex escaping syntax
Python strings have their own notion of backslash-escaping, and that can
conflict with the intentions for strings passed to the 're' module. In
particular, I get warnings like this:
Jerome Forissier [Wed, 28 Aug 2024 15:36:37 +0000 (17:36 +0200)]
mach-imx: do not use if_changed more than once per target
doc/develop/makefiles.rst has the following note:
if_changed should not be used more than once per target.
It stores the executed command in a corresponding .cmd
file and multiple calls would result in overwrites and
unwanted results when the target is up to date and only the
tests on changed commands trigger execution of commands.
The mach-imx Makefile does not follow this recommandation, so fix it
by implementing a single command that performs both the cpp_cfg
and imx9_check actions.
This change fixes an issue with "tools/buildman/buildman imx8ulp_evk"
failing every other time [1].
Jonas Karlman [Sat, 3 Aug 2024 12:41:44 +0000 (12:41 +0000)]
bootstage: Fix unstash of records from SPL
The commit b81e31a1e6c5 ("bootstash: Do not provide a default address
for all") changed a bootstage unstash call to bootstage stash, this
has resulted in bootstage records stashed in SPL no longer get unstaged
in U-Boot proper. Fix this by changing back to a unstage call.
Fixes: b81e31a1e6c5 ("bootstash: Do not provide a default address for all") Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
uint64_t is defined as unsigned long long on 32-bit ARM.
Use PRIX64 for printing uint64_t.
This avoid a build failure on 32-bit systems:
tools/mkeficapsule.c: In function 'dump_capsule_auth_header':
tools/mkeficapsule.c:694:66: warning: format '%lX' expects argument of
type 'long unsigned int', but argument 2 has type 'uint64_t'
{aka 'long long unsigned int'} [-Wformat=]
694 | printf("EFI_FIRMWARE_IMAGE_AUTH.MONOTONIC_COUNT\t\t: %08lX\n",
| ~~~~^
| |
| long unsigned int
| %08llX
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Ilias Apalodimas [Mon, 12 Aug 2024 20:57:59 +0000 (23:57 +0300)]
efi_loader: fix memory freeing in efi_get_dp_from_boot()
efi_get_var() allocates memory which must be freed after the variable is
used. Since the device path is duplicated after we deserialize the load
options free the memory used for the variable payload
- Fix crash in BCB on invalid block device (reported by coverity)
- Fix booting Android kernel without a ramdisk using fastboot
- Fix ux500 gadget driver ops based on CONFIG_USB_MUSB_HOST
Marek Vasut [Sun, 18 Aug 2024 20:04:15 +0000 (22:04 +0200)]
usb: gadget: ux500: Do not redefine ops if CONFIG_USB_MUSB_HOST set
In case CONFIG_USB_MUSB_HOST is set, the ux500_gadget_ops get overridden
to musb_usb_ops . Simply set the ops one way or the other depending on
whether CONFIG_USB_MUSB_HOST is set or not.
Michael Walle [Mon, 29 Jul 2024 21:36:57 +0000 (23:36 +0200)]
boot: android: fix booting without a ramdisk
android_image_get_ramdisk() will return an error if there is no ramdisk.
Using the android image without a ramdisk worked until commit 1ce8e10f3b4b ("image: Fix up ANDROID_BOOT_IMAGE ramdisk code") because
the return code wasn't checked until then. Return -ENOENT in case
there is no ramdisk and translate that into -ENOPKG in the calling
code, which will then indicate "no ramdisk" to its caller
(boot_get_ramdisk()).
This way, we can get rid of the "*rd_data = *rd_len = 0;" in the error
path, too.
With this, I'm able to boot a linux kernel using fastboot again:
Tom Rini [Mon, 19 Aug 2024 21:07:18 +0000 (15:07 -0600)]
pytest: requirements.txt: Resync with the rest of the project
In order to build the docker container, which contains a download cache
of python modules, we need to have our versions be in sync in each
requirements file. Update some of the cases where which are older than
the rest of the project.
Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
- Convert tqma6q_mba6 to watchdog DM to fix reset.
- Convert tqma6q_mba6 to PMIC and I2C DM.
- Convert tqma6q_mba6 to OF_UPSTREAM.
- Do not print the board name twice on tqma6.
- Enable CMD_ERASEENV for imx8mm/mp Phytec boards.
- Add imx8ulp binman support.
- Fix imx8 build when CONFIG_IMX_BOOTAUX is set.
Fabio Estevam [Fri, 9 Aug 2024 15:25:48 +0000 (12:25 -0300)]
imx6-tqma6: Convert to OF_UPSTREAM
Instead of using the local imx6-tqma6 devicetree copies from U-Boot,
convert the imx6-tqma6 target to OF_UPSTREAM so that the upstream
kernel devicetrees can be used instead.
Gary Bisson [Mon, 5 Aug 2024 21:25:10 +0000 (23:25 +0200)]
mach-imx: Add i.MX 8ULP binman support
- Re-use i.MX 93 Makefile target as similar boot process
- Create imx8ulp-u-boot.dtsi for binman image architecture
- Create both SPL and U-Boot containers configuration
Key differences between the 93 and 8ULP SPL container are:
- No LPDDR training library needed for 8ULP
- 8ULP requires a uPower binary (RISC-V core) for power management
- 8ULP also requires a M33 binary to work properly
Signed-off-by: Gary Bisson <bisson.gary@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Gary Bisson [Mon, 5 Aug 2024 21:25:08 +0000 (23:25 +0200)]
tools: imx8image: add upower image support
Part of the upower management was included in a previous commit [1].
This patch only adds the bits required to properly parse a config file
that would include the binary as follows:
IMAGE PWR upower.bin
Gary Bisson [Mon, 5 Aug 2024 21:25:07 +0000 (23:25 +0200)]
tools: imx8image: fix soc variable for ULP
Currently the ULP token sets the soc as IMX9, making it impossible to
differentiate the two families of processors.
However, since the 8ULP requires specific binaries like upower which do
not exist in 93, they need to be separated.
Fixes: 6ec65c8558f (tools: image: support i.MX93) Signed-off-by: Gary Bisson <bisson.gary@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Mon, 12 Aug 2024 13:58:24 +0000 (07:58 -0600)]
Merge tag 'u-boot-rockchip-20240812' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
Please pull the updates for rockchip platform:
- Add board support:
RK3566: Radxa ROCK 3 Model C
Radxa ZERO 3W/3E
Xunlong Orange Pi 3B
RK3568J: Radxa ROCK 3B
RK3308B: Radxa ROCK S0
RK3588: Radxa ROCK 5 ITX
FriendlyElec CM3588 NAS board
- dw-mmc: allow 4-bit mode;
- dts and config updates;
Tom Rini [Mon, 12 Aug 2024 13:57:34 +0000 (07:57 -0600)]
Merge tag 'efi-2024-10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-10-rc3
UEFI:
* efi_loader: use list_count_nodes() in efi_protocols_per_handle()
* efi_loader: correct description of efi_get_distro_fdt_name
* boot: set correct block device name in set_efi_bootdev()
* configs: enable efidebug and EFI http boot on QEMU aarch64
Other:
* Makefile: don't use CFLAGS for environment text file