pandora-u-boot.git
6 weeks agoscmi_protocols: add SCMI Performance domain management protocol message IDs
Peng Fan [Mon, 28 Apr 2025 10:37:29 +0000 (18:37 +0800)]
scmi_protocols: add SCMI Performance domain management protocol message IDs

SCMI Performance domain management protocol is intended for performance
management of groups of devices or APs that run in the same performance
domain. The functionality provided by the callee-side can be used by
passing the corresponding message_id.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
6 weeks agoscmi_protocols: add SCMI misc protocol protocol_id and message_id for getting the...
Peng Fan [Mon, 28 Apr 2025 10:37:28 +0000 (18:37 +0800)]
scmi_protocols: add SCMI misc protocol protocol_id and message_id for getting the ROM passover data

SCMI misc protocol is intended for miscellaneous functions which are
device specific and are usually defined to access bit fields. It is i.MX
specific. This patch adds SCMI misc protocol protocol_id and message_id
for getting the ROM passover data.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marek Vasut <marex@denx.de>
6 weeks agofirmware: scmi_agent: add SCMI pin control protocol support
Alice Guo [Mon, 28 Apr 2025 10:37:27 +0000 (18:37 +0800)]
firmware: scmi_agent: add SCMI pin control protocol support

This patch adds SCMI pin control protocol support to make the pin
controller driver based on SCMI, such as
drivers/pinctrl/nxp/pinctrl-imx-scmi.c, can be bound to the SCMI agent
device whose protocol id is 0x19.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
6 weeks agopinctrl: nxp: add a pin controller driver based on SCMI pin control protocol
Alice Guo [Mon, 28 Apr 2025 10:37:26 +0000 (18:37 +0800)]
pinctrl: nxp: add a pin controller driver based on SCMI pin control protocol

This patch provides a pinctrl driver based on SCMI pin control protocol.
Currently, only the PINCTRL_CONFIG_SET command is implemented.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
6 weeks agofirmware: scmi: use scmi_proto_driver_get() function to get SCMI protocol driver
Alice Guo [Mon, 28 Apr 2025 10:37:25 +0000 (18:37 +0800)]
firmware: scmi: use scmi_proto_driver_get() function to get SCMI protocol driver

If there is a SoC specific SCMI protocol driver, using
scmi_proto_driver_get() function can avoid to add SoC specific code to
scmi_agent-uclass.c.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
6 weeks agofirmware: scmi: support to manage SCMI protocol drivers with a linker-genetated array
Alice Guo [Mon, 28 Apr 2025 10:37:24 +0000 (18:37 +0800)]
firmware: scmi: support to manage SCMI protocol drivers with a linker-genetated array

U_BOOT_SCMI_PROTO_DRIVER macro is used to add a SCMI protocol driver to
scmi_proto_driver list. scmi_proto_driver_get() function can be used to
match a SCMI protocol id and its driver.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
6 weeks agoMerge patch series "k3-j784s4*: Enable ESMs and related PMIC"
Tom Rini [Fri, 2 May 2025 20:24:21 +0000 (14:24 -0600)]
Merge patch series "k3-j784s4*: Enable ESMs and related PMIC"

Udit Kumar <u-kumar1@ti.com> says:

This series enables the ESMs and the associated PMIC. Programming these bits is
a requirement to make the watchdog actually reset the board.

Series supports WDT reset on all TI platforms based upon J784S4 SOC
including cut down (J742S2).

Bootlogs for reset

AM69: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-am69-L2466

J784S4: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-j784s4-L2704

J742S2: https://gist.github.com/uditkumarti/dca2171aafd6d50c82159346f9a0102f#file-j742s2-L2614

Link: https://lore.kernel.org/r/20250427070323.590449-1-u-kumar1@ti.com
6 weeks agoMerge patch series "board: beagle: beagley-ai: Cleanups and stdboot"
Tom Rini [Fri, 2 May 2025 20:23:51 +0000 (14:23 -0600)]
Merge patch series "board: beagle: beagley-ai: Cleanups and stdboot"

Nishanth Menon <nm@ti.com> says:

Just happened to get a BeagleY-AI at desk and happened to test master
branch (7dd49a9264a6 drivers: scsi: Add 'erase' support), noticed a few
issues which were rather easy to solve.. so, here we go:

Link: https://lore.kernel.org/r/20250425173120.141503-1-nm@ti.com
6 weeks agoarm: dts: k3: binman: Fix DM firmware selection
Andrew Davis [Fri, 25 Apr 2025 22:54:03 +0000 (17:54 -0500)]
arm: dts: k3: binman: Fix DM firmware selection

Just like TF-A and OP-TEE, the documentation states a custom path for DM
can be provided at build time by setting TI_DM. This should then set
ti-dm-path which updates ti-dm node filenames in binman.

Two issues prevent this from functioning for most K3 boards. One is when
then DM firmware name is inside a blob-ext node instead of a ti-dm node.

The second is when the filename in the ti-dm node is a pointer to a
blob-ext node. In this case even though the filename is updated, the
filename in the blob-ext is not, so build can fail if the default
file in the blob-ext cannot be found, even if the updated ti-dm file
does exist.

Fix both of these for all K3 by removing any indirect ti-dm nodes and
making sure all DM nodes are labeled with "ti-dm".

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
6 weeks agoarm: mach-k3: use CFG_MAX_MEM_SIZE
Bryan Brattlof [Fri, 25 Apr 2025 17:02:06 +0000 (12:02 -0500)]
arm: mach-k3: use CFG_MAX_MEM_SIZE

Rather than hard coding the maximum memory size, lets just define the
CFG_MAX_MEM_SIZE so get_effective_memsize() will return the correct
value without modification.

Signed-off-by: Bryan Brattlof <bb@ti.com>
6 weeks agoboard: ti: am33xx: Add support for BeagleBoard Green Eco
Kory Maincent [Fri, 25 Apr 2025 15:59:25 +0000 (17:59 +0200)]
board: ti: am33xx: Add support for BeagleBoard Green Eco

SeeedStudio BeagleBone Green Eco (BBGE) is a clone of the BeagleBone Green
(BBG). It has minor differences from the BBG, such as a different PMIC,
a different Ethernet PHY, and a larger eMMC.

The PMIC is not yet supported in mainline, but the work is ongoing.

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
6 weeks agoconfigs: am64x_evm_a53: Enable MMC UHS modes
Judith Mendez [Thu, 24 Apr 2025 19:33:31 +0000 (14:33 -0500)]
configs: am64x_evm_a53: Enable MMC UHS modes

Enable UHS modes for SD by enabling configs for voltage regulator
drivers, IO voltage switching, and configs to support UHS modes.

The am64x SoC has an internal LDO which does voltage switching,
but the MMC_IO_VOLTAGE config is still required to be able to
switch voltage for SD.

