pandora-u-boot.git
5 weeks agoconfigs: j722s_evm_r5_defconfig: Enable PMIC config
Udit Kumar [Thu, 1 May 2025 17:53:08 +0000 (23:23 +0530)]
configs: j722s_evm_r5_defconfig: Enable PMIC config

In kernel device tre commit 714d54917147: ("arm64: dts: ti: k3-j722s-evm:
Enable PMIC") adds pmic support.

Above commit of kernel get synched in u-boot by sha ab06a533f08e:("Squashed
'dts/upstream/' changes from 8531b4b4988c..955176a4ff59").

Now, PMIC DT is available in u-boot for J722S EVM,
So enable PMIC in defconfig as well.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
5 weeks agodisable mail for swarren
Stephen Warren [Fri, 14 Mar 2025 18:10:31 +0000 (12:10 -0600)]
disable mail for swarren

I haven't been involved in U-Boot development for quite a while, so
CCing me on patches isn't currently useful. Add a .mailmap entry that I
believe will turn off patch CCs. This can always be removed if I become
active again! Remove myself from a few MAINTAINERS failed and the git
mailrc file too.

5 weeks agonet: dwc: xgmac: Allow DMA buffers above 4GB
Nikunj Kela [Sat, 22 Feb 2025 06:07:34 +0000 (22:07 -0800)]
net: dwc: xgmac: Allow DMA buffers above 4GB

Currently, Synopsis xgmac driver only works if DMA region is under 4GB.
This change enables the DMA buffers allocations above 4GB memory
regions.

Signed-off-by: Nikunj Kela <nikunj.kela@sima.ai>
5 weeks agox86: Correct usage of FSP_VERSION2
Tom Rini [Sat, 15 Mar 2025 01:28:45 +0000 (19:28 -0600)]
x86: Correct usage of FSP_VERSION2

As the code is today, we get a warning about "select" statements on
"choice" options not doing anything. In this case, we move to having a
"default FSP_VERSION2 if INTEL_APOLLOLAKE" in order to get the desired
outcome.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agox86: spl: Add support for NVMe boot device
Naresh Solanki [Wed, 12 Mar 2025 09:01:15 +0000 (14:31 +0530)]
x86: spl: Add support for NVMe boot device

This change adds `BOOT_DEVICE_NVME` to the `enum` list in
`arch/x86/include/asm/spl.h`,
enabling NVMe as a recognized boot device for SPL (Secondary Program
Loader).

Tested x86 hardware with coreboot + U-Boot payload.
Verified successful boot to NVMe drive.

Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agogpio: x86: Correct usage of IS_ENABLED() macro in intel_pinctrl_defs.h
Tom Rini [Wed, 26 Feb 2025 20:31:32 +0000 (14:31 -0600)]
gpio: x86: Correct usage of IS_ENABLED() macro in intel_pinctrl_defs.h

This file was using IS_ENABLED() to test for CONFIG flags but omitted
the CONFIG_ prefix and so did not work as expected.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agox86: Correct usage of IS_ENABLED() macro in arch/x86/lib/spl.c
Tom Rini [Wed, 26 Feb 2025 20:31:26 +0000 (14:31 -0600)]
x86: Correct usage of IS_ENABLED() macro in arch/x86/lib/spl.c

This file was using IS_ENABLED() to test for CONFIG flags but omitted
the CONFIG_ prefix and so did not work as expected.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agox86: apl: Correct usage of IS_ENABLED() macro in acpi-pmc-uclass.c
Tom Rini [Wed, 26 Feb 2025 20:31:15 +0000 (14:31 -0600)]
x86: apl: Correct usage of IS_ENABLED() macro in acpi-pmc-uclass.c

This file was using IS_ENABLED() to test for CONFIG flags but omitted
the CONFIG_ prefix and so did not work as expected.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agox86: cpu: Describe board final hooks in the header
Andy Shevchenko [Fri, 18 Oct 2024 15:55:57 +0000 (18:55 +0300)]
x86: cpu: Describe board final hooks in the header

The new two declarations board_final_init() and board_final_cleanup()
need a description. Add it here.

Suggested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Thu, 8 May 2025 15:22:25 +0000 (09:22 -0600)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra

5 weeks agoMerge tag 'u-boot-rockchip-20250508' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 8 May 2025 14:29:17 +0000 (08:29 -0600)]
Merge tag 'u-boot-rockchip-20250508' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/26117

- New Board support: rk3566 LCKFB TaishanPi, rk3588 Xunlong Orange Pi 5
  Max;
- Add rk3288 rmii support;
- pinctrl driver fix;
- binman description update;

5 weeks agoARM: tegra: drop CONFIG_DISABLE_SDMMC1_EARLY
Svyatoslav Ryhel [Fri, 18 Apr 2025 14:29:52 +0000 (17:29 +0300)]
ARM: tegra: drop CONFIG_DISABLE_SDMMC1_EARLY

This was a temporary workaround for the Tegra210 Jetson Nano board. It is
not used by any device anymore, so let's remove it.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agoARM: tegra: set default SYS_CONFIG_NAME from SoC Kconfig
Svyatoslav Ryhel [Tue, 15 Apr 2025 15:07:01 +0000 (18:07 +0300)]
ARM: tegra: set default SYS_CONFIG_NAME from SoC Kconfig

Since most boards now use the same generic device config header, move its
setup to SoC Kconfig instead of setting SYS_CONFIG_NAME in each board's
Kconfig.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agoARM: tegra: convert boards to use TEGRA_PRAM
Svyatoslav Ryhel [Tue, 15 Apr 2025 08:55:28 +0000 (11:55 +0300)]
ARM: tegra: convert boards to use TEGRA_PRAM

Switch boards that use CFG_PRAM to TEGRA_PRAM.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agoARM: tegra: add PRAM Kconfig option
Svyatoslav Ryhel [Tue, 15 Apr 2025 08:54:55 +0000 (11:54 +0300)]
ARM: tegra: add PRAM Kconfig option

Wrap CFG_PRAM with Kconfig option.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agoboard: lg: star: add Optimus 2X P990 support
Svyatoslav Ryhel [Fri, 3 Nov 2023 19:00:22 +0000 (21:00 +0200)]
board: lg: star: add Optimus 2X P990 support

The LG Optimus 2X is a touchscreen-based, slate-sized smartphone designed
and manufactured by LG that runs the Android operating system. The
Optimus 2X features a 4" WVGA display, an Nvidia Tegra 2 dual-core chip,
512 MB of RAM and extendable 8 GB of internal storage. UART-B is default
debug port.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agovideo: backlight: add Skyworks/Analogictech AAT2870 led controller driver
Svyatoslav Ryhel [Wed, 2 Oct 2024 09:07:10 +0000 (12:07 +0300)]
video: backlight: add Skyworks/Analogictech AAT2870 led controller driver

Add support for Skyworks AAT2870 LED Backlight Driver and Multiple LDO
Lighting Management Unit. Only backlight is supported as for now. Supported
backlight level range is from 2 to 255 with step of 1.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agovideo: panel: add LG LH400WV3-SD04 MIPI DSI panel driver
Svyatoslav Ryhel [Mon, 3 Mar 2025 13:00:37 +0000 (15:00 +0200)]
video: panel: add LG LH400WV3-SD04 MIPI DSI panel driver

LG LH400WV3-SD04 is a color active matrix TFT (Thin Film Transistor)
liquid crystal display (LCD). The resolution of a 4" contains 480 x 800
pixels.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agovideo: panel: add Hitachi TX10D07VM0BAA MIPI DSI panel driver
Svyatoslav Ryhel [Fri, 4 Oct 2024 09:03:09 +0000 (12:03 +0300)]
video: panel: add Hitachi TX10D07VM0BAA MIPI DSI panel driver

Hitachi TX10D07VM0BAA is a color active matrix TFT (Thin Film Transistor)
liquid crystal display (LCD). The resolution of a 4" contains 480 x 800
pixels.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agovideo: tegra: add 8-bit CPU driven protocol
Svyatoslav Ryhel [Fri, 4 Oct 2024 08:54:46 +0000 (11:54 +0300)]
video: tegra: add 8-bit CPU driven protocol

Add support for 8-bit CPU driven (primary and secondary) display signal
interface found in Tegra 2 and Tegra 3 SoC.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agosysreset: implement MAX9807 sysreset functions
Svyatoslav Ryhel [Sun, 6 Oct 2024 13:51:21 +0000 (16:51 +0300)]
sysreset: implement MAX9807 sysreset functions

MAX8907 PMIC has embedded poweroff function used by some device to initiane
device power off. Implement it as optional sysreset driver guarded by
kconfig option and system-power-controller device tree property.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agopower: regulator: max9807: add regulator support
Svyatoslav Ryhel [Sun, 6 Oct 2024 11:59:54 +0000 (14:59 +0300)]
power: regulator: max9807: add regulator support

Added a new regulator driver for the MAXIM MAX8907 PMIC, providing
essential regulator functionalities and incorporated the necessary binding
framework within the core PMIC driver.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agopower: pmic: add the base MAX8907 PMIC support
Svyatoslav Ryhel [Sun, 6 Oct 2024 11:50:02 +0000 (14:50 +0300)]
power: pmic: add the base MAX8907 PMIC support

Add basic i2c based read/write functions to access PMIC registers.

Tested-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agogpio: tegra_gpio: implement rfree operation
Svyatoslav Ryhel [Fri, 11 Apr 2025 05:49:12 +0000 (08:49 +0300)]
gpio: tegra_gpio: implement rfree operation

Releasing a GPIO on Tegra necessitates changing its configuration to SFIO
to activate its special function. Without this reconfiguration, the special
function will be unavailable.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 weeks agonet: gmac_rockchip: Add RMII support for rk3288
Christoph Fritz [Wed, 16 Apr 2025 11:45:35 +0000 (13:45 +0200)]
net: gmac_rockchip: Add RMII support for rk3288

Add RMII-specific handling to rk3288_gmac_fix_mac_speed() so that it
properly sets the RMII clock (2.5 MHz vs. 25 MHz) and speed bits
(10 Mbps vs. 100 Mbps). Also define a new rk3288_gmac_set_to_rmii()
function to set the PHY interface field and RMII_MODE bit.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agorockchip: rk3288: grf: Unify speed/flowctrl fields for clarity
Christoph Fritz [Wed, 16 Apr 2025 11:44:13 +0000 (13:44 +0200)]
rockchip: rk3288: grf: Unify speed/flowctrl fields for clarity

Update GMAC speed and flow control fields in GRF_SOC_CON1 to use
RK3288_GMAC_* prefix, ensuring a consistent naming convention. It also
shifts each mask/bit definition to match the actual hardware bits, which
makes future usage easier.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agoboard: rockchip: Add LCKFB TaishanPi RK3566 Board
Jiehui He [Tue, 15 Apr 2025 07:36:50 +0000 (03:36 -0400)]
board: rockchip: Add LCKFB TaishanPi RK3566 Board

The LCKFB TaishanPi is a single-board computer based on the RK3566 SoC.

Specification:
- 1/2 Gib RAM
- Optinal EMMC
- SD-Card
- HDMI / MIPI CSI / MIPI DSI
- USB 2.0 Host (Type-A)
- USB 2.0 Host / OTG (Type-C)
- No Ethernet

This patch adds U-Boot support for the LCKFB TaishanPi RK3566 board, including:
- U-Boot device tree
- Default defconfig
- Board documentation
- MAINTAINERS entry

Changes in v2:
- Removed unused configs from `lckfb-tspi-rk3566_defconfig`
- Reordered TaishanPi entry in `doc/board/rockchip/rockchip.rst` alphabetically

Link to v1:
https://lore.kernel.org/u-boot/tencent_95ED0C0545D87B6A8C4B62EC045D53AD2406@qq.com/

Signed-off-by: Jiehui He <jiehui.he@foxmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agoboard: rockchip: add Xunlong Orange Pi 5 Max
Ilya Katsnelson [Wed, 23 Apr 2025 15:36:40 +0000 (18:36 +0300)]
board: rockchip: add Xunlong Orange Pi 5 Max

The 5 Max is another board in the Orange Pi 5 family.

It's overall similar to the 5 Plus, but in a smaller form factor,
which leads to some I/O being reshuffled, but nothing relevant
to u-boot.

So, just reuse the config for the 5 Plus and adjust the DT names.

Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Ilya Katsnelson <me@0upti.me>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agoMerge patch series "include: env: phytec: k3_net: Remove net_apply_extensions"
Tom Rini [Wed, 7 May 2025 13:59:09 +0000 (07:59 -0600)]
Merge patch series "include: env: phytec: k3_net: Remove net_apply_extensions"

This series from Daniel Schultz <d.schultz@phytec.de> cleans up the
environment further on the phytec am62ax platforms.

Link: https://lore.kernel.org/r/20250428144904.1058574-1-d.schultz@phytec.de
5 weeks agoboard: phytec: phycore_am62ax: Update Environment
Daniel Schultz [Mon, 28 Apr 2025 14:49:04 +0000 (07:49 -0700)]
board: phytec: phycore_am62ax: Update Environment

Add fit_addr_r to the environment to allow us to boot from a FIT image.

Increase the maximum Image size from 23 MB to 26 MB by moving the
initramfs start address up. This gives us a bigger ranger to
provide kernel images which are not stripped down too much.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agoinclude: env: phytec: k3_net: Use get_cmd
Daniel Schultz [Mon, 28 Apr 2025 14:49:03 +0000 (07:49 -0700)]
include: env: phytec: k3_net: Use get_cmd

'net_fetch_cmd' is not defined by the K3 board files. They
use the more common 'get_cmd' from NXP products.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
5 weeks agoinclude: env: phytec: k3_net: Remove net_apply_extensions
Daniel Schultz [Mon, 28 Apr 2025 14:49:02 +0000 (07:49 -0700)]
include: env: phytec: k3_net: Remove net_apply_extensions

Extensions are now handled by the board-code. Remove this non-existing
function to proper boot from network.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
5 weeks agobootstd: Rework BLK dependency
Tom Rini [Wed, 23 Apr 2025 14:49:13 +0000 (08:49 -0600)]
bootstd: Rework BLK dependency

The bootstd code itself does not have any dependency on BLK in order to
build. However, in order to minimize size growth of non-migrated
platforms, change this from being "default y" to "default y if BLK".
This will make it easier to begin migration of platforms which do not
have any BLK-class device but do want to use bootstd.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agomips: octeon: remove unused middle expression
Bryan Brattlof [Wed, 9 Apr 2025 17:26:20 +0000 (12:26 -0500)]
mips: octeon: remove unused middle expression

!A || (A && B) is equivalent to !A || B

Drop the unused middle expression to simplify the statement.

Signed-off-by: Bryan Brattlof <bb@ti.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
5 weeks agomtd: spi-nor: Send write disable cmd after every write enable
Venkatesh Yadav Abbarapu [Tue, 19 Nov 2024 06:39:18 +0000 (12:09 +0530)]
mtd: spi-nor: Send write disable cmd after every write enable

Write enable(06h) command will be sent to a flash device to
set the write enable latch bit before every program, erase,
write command. After that write disable command (04h) needs
to be sent to clear the write enable latch.

This write_disable() is missing at the majority of the places
in the driver, add it to clear write enable latch.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://gist.github.com/PrasanthBabuMantena/c12f39744de188a9d08cd5ca51dc2a7b
Tested-by: Prasanth Babu Mantena <p-mantena@ti.com>
5 weeks agomtd: spi-nor-core: Fixup SNOR_F_IO_MODE_EN_VOLATILE for MT35X
Vaishnav Achath [Mon, 25 Nov 2024 10:49:47 +0000 (16:19 +0530)]
mtd: spi-nor-core: Fixup SNOR_F_IO_MODE_EN_VOLATILE for MT35X

MT35XU512ABA has only BFPT and 4-Byte Address Instruction Table
in  SFDP. commit bebdc237507c ("mtd: spi-nor: Parse SFDP SCCR Map")
added checks in spi_nor_octal_dtr_enable() to bail out if the 22nd DWORD
in SCCR does not indicate DTR Octal Mode Enable, since MT35XU512ABA device
supports octal DTR mode, add this property in SFDP fixup.

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
5 weeks agoconfigs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for px30 to rk3308/etc
Heiko Stuebner [Tue, 6 May 2025 08:55:31 +0000 (10:55 +0200)]
configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS for px30 to rk3308/etc

Loading a FIT image for kernel, initrd and rootfs on px30 can result in an
memory overlap, resulting in the not 100% helpful message of
"This will not be a case any time" from lmb_fix_over_lap_regions().

Adding a bit of debug info to lmb_fix_over_lap_regions() brings:
lmb_fix_over_lap_regions: base1 0x280000-0x6005ac > base2 0x600000-0x6000d1

So this is because the FIT image gets loaded to the kernel_addr_r at
0x280000 while the pxe-file is already living at 0x600000, only 3.5MB
behind.

In commit 4acc8bb044a4 ("configs: rockchip: sync ENV_MEM_LAYOUT_SETTINGS
for rk3308, rk3328, and rk3399") FUKAUMI Naoki already brought the memory
layouts for the mentioned socs in sync.

Adjusting the env-layout on px30 to this scheme, magically solves the
overlap issue and also brings px30 more in line with the other mentioned
SoCs.

Signed-off-by: Heiko Stuebner <heiko.stuebner@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agorockchip: io-domain: Enable by default for all supported SoCs
Chen-Yu Tsai [Tue, 29 Apr 2025 13:28:40 +0000 (21:28 +0800)]
rockchip: io-domain: Enable by default for all supported SoCs

The IO domain driver controls the I/O voltage for various pins,
MMC included.

Enable it by default for all supported Rockchip SoCs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RV1108
Quentin Schulz [Fri, 31 Jan 2025 10:31:41 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RV1108

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3399
Quentin Schulz [Fri, 31 Jan 2025 10:31:40 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3399

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3368
Quentin Schulz [Fri, 31 Jan 2025 10:31:39 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3368

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3328
Quentin Schulz [Fri, 31 Jan 2025 10:31:38 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3328

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3308
Quentin Schulz [Fri, 31 Jan 2025 10:31:37 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3308

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3288
Quentin Schulz [Fri, 31 Jan 2025 10:31:36 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3288

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3228
Quentin Schulz [Fri, 31 Jan 2025 10:31:35 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3228

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3188
Quentin Schulz [Fri, 31 Jan 2025 10:31:34 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3188

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3128
Quentin Schulz [Fri, 31 Jan 2025 10:31:33 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3128

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3066
Quentin Schulz [Fri, 31 Jan 2025 10:31:32 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3066

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for RK3036
Quentin Schulz [Fri, 31 Jan 2025 10:31:31 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for RK3036

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: constify rockchip_pin_ctrl for PX30
Quentin Schulz [Fri, 31 Jan 2025 10:31:30 +0000 (11:31 +0100)]
pinctrl: rockchip: constify rockchip_pin_ctrl for PX30

There's no need to modify private data from the controller, so let's
make that struct const.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agopinctrl: rockchip: fix bank's pin_base computing
Quentin Schulz [Fri, 31 Jan 2025 10:31:29 +0000 (11:31 +0100)]
pinctrl: rockchip: fix bank's pin_base computing

The logic in the core reads the nr_pins of the controller and uses it as
the index of the first pin in the bank (pin_base) it currently parses.
It then increments the number of pins in the controller before going to
the next bank.

This works "fine" for controllers where nr_pins isn't defined in their
rockchip_pin_ctrl struct as it defaults to 0. However, when it is
already set, it'll make the index pin of each bank offset by the number
in nr_pins declared in the struct at initialization, and it'll keep
growing while adding banks, which means the total number of pins in the
controller will be misrepresented.

Additionally, U-Boot proper may probe this driver twice (pre-reloc and
true proper) and not reset nr_pins of the controller in-between meaning
the second probe will have an offset of the actual correct nr_pins.

Instead, let's just store locally the number of pins in the controller
and make sure it's reset between probes.

Finally, this stops modifying a const struct which will soon be
triggering a CPU abort at runtime.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agorockchip: binman: Support use of crc32 hash for FIT images
Jonas Karlman [Sun, 13 Apr 2025 19:59:39 +0000 (19:59 +0000)]
rockchip: binman: Support use of crc32 hash for FIT images

Use of SHA256 checksum validation on ARMv7 SoCs can be very time
consuming compared to when used on a ARMv8 SoC with Crypto Extensions.

Add support for use of the much faster CRC32 hash algo when SHA256 is
not supported in SPL. Also use FIT_HASH_ALGO to simplify the ifdefs when
no known hash algo has been compiled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: binman: Include a compatible string in each configuration
Simon Glass [Sun, 13 Apr 2025 19:59:38 +0000 (19:59 +0000)]
rockchip: binman: Include a compatible string in each configuration

Provide a compatible string in the config nodes that U-Boot can use to
help decide which configuration to use with SPL_LOAD_FIT_FULL=y and
FIT_BEST_MATCH=y.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: Add SPL_PAD_TO Kconfig default value
Jonas Karlman [Sun, 13 Apr 2025 19:59:37 +0000 (19:59 +0000)]
rockchip: Add SPL_PAD_TO Kconfig default value

Almost all Rockchip boards use the same Kconfig value for SPL_PAD_TO,
0x7f8000.

u-boot-rockchip.bin is typically written to offset 64S (32KiB) of MMC
media. u-boot.itb (or u-boot.img) is typically expected at offset 16384S
(8MiB) of MMC media (SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x4000).

SPL_PAD_TO is used as the offset for u-boot.itb (or u-boot.img) in the
generated simple-bin binman image, and can be calculated as:

  SPL_PAD_TO = (16384S - 64S) * 512 = 0x7f8000

Add this value as a default value for ARCH_ROCKCHIP.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: binman: Un-indent the FIT template
Simon Glass [Sun, 13 Apr 2025 19:59:36 +0000 (19:59 +0000)]
rockchip: binman: Un-indent the FIT template

Fix the indentation on the template. This is done in a separate patch
so that it is easier to review.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: binman: Create a template for the FIT
Simon Glass [Sun, 13 Apr 2025 19:59:35 +0000 (19:59 +0000)]
rockchip: binman: Create a template for the FIT

Move the FIT description into a template so that it can be used in both
the simple-bin and the simple-bin-spi images.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: binman: Factor out arch and compression
Simon Glass [Sun, 13 Apr 2025 19:59:34 +0000 (19:59 +0000)]
rockchip: binman: Factor out arch and compression

Declare arch and compression at the top of the file to avoid needing
ifdefs in every usage.

Add a few comments to help with the remaining #ifdefs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 weeks agorockchip: binman: Correct the OS prop for U-Boot
Simon Glass [Sun, 13 Apr 2025 19:59:33 +0000 (19:59 +0000)]
rockchip: binman: Correct the OS prop for U-Boot

The U-Boot image is currently being identified as an invalid OS in
spl_fit_image_get_os() due to case sensitive compare.

Use the correct lower-case value to fix this.

Fixes: e0c0efff2a02 ("rockchip: Support building the all output files in binman")
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: rk3288: do not generate u-boot.rom anymore
Quentin Schulz [Mon, 5 May 2025 14:47:19 +0000 (16:47 +0200)]
rockchip: rk3288: do not generate u-boot.rom anymore

This was only used on RK3288 Chromebooks and the EVB.

If it follows the same pattern as for RK3399 Chromebooks where their
maintainer (Simon) agreed[1] to removal of u-boot.rom on the basis that
the generic u-boot-rockchip-spi.bin is now enough, let's do the same for
RK3288 and remove the last Rockchip users of u-boot.rom (and HAS_ROM
symbol).

At the same time, remove HAS_ROM symbol from the RK3288 Chromebooks and
EVB configs since they were used only for that.

SYS_SPI_U_BOOT_OFFS offset in rockchip-u-boot.dtsi for the u-boot-img
node of simple-bin-spi binman image matches the one used in u-boot.rom
except for the EVB.
The EVB doesn't have ROCKCHIP_SPI_IMAGE symbol enabled, so HAS_ROM had
no effect anyway. Even if it had, this would not have been enough
considering that SPL_SPI_LOAD symbol is not set, so U-Boot proper could
not be loaded from SPI even if SPL/TPL does.

Make sure u-boot-rockchip-spi.bin has the same size of u-boot.rom for
Chromebooks as that seems to be important.

[1] https://lore.kernel.org/u-boot/CAFLszTh-SewFod8dEOF3+e-wCE1qFF0CyxxR8CbQwy3BRW3k6w@mail.gmail.com/

Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook-kevin
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agorockchip: rk3399: do not generate u-boot.rom anymore
Quentin Schulz [Mon, 5 May 2025 14:47:18 +0000 (16:47 +0200)]
rockchip: rk3399: do not generate u-boot.rom anymore

This was only used on RK3399 Gru Chromebooks and their maintainer
(Simon) agreed[1] to its removal on the basis that the generic
u-boot-rockchip-spi.bin is now enough, so let's do that.

At the same time, remove HAS_ROM symbol from the Gru Chromebooks config
since they were used only for that.

Make sure u-boot-rockchip-spi.bin has the same size of u-boot.rom for
Chromebooks as that seems to be important.

[1] https://lore.kernel.org/u-boot/CAFLszTh-SewFod8dEOF3+e-wCE1qFF0CyxxR8CbQwy3BRW3k6w@mail.gmail.com/

Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Simon Glass <sjg@chromium.org> # chromebook-kevin
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
5 weeks agofs: exfat: Inhibit unused exfat_humanize_bytes() and exfat_print_info()
Marek Vasut [Wed, 30 Apr 2025 16:45:52 +0000 (18:45 +0200)]
fs: exfat: Inhibit unused exfat_humanize_bytes() and exfat_print_info()

Make sure unused exfat_humanize_bytes() and exfat_print_info()
functions are not compiled into U-Boot code base. This also removes
CID 550300:  Integer handling issues  (INTEGER_OVERFLOW)
in exfat_humanize_bytes() , which is now surely unreachable.

Signed-off-by: Marek Vasut <marex@denx.de>
5 weeks agofs: exfat: Use strncpy() and bail on too long filenames
Marek Vasut [Wed, 30 Apr 2025 16:45:51 +0000 (18:45 +0200)]
fs: exfat: Use strncpy() and bail on too long filenames

In case the filename is too long, longer than PATH_MAX - 1, it
would overflow dirs->dirname array. Add missing check and also
use strncpy() to prevent the overflow in any case.

Fixes CID 550305:  Security best practices violations  (STRING_OVERFLOW)

Signed-off-by: Marek Vasut <marex@denx.de>
5 weeks agofirmware: ti_sci: Add Initialization of dev_info head node
Udit Kumar [Tue, 29 Apr 2025 17:14:40 +0000 (22:44 +0530)]
firmware: ti_sci: Add Initialization of dev_info head node

On K3 devices two drivers ti_sci and ti_sci_dm are supporting firmware
functions. At run time one of driver is used.

Driver ti_sci already initializing head for dev_list in its probe
function, but it was missed in ti_sci_dm driver.

So add head list init support for ti_sci_dm driver.
While at this, move init of list before usages in both functions.

Fixes: 5d5a699855a7("firmware: ti_sci: Add support for Resoure Management at R5 SPL stage")
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Nishanth Menon <nm@ti.com>
5 weeks agoconfigs: phycore_am62x_a53_defconfig: Remove CONFIG_SYS_BOOTM_LEN
Daniel Schultz [Tue, 29 Apr 2025 12:08:18 +0000 (05:08 -0700)]
configs: phycore_am62x_a53_defconfig: Remove CONFIG_SYS_BOOTM_LEN

This config was defined with the default value of 8 MiB. However,
the default value is different when CONFIG_ARM64 is enabled and
should be 64 MiB.

Remove this config from the A53 defconfig and use the correct
default config.

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 weeks agocmd: spawn: reject 0 as an invalid job ID
Jerome Forissier [Tue, 29 Apr 2025 12:02:18 +0000 (14:02 +0200)]
cmd: spawn: reject 0 as an invalid job ID

Job IDs are positive integers greater than 1. 0 is not a valid job ID,
therefore fix the comparison in do_wait().

Fixes Coverity defects:

*** CID 550296:  Control flow issues  (NO_EFFECT)
/cmd/spawn.c: 172 in do_wait()
166                     for (i = 0; i < CONFIG_CMD_SPAWN_NUM_JOBS; i++)
167                             if (job[i])
168                                     ret = wait_job(i);
169             } else {
170                     for (i = 1; i < argc; i++) {
171                             id = dectoul(argv[i], NULL);
>>>     CID 550296:  Control flow issues  (NO_EFFECT)
>>>     This less-than-zero comparison of an unsigned value is never true.
"id < 0UL".
172                             if (id < 0 || id >
CONFIG_CMD_SPAWN_NUM_JOBS)
173                                     return CMD_RET_USAGE;
174                             idx = (int)id - 1;
175                             ret = wait_job(idx);
176                     }
177             }

*** CID 550297:  Integer handling issues  (INTEGER_OVERFLOW)
/cmd/spawn.c: 174 in do_wait()
168                                     ret = wait_job(i);
169             } else {
170                     for (i = 1; i < argc; i++) {
171                             id = dectoul(argv[i], NULL);
172                             if (id < 0 || id >
CONFIG_CMD_SPAWN_NUM_JOBS)
173                                     return CMD_RET_USAGE;
>>>     CID 550297:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "idx", where "(int)id - 1" is known to be equal to -1,
overflows the type of "idx", which is type "unsigned int".
174                             idx = (int)id - 1;
175                             ret = wait_job(idx);
176                     }
177             }

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: Tom Rini <trini@konsulko.com>
5 weeks agoMakefile: Strip leading spaces when preprocessing generated_defconfig
Yao Zi [Sun, 27 Apr 2025 14:50:10 +0000 (14:50 +0000)]
Makefile: Strip leading spaces when preprocessing generated_defconfig

Clang's preprocessor may emit extra spaces for lines starting with '#'.
Lines with these extra characters cannot be handled by Kconfig and will
be ignored with warnings like,

        unexpected data:  # CONFIG_OF_BOARD_FIXUP is not set

Those options that is expected to be assigned explicitly with N will be
set to the default value, messing up board configurations.

Let's sed these spaces away to ensure board configurations could be
correctly generated with Clang.

Link: https://github.com/llvm/llvm-project/issues/78778
Fixes: 2027e99e61a ("Makefile: Run defconfig files through the C preprocessor")
Reported-by: Nathaniel Hourt <I@nathaniel.land>
Signed-off-by: Yao Zi <ziyao@disroot.org>
5 weeks agoenv: Introduce support for MTD
Christian Marangi [Mon, 7 Apr 2025 18:59:51 +0000 (20:59 +0200)]
env: Introduce support for MTD

Introduce support for env in generic MTD. Currently we only support SPI
flash based on the lagacy sf cmd that assume SPI flash are always NOR.
This is not the case as to SPI controller also NAND can be attached.

To support also these flash scenario, add support for storing and
reading ENV from generic MTD device by adding an env driver that
base entirely on the MTD api.

Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and
CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed
by mtd list.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 weeks agobootm: improve error message when gzip decompression buffer is too small
Aristo Chen [Wed, 30 Apr 2025 02:23:25 +0000 (10:23 +0800)]
bootm: improve error message when gzip decompression buffer is too small

Currently, when decompressing a gzip-compressed image during bootm, a
generic error such as "inflate() returned -5" is shown when the buffer is
too small. However, it is not immediately clear that this is caused by
CONFIG_SYS_BOOTM_LEN being too small.

This patch improves error handling by:
- Detecting Z_BUF_ERROR (-5) returned from the inflate() call
- Suggesting the user to increase CONFIG_SYS_BOOTM_LEN when applicable
- Preserving the original return code from zunzip() instead of overwriting
  it with -1

By providing clearer hints when decompression fails due to insufficient
buffer size, this change helps users diagnose and fix boot failures more
easily.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 weeks agoAdd HOST_ARCH detection for armv5tel and armv6l
Ben Wolsieffer [Sun, 27 Apr 2025 23:07:25 +0000 (19:07 -0400)]
Add HOST_ARCH detection for armv5tel and armv6l

Since 7506c15, HOST_ARCH is now used by the EFI loader even when
CONFIG_SANDBOX is disabled. When cross-compiling, the Makefile defines
HOST_ARCH based on the cross-compiler prefix, but this definition fails
to cover some common compiler prefixes. When cross-compiling U-Boot in
nixpkgs, we use CROSS_COMPILE=armv6l-unknown-linux-gnueabihf-, which
results in HOST_ARCH being undefined and causes a build failure.

Fix this by adding armv6l to the match for ARM. Also add armv5tel,
as this is another possible ARM compiler prefix.

Signed-off-by: ZHANG Yuntian <yt@radxa.com>
Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
5 weeks agoeth: Support E1000E I225-V
ZhiJie.zhang [Mon, 21 Apr 2025 09:08:26 +0000 (17:08 +0800)]
eth: Support E1000E I225-V

1. Add pcie device id 0x15f3
2. Add IIC phy id 0x67C9DC00

Signed-off-by: ZhiJie.Zhang <zhangzhijie@bosc.ac.cn>
5 weeks agoMerge tag 'u-boot-stm32-20250505' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Mon, 5 May 2025 16:14:37 +0000 (10:14 -0600)]
Merge tag 'u-boot-stm32-20250505' of https://source.denx.de/u-boot/custodians/u-boot-stm

- CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/26081
- STM32 MCUs:
   - Fix console cmdline
   - Add support NT35510 panel controller on stm32f769i-disco board
- Fix dfu alt buffer clearing
- Enable scan and start for AB schema on STM32MP15 DHSOM
- Add stm32mp2 support for dwc_eth_qos

6 weeks agoMerge tag 'ubifixes-for-2025.07-rc2' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 5 May 2025 13:54:30 +0000 (07:54 -0600)]
Merge tag 'ubifixes-for-2025.07-rc2' of https://source.denx.de/u-boot/custodians/u-boot-ubi

ubi fixes for v2025.07-rc2

- fix bug: Put MTD device after it is not used
  drop MTD device reference after it is not longer used!
  port from upstream Linux commit: b95f83ab762dd6211351b9140f99f43644076ca8
  from Alexander Vickberg

6 weeks agoconfigs: stm32746-eval: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:32 +0000 (15:51 +0200)]
configs: stm32746-eval: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoconfigs: stm32746-eval_spl: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:31 +0000 (15:51 +0200)]
configs: stm32746-eval_spl: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoconfigs: stm32f729-discovery: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:30 +0000 (15:51 +0200)]
configs: stm32f729-discovery: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoconfigs: stm32f769-disco: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:29 +0000 (15:51 +0200)]
configs: stm32f769-disco: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoconfigs: stm32f746-disco_spl: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:28 +0000 (15:51 +0200)]
configs: stm32f746-disco_spl: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoconfigs: stm32f769-disco_spl: Fix console cmdline
Patrice Chotard [Tue, 1 Apr 2025 13:51:27 +0000 (15:51 +0200)]
configs: stm32f769-disco_spl: Fix console cmdline

The Linux cmdline encoded in the defconfig is wrong, the
STM32 USART driver registers as ttySTM0 not ttyS0.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agonet: dwc_eth_qos: add support of stm32mp2 platform
Christophe Roullier [Fri, 11 Apr 2025 09:27:20 +0000 (11:27 +0200)]
net: dwc_eth_qos: add support of stm32mp2 platform

Add compatible "st,stm32mp25-dwmac" to manage STM32MP2 boards

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
6 weeks agoboard: st: common: fix dfu alt buffer clearing
Vincent Stehlé [Mon, 7 Apr 2025 17:05:26 +0000 (19:05 +0200)]
board: st: common: fix dfu alt buffer clearing

The set_dfu_alt_info() function calls the ALLOC_CACHE_ALIGN_BUFFER()
macro to declare a `buf' variable pointer into an array allocated on the
stack. It then calls the memset() function to clear the useable portion
of the array using the idiomatic expression `sizeof(buf)'.

While this would indeed work fine for an array, in the present case we
end up clearing only the size of a pointer.
Fix this by specifying the explicit size `DFU_ALT_BUF_LEN' instead.

Fixes: ec2933e543df ("board: stm32mp1: move set_dfu_alt_info in st common directory")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Marek Vasut <marex@denx.de>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agoconfigs: stm32f769-disco: support FRD400B25025-A-CTK display
Dario Binacchi [Tue, 1 Apr 2025 07:00:57 +0000 (09:00 +0200)]
configs: stm32f769-disco: support FRD400B25025-A-CTK display

Support FRIDA FRD400B25025-A-CTK display on stm32f769-disco board.

As reported in the section 8.3 (i. e. Board revision history) of document
UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes
related to the board revision addressed by the patch:
- Board MB1166 revision A-09:
- LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK

This means that the MB1166-A09 is using an NT35510 panel controller,
unlike the previous versions which use an OTM8009A controller.
Therefore, let's add support for NT35510 panel handling to the
stm32f769-disco board configurations.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agovideo: support FRIDA FRD400B25025-A-CTK
Dario Binacchi [Tue, 1 Apr 2025 07:00:56 +0000 (09:00 +0200)]
video: support FRIDA FRD400B25025-A-CTK

[backport from Linux commits 9b26d5c044d6a29ebfb1845408e0f2a7c5f89818
 and 219a1f49094f50bf9c382830d06149e677f76bed]

The patch adds the FRIDA FRD400B25025-A-CTK panel, which belongs to the
Novatek NT35510-based panel family.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agoARM: dts: add stm32f769-disco-mb1166-reva09
Dario Binacchi [Tue, 1 Apr 2025 07:00:55 +0000 (09:00 +0200)]
ARM: dts: add stm32f769-disco-mb1166-reva09

[backport from Linux commit db4fc2c79c533986795a7750e9a12caf9d620b48]

As reported in the section 8.3 (i. e. Board revision history) of document
UM2033 (i. e. Discovery kit with STM32F769NI MCU) these are the changes
related to the board revision addressed by the patch:
- Board MB1166 revision A-09:
  - LCD FRIDA FRD397B25009-D-CTK replaced by FRIDA FRD400B25025-A-CTK

The patch adds the DTS support for the new display which belongs to the
the Novatek NT35510-based panel family.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agoARM: dts: stm32: add bootph-all for dsi node in stm32f769-disco-u-boot
Dario Binacchi [Tue, 1 Apr 2025 07:00:52 +0000 (09:00 +0200)]
ARM: dts: stm32: add bootph-all for dsi node in stm32f769-disco-u-boot

Add bootph-all for dsi node in stm32f769-disco-u-boot.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agoARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM
Pascal Zimmermann [Thu, 27 Mar 2025 14:38:43 +0000 (15:38 +0100)]
ARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM

For the STM32MP15 DHSOM, change the default environment so an AB schema
on a device can be detected.

For this the define "SCAN_DEV_FOR_BOOT_PARTS" is overwritten and
appended.

The detection works by looking for the partitions with specific lables.
The name of those partitions are in the variables and its defaults:
* dh_ab_partname_primary=rootfs-a
* dh_ab_partname_secondary=rootfs-b

To prevent being hanging at bootcmd, enable "CONFIG_BOOT_RETRY" and
"CONFIG_RESET_TO_RETRY", but the timer will only be activated, if the AB
partitions are detected.

Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agoconfig_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd
Pascal Zimmermann [Thu, 27 Mar 2025 14:38:42 +0000 (15:38 +0100)]
config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd

Make it possible to substitute the 'part list' command inside
'scan_dev_for_boot_part' with a custom board specific implementation.

For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.

Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
6 weeks agomtd: ubi: Put MTD device after it is not used
Alexander Vickberg [Thu, 10 Apr 2025 11:37:40 +0000 (13:37 +0200)]
mtd: ubi: Put MTD device after it is not used

The MTD device reference is dropped via put_mtd_device, however its
field ->index is read and passed to ubi_msg. To fix this, the patch
moves the reference dropping after calling ubi_msg.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Upstream Linux commit: b95f83ab762dd6211351b9140f99f43644076ca8

Signed-off-by: Alexander Vickberg <wickbergster@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
6 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 4 May 2025 19:44:01 +0000 (13:44 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Improvements to the Renesas Ethernet AVB MAC driver

6 weeks agorenesas_rzg2l_smarc_defconfig: Enable networking support
Paul Barker [Wed, 19 Mar 2025 12:04:00 +0000 (12:04 +0000)]
renesas_rzg2l_smarc_defconfig: Enable networking support

For Ethernet to work on the RZ/G2L board, we need to enable support for
the ksz9131 PHY and enable random MAC address generation (as no MAC
address is programmed into the board).

We also enable the `dhcp`, `mii` and `ping` commands so that Ethernet
functionality can be tested and used to boot Linux.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 weeks agonet: ravb: Add RZ/G2L Support
Paul Barker [Wed, 19 Mar 2025 12:03:59 +0000 (12:03 +0000)]
net: ravb: Add RZ/G2L Support

The Renesas R9A07G044L (RZ/G2L) SoC includes two Gigabit Ethernet
interfaces which can be supported using the ravb driver. Some RZ/G2L
specific steps need to be taken during initialization due to differences
between this SoC and previously supported SoCs. We also need to ensure
that the module reset is de-asserted after the module clock is enabled
but before any Ethernet register reads/writes take place.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
6 weeks agonet: ravb: Add optional reset deassertion
Paul Barker [Wed, 19 Mar 2025 12:03:58 +0000 (12:03 +0000)]
net: ravb: Add optional reset deassertion

In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we introduce optional de-assertion and re-assertion of
a reset signal in ravb_probe() and ravb_remove().

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
6 weeks agonet: ravb: Refactor out R-Car specific code
Paul Barker [Wed, 19 Mar 2025 12:03:57 +0000 (12:03 +0000)]
net: ravb: Refactor out R-Car specific code

In order to add support for the Renesas RZ/G2L Ethernet IP in a
subsequent patch, we move all R-Car specific code into new functions and
introduce a device_ops function pointer table.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
6 weeks agonet: ravb: Fix RX error handling
Marek Vasut [Sun, 20 Apr 2025 16:35:33 +0000 (18:35 +0200)]
net: ravb: Fix RX error handling

Correctly handle RX errors in ravb_recv() by returning 0 instead
of -EAGAIN on RX error.

In case the RAVB driver detects an RX error in ravb_recv(), it must
not return the -EAGAIN, but instead must return 0. Both error codes
are handled in eth-uclass.c eth_rx() and -EAGAIN is rewritten to 0
at the end of eth_rx(), but negative return code from the .recv()
callback does not trigger .free_pkt() callback, which would clean
up and re-enqueue the descriptor which holds the currently received
corrupted packet. The .free_pkt() must be called for this descriptor,
otherwise the follow up received data become corrupted too, even if
those packets are correctly received. Returning 0 from the .recv()
callback assures the corrupted packet is not processed by the network
stack, but is skipped instead.

For TFTP loading, an RX error produces the timeout "T" output and
resumes the TFTP loading operation shortly afterward, without any
data corruption.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
6 weeks agoMerge tag 'u-boot-imx-master-20250503' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sun, 4 May 2025 14:51:43 +0000 (08:51 -0600)]
Merge tag 'u-boot-imx-master-20250503' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Add i.MX95 support.
- Enable BOOTAUX on the i.MX8M Beacon boards.

6 weeks agoarm64: imx: imx8mp-beacon: Enable BOOTAUX
Adam Ford [Fri, 2 May 2025 10:58:48 +0000 (05:58 -0500)]
arm64: imx: imx8mp-beacon: Enable BOOTAUX

In order to run binaries targeting the Cortex-M7, BOOTAUX is
required.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 weeks agoarm64: imx: imx8mn-beacon: Enable BOOTAUX
Adam Ford [Fri, 2 May 2025 10:58:47 +0000 (05:58 -0500)]
arm64: imx: imx8mn-beacon: Enable BOOTAUX

In order to run binaries targeting the Cortex-M7,
BOOTAUX is required.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 weeks agoarm64: imx: imx8mm-beacon: Enable BOOTAUX
Adam Ford [Fri, 2 May 2025 10:58:46 +0000 (05:58 -0500)]
arm64: imx: imx8mm-beacon: Enable BOOTAUX

In order to run binaries targeting the Cortex-M4,
BOOTAUX is required.

Signed-off-by: Adam Ford <aford173@gmail.com>
6 weeks agoMakefile: add some files to CLEAN_FILES
Alice Guo [Mon, 28 Apr 2025 10:37:44 +0000 (18:37 +0800)]
Makefile: add some files to CLEAN_FILES

When building the flash.bin of i.MX95 with binman,
mkimage.imx-boot.spl, mkimage.imx-boot.u-boot,
mkimage-out.imx-boot.spl and mkimage-out.imx-boot.u-boot are created.
Add these files to CLEAN_FILES so that they can be removed when running
"make clean".

Signed-off-by: Alice Guo <alice.guo@nxp.com>
6 weeks agoimx95_evk: add i.MX95 19x19 EVK board basic support
Ye Li [Mon, 28 Apr 2025 10:37:43 +0000 (18:37 +0800)]
imx95_evk: add i.MX95 19x19 EVK board basic support

This patch adds i.MX95 19x19 EVK board basic support.

Messaging unit for EdgeLock Secure Enclave, messaging unit for System
Manager, uSDHC for SD Card, gpio, lpuart are supported now.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
6 weeks agodoc: imx: add document for i.MX95 Image Container Format
Alice Guo [Mon, 28 Apr 2025 10:37:42 +0000 (18:37 +0800)]
doc: imx: add document for i.MX95 Image Container Format

This patch add a document for i.MX95 Image Container Format.

Signed-off-by: Alice Guo <alice.guo@nxp.com>