Stephan Gerhold [Mon, 7 Apr 2025 16:59:27 +0000 (18:59 +0200)]
board: dragonboard410c: Drop unused linux_image
This does not seem to be used anywhere.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-6-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:26 +0000 (18:59 +0200)]
board: dragonboard410c: Drop reflash functionality
This is broken ever since we switched to using U-Boot as first stage
bootloader. Since no one seems to test this actively, let's just drop this
entirely. There are other tools available for re-flashing the DB410c.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-5-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:25 +0000 (18:59 +0200)]
board: dragonboard410c: Drop UNSTUFF_BITS() macro
This was originally taken from Linux, but at this point it's an inline
function upstream and no longer a macro. Given that we just want to extract
the serial number from the MMC CID, let's just inline that specifically.
This is also the style used in the MMC core code within U-Boot.
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-4-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:24 +0000 (18:59 +0200)]
board: dragonboard410c: Fix BD address
local-bd-address in the device tree needs to be formatted with the least
significant byte first (i.e. little endian). We're not doing this when
adding it to the DT, which means the MAC address ends up being reversed in
Linux. Fix this by reversing the array before setting it in the DT.
We're also flipping the wrong bit when generating the BD address. Before
reversing the array, the least significant bit is in the last byte.
Fixes:
ff06dc240325 ("db410: alter WLAN/BT MAC address fixup")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-3-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:23 +0000 (18:59 +0200)]
board: dragonboard410c: Fix RAM size
DB410c has exactly 1 GiB of RAM. Some of it is reserved, but this is
described separately in the DT.
This was fixed before in commit
1d667227ea51 ("board: dragonboard410c: Fix
PHYS_SDRAM_1_SIZE"), but was reintroduced when DB410c was converted to use
the upstream device tree.
Note that there are variants of apq8016-sbc with 2 GiB RAM (e.g. the
Geniatech DB4). They need the WIP SMEM memory map parsing [1] to use the
full amount of RAM.
[1]: https://lore.kernel.org/u-boot/
20241124-b4-modernise-smem-v1-0-
b7852c11b67c@linaro.org/T/
Fixes:
ed8fbd2889fc ("dts: msm8916: replace with upstream DTS")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-2-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Stephan Gerhold [Mon, 7 Apr 2025 16:59:22 +0000 (18:59 +0200)]
mach-snapdragon: Fix EL2 boot on DragonBoard 410c
The workaround for the "PSCI bug" on DragonBoard 410c implemented in
arch/arm/mach-snapdragon/include/mach/boot0.h clobbers the x0 register
by storing the CurrentEL in there. When running in EL1, the mode switch
sequence implemented there later clears the register again, but this is
skipped when U-Boot is booted in EL2.
This causes crashes in the mach-snapdragon board_fdt_blob_setup() later,
because the invalid address stored in x0 gets dereferenced to check if it
points to a valid DTB.
We can't rely on having a valid values in the CPU registers for the first
stage bootloader configuration on DB410c, and nothing would place a DTB
there anyway. Skip selecting the SAVE_PREV_BL_FDT_ADDR option for the boot0
hook case to avoid crashing with the clobbered register value.
Fixes:
059d526af312 ("mach-snapdragon: generalise board support")
Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-1-524aefbc8bb4@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Thu, 10 Apr 2025 08:52:38 +0000 (10:52 +0200)]
pinctrl: qcom: handle reserved ranges
Some Qualcomm boards feature reserved ranges of pins which are protected
by firmware. Attempting to read or write any registers associated with
these pins results the board resetting.
Add support for parsing these ranges from devicetree and ensure that the
pinctrl and GPIO drivers don't try to interact with these pins.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250410-topic-sm8x50-pinctrl-reserved-ranges-v2-1-654488392b9a@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:23 +0000 (14:23 +0200)]
button: make button_get_by_label() case insensitive
This function is already doing a fuzzy match, since there are no
guarantees that a given label is unique.
Ignoring case makes it much easier to catch "Volume down" or "Volume
Down" in board-agnostic code.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-6-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:22 +0000 (14:23 +0200)]
button: qcom-pmic: prettify and standardise button labels
Boards using gpio-keys for volume buttons label them "Volume Down",
let's match that here, and make the power button nicer too.
This simplifies configuring button_cmds in a board-agnostic way.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-5-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:21 +0000 (14:23 +0200)]
doc: board/qualcomm: describe phone support and bringup
Add some documentation which attempts to describe Qualcomm smartphone
support with the qcom-phone.config fragment, as well as a high level
debugging guide for diagnosing U-Boot issues when UART and framebuffer
are unavailable.
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-4-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:20 +0000 (14:23 +0200)]
bootretry: check for bootretry variable changes
To enable more complex sequencing of the bootmenu, autoboot, and
bootretry, handle changes to the bootretry variable between tries. This
makes it possible to turn bootretry off (e.g. to drop to a shell) and
then back on again.
This makes it possible to have a persistent bootmenu (the only way to
navigate U-Boot on devices like smartphones which lack a physical
keyboard) by having bootcmd be defined to launch the bootmenu. This
allows for menu options like enabling USB mass storage gadget to return
back to the boot menu once the gadget is shut down.
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-3-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:19 +0000 (14:23 +0200)]
cli_hush: support running bootcmd on boot retry
Introduce a new config option: RETRY_BOOTCMD. When enabled this causes
hush shell to re-run "bootcmd" when the auto-boot counter times out.
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-2-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 12:23:18 +0000 (14:23 +0200)]
board/qualcomm: introduce phone config
Phones don't have keyboards! Introduce a phone-specific config fragment
and associated environment file to make U-Boot more useful on these
devices. This allows for navigating via the buttons and enabling
various USB gadget modes or displaying info about U-Boot.
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Danila Tikhonov <danila@jiaxyga.com> # google-sunfish
Tested-by: Jens Reidel <adrian@mainlining.org> # xiaomi-davinci
Link: https://lore.kernel.org/r/20250331-qcom-phones-v4-1-f52e57d3b8c6@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Alexey Minnekhanov [Mon, 31 Mar 2025 15:55:31 +0000 (18:55 +0300)]
drivers: pinctrl: Add Qualcomm SDM630/660 TLMM driver
Add support for TLMM pin controller block (Top Level Mode
Multiplexer) on SDM630/660 SoCs, with support for special pins.
Correct pin configuration is required for working debug UART
and eMMC/SD cards.
SDM630 and SDM660 TLMM blocks are the same.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250331155531.3638165-1-alexeymin@postmarketos.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Tue, 1 Apr 2025 07:45:20 +0000 (09:45 +0200)]
gpio: msm: return correct value return for special output pins
When a special pin is output only, the current code would return 0,
but if the pin is output only we can get the output value.
Try to return the output value and in all the other cases return
an error instead of 0.
Fixes:
f9bb539460d ("gpio: msm: add support for special pins")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-2-a1148a02bb16@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Tue, 1 Apr 2025 07:45:19 +0000 (09:45 +0200)]
gpio: msm: fix get_function return for special pins
The get_function callback wrongly returns 0 for special pins,
return the appropriate pin function by probing into the special
pins data fields to find if the pin is gpio capable.
Fixes:
f9bb539460d ("gpio: msm: add support for special pins")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-topic-sm8x50-msm-gpio-special-fixes-v1-1-a1148a02bb16@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Sumit Garg [Thu, 10 Apr 2025 08:00:27 +0000 (13:30 +0530)]
phy: phy-qcom-qusb2: Fix USB PHY power on sequence
Recent addition of support for SDM660 inadvertently broke USB PHY power
on sequence on RB1/RB2 and others with following error:
starting USB...
Bus usb@4e00000: QUSB2PHY pll lock failed: status reg = 0
qcom-qusb2-phy phy@1613000: PHY: Failed to power on phy@1613000: -16.
Can't power on PHY0
probe failed, error -16
No USB controllers found
The root cause was the addition of flag se_clk_scheme_default which was
configured correctly for SDM660 but incorrect for all other supported
SoC. Fix that by properly assignment as per upstream Linux driver.
Fixes:
475497dc3c15 ("phy: Add SDM660 support to Qualcomm QUSB2 phy")
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250410080027.208674-3-sumit.garg@kernel.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Sumit Garg [Thu, 10 Apr 2025 08:00:26 +0000 (13:30 +0530)]
qcom_defconfig: Disable MMC HS200 mode support
Currently the msm_sdhci doesn't yet support DLL configurations which are
required to enable bus speeds greater that 100MHz. So disable HS200 mode
support as of now as it requires bus speeds of 200MHz.
This should fix eMMC issues reported on RB1/RB2 although it should fix
issues for all Qcom platforms but it's not seen there as mostly SD cards
available don't support HS200 mode. The SD cards usually works in high
speed mode whose performance remains unaffected by this change. It only
affects RB1/RB2 as eMMC flash on these support HS200 mode but the U-Boot
driver currently is incapable of supporting that.
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250410080027.208674-2-sumit.garg@kernel.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Jorge Ramirez-Ortiz [Mon, 7 Apr 2025 17:56:17 +0000 (19:56 +0200)]
configs: dragonboard820: updates
Configure GPIO and CLK_STUBS
CLK_STUBS is required for MMC initialization
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407175617.3494506-5-jorge.ramirez@oss.qualcomm.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Jorge Ramirez-Ortiz [Mon, 7 Apr 2025 17:56:16 +0000 (19:56 +0200)]
clk: stub: add qcom,glink-smd-rpm
Add support for the resource power manager clocks over SMD/GLINK to be
stubbed.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250407175617.3494506-4-jorge.ramirez@oss.qualcomm.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Jorge Ramirez-Ortiz [Mon, 7 Apr 2025 17:56:15 +0000 (19:56 +0200)]
clk/qcom: apq8096: fix the sdhci clock
Select the right clock for sdhci.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250407175617.3494506-3-jorge.ramirez@oss.qualcomm.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Jorge Ramirez-Ortiz [Mon, 7 Apr 2025 17:56:14 +0000 (19:56 +0200)]
clk/qcom: apq8096: fix set rate for the uart clock
The function should return a valid rate.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407175617.3494506-2-jorge.ramirez@oss.qualcomm.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Jorge Ramirez-Ortiz [Mon, 7 Apr 2025 17:56:13 +0000 (19:56 +0200)]
board: qualcomm: dragonboard820c: update readme
Update build instructions.
Be sure to use the u-boot-nodtb.bin image, as the Snapdragon platform
prioritizes the embedded Device Tree Blob (DTB) when present, rather
than the external one. The external DTB—modified by LK—is the version
required by the DB820c.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org>
Reviewed-by:
Link: https://lore.kernel.org/r/20250407175617.3494506-1-jorge.ramirez@oss.qualcomm.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Wed, 2 Apr 2025 14:28:03 +0000 (16:28 +0200)]
hmibsc_defconfig: disable DM_USB_GADGET
As with the db410c this breaks linking as it conflicts with the USB
controller used by these platforms.
This fixes building after DM_USB_GADGET was enabled by default for
mach-snapdragon.
Fixes:
7235dbedfce3 (mach-snapdragon: enable DM_USB_GADGET by default)
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250402142812.368168-1-caleb.connolly@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 31 Mar 2025 10:43:18 +0000 (12:43 +0200)]
mach-snapdragon: of_fixup: fix condition check in ft_board_setup()
The fdt_node_check_compatible() function returns 0 on success which is
pretty confusing, and we were using it wrong!
Invert the condition check and refactor things to be more readable.
Additionally, add the check for the RB1 which needs the same fixup as
the RB2.
Reported-by: Sam Day <me@samcday.com>
Fixes:
e64503f1fcdf ("mach-snapdragon: implement ft_board_setup() for USB role selection")
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Tested-by: Sam Day <me@samcday.com>
Link: https://lore.kernel.org/r/20250331104327.321339-1-caleb.connolly@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 28 Mar 2025 08:53:24 +0000 (09:53 +0100)]
spmi: msm: correctly handle multiple mapping entries
On v5 & v7 controllers, multiple mapping for different
Execution Environment exists, if the mapping owner is for
a different Execution Environment we can only read and
not write any data.
To allow us to find a Write mapping for our Execution
Environment, we can overwritte a mapping if we encounter
a new one which we own.
Implement this logic, the result is the same mapping
table as in Linux.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: caleb.connolly@linaro.org # sdm845
Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-4-a7548d3aef0d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 28 Mar 2025 08:53:23 +0000 (09:53 +0100)]
spmi: msm: introduce SPMI_CHANNEL_VALID flag
Introduce the SPMI_CHANNEL_VALID flag so we can check if
a mapping exists for a SPMI command.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: caleb.connolly@linaro.org # sdm845
Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-3-a7548d3aef0d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 28 Mar 2025 08:53:22 +0000 (09:53 +0100)]
spmi: msm: factor out channel mapping for v5 & v7
The handling of the table mapping for V5 & V7 needs more work
to handle the duplicate read-only & read-write mappings,
so to make code cleaner add a switch/case and move the
v5 & v7 mapping handler in a separate function.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: caleb.connolly@linaro.org # sdm845
Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-2-a7548d3aef0d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Neil Armstrong [Fri, 28 Mar 2025 08:53:21 +0000 (09:53 +0100)]
spmi: msm: use real number of channels for v5 & v7
The SPMI_MAX_CHANNELS_Vx are only the maximum channels supported
by the controller, but the real number of channels mapped on this
system can be read from a register, so take this info.
This allows no to overlap on the second controller present on
the V7 SPMI arbiter, otherwise we would also parse the mapping
of the second SPMI bus and we would bet the wrong IDs.
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: caleb.connolly@linaro.org # sdm845
Link: https://lore.kernel.org/r/20250328-topic-sm8x50-spmi-fix-v1-1-a7548d3aef0d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 17 Mar 2025 16:15:02 +0000 (16:15 +0000)]
clk/qcom: sc7280: add missing UFS and MMC clocks
These are all usually enabled, hence we don't (yet) bother configuring
their RCG src clocks.
Add them to remove the errors about missing clocks when the UFS and MMC
drivers probe.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250317-sc7280-mmc-ufs-clocks-v1-2-38e05c16511b@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Mon, 24 Mar 2025 08:05:04 +0000 (13:35 +0530)]
qcom_defconfig: enable pinctrl for SA8775P
Enable the pinctrl driver for SA8775P
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250324080504.2385747-2-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Mon, 24 Mar 2025 08:05:03 +0000 (13:35 +0530)]
pinctrl: qcom: add driver for SA8775P SoC
Add pinctrl and GPIO driver for SA8775P. Driver code is based on the
similar U-Boot and Linux drivers.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250324080504.2385747-1-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Varadarajan Narayanan [Mon, 24 Mar 2025 11:30:30 +0000 (17:00 +0530)]
regulator: qcom-rpmh-regulator: add support for pmm8654 regulators
Add the PMC8380 regulator data found on the Qualcomm SA8775P platform.
The tables are imported from the Linux driver.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250324113030.2597986-1-quic_varada@quicinc.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Rui Miguel Silva [Thu, 27 Feb 2025 09:45:50 +0000 (09:45 +0000)]
power: regulator: add qcom-usb-vbus
Add regulator driver that allow some Qualcomm PMIC to
feed VBUS output to peripherals that are connected.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Acked-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250227094911.497219-3-rui.silva@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Rui Miguel Silva [Thu, 27 Feb 2025 09:45:49 +0000 (09:45 +0000)]
mach-snapdragon: of_fixup: fix property length at writing
The length of a property includes '\0' in a string type one, so
the length passed by needs to have that in account, if not,
when getting the property value it will fail because it
has the wrong size.
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Tested-by: caleb.connolly@linaro.org # db845c
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250227094911.497219-2-rui.silva@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 24 Mar 2025 18:17:40 +0000 (19:17 +0100)]
qcom_defconfig: enable fastboot
Enable fastboot support over USB, using MMC as the backend. This will be
the internal eMMC on devices that have it, or the sdcard slot on devices
with UFS (if available).
We don't use a fixed address for the fastboot buffer because it's
allocated at runtime per-board. Entering fastboot mode should be done by
executing "run fastboot" or manually running:
fastboot -l $fastboot_addr_r usb 0
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-4-d177a10f336d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 24 Mar 2025 18:17:39 +0000 (19:17 +0100)]
mach-snapdragon: enable DM_USB_GADGET by default
This is required for gadget modes to work on most platforms. It must be
disabled for dragonboard410c since that doesn't use dwc3. USB on other
MSM8916 platforms isn't supported by qcom_defconfig anyway.
Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-3-d177a10f336d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 24 Mar 2025 18:17:38 +0000 (19:17 +0100)]
clk/qcom: sdm845: add GCC_AGGRE_UFS_PHY_AXI_CLK
Missing for UFS.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-2-d177a10f336d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 24 Mar 2025 18:17:37 +0000 (19:17 +0100)]
clk/stub: add sdm845 rpmh clock
Necessary for UFS to successfully probe all clocks.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250324-sdm845-fixes-fastboot-v1-1-d177a10f336d@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Sam Day [Wed, 19 Mar 2025 15:45:29 +0000 (15:45 +0000)]
clk/qcom: sdm845: add missing USB3 clocks
These are necessary for USB gadget to come up properly, now that
qcom_gate_clk_en fails on unknown clocks.
Signed-off-by: Sam Day <me@samcday.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250319-sdm845-usb-clocks-v1-1-ddea854f62ec@samcday.com
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Alexey Minnekhanov [Tue, 25 Mar 2025 08:37:13 +0000 (11:37 +0300)]
phy: Add SDM660 support to Qualcomm QUSB2 phy
Imported from Linux driver.
Note that already existing but previously unused member of
struct qusb2_phy::has_se_clk_scheme is now utilized for it's
purpose.
Signed-off-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20250325083713.2425430-1-alexeymin@postmarketos.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Fri, 28 Mar 2025 10:40:07 +0000 (11:40 +0100)]
qcom_defconfig: enable OF_UPSTREAM_BUILD_VENDOR
A single U-Boot binary can be run on many different Qualcomm boards just
by booting with a different DTB.
Simplify the build process for this by enabling OF_UPSTREAM_BUILD_VENDOR
so that all the DTBs will be available after building U-Boot once.
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Christopher Obbard <christopher.obbard@linaro.org>
Link: https://lore.kernel.org/r/20250328104011.1837872-1-caleb.connolly@linaro.org
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Tom Rini [Thu, 10 Apr 2025 00:31:21 +0000 (18:31 -0600)]
CI: Disable evb-ast2600
Currently, this platform is failing in CI due to seemingly platform
specific reasons. For now, remove it from CI until the maintainers have
a chance to look in to it.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 8 Apr 2025 22:24:12 +0000 (16:24 -0600)]
Merge patch series "Annotate switch/case fallthrough cases"
Andre Przywara <andre.przywara@arm.com> says:
C's implicit fallthrough behaviour in switch/case statements can lead to
subtle bugs. Quite some while ago many compilers introduced warnings in
those cases, requiring intentional fallthrough's to be annotated.
So far we were not enabling that compiler option, so many ambiguities
and some bugs in the code went unnoticed.
This series adds the required annotations in code paths that the first
stage of the U-Boot CI covers. There is a large number of cases left
in the libbz2 code. The usage of switch/case is borderline insane there,
labels are hidden in macros, and there are no breaks, but just goto's.
Upstream still uses very similar code, without any annotations. I still
am not 100% sure those are meant to fall through or not, and plan to do
further investigations, but didn't want to hold the rest of the patches
back. You can see for yourself by applying patch 18/18 and building for
sandbox64, for instance.
Because of this we cannot quite enable the warning in the Makefile yet,
but those fixes are worth regardless, and be it to increase readability.
Please note that those patches do not fix anything, really, they just add
those fallthrough annotations, so the series is not really critical.
Link: https://lore.kernel.org/r/20250327153313.2105227-1-andre.przywara@arm.com
Andre Przywara [Thu, 27 Mar 2025 15:33:12 +0000 (15:33 +0000)]
cmd: spl: annotate switch/case fallthrough
The argument parsing in the SPL configuration command uses an implicit
switch/case fallthrough when dealing with a different number of
arguments.
Add our "fallthrough;" statement-like macro before the respective labels
in the bootm code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:11 +0000 (15:33 +0000)]
cmd: pmic: annotate switch/case fallthrough
The argument parsing code in the pmic command uses an implicit switch/case
fallthrough to handle the common part of having one or two arguments.
Add our "fallthrough;" statement-like macro before the second branch in
the parsing code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:10 +0000 (15:33 +0000)]
mtd: rawnand: nand_base: annotate switch/case fallthrough
The raw NAND flash code uses an implicit switch/case fallthrough to
share code when dealing with different ECC modes, and also when handling
some read command.
Add our "fallthrough;" statement-like macro before the respective labels
in the NAND code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
This copies the fallthrough annotations that the original kernel code
gained, before this function got refactored there.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Michael Trimrachi <michael@amarulasolutions.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:09 +0000 (15:33 +0000)]
mtd: spi-nor-tiny: annotate switch/case fallthrough
The SPI NOR code uses an implicit switch/case fallthrough when checking
different vendors to determine how to deal with extended addressig modes.
Add our "fallthrough;" statement-like macro before some label in the
4-byte addressing mode code, to avoid a warning when GCC's
-Wimplicit-fallthrough warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:08 +0000 (15:33 +0000)]
arm: mach-k3: am62p: annotate switch/case fallthrough
The MMC boot mode selection for the TI AM62P series of SoCs uses an
implicit switch/case fallthrough for falling back to some default
boot mode.
Add our "fallthrough;" statement-like macro before the default branch in
the code, to avoid a warning when GCC's -Wimplicit-fallthrough warning
option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:07 +0000 (15:33 +0000)]
mtd: ubi: annotate fallthrough
The UBI code uses an implicit switch/case fallthrough when handling two
related cases of bad header errors. Also there is a switch/case for unit
prefix handling (G/M/K), which accumulates multiplications.
Add our "fallthrough;" statement-like macro before the respective labels
in both cases, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Andre Przywara [Thu, 27 Mar 2025 15:33:06 +0000 (15:33 +0000)]
net: e1000: annotate switch/case fallthrough
The E1000 driver uses an implicit switch/case fallthrough for sharing
some code supporting different PHYs.
Add our "fallthrough;" statement-like macro before the two labels in
e1000_set_phy_type(), to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:05 +0000 (15:33 +0000)]
video: annotate switch/case fall-through
The generic DM video code uses an implicit switch/case fallthrough to
provide fallback code paths when certain colour depths are not enabled.
Add our "fallthrough;" statement-like macro to the video_fill() function
to avoid a warning when GCC's -Wimplicit-fallthrough warning option is
enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:04 +0000 (15:33 +0000)]
usb: xhci: annotate switch/case fallthrough properly
The USB XHCI code uses an implicit switch/case fallthrough to share code
for handling full speed and low speed transfers.
Add our "fallthrough;" statement-like macro before the second label in
the XHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:03 +0000 (15:33 +0000)]
usb: ohci-hcd: annotate switch/case fallthrough
The USB OCHI code uses an implicit switch/case fallthrough after checking
for valid descriptor IDs.
Add our "fallthrough;" statement-like macro before the default branch in
the OHCI code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:02 +0000 (15:33 +0000)]
net: sun8i-emac: annotate fallthrough
The Allwinner sun8i EMAC driver uses an implicit switch/case fallthrough
when setting up the MAC/PHY communication protocol, to handle the case
when RMII is requested, but would not be supported by the hardware.
Add our "fallthrough;" statement-like macro before the default branch in
sun8i_emac_set_syscon(), to avoid a warning when GCC's
-Wimplicit-fallthrough warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Andre Przywara [Thu, 27 Mar 2025 15:33:01 +0000 (15:33 +0000)]
fastboot: annotate switch/case fallthrough case
The fastboot command handling uses an implicit switch/case fallthrough
when receiving the OEM_CONSOLE command, but when this command is not
enabled in Kconfig, to report this command as unknown.
Add our "fallthrough;" statement-like macro before the default branch in
the fastboot code, to avoid a warning when GCC's -Wimplicit-fallthrough
warning option is enabled.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Andre Przywara [Thu, 27 Mar 2025 15:32:59 +0000 (15:32 +0000)]
use proper fallthrough annotations
In some cases in the generic code, we were already using switch/case
fallthrough annotations comments, though in a way which might not be
understood by most compilers.
Replace two non-standard /* no break */ comments with our fallthrough;
statement-like macro, to make this visible to the compiler.
Also use this macro in place of an /* Fall through */ comment, to be
more consistent.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:32:58 +0000 (15:32 +0000)]
gadget: f_thor: annotate switch/case fallthrough
Even though we seem to catch POWEROFF and EFSCLEAR commands in the THOR
protocol request handling, we ultimately do not seem to handle them
(apart from sending a response), so those commands still print an error
message.
Annotate the switch/case fallthrough in this case, to make this clear to
the compiler.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Andre Przywara [Thu, 27 Mar 2025 15:32:57 +0000 (15:32 +0000)]
zlib: annotate switch/case fallthrough cases
The inflate state machine in zlib uses switch/case fall-through's
extensively, as it sometimes advances the state, and lets the
conveniently placed next case statement handle the new state already.
The pattern here is:
state->mode = LEN;
case LEN:
Annotate those occasions with the "fallthrough;" macro, to let compilers
know this is fine when using -Wimplicit-fallthrough.
This mimics the upstream commit
76f70abbc73f:
Author: Mark Adler <madler@alumni.caltech.edu>
Date: Sun Mar 27 00:12:38 2022 -0700
Subject: Add fallthrough comments for gcc.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Link: https://github.com/madler/zlib/commit/76f70abbc73f
Reviewed-by: Tom Rini <trini@konsulko.com>
Andre Przywara [Thu, 27 Mar 2025 15:32:56 +0000 (15:32 +0000)]
spl: mmc: properly annotate fallthrough
Depending on the various MMC boot configurations, we might end up with
trying filesystem mode when a raw image boot failed. This fall-through
in the switch/case statement is explained in a comment, but this is not
visible to the compiler, which still will complain.
Add the proper compiler-visible annotation, to allow enabling the
compiler check in the future.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 8 Apr 2025 21:23:06 +0000 (15:23 -0600)]
Merge patch series "acpi: simplify updating ACPI table header checksum"
Heinrich Schuchardt <heinrich.schuchardt@canonical.com> says:
Introduce a new function to update ACPI table headers.
This allows to simplify the existing code.
Link: https://lore.kernel.org/r/20250321232121.251800-1-heinrich.schuchardt@canonical.com
Tom Rini [Tue, 8 Apr 2025 21:20:33 +0000 (15:20 -0600)]
Merge patch series "Change DRAM message and add RAM doc"
Neha Malcom Francis <n-francis@ti.com> says:
This short series is an ongoing effort to make RAM utilization clearer for
easier debugging and understanding of code. Intention is for users to quickly
be able to identify the CONFIGs needed to modify for their RAM usecase.
Link: https://lore.kernel.org/r/20250319140327.301266-1-n-francis@ti.com
Vincent Stehlé [Mon, 24 Mar 2025 08:34:06 +0000 (09:34 +0100)]
ata: ahci: remove bad free
In the case of a memory allocation error, the ahci_port_start() function
tries to free the `pp' pointer.
This pointer was not dynamically allocated but does in fact point to an
element of the port[] array member of the struct ahci_uc_priv.
Remove the erroneous call to free() to fix this.
Fixes:
4782ac80b02f ("Add AHCI support to u-boot")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Jason Jin <jason.jin@freescale.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Patrick Rudolph [Thu, 20 Mar 2025 12:51:58 +0000 (13:51 +0100)]
emulation: qemu-sbsa: Fill in correct ITS ID
The ACPI IORT and ACPI MADT needs to use the same IDs when referencing
GIC ITS. The GIC-v3 ITS driver uses dev_seq(dev) to generate a unique ID
for the MADT, but qemu sbsa-ref hardcodes it.
Currently it's not the same ID, breaking interrupt routing on the OS.
Don't assume it's 0 and fetch it from the device instead.
TEST: Fixes non working IRQs in QEMU sbsa-ref.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Patrick Rudolph [Thu, 20 Mar 2025 12:51:57 +0000 (13:51 +0100)]
emulation: qemu-sbsa: Move ITS node into GICv3 node
According to the binding [1] the ITS node should be a subnode of the
GICv3 node. Thus move it now that the driver binds subnodes as well.
1: https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic-v3.txt
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Patrick Rudolph [Thu, 20 Mar 2025 12:51:56 +0000 (13:51 +0100)]
arm: gic-v3: Scan for subnodes
According to the binding [1] the ITS node should be a subnode of the
GICv3 node. Since the ITS node has it's own driver, manually probe for
possible subnodes after binding since dm_scan_fdt() is not recursive.
1: https://www.kernel.org/doc/Documentation/devicetree/bindings/interrupt-controller/arm%2Cgic-v3.txt
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Christoph Niedermaier [Thu, 20 Mar 2025 19:01:47 +0000 (20:01 +0100)]
tiny-printf: Improve %X formatting
If tiny printf is used with 0x%08X (upper case X) the output is
always 0x00000000. It could be confusing if upper case instead
of lower case is used intentionally or accidentally because the
actual value is not output. To avoid this confusion, treat output
of %X as %x. As a compromise for tiny printf, the hex value is
then output correctly, but in lower case. This is done to keep it
tiny printf small.
Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Heinrich Schuchardt [Fri, 21 Mar 2025 23:21:20 +0000 (00:21 +0100)]
arm: simplify updating ACPI table header checksum
Use acpi_update_checksum() to update table header.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Heinrich Schuchardt [Fri, 21 Mar 2025 23:21:19 +0000 (00:21 +0100)]
qemu-sbsa: simplify updating ACPI table header checksum
Use acpi_update_checksum() to update table header.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Fri, 21 Mar 2025 23:21:18 +0000 (00:21 +0100)]
x86/acpi: simplify updating header checksum
Use acpi_update_checksum() for updating ACPI table header checksum.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Heinrich Schuchardt [Fri, 21 Mar 2025 23:21:17 +0000 (00:21 +0100)]
acpi: simplify updating header checksum
Use acpi_update_checksum() for updating ACPI table header checksum.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Heinrich Schuchardt [Fri, 21 Mar 2025 23:21:16 +0000 (00:21 +0100)]
acpi: new function acpi_update_checksum()
Introduce a new function to update ACPI table headers.
This allows to simplify the existing code.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Neha Malcom Francis [Wed, 19 Mar 2025 14:03:27 +0000 (19:33 +0530)]
doc: memory: Add documentation for system RAM
Add documentation for system RAM utilization in U-Boot.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Neha Malcom Francis [Wed, 19 Mar 2025 14:03:26 +0000 (19:33 +0530)]
board_f: Modify DRAM message
The message "DRAM: 2 GiB (effective 32 GiB)" can be a little confusing,
modify the message s/effective/total to make it more evident.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Tom Rini [Tue, 8 Apr 2025 21:07:23 +0000 (15:07 -0600)]
Merge tag 'ubifixes-for-2025.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-ubi
ubi fixes for v2025.07-rc1
- ubi: fix bug creating partitions for non-existent volumes
from Oskar Nilsson
Tom Rini [Tue, 8 Apr 2025 19:54:50 +0000 (13:54 -0600)]
Merge patch series "Improve pytest runtime"
Tom Rini <trini@konsulko.com> says:
One thing that Simon Glass has noted is that our pytest run time keeps
getting longer. Looking at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25011/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
we can see that some of the longest running tests are a little puzzling.
It turns out that we have two ways of making filesystem images without
requiring root access and one of them is significantly slower than the
other. This series changes us from using virt-make-fs to only using the
mk_fs helper that currently resides in test_ut.py which uses standard
userspace tools. The final result can be seen at:
https://source.denx.de/u-boot/u-boot/-/pipelines/25015/test_report?job_name=sandbox%20test.py%3A%20%5Bfast%20amd64%5D
and the tests changed here now run much quicker.
Link: https://lore.kernel.org/r/20250320140030.2052434-1-trini@konsulko.com
Tom Rini [Thu, 20 Mar 2025 13:59:31 +0000 (07:59 -0600)]
Dockerfile: Update to drop virt-make-fs packages
Now that we do not need nor want people to use virt-make-fs for
filesystem tests, remove the related packages from the installation
list.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:30 +0000 (07:59 -0600)]
doc/develop/py_testing.rst: Update section on filesystem images
Now that we have no users of "virt-make-fs" nor users of "sudo" for
creating disk images update the documentation. We remove packages that
are no longer required (and related text) as well as be firm in our
wording around not using "sudo".
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:29 +0000 (07:59 -0600)]
test/py: Rework test_efi_secboot to not use virt-make-fs
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:28 +0000 (07:59 -0600)]
test/py: Rework test_efi_capsule to not use virt-make-fs
FIXME: Reword more
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
The main change here is that our mount point directory has changed from
"test_efi_capsule" to "scratch" and so we need to update other functions
too. As the disk image that we get created doesn't have a GPT, invoke
sgdisk to do a conversion first.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:27 +0000 (07:59 -0600)]
test/py: Rework test_eficonfig to not use virt-make-fs
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
As this test already had a number of internal functions, add a
prepare_image function to do this part of the test.
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:26 +0000 (07:59 -0600)]
test/py: Rework test_efi_bootmgr to not use virt-make-fs
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:25 +0000 (07:59 -0600)]
test/py: Fix a problem with setup_image
While we can be passed an image size to use, we always called qemu-img
with 20M as the size. Fix this by using the size parameter.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:24 +0000 (07:59 -0600)]
test/py/tests: Move "setup_image" from test_ut.py to fs_helper.py
The generic function in test_ut.py to create a disk image with partition
table can be useful outside of test_ut.py so move it to be available
more clearly.
To make this a bit more easily used library function, make use of
check_call directly rather than calling things though u_boot_utils. In
turn, to more easily handle stdin here, use the shell "printf" utility
to pass sfdisk the specification to create as we do not have an actual
file descriptor to use here.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:23 +0000 (07:59 -0600)]
test/py: Rework test_xxd to not use virt-make-fs
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Thu, 20 Mar 2025 13:59:22 +0000 (07:59 -0600)]
test/py: Rework test_cat to not use virt-make-fs
The problem with using "virt-make-fs" to make a filesystem image is that
it is extremely slow. Switch to using the fs_helper functions we have
instead from the filesystem tests as these can add files to images and
are significantly faster and still do not require root access.
Signed-off-by: Tom Rini <trini@konsulko.com>
Dario Binacchi [Tue, 8 Apr 2025 06:28:28 +0000 (08:28 +0200)]
doc: release_cycle: fix next release version
The release commit for version v2025.04 forgot to update the next
version (i. e. v2025.07) in the section where information about the
merge window is provided.
Fixes:
34820924edbc ("Prepare v2025.04")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 7 Apr 2025 22:40:02 +0000 (16:40 -0600)]
Merge branch 'next'
Note that this undoes the changes of commit
cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
Oskar Nilsson [Wed, 26 Mar 2025 09:22:44 +0000 (10:22 +0100)]
ubi: fix bug creating partitions for non-existent volumes
The part_get_info_ubi() function was incorrectly returning 0 (success)
when a UBI volume was not found for a given partition index. This caused
the part_create_block_devices() function in blk-uclass.c to continue
creating devices for non-existent partitions up to MAX_SEARCH_PARTITIONS
Fix the issue by returning -1 when a volume is not found, signaling to
the part_create_block_devices() function that no more valid volumes
exist.
Before patch, 128 blk_partition are created:
Class Index Probed Driver Name
-------------------------------------------------
root 0 [ + ] root_driver root_driver
thermal 0 [ ] imx_thermal |-- imx_thermal
simple_bus 0 [ + ] simple_bus |-- soc
mtd 0 [ + ] mxs-nand-dt | |-- nand-controller@1806000
blk 0 [ ] ubi_blk | | `-- nand-controller@1806000.blk
partition 0 [ ] blk_partition | | |-- nand-controller@1806000.blk:1
...
partition 127 [ ] blk_partition | | `-- nand-controller@1806000.blk:128
After patch, the expected blk_partition are created:
Class Index Probed Driver Name
-------------------------------------------------
root 0 [ + ] root_driver root_driver
thermal 0 [ ] imx_thermal |-- imx_thermal
simple_bus 0 [ + ] simple_bus |-- soc
mtd 0 [ + ] mxs-nand-dt | |-- nand-controller@1806000
blk 0 [ ] ubi_blk | | `-- nand-controller@1806000.blk
partition 0 [ ] blk_partition | | |-- nand-controller@1806000.blk:1
partition 1 [ ] blk_partition | | |-- nand-controller@1806000.blk:2
partition 2 [ ] blk_partition | | |-- nand-controller@1806000.blk:3
partition 3 [ ] blk_partition | | `-- nand-controller@1806000.blk:4
simple_bus 1 [ + ] simple_bus | |-- bus@2000000
Signed-off-by: Oskar Nilsson <onilsson@rums.se>
Cc: Kyungmin Park <kmpark@infradead.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Alexey Romanov <avromanov@salutedevices.com>
Changed in v2:
- Change return from -1 to -ENOENT
Reviewed-by: Heiko Schocher <hs@denx.de>
Tom Rini [Mon, 7 Apr 2025 18:35:13 +0000 (12:35 -0600)]
Revert "Merge patch series "pxe: Precursor series for supporting read_all() in extlinux / PXE""
This reverts commit
8bc3542384e3a1219e5ffb62b79d16dddc1b1fb9, reversing
changes made to
698edd63eca090a2e299cd3facf90a0b97bed677.
There are still problems with this series to work out.
Link: https://lore.kernel.org/u-boot/CAFLszTjw_MJbK9tpzVYi3XKGazcv55auBAdgVzcAVUta7dRqcg@mail.gmail.com/
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 7 Apr 2025 21:57:55 +0000 (15:57 -0600)]
Prepare v2025.04
Signed-off-by: Tom Rini <trini@konsulko.com>
Heinrich Schuchardt [Mon, 7 Apr 2025 06:47:12 +0000 (08:47 +0200)]
buildman: update PyYAML requirement
On Ubuntu 25.04 installing the dependency pyyaml 6.0 fails with
License classifiers are deprecated
Update PyYAML to the current release.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 5 Apr 2025 06:58:12 +0000 (08:58 +0200)]
efi_loader: stop network in EXIT_BOOT_SERVICES
It has been reported that memory corruption can occurred because network
packages where received after EXIT_BOOT_SERVICES. See the thread
starting at [1].
We try to remove all drivers when EXIT_BOOT_SERVICES is called. But
* Some network drivers don't call their own stop method when removed.
* Some network drivers don't have a remove method.
* Some devices have CONFIG_DM_DEVICE_REMOVE=n.
Let's call eth_halt() in EXIT_BOOT_SERVICES explicitly.
[1]
https://lore.kernel.org/all/
C101B675-EEE6-44CB-8A44-
83F72182FBD6@kohlschutter.com/
Cc: Michael Brown <mcb30@ipxe.org>
Reported-by: Christian Kohlschütter <christian@kohlschutter.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Michael Brown <mcb30@ipxe.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Christian Kohlschütter <christian@kohlschutter.com>
Heiko Stuebner [Wed, 2 Apr 2025 21:50:25 +0000 (23:50 +0200)]
boot: call dhcp_run in pxe bootmethod
A recent change tried to speed up EFI booting by not calling dhcp_run
from eth_bootdev_hunt() every time. PXE so far relied on that dhcp_run
call to get an IP address.
Fix that by adding a dhcp_run call to the pxe bootflow, with autoload
disabled to only get the ip address and nothing else.
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Fixes:
1f68057e0320 ("net: eth_bootdev_hunt() should not run DHCP")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Raymond Mao [Fri, 4 Apr 2025 14:05:25 +0000 (07:05 -0700)]
mbedtls: remove incorrect attribute type checker
S/MIME Capabilities (OID: 1.2.840.113549.1.9.15) attributes are
expected to be algorithms but neither data nor MS Inderect Data,
thus the checker for data type is incorrect.
This patch fixes a capsule authentication failure with PKCS#7
message that contains S/MIME capabilities, which formed by the EDK2
GenerateCapsule tool.
S/MIME Capabilities are not common attributes in an EFI capsule,
thus this failure cannot be reproduced with the capsules generated
via mkeficapsule.
Fixes:
7de0d155cce7 ("mbedtls: add PKCS7 parser porting layer")
Reported-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Tom Rini [Fri, 4 Apr 2025 16:36:17 +0000 (10:36 -0600)]
x86: emulation: Disable bloblist for now
As reported by Niklas Sombert, enabling bloblist on these platforms
means that we currently don't pass SMBIOS tables on to later stages. For
the v2025.04 release, disable bloblists as that is sufficient to restore
functionality and we will address the underlying problem for the next
release.
Link: https://lore.kernel.org/u-boot/c1dc7446-d1d0-4ef2-b201-09fc612aa8db@uni-duesseldorf.de
Reported-by: Niklas Sombert <niklas.sombert@uni-duesseldorf.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sat, 5 Apr 2025 15:35:30 +0000 (09:35 -0600)]
Merge patch series "Enable MUX_MMIO at SPL stage"
Anurag Dutta <a-dutta@ti.com> says:
This series enables MUX_MMIO at SPL stage for j7200 and j721e
as it is required for successful hyperflash boot.
Test logs :
https://gist.github.com/anuragdutta731/
b4c79ef8da56d8c50b38d953c9da4d45
Link: https://lore.kernel.org/r/20250320063004.1069653-1-a-dutta@ti.com
Neha Malcom Francis [Thu, 20 Mar 2025 06:27:33 +0000 (11:57 +0530)]
arm: mach-k3: k3-ddr.h: Include spl.h
Include spl.h to avoid definition errors in custom builds.
Fixes: commit
bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Andrew Davis [Wed, 19 Mar 2025 18:54:58 +0000 (13:54 -0500)]
arm: mach-k3: j721e: Split out J7200 SoC support from J721e
Currently in j721e_init.c we check which firewalls to remove using
the board configuration (e.g CONFIG_TARGET_J721E_R5_EVM). We do this
as J721e and J7200 have different IP and firewalls but use the same
SoC definition (SOC_K3_J721E) even though they are different SoCs.
The idea was they would be similar enough that they both could use
the same SoC config to help with common code sharing. Board checks
would then be used differentiate.
This has grown far too messy to maintain any more, especially now
that there is more than one board using J721e (EVM, SK, Beagle AI64).
As differentiation is done based on board, every one of these boards
would have to have checks added for them. Instead let's split J7200
support out from J721e like how normal new SoC support is done.
This patch touches several subsystems and could not be split much better
as when we add SOC_K3_J7200 we want to make use of it in all spots that
once used the combined SOC_K3_J721E so we can turn off SOC_K3_J721E when
building for J7200 boards.
Signed-off-by: Andrew Davis <afd@ti.com>
Andrew Davis [Wed, 19 Mar 2025 15:15:50 +0000 (10:15 -0500)]
arm: dts: k3: Remove leftover file after OF_UPSTREAM
The file k3-am62a7.dtsi is part of upstream DT and should
have been removed when migrating to OF_UPSTREAM but must
have been missed. Do this here.
Signed-off-by: Andrew Davis <afd@ti.com>