While we are here, am64x HS400 mode has been descoped as per
datasheet [0] even though we still initialize to HS200, clean
this up by switching to MMC_HS200_SUPPORT config options.

[0] https://www.ti.com/lit/gpn/am6442

Signed-off-by: Judith Mendez <jm@ti.com>
6 weeks agoconfigs: j784s4_evm_r5: Enable ESM related configs
Andrew Halaney [Sun, 27 Apr 2025 07:03:23 +0000 (12:33 +0530)]
configs: j784s4_evm_r5: Enable ESM related configs

Like other TI platforms, let's enable the ESM. This allows the ESM to be
programmed during boot, and the PMIC associated with the ESM output,
enabling blocks like the RTI watchdogs to actually cause the system to
reset.

Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
6 weeks agoboard: ti: j784s4: Initialize the ESM & PMIC ESM
Keerthy [Sun, 27 Apr 2025 07:03:22 +0000 (12:33 +0530)]
board: ti: j784s4: Initialize the ESM & PMIC ESM

Initialize the ESM & PMIC ESM. This allows things like
the watchdog to reset the board when tripped.

Signed-off-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
6 weeks agoarm: dts: k3-am69-r5-evm: Add the PMIC ESM node
Andrew Halaney [Sun, 27 Apr 2025 07:03:21 +0000 (12:33 +0530)]
arm: dts: k3-am69-r5-evm: Add the PMIC ESM node

Add the PMIC ESM node which is responsible for triggering the PMIC
reset.

Suggested-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
6 weeks agoarm: dts: k3-j784s4-r5-evm: Add the PMIC ESM node
Neha Malcom Francis [Sun, 27 Apr 2025 07:03:20 +0000 (12:33 +0530)]
arm: dts: k3-j784s4-r5-evm: Add the PMIC ESM node

Add the PMIC ESM node which is responsible for triggering the PMIC
reset.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Andrew Halaney <ahalaney@redhat.com>
6 weeks agodoc: beagle: Add BeagleY-AI documentation
Nishanth Menon [Fri, 25 Apr 2025 17:31:19 +0000 (12:31 -0500)]
doc: beagle: Add BeagleY-AI documentation

Document the BeagleY-AI usage, build and basic debug hints

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoconfigs: am67a_beagley_ai_a53: Enable additional features
Nishanth Menon [Fri, 25 Apr 2025 17:31:18 +0000 (12:31 -0500)]
configs: am67a_beagley_ai_a53: Enable additional features

Enable basic EFI debug features, switch over to stdboot, enable GPIO,
LED and PMIC used on this platform. And enable UHS mode support for SD
cards in U-Boot.

Unlike other BeagleBoard products, BeagleY-AI does not have
alternative onboard non-volatile memories, so capsule support does not
make sense.

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoconfigs:am67a_beagley_ai*: Drop un-necessary config options
Nishanth Menon [Fri, 25 Apr 2025 17:31:17 +0000 (12:31 -0500)]
configs:am67a_beagley_ai*: Drop un-necessary config options

Drop SPI, EMMC, GPIO expanders that come with EVM etc.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoconfigs: am67a_beagley_ai*: Use saveddefconfig
Nishanth Menon [Fri, 25 Apr 2025 17:31:16 +0000 (12:31 -0500)]
configs: am67a_beagley_ai*: Use saveddefconfig

Drop using j722s_evm defconfig since the evm has numerous features that
we do not need on BeagleY-AI platform. As new peripherals get added to
EVM support, we end up having to cleanup after in beagle configurations.

Instead of doing that, just split up BeagleY's configuration
independently out.

NOTE: no cleanup has been done to this configuration to allow for
reproducibility. The cleanups are done in follow on patches

Acked-by: Andrew Davis <afd@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agobeagle: beagley-ai: env: Enable DFU env options
Nishanth Menon [Fri, 25 Apr 2025 17:31:15 +0000 (12:31 -0500)]
beagle: beagley-ai: env: Enable DFU env options

Just enable dfu options, We have MMC and RAM as options here.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agobeagle: beagley-ai: env: Setup scripts for LED control
Nishanth Menon [Fri, 25 Apr 2025 17:31:14 +0000 (12:31 -0500)]
beagle: beagley-ai: env: Setup scripts for LED control

Most of the users of BeagleY-AI are headless OR do not use serial port.
In such cases, it is very useful for the device to provide some level of
indication to know what state their board is at.

Unfortunately, with a single LED (ignoring the :heartbeat), the
options are limited. This is a precursor patch to actually enabling
the LED options that will use the same in the follow on patches.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agobeagle: beagley-ai: env: Set up the boot devices and boot methods
Nishanth Menon [Fri, 25 Apr 2025 17:31:13 +0000 (12:31 -0500)]
beagle: beagley-ai: env: Set up the boot devices and boot methods

We just have a single MMC on BeagleY-AI. So drop all other boot options,

In the meanwhile, we also will use efiboot and standard boot methods
consistent with other K3 Beagle products.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoarch: arm: dts: k3-am67a-beagley-ai-u-boot: Mark main_gpio1 as bootph-all
Nishanth Menon [Fri, 25 Apr 2025 17:31:12 +0000 (12:31 -0500)]
arch: arm: dts: k3-am67a-beagley-ai-u-boot: Mark main_gpio1 as bootph-all

main_gpio1 controls the voltage for the SDcard from 3.3v to 1.8v.
This is required for proper operation of SDcard through various boot
stages.

Fixes the following seen in the boot log:
failed to set vqmmc-voltage to 3.3V

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoboard: beagle: beagley-ai: Add pattern match for MAINTAINERS
Nishanth Menon [Fri, 25 Apr 2025 17:31:11 +0000 (12:31 -0500)]
board: beagle: beagley-ai: Add pattern match for MAINTAINERS

just use beagley_ai as pattern match for the files and folders involved.

Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
6 weeks agoMerge patch series "video: Enhancements related to truetype and console"
Tom Rini [Fri, 2 May 2025 19:57:26 +0000 (13:57 -0600)]
Merge patch series "video: Enhancements related to truetype and console"

Simon Glass <sjg@chromium.org> says:

This series includes some precursor patches needed for forthcoming expo
enhancements.

- truetype support for multiple lines
- make white-on-black a runtime option
- support drawing a rectangle

6 weeks agovidconsole: Avoid kerning against an unrelated character
Simon Glass [Tue, 1 Apr 2025 17:29:44 +0000 (06:29 +1300)]
vidconsole: Avoid kerning against an unrelated character

When the cursor position changes, kerning should not be used for the
next character, since it can make the first displayed character shuffle
left or right a bit.

Clear the kern character when setting the position.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Add a function to draw a rectangle
Simon Glass [Tue, 1 Apr 2025 17:29:43 +0000 (06:29 +1300)]
video: Add a function to draw a rectangle

Provide a way to draw an unfilled box of a certain width. This is useful
for grouping menu items together.

Add a comment showing how to see the copy-framebuffer, for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Allow console output to be silenced
Simon Glass [Tue, 1 Apr 2025 17:29:42 +0000 (06:29 +1300)]
video: Allow console output to be silenced

When using expo we want to be able to control the information on the
display and avoid other messages (such as USB scanning) appearing.

Add a 'quiet' flag for the console, to help with this.

The test is a little messy since stdio is still using the original
vidconsole create on start-up. So take care to use the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agotest: video: Export the video-checking functions
Simon Glass [Tue, 1 Apr 2025 17:29:41 +0000 (06:29 +1300)]
test: video: Export the video-checking functions

We want to check the display contents in expo tests, so move the two
needed functions to a new header file.

Rename them to have a video_ prefix.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Add a way to write a partial string to the console
Simon Glass [Tue, 1 Apr 2025 17:29:40 +0000 (06:29 +1300)]
video: Add a way to write a partial string to the console

When writing multiple lines of text we need to be able to control which
text goes on each line. Add a new vidconsole_put_stringn() function to
help with this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: truetype: Support a limit on the width of a line
Simon Glass [Tue, 1 Apr 2025 17:29:39 +0000 (06:29 +1300)]
video: truetype: Support a limit on the width of a line

Expo needs to be able to word-wrap lines so that they are displayed as
the user expects. Add a limit on the width of each line and support this
in the measurement algorithm.

Add a log category to truetype while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: truetype: Support newlines in the measured string
Simon Glass [Tue, 1 Apr 2025 17:29:38 +0000 (06:29 +1300)]
video: truetype: Support newlines in the measured string

It is useful to be able to embed newline characters in the string and
have the text measured into multiple lines. Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: truetype: Fill in the measured line
Simon Glass [Tue, 1 Apr 2025 17:29:37 +0000 (06:29 +1300)]
video: truetype: Fill in the measured line

Create a measured line for the (single) line of text.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Begin support for measuring multiple lines of text
Simon Glass [Tue, 1 Apr 2025 17:29:36 +0000 (06:29 +1300)]
video: Begin support for measuring multiple lines of text

Update the vidconsole API so that measure() can measure multiple lines
of text. This will make it easier to implement multi-line fields in
expo.

Tidy up the function comments while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Add a test for font measurement
Simon Glass [Tue, 1 Apr 2025 17:29:35 +0000 (06:29 +1300)]
video: Add a test for font measurement

Add a simple test which measures a line of text using a Truetype font.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agosandbox: Select white-on-black
Simon Glass [Tue, 1 Apr 2025 17:29:34 +0000 (06:29 +1300)]
sandbox: Select white-on-black

Use white on black for the expo menu as it is easier on the eyes.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Make white-on-black a video-device property
Simon Glass [Tue, 1 Apr 2025 17:29:33 +0000 (06:29 +1300)]
video: Make white-on-black a video-device property

The CONFIG_WHITE_ON_BLACK setting is hard-coded at build-time. It is
useful to be able to control this when showing menus.

Create a property to hold this information, using the CONFIG as the
initial value.

Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agoconsole: Support a format string for stderr output
Simon Glass [Tue, 1 Apr 2025 17:29:32 +0000 (06:29 +1300)]
console: Support a format string for stderr output

Add a console_printf_select_stderr() function so that it is not
necessary for the caller to process the format string.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
6 weeks agoMerge patch series "Qualcomm: cleanup OF_LIVE fixup and fix RB1/2"
Tom Rini [Fri, 2 May 2025 14:38:27 +0000 (08:38 -0600)]
Merge patch series "Qualcomm: cleanup OF_LIVE fixup and fix RB1/2"

Caleb Connolly <caleb.connolly@linaro.org> says:

Introduce a new event to signal that the live tree has been built,
allowing boards to perform fixups on the tree before devices are bound.
Crucially this allows for devices to be enabled or disabled, but also
allows for properties that are parsed during the bind stage to be
modified (such as dr_mode for dwc3).

With this in place, mach-snapdragon is switched over to use the event
and some hacky U-Boot specific DT overrides (which had to be undone
prior to booting an image) are removed in favour of fixing up the
livetree (which is not passed on to further boot stages).

Finally, some minor fixes are made for the QCM2290 RB1 board, the sdcard
is enabled and it now uses USB host mode in U-Boot like it's bigger
sibling the RB2.

Link: https://lore.kernel.org/r/20250411-livetree-fixup-v2-0-1236823377bb@linaro.org
6 weeks agopinctrl: qcom: qcm2290: fix off by 1 in pin_count
Caleb Connolly [Fri, 11 Apr 2025 12:47:45 +0000 (14:47 +0200)]
pinctrl: qcom: qcm2290: fix off by 1 in pin_count

There are 134 pins not 133, oops! This fixes the sdcard on the RB1 as
the pins now all get configured correctly.

Fixes: 0ecb8cfcb930 ("pinctrl: qcom: add qcm2290 pinctrl driver")
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agoclk/qcom: qcm2290: show clock name in set_rate()
Caleb Connolly [Fri, 11 Apr 2025 12:47:44 +0000 (14:47 +0200)]
clk/qcom: qcm2290: show clock name in set_rate()

The device name is always clk_qcom... Not very useful.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agomach-snapdragon: of_fixup: set dr_mode for RB1/2 boards
Caleb Connolly [Fri, 11 Apr 2025 12:47:43 +0000 (14:47 +0200)]
mach-snapdragon: of_fixup: set dr_mode for RB1/2 boards

The RB1 and RB2 have a single USB controller which is manually muxed
between a type-c port and an internal USB hub via a DIP switch. OTG is
supported in Linux, but the DWC3 driver in U-Boot can only handle a
single mode, and defaults to peripheral mode.

We did hack around this on the RB2, but the RB1 got left out.

Now that we can fix up the live tree before devices are bound, drop the
DTS hacks and do the fixup at runtime instead.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agomach-snapdragon: of_fixup: update comment
Caleb Connolly [Fri, 11 Apr 2025 12:47:42 +0000 (14:47 +0200)]
mach-snapdragon: of_fixup: update comment

we don't rewrite the volume buttons any more.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
6 weeks agomach-snapdragon: of_fixup: remove confusing log message
Caleb Connolly [Fri, 11 Apr 2025 12:47:41 +0000 (14:47 +0200)]
mach-snapdragon: of_fixup: remove confusing log message

The debug log here had the logic completely backwards, even though the
code is actually correct. Remove it since it's extraneous anyway.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
6 weeks agomach-snapdragon: of_fixup: skip disabled USB nodes
Caleb Connolly [Fri, 11 Apr 2025 12:47:40 +0000 (14:47 +0200)]
mach-snapdragon: of_fixup: skip disabled USB nodes

There's no need to waste time fixing up nodes that aren't used on this
device. Skip them.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agomach-snapdragon: use EVT_OF_LIVE_INIT to apply DT fixups
Caleb Connolly [Fri, 11 Apr 2025 12:47:39 +0000 (14:47 +0200)]
mach-snapdragon: use EVT_OF_LIVE_INIT to apply DT fixups

This will now apply fixups prior to devices being bound, which makes it
possible to enable/disable devices and adjust more properties that might
be read before devices probe.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agoevent: signal when livetree has been built
Caleb Connolly [Fri, 11 Apr 2025 12:47:38 +0000 (14:47 +0200)]
event: signal when livetree has been built

OF_LIVE offers a variety of benefits, one of them being that the live
tree can be modified without caring about the underlying FDT. This is
particularly valuable for working around U-Boot limitations like lacking
USB superspeed support on Qualcomm platforms, no runtime OTG, or
peripherals like the sdcard being broken (and displaying potentially
worrying error messages).

Add an event to signal when the live tree has been built so that we can
apply fixups to it directly before devices are bound.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
6 weeks agoMerge tag 'dm-pull-mayday' of git://git.denx.de/u-boot-dm
Tom Rini [Thu, 1 May 2025 16:49:07 +0000 (10:49 -0600)]
Merge tag 'dm-pull-mayday' of git://git.denx.de/u-boot-dm

Support for calculating video damage

6 weeks agoMerge tag 'efi-2025-07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 1 May 2025 16:48:24 +0000 (10:48 -0600)]
Merge tag 'efi-2025-07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-07-rc2

CI:

* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/26025

Documentation:

* ti: update bash code-block directives to prompt
* ti: k3: add language for code-block directive
* correct uthread inline documentation

UEFI:

* correctly handle EFI FIT images without initrd
* pass kernel load address not entry point for EFI FIT images

Other:

* boot:let BOOTSTAGE_RECORD_COUNT default to 50

6 weeks agovideo: Enable VIDEO_DAMAGE for drivers that need it
Alexander Graf [Mon, 21 Aug 2023 13:51:10 +0000 (16:51 +0300)]
video: Enable VIDEO_DAMAGE for drivers that need it

Some drivers call video_set_flush_dcache() to indicate that they want to
have the dcache flushed for the frame buffer. These drivers benefit from
our new video damage control, because we can reduce the amount of memory
that gets flushed significantly.

This patch enables video damage control for all device drivers that call
video_set_flush_dcache() to make sure they benefit from it.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
[Alper: Add to VIDEO_TIDSS, imply instead of select]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Always compile cache flushing code
Alexander Graf [Tue, 3 Jan 2023 21:50:03 +0000 (22:50 +0100)]
video: Always compile cache flushing code

The dcache flushing code path was conditional on ARM && !DCACHE config
options. However, dcaches exist on other platforms as well and may need
clearing if their driver requires it.

Simplify the compile logic and always enable the dcache flush logic in
the video core. That way, drivers can always rely on it to call the arch
specific callbacks.

This will increase code size for non-ARM platforms with CONFIG_VIDEO=y
slightly.

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-13-alpernebiyasak@gmail.com/
Added workaround for CONFIG_SYS_CACHELINE_SIZE for ibex-ast2700:
Signed-off-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: Use VIDEO_DAMAGE for VIDEO_COPY
Alexander Graf [Thu, 9 Jun 2022 22:59:21 +0000 (00:59 +0200)]
video: Use VIDEO_DAMAGE for VIDEO_COPY

CONFIG_VIDEO_COPY implemented a range-based copying mechanism: If we
print a single character, it will always copy the full range of bytes
from the top left corner of the character to the lower right onto the
uncached frame buffer. This includes pretty much the full line contents
of the printed character.

Since we now have proper damage tracking, let's make use of that to reduce
the amount of data we need to copy. With this patch applied, we will only
copy the tiny rectangle surrounding characters when we print them,
speeding up the video console.

After this, changes to the main frame buffer are not immediately copied
to the copy frame buffer, but postponed until the next video device
sync. So issue an explicit sync before inspecting the copy frame buffer
contents for the video tests.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
[Alper: Rebase for fontdata->height/w, fill_part(), fix memmove(dev),
        drop from defconfig, use damage.xstart/yend, use IS_ENABLED(),
        call video_sync() before copy_fb check, update video_copy test]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-12-alpernebiyasak@gmail.com/
6 weeks agovideo: Only dcache flush damaged lines
Alexander Graf [Thu, 9 Jun 2022 22:59:20 +0000 (00:59 +0200)]
video: Only dcache flush damaged lines

Now that we have a damage area tells us which parts of the frame buffer
actually need updating, let's only dcache flush those on video_sync()
calls. With this optimization in place, frame buffer updates - especially
on large screen such as 4k displays - speed up significantly.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
[Alper: Use damage.xstart/yend, IS_ENABLED()]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-11-alpernebiyasak@gmail.com/
6 weeks agoefi_loader: GOP: Add damage notification on BLT
Alexander Graf [Thu, 9 Jun 2022 22:59:19 +0000 (00:59 +0200)]
efi_loader: GOP: Add damage notification on BLT

Now that we have a damage tracking API, let's populate damage done by
UEFI payloads when they BLT data onto the screen.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
[Alper: Add struct comment for new member]
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-10-alpernebiyasak@gmail.com/
6 weeks agovideo: Add damage notification on bmp display
Alexander Graf [Thu, 9 Jun 2022 22:59:18 +0000 (00:59 +0200)]
video: Add damage notification on bmp display

Let's report the video damage when we draw a bitmap on the screen. This
way we can later lazily flush only relevant regions to hardware.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-9-alpernebiyasak@gmail.com/
6 weeks agovideo: test: Test video damage tracking via vidconsole
Alper Nebi Yasak [Fri, 18 Aug 2023 14:55:08 +0000 (17:55 +0300)]
video: test: Test video damage tracking via vidconsole

With VIDEO_DAMAGE, the video uclass tracks updated regions of the frame
buffer in order to avoid unnecessary work during a video sync. Enable
the config in sandbox and add a test for it, by printing strings at a
few locations and checking the tracked region.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Adjust test avoid temporary failures in this patch:
Signed-off-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-8-alpernebiyasak@gmail.com/
6 weeks agovidconsole: Add damage notifications to all vidconsole drivers
Alexander Graf [Thu, 9 Jun 2022 22:59:17 +0000 (00:59 +0200)]
vidconsole: Add damage notifications to all vidconsole drivers

Now that we have a damage tracking API, let's populate damage done by
vidconsole drivers. We try to declare as little memory as damaged as
possible.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
[Alper: Rebase for met->baseline, fontdata->height/width, make rotated
        console_putc_xy() damages pass tests, edit patch message]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-7-alpernebiyasak@gmail.com/
6 weeks agodm: video: Add damage notification on display fills
Alexander Graf [Thu, 9 Jun 2022 22:59:16 +0000 (00:59 +0200)]
dm: video: Add damage notification on display fills

Let's report the video damage when we fill parts of the screen. This
way we can later lazily flush only relevant regions to hardware.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
[Alper: Move from video_clear() to video_fill(), video_fill_part()]
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-6-alpernebiyasak@gmail.com/
6 weeks agodm: video: Add damage tracking API
Alexander Graf [Thu, 9 Jun 2022 22:59:15 +0000 (00:59 +0200)]
dm: video: Add damage tracking API

We are going to introduce image damage tracking to fasten up screen
refresh on large displays. This patch adds damage tracking for up to
one rectangle of the screen which is typically enough to hold blt or
text print updates. Callers into this API and a reduced dcache flush
code path will follow in later patches.

Signed-off-by: Alexander Graf <agraf@csgraf.de>
Reported-by: Da Xue <da@libre.computer>
[Alper: Use xstart/yend, document new fields, return void from
        video_damage(), declare priv, drop headers, use IS_ENABLED()]
Co-developed-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-5-alpernebiyasak@gmail.com/
Reviewed-by: Simon Glass <sjg@chromium.org>
6 weeks agovideo: test: Test partial updates of hardware frame buffer
Alper Nebi Yasak [Fri, 18 Aug 2023 14:31:27 +0000 (17:31 +0300)]
video: test: Test partial updates of hardware frame buffer

With VIDEO_COPY enabled, only the modified parts of the frame buffer are
intended to be copied to the hardware. Add a test that checks this, by
overwriting contents we prepared without telling the video uclass and
then checking if the overwritten contents have been redrawn on the next
sync.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-4-alpernebiyasak@gmail.com/
6 weeks agovideo: test: Support checking copy frame buffer contents
Alper Nebi Yasak [Sun, 20 Aug 2023 14:46:46 +0000 (17:46 +0300)]
video: test: Support checking copy frame buffer contents

The video tests have a helper function to generate a pseudo-digest of
frame buffer contents, but it only does so for the main one. There is
another check that the copy frame buffer is the same as that. But
neither is enough to test if only the modified regions are copied to the
copy frame buffer, since we will want the two to be different in very
specific ways.

Add a boolean argument to the existing helper function to indicate which
frame buffer we want to inspect, and update the existing callers.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-3-alpernebiyasak@gmail.com/
6 weeks agovideo: test: Split copy frame buffer check into a function
Alper Nebi Yasak [Fri, 18 Aug 2023 10:31:36 +0000 (13:31 +0300)]
video: test: Split copy frame buffer check into a function

While checking frame buffer contents, the video tests also check if the
copy frame buffer contents match the main frame buffer. To test if only
the modified regions are updated after a sync, we will need to create
situations where the two are mismatched. Split this check into another
function that we can skip calling, since we won't want it to error on
those mismatched cases.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/u-boot/20230821135111.3558478-2-alpernebiyasak@gmail.com/
7 weeks agoboot: let BOOTSTAGE_RECORD_COUNT default to 50
Heinrich Schuchardt [Wed, 30 Apr 2025 07:34:05 +0000 (09:34 +0200)]
boot: let BOOTSTAGE_RECORD_COUNT default to 50

BOOTSTAGE_RECORD_COUNT=30 is too small to record booting a FIT image
with EFI kernel, initrd, dtb as seen on the StarFive VisionFive 2
board.

Increase the default for BOOTSTAGE_RECORD_COUNT to 50.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agobootm: pass kernel load address not entry point for IH_OS_EFI
Heinrich Schuchardt [Wed, 30 Apr 2025 10:55:46 +0000 (12:55 +0200)]
bootm: pass kernel load address not entry point for IH_OS_EFI

The EFI sub-system needs the load address and not the entry point
to boot the binary passed from the bootm command. The entry point
is derived from the PE-COFF header of the binary.

Fixes: ecc7fdaa9ef1 ("bootm: Add a bootm command for type IH_OS_EFI")
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
7 weeks agodoc: ti: k3: add language for code-block directive
Anshul Dalal [Tue, 29 Apr 2025 13:51:08 +0000 (19:21 +0530)]
doc: ti: k3: add language for code-block directive

The code-block directive supports the optional language property which
enables syntax highlighting for the block[1].

This patch adds the relevant language property for code-blocks in k3
docs.

[1]:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-code-block

Signed-off-by: Anshul Dalal <anshuld@ti.com>
7 weeks agodoc: ti: update bash code-block directives to prompt
Anshul Dalal [Tue, 29 Apr 2025 13:51:07 +0000 (19:21 +0530)]
doc: ti: update bash code-block directives to prompt

The code-block directive requires addition of the prompt symbol for each
line, using the prompt directive instead allows for auto insertion of
the symbol per line[1].

For the readers, the character added by the prompt directive is
un-selectable i.e the entire line can be more easily selected for copy
pasting etc. Whereas with code-block, the prompt symbol like "$" is also
selectable which is usually not the intent.

This is mostly a QoL addition + making the docs consistent since k3.rst
makes use of prompt directives which these board docs include from.

[1]: https://pypi.org/project/sphinx-prompt/

Signed-off-by: Anshul Dalal <anshuld@ti.com>
7 weeks agoefi_loader: fix typo initd_sz to initrd_sz
Adriano Cordova [Tue, 29 Apr 2025 13:27:56 +0000 (09:27 -0400)]
efi_loader: fix typo initd_sz to initrd_sz

Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 weeks agoefi_loader: bootbin: do not load an initrd if none is provided
Adriano Cordova [Tue, 29 Apr 2025 13:27:55 +0000 (09:27 -0400)]
efi_loader: bootbin: do not load an initrd if none is provided

Do not try to create an initrd device path nor try to register
an initrd with the EFI_LOAD_FILE2_PROTOCOL if none is provided.

Handle initrd installation in efi_binary_run_dp with
efi_install_initrd, imitating what is done for the fdt.

Fixes: 36835a9105c ("efi_loader: binary_run: register an initrd")
Reported-by: Weizhao Ouyang <o451686892@gmail.com>
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Tested-by: Weizhao Ouyang <o451686892@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
7 weeks agouthread: doc: fix inline documentation
Jerome Forissier [Tue, 29 Apr 2025 09:57:34 +0000 (11:57 +0200)]
uthread: doc: fix inline documentation

Fix Sphinx warnings:

 $ make htmldocs
 [...]
 ./include/uthread.h:56: warning: cannot understand function prototype: 'enum uthread_mutex_state '
 ./include/uthread.h:64: warning: cannot understand function prototype: 'struct uthread_mutex '
 ./include/uthread.h:56: warning: cannot understand function prototype: 'enum uthread_mutex_state '
 ./include/uthread.h:64: warning: cannot understand function prototype: 'struct uthread_mutex '

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agomtd: mtdpart: Support MTDPART_SIZ_FULL in fixed-partitions
Mike Looijmans [Tue, 8 Apr 2025 05:46:38 +0000 (07:46 +0200)]
mtd: mtdpart: Support MTDPART_SIZ_FULL in fixed-partitions

Flash partitions may specify MTDPART_SIZ_FULL (=0) as the size of the
partition to indicate "the remainder of the flash". Make this work with
device-tree "fixed-partitions" as well.

This makes MTD partitioning compatible with the Linux kernel, see:
  https://github.com/torvalds/linux/blob/master/include/linux/mtd/partitions.h#L29
  https://github.com/torvalds/linux/blob/master/drivers/mtd/mtdpart.c#L123

Previously, this could only be done through MTDPARTS so this change allows
boards like topic_miami to migrate from `mtdparts`/`mtdids` to devicetree
partitions.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
7 weeks agoclk: fix crash on clk_set_rate clean rate cache
Christian Marangi [Sat, 15 Mar 2025 09:24:14 +0000 (10:24 +0100)]
clk: fix crash on clk_set_rate clean rate cache

It's currently possible to make the bootloader crash on calling
clk_set_rate caused by the loop in clk_clean_rate_cache.

The loop assume that every child of the clock node are also clock
device but this is not always the case. For example it's common for a
clock to bind to a reset device or also expose a syscon if the clock
register map is also used to apply special configuration.

In such case, on accessing a device as a clock, the bootloader crash. To
correctly handle this, check if the child device is actually a clock and
ignore otherwise.

Fixes: 6b7fd3128f71 ("clk: fix set_rate to clean up cached rates for the hierarchy")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
7 weeks agocommon: board: fix build condition of noncached memory initcall
Weijie Gao [Tue, 29 Apr 2025 02:04:24 +0000 (10:04 +0800)]
common: board: fix build condition of noncached memory initcall

CONFIG_SYS_NONCACHED_MEMORY is defined as hex, not bool. It should be
replaced with CONFIG_SYS_HAS_NONCACHED_MEMORY when switched from #ifdef to
CONFIG_IS_ENABLED().

Fixes: 6c171f7a184 (common: board: make initcalls static)
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@codethink.co.uk> # rock5b
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
7 weeks agoRevert "mtd: spi-nor: Remove recently added SST special case"
Prasad Kummari [Fri, 28 Feb 2025 09:17:24 +0000 (14:47 +0530)]
Revert "mtd: spi-nor: Remove recently added SST special case"

SST(sst26wf016) flashes have multiple erase block sizes, including
8 KB, 32 KB, and 64 KB. Since a 64 KB sector erase cannot be performed
on all blocks, the 4 KB sector erase command should be used instead.
Enabling the SPI_FLASH_USE_4K_SECTORS configuration allows the use of
4 KB sector erases, but it may increase the erase operation time for large
memory flashes.

This reverts commit 34cd4a72fb2d113e2754c0d643618a8e3fa549ab

MEMORY ORGANIZATION:
The SST26WF016B/016BA SQI memory array is organized
in uniform, 4 KByte erasable sectors with the following
erasable blocks: eight 8 KByte parameter, two
32 KByte overlay, and thirty 64 KByte overlay blocks.
See Figure 3-1.

Top of Memory Block
┌──────────┐
│  8 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│ 32 KByte │
├──────────┤
│ 64 KByte │
├──────────┤
│ 64 KByte │
├──────────┤
│ 64 KByte │
├──────────┤
│ 32 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│  8 KByte │
├──────────┤
│  8 KByte │
└──────────┘
Bottom of Memory Block

      ┌────────────────────────────────┐
      │            64 KByte            │
      ├────────────────────────────────┤
      │            64 KByte            │
      └────────────────────────────────┘

      Expanded View:
      ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
      │ 4 KB │ │ 4 KB │ │ 4 KB │ │ 4 KB │
      ├──────┤ ├──────┤ ├──────┤ ├──────┤
      │  . .  .  (continues) . .  .   │
      └──────┘ └──────┘ └──────┘ └──────┘

2 Sectors for 8 KByte blocks
8 Sectors for 32 KByte blocks
16 Sectors for 64 KByte blocks

Link: https://ww1.microchip.com/downloads/en/DeviceDoc/20005013D.pdf
Signed-off-by: Prasad Kummari <prasad.kummari@amd.com>
7 weeks agodrivers: spi: Fix data loss issue in QSPI
Naresh Kumar Ravulapalli [Fri, 7 Mar 2025 09:38:26 +0000 (01:38 -0800)]
drivers: spi: Fix data loss issue in QSPI

QSPI driver performs chip select operation before every read/write
access. During this operation, driver needs to enable and disable
the QSPI controller. This may cause data loss if there is inadvertent
halting of any ongoing read/write operation. To avoid this scenario,
waiting for the QSPI status to be idle before next read/write
operation is implemented.

Signed-off-by: Naresh Kumar Ravulapalli <nareshkumar.ravulapalli@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@intel.com>
7 weeks agoMerge patch series "Add support for Infineon S28HL256T and S28HL02GT"
Tom Rini [Tue, 29 Apr 2025 21:27:40 +0000 (15:27 -0600)]
Merge patch series "Add support for Infineon S28HL256T and S28HL02GT"

Takahiro Kuwano <Takahiro.Kuwano@infineon.com> says:

Those are 3.0V, 256Mb/2Gb NOR Flash devices with Octal interface.
Same fanctionalities with 1.8V version that are already supported.

Link: https://lore.kernel.org/r/cover.1743575001.git.Takahiro.Kuwano@infineon.com
7 weeks agomtd: spi-nor-ids: Add support for S28HL02GT
Takahiro Kuwano [Wed, 2 Apr 2025 06:26:41 +0000 (15:26 +0900)]
mtd: spi-nor-ids: Add support for S28HL02GT

Infineon S28HL02GT is 3.0V, 2Gb Flash device with Octal interface.
It has the same functionalities with S28HS02GT.

Link: https://www.infineon.com/dgdl/Infineon-S28HS02GT_S28HS04GT_S28HL02GT_S28HL04GT_2Gb_4Gb_SEMPER_Flash_Octal_interface_1.8V_3.0V-DataSheet-v01_00-EN.pdf?fileId=8ac78c8c7e7124d1017f0631e33714d9
Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
7 weeks agomtd: spi-nor-ids: Add support for S28HL256T
Takahiro Kuwano [Wed, 2 Apr 2025 06:26:40 +0000 (15:26 +0900)]
mtd: spi-nor-ids: Add support for S28HL256T

Infineon S28HL256T is 3.0V, 256Mb Flash device with Octal interface.
It has the same functionalities with S28HS256T.

Link:https://www.infineon.com/dgdl/Infineon-S28HS256T_S28HL256T_256Mb_SEMPER_Flash_Octal_interface_1_8V_3-DataSheet-v02_00-EN.pdf?fileId=8ac78c8c8fc2dd9c018fc66787aa0657

Reviewed-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Takahiro Kuwano <Takahiro.Kuwano@infineon.com>
7 weeks agomtd: spi-nor: Use CONFIG_IS_ENABLED for CONFIG_SPI_FLASH_BAR defines
Bernhard Messerklinger [Fri, 4 Apr 2025 09:56:07 +0000 (11:56 +0200)]
mtd: spi-nor: Use CONFIG_IS_ENABLED for CONFIG_SPI_FLASH_BAR defines

At the moment a mixture of ifdef(CONFIG_IS_ENABLED) and
CONFIG_IS_ENABLED(SPI_FLASH_BAR) is used in the spi-nor framework.
This leads to misbehaviour in the SPL as there is no Kconfig option
CONFIG_SPL_SPI_FLASH_BAR. This commit standardizes the use of
CONFIG_SPI_FLASH to get SPLs that load U-Boot proper from the
SPI flash to work again.

Fixes: 9bb02f7 (mtd: spi-nor: Fix the spi_nor_read() when config SPI_STACKED_PARALLEL is enabled)
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
7 weeks agomtd: spi-nor: Add NO_CHIP_ERASE flag for mt35xu01g/2g
Venkatesh Yadav Abbarapu [Thu, 27 Mar 2025 07:04:43 +0000 (12:34 +0530)]
mtd: spi-nor: Add NO_CHIP_ERASE flag for mt35xu01g/2g

Since the opcode SPINOR_OP_CHIP_ERASE (0xc7) is not supported
for the mt35xu01g/2g flashes, the NO_CHIP_ERASE flag has been added
to enable sector erase functionality instead.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
7 weeks agoDocker, CI: Add vexpress_fvp / vexpress_fvp_bloblist support
Tom Rini [Tue, 22 Apr 2025 19:36:56 +0000 (13:36 -0600)]
Docker, CI: Add vexpress_fvp / vexpress_fvp_bloblist support

This adds the vexpress_fvp and vexpress_fvp_bloblist platforms to the
list of platforms we test via emulator in CI. In order to do this we
need to first have our container runtime have TF-A builds for the
vexpress_fvp platform, both with and without transfer list support as
well as installing "telnet" so that we can access console. In the CI
files we check for the existence of /opt/tf-a/${TEST_PY_BD} and if
found, copy bl1.bin and fip.bin to /tmp and set the variables so that we
can later run FVP to run.

Note that we currently disable the hostfs (semihosting) tests as they
trigger a bug in FVP. This has been reported upstream, and can be
enabled when fixed.

Reviewed-by: Harrison Mutai <harrison.mutai@arm.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agoPrepare v2025.07-rc1 v2025.07-rc1
Tom Rini [Mon, 28 Apr 2025 21:39:42 +0000 (15:39 -0600)]
Prepare v2025.07-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: mtdparts: calculate mtd partition offset before calculating size
Weijie Gao [Fri, 25 Apr 2025 03:43:03 +0000 (11:43 +0800)]
mtd: mtdparts: calculate mtd partition offset before calculating size

The mtd partition offset must be calculated first as it will be
referenced when calculating the mtd partition size.

Change-Id: Iccfd101b0a9597ac240c25670da638a82af28980
Fixes: 1ca97ee9039 (mtd: mtdpart: Support MTD_SIZE_REMAINING with unallocated memory area)
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Reported-by: Francesco Dolcini <francesco@dolcini.it>
7 weeks agomkimage: fix option parsing segfault
Carlos López [Thu, 24 Apr 2025 15:08:19 +0000 (17:08 +0200)]
mkimage: fix option parsing segfault

getopt_long() expects a NULL-terminated list of structures. The current
list in mkimage does not have a zero-filled structure at the end, which
can cause getopt_long() to walk past the end of the array when passing
an unknown option, causing a segmentation fault.

As a reproducer, the following command causes a segmentation fault
(tested in Debian 12):

    mkimage --foobar

Signed-off-by: Carlos López <carlos.lopezr4096@gmail.com>
7 weeks agolmb: use a different bit position for LMB_NOMAP
Sughosh Ganu [Wed, 23 Apr 2025 11:31:23 +0000 (17:01 +0530)]
lmb: use a different bit position for LMB_NOMAP

The LMB memory region attributes flags are used to specify the
behaviour of the memory regions with respect to allocations -- for
e.g. it is allowed to re-allocate a memory region already reserved
with the LMB_NONE flag. The flags use values with different bit
positions through the BIT() macro. Move the LMB_NOMAP value to bit
position 1, and also move the other flags accordingly. Using bit
position 0 for LMB_NOMAP results in the logic in
lmb_print_region_flags() to break, which prints an incorrect value for
the regions with LMB_NOMAP atribute.

Fixes: 3d56c06551d ("lmb: Move enum lmb_flags to a u32")
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
7 weeks agocmd: Kconfig: Fix typos
Aristo Chen [Sun, 20 Apr 2025 08:12:10 +0000 (16:12 +0800)]
cmd: Kconfig: Fix typos

fix the following typos
- from "categorys" to "categories"
- from "indivdually" to "individually"

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
7 weeks agocros_ec_sandbox.c: Drop spi.h include
Tom Rini [Thu, 17 Apr 2025 13:56:15 +0000 (07:56 -0600)]
cros_ec_sandbox.c: Drop spi.h include

As this driver needs to use the special sandbox <asm/malloc.h> header
rather than normal malloc, it must be careful of the includes it brings
in. It does not need <spi.h> for anything, so drop it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agonet: ti: am65-cpsw-nuss: invoke phy_config() in driver's .start callback
Siddharth Vadapalli [Wed, 16 Apr 2025 12:56:43 +0000 (18:26 +0530)]
net: ti: am65-cpsw-nuss: invoke phy_config() in driver's .start callback

Currently, the phy_config() API is invoked by the driver only once since it
has been probed. While this works in general, it doesn't allow the driver
to bring the PHY back to its default reset state. As a result, the driver
might not be able to recover the PHY from a bad state. To address this,
move phy_config() into the driver's start callback (am65_cpsw_start()).

Apart from providing the means to recover the PHY in the event of failure,
the implementation is in line with the idea of "reset and configure" that
is already followed by am65_cpsw_start() when it comes to programming the
CPSW MAC.

Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
7 weeks agoMerge patch series "Apple RTKit improvements"
Tom Rini [Mon, 28 Apr 2025 19:17:20 +0000 (13:17 -0600)]
Merge patch series "Apple RTKit improvements"

Mark Kettenis <kettenis@openbsd.org> says:

This is a collection of improvements for the Apple RTKit code
that we have been carrying downstream for some time now.

Link: https://lore.kernel.org/r/20250420115808.94272-1-kettenis@openbsd.org
7 weeks agoarm: apple: rtkit: Support allocating OSLog out of SRAM in helper
Hector Martin [Sun, 20 Apr 2025 11:58:08 +0000 (13:58 +0200)]
arm: apple: rtkit: Support allocating OSLog out of SRAM in helper

The new OSLog region in MTP (firmware 13.3+) persists on handoff to
Linux. To avoid having to come up with some weird DART handoff or DAPF
tricks, let's just steal some of the coprocessor's dedicated SRAM. This
keeps it happy and Linux doesn't need any special handoff then.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoarm: apple: rtkit: Add endpoint field to buffers
Hector Martin [Sun, 20 Apr 2025 11:58:07 +0000 (13:58 +0200)]
arm: apple: rtkit: Add endpoint field to buffers

To be used for special-case oslog support in rtkit-helper.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoarm: apple: rtkit: Add OSLog buffer support
Hector Martin [Sun, 20 Apr 2025 11:58:06 +0000 (13:58 +0200)]
arm: apple: rtkit: Add OSLog buffer support

This will work for u-boot itself, but needs a special workaround in the
MTP driver for Linux handoff to work.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoarm: apple: rtkit: Add a generic RTKit helper driver
Hector Martin [Sun, 20 Apr 2025 11:58:05 +0000 (13:58 +0200)]
arm: apple: rtkit: Add a generic RTKit helper driver

This driver handles the MTP ASC coprocessor, which does not need any
special handling on the RTKit side and communicates out-of-band.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoarm: apple: rtkit: Add default buffer handlers
Hector Martin [Sun, 20 Apr 2025 11:58:04 +0000 (13:58 +0200)]
arm: apple: rtkit: Add default buffer handlers

For devices without specific buffer methods, just assume we can give
them raw memory pointers when they request a buffer.

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoarm: apple: rtkit: Add support for AP power & syslogs
Hector Martin [Sun, 20 Apr 2025 11:58:03 +0000 (13:58 +0200)]
arm: apple: rtkit: Add support for AP power & syslogs

This is required for MTP to work properly

Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 weeks agoMerge tag 'u-boot-imx-master-20250428' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Mon, 28 Apr 2025 16:19:29 +0000 (10:19 -0600)]
Merge tag 'u-boot-imx-master-20250428' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/25974

- Fix power-domain ref counting regression.
- Fix i.MX8MP USB clock regression.
- Fix i.MX8MM osc_32k regression in SPL.
- Finish converting clock-osc-24 back to osc_24 on i.MX.
- Several imx8mp capricorn updates.
- Update Stefano Babic's email address.
- Fix fsl_qspi bug by moving AHB read buffer config after LUT.
- Fix verdin imx95 sku 0089 pid4.

7 weeks agoMerge patch series "bloblist: fix the overriding of fdt from bloblist"
Tom Rini [Mon, 28 Apr 2025 16:13:42 +0000 (10:13 -0600)]
Merge patch series "bloblist: fix the overriding of fdt from bloblist"

This series from Raymond Mao <raymond.mao@linaro.org> fixes some cases
of passing the device tree to U-Boot via standard passage and then
ensures that we set the environment variable of the device tree
correctly in this case.

Link: https://lore.kernel.org/r/20250331224011.2734284-1-raymond.mao@linaro.org
7 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Mon, 28 Apr 2025 15:34:32 +0000 (09:34 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxi

We have improvements to the reliability of H6 and H616 DRAM
initialisation, hopefully avoiding those occasional size misdetections
many people reported before.
Also there is some modernisation of the USB PHY code, to use DT provided
regulators and GPIOs, instead of relying on this being badly duplicated
in Kconfig. This also happens to fix broken USB operations for older
boards (using the A20 SoCs, for instance), which were clashing over
grabbing some GPIOs, leading to a driver bailout.  There is also some
rework of the H6/H616 SPL clock code, to prepare it for being reused by
the upcoming Allwinner A523 support. This drops the usage of C structs
to model MMIO register frames, and replaces them by using an addition of
the base address with a macro defined offset.  Also in preparation for
A523 there is one fix and one addition for the FEL code, to prepare for
the GICv3 interrupt controller that the new SoC uses. And since this is
a simple fix, and was ready, there is also the watchdog driver for that
new SoC. Finally tossing in an easy fix to some H616 defconfig files to
enable eMMC.

I also use the opportunity to enable proper page table protection
(observing read-only and no-execute attributes), support for which the
arm64 port recently gained. I didn't spot any issues on my arm64 board
tests, but it can be easily disabled or backed out again in case any
issues arise.

Full support for the two new SoC series (A133 and A523) we are working
on is not quite ready yet, but might follow still a bit later if
progress permits.

CI passed, and boot-tested on at least one board with a H616, H6, A64,
H3, A20, T113s.

7 weeks agosunxi: clock: H6: remove struct sunxi_prcm_reg
Andre Przywara [Sun, 26 Jan 2025 00:04:41 +0000 (00:04 +0000)]
sunxi: clock: H6: remove struct sunxi_prcm_reg

With the SPL clock code and the DRAM init routine we converted all users
of the H6 class "struct sunxi_prcm_reg" over to use #define'd register
offsets now.

Drop the whole definition of this struct now, since it's not needed
anymore, for all H6 and H616 boards.
This removes the entire fragile and questionable definition, and allows
new SoCs to share the code more easily.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
7 weeks agosunxi: H6/H616: dram: remove usage of struct sunxi_prcm_reg
Andre Przywara [Sat, 25 Jan 2025 23:49:27 +0000 (23:49 +0000)]
sunxi: H6/H616: dram: remove usage of struct sunxi_prcm_reg

The Allwinner H6 and H616 DRAM initialisation code uses a complex C
struct, modelling the PRCM clock register frame. For those SoCs, this
struct contains 20 registers, but the DRAM code only uses two of them.

Since we want to get rid of this struct, drop the usage of the struct in
the H6 and H616 DRAM code, by using #define'd register names and their
offset, and then adding those names to the base pointer.

This removes one more user of the PRCM clock register struct.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>