106973 Commits
Author SHA1 Message Date
vhaudiquet 055563bd92 krane: restore CONFIG_USB dropped by the R35 defconfig edit; rotate 270
The R35 rotation edit used PUT 77.=77 against a stale line number and
overwrote CONFIG_USB=y with a duplicate VIDEO block, leaving the USB
menuconfig unset: no USB controller, no usb command, no keyboard.
Restore CONFIG_USB=y (deduplicate VIDEO) and verify the full USB set
in .config after the defconfig re-run.

Also flip the console rotation from 1 (90 degrees clockwise) to 3
(270 degrees clockwise): rot=1 read upside down on the device with
the keyboard attached.
2026-08-30 20:46:36 +02:00
vhaudiquet 69787732b4 krane: rotate the console 90 degrees clockwise for landscape use
The BOE TV101WUM-NL6 panel is mounted rotated 270 degrees in the
krane chassis (rotation property on the panel node in the upstream
DT). With the keyboard attached the tablet is used in landscape, so
set video rot=1 and enable CONFIG_CONSOLE_ROTATION: the uclass then
binds the rotated vidconsole1 driver, which writes glyphs rotated by
90 degrees clockwise into the native 1200x1920 portrait scanout and
uses the swapped console geometry (240 columns x 75 rows).

The framebuffer geometry and the depthcharge scanout path are
unchanged; only the console text placement rotates.
2026-08-30 20:07:22 +02:00
vhaudiquet 75fe5bc9de krane: bind the mtu3 SSUSB container so its xhci child is scanned
DM scans only the immediate subnodes of a bound node; recursion into
children happens when a bound bus driver runs dm_scan_fdt_dev. Nothing
in U-Boot binds the "mediatek,mtu3" ssusb@11201000 node, so its xhci
child (usb@11200000) was never bound, no UCLASS_USB device existed and
usb start() reported "No USB controllers found".

Add "simple-mfd" to the ssusb compatible in the -u-boot.dtsi overlay
so the generic simple-bus driver binds the node and scans its children.
2026-08-30 19:46:21 +02:00
vhaudiquet 9aca824a0a krane: enable USB xHCI, T-PHY and USB keyboard for the pogo keyboard
The pogo keyboard is a USB HID device behind the GL610 hub on
usb@11200000. Enable the USB stack (USB, DM_USB, USB_XHCI_HCD,
USB_XHCI_MTK, USB_STORAGE, CMD_USB), the MTK T-PHY (PHY_MTK_TPHY),
USB_KEYBOARD and CONFIG_USE_PREBOOT (preboot defaults to "usb start"
with USB_KEYBOARD) so the bus is enumerated before the prompt.

The upstream mt8183.dtsi models the SSUSB block for the Linux mtu3
dual-role driver: the IPPC register space and the phys live on the
parent mtu3 node while the xhci child has only its "mac" register.
U-Boot binds the "mediatek,mtk-xhci" child directly and expects
mac+ippc and a phys list on that node, so add a board
-u-boot.dtsi overlay (auto-included after the upstream dts) that
supplies them. No upstream DT files are modified.

stdin=serial,usbkbd routes the prompt through the USB keyboard once
the usb_kbd stdio device is registered.
2026-08-30 19:29:35 +02:00
vhaudiquet 709cff2d80 krane: override get_page_table_size for dynamic scanout mappings 2026-08-30 18:00:02 +02:00
vhaudiquet 8cda58518b WIP (temporary): framebuffer text logger and abort dump for bring-up 2026-08-30 17:50:00 +02:00
vhaudiquet 0de89a3ebc WIP (temporary): probe step checkpoints in scanout driver 2026-08-30 17:37:24 +02:00
vhaudiquet bd46ab0095 WIP (temporary): PANIC_HANG for bring-up abort visibility 2026-08-30 17:20:30 +02:00
vhaudiquet 20a21b5c9b WIP (temporary): board_late_init pink band checkpoint 2026-08-30 17:00:22 +02:00
vhaudiquet b5de7c4a97 WIP (temporary): main_loop entry band; disable WDT autostart for bring-up 2026-08-30 16:42:07 +02:00
vhaudiquet 5e3516ce64 krane: default env routes stdout through vidconsole; env nowhere for payload stage 2026-08-30 16:28:28 +02:00
vhaudiquet e66ab84fa7 WIP (temporary): bind/probe checkpoints in scanout driver and video uclass 2026-08-30 16:10:36 +02:00
vhaudiquet 21c66cf72e krane: CONFIG_TEXT_BASE=0x4C001000 (8-aligned, keeps _start at image base) 2026-08-30 15:46:49 +02:00
vhaudiquet a85281a550 WIP (temporary): green band at board_init_f entry for bring-up 2026-08-30 15:26:47 +02:00
vhaudiquet 46283a7722 WIP (temporary): cyan band after video_clear in video_post_probe 2026-08-30 14:47:16 +02:00
vhaudiquet 1fb1f5f95e WIP (temporary): post-clear white-band checkpoint in video_post_probe 2026-08-30 13:26:41 +02:00
vhaudiquet 08305fd8a0 WIP (temporary): add misc_init_r checkpoint band + backlight re-assert 2026-08-30 11:18:57 +02:00
vhaudiquet e00e4f172b WIP (temporary): krane bring-up init checkpoints painting scanout bands
Diagnostic only, to be reverted before upstreaming: board_early_init_f
(orange), dram_init_banksize (blue), board_early_init_r (red) paint
bands into the depthcharge scanout to localize the early crash.
2026-08-30 10:04:48 +02:00
vhaudiquet f0470c9be5 video: add MT8183 scanout driver for firmware-initialized displays
Add a display driver for the MT8183 kukui family of ChromeOS devices
(e.g. the Lenovo IdeaPad Duet, google,krane), where the display
pipeline is already initialized and running when the payload is
handed off by depthcharge. depthcharge's display_cleanup() stops the
overlay engines and turns the backlight off before the jump, so the
driver only revives the pipeline: it re-enables the OVL0 engines
(OVL_EN @ +0x000c and OVL0_2L_EN @ +0x100c, offsets from depthcharge's
device-era mtk_ddp.c), drives the backlight GPIOs high (DISP_PWM,
pin 43, and EN_LCD_BL, pin 176, through the GPIO controller dout block
at 0x10005000+0x100), and renders the console into the live scanout
surface.

The geometry comes from the coreboot table framebuffer record, which
sits at the fixed kukui address 0xffed9000; when its physical_address
is 0 (what upstream coreboot 4.14 publishes on kukui), the live
scanout address is taken from the OVL layer 0 address register
(+0x0f40), which the firmware leaves in place across the handoff.

The driver binds to the existing ovl0 device tree node
(mediatek,mt8183-disp-ovl) and requires no display initialization.
2026-08-30 01:27:34 +02:00
vhaudiquet 923cc75439 scripts: Makefile.lib: prefer upstream DT includes with OF_UPSTREAM
Device trees imported from Linux (dts/upstream) include their
dt-bindings headers from dts/upstream/include, but the dtc preprocessor
search order places U-Boot's legacy in-tree include/ first. When a SoC
has both a legacy dt-bindings header (used by non-upstream in-tree
device trees) and an upstream one, the legacy copy shadows the upstream
one and silently misresolves the clock/reset/power macros whose
numbering changed between generations.

Prefer dts/upstream/include when building with CONFIG_OF_UPSTREAM. The
upstream imported device trees are written against the upstream
bindings, and no current OF_UPSTREAM user builds legacy in-tree device
trees.
2026-08-30 01:27:34 +02:00
vhaudiquet 29aec558d7 arm: mediatek: add MT8183 kukui krane board support
Add support for the Lenovo IdeaPad Duet (google,krane sku176), an
MT8183 ChromeOS tablet from the kukui family. The board boots through
coreboot + depthcharge, which load U-Boot as an arm64 Image at an
arbitrary 2 MiB-aligned DRAM slot; keep CONFIG_POSITION_INDEPENDENT
like the pumpkin target.

The board shares the pumpkin's board file, renamed to mt8183.c since it
is generic for the SoC. The defconfig uses the upstream devicetree from
dts/upstream (CONFIG_OF_UPSTREAM) and drops the pumpkin-specific USB
gadget/fastboot support for now.
2026-08-30 01:27:18 +02:00
Jaipaul CheernamandTom Rini 527115ef67 pylibfdt: Replace removed SWIG Python 2 compatibility macros
SWIG 4.5.0 removed Python 2 compatibility macros (PyInt_*, PyString_*)
from its runtime header pyhead.swg (see commit 79f7a2b7cb7d). Replace
them with their Python 3 C API equivalents:

- PyString_FromString -> PyUnicode_FromString
- PyString_AsString -> PyBytes_AsString
- PyInt_AsLong -> PyLong_AsLong

The replacements are safe since the macros were already aliased to
these exact functions in SWIG's Python 3 code path.

This is a backport of dtc commit 5008d1d6a356 ("pylibfdt: Replace
removed SWIG Python 2 compatibility macros").

Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
Reviewed-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
Tested-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2026-08-13 10:12:41 -06:00
Anshul DalalandTom Rini 1262e50a34 arm: dts: k3-am625-beagleplay: add bootph tags to pmic regulators
With commit 607d45d1e3 ("power: pmic: tps65219: fail if regulators
node is missing"), the driver requires the PMIC node to have regulator
nodes.

Since we don't have bootph tags in the regulator child nodes, the
resulting DTB doesn't have any regulator child nodes for the SPL phase
leading to boot failures. Therefore this patch explicitly adds the
bootph-all tag to all regulator nodes for the beagleplay.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
2026-08-13 10:01:04 -06:00
Tom Rini 551188c136 Merge tag 'u-boot-rockchip-2026.10-20260813' of https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip
CI: https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/pipelines/972

- Disable JTAG for RK3576. Fix for boards potentially not being able to
  use SD card anymore due to automatic switch to JTAG based on level of
  one specific pin,
2026-08-13 08:58:51 -06:00
Tom Rini c2ac5fc4e3 Merge tag 'net-20260813' of https://git.u-boot-project.org/u-boot/custodians/u-boot-net
Pull request net-20260813.

net:
- phy: dp83867: enable extended read / write for driver
- phy: fix duplicate eth_phy binding
- Drop unnecessary device_set_name
- dwc_eth_xgmac: Return -ENODEV when phy_connect() fails
- nfs: clean up bounds checks in nfs_readlink_reply()
- rtl8169: add support for RTL8126A and RTL8127A
- srand_mac(): fix -ENODEV crash with CONFIG_DM_RNG

net-legacy:
- Fix out-of-bounds write in IP fragment reassembly
- test: net: add regression test for IP reassembly overflow

net-lwip:
- Add tftpsrv command
- Handle chained pbufs in transmit path
- sntp: fix netif leak when ntpserverip is unset
- wget: free mbedtls x509 cert context to avoid memory leak
- Fix DHCP fine timer interval
2026-08-13 08:58:29 -06:00
Graeme SmecherandJerome Forissier b752e44179 net: srand_mac(): fix -ENODEV crash with CONFIG_DM_RNG
The uclass_get_device() return-value check was inverted, resulting in a
synchronous abort when -ENODEV was returned.

Signed-off-by: Graeme Smecher <gsmecher@t0.technology>
Reviewed-by: Simon Glass <sjg@chromium.org>
2026-08-12 17:02:50 +02:00
Tom Rini 0b581a9612 Merge tag 'xilinx-for-v2026.10-rc3' of https://git.u-boot-project.org/u-boot/custodians/u-boot-amd
AMD/Xilinx changes for v2026.10-rc3

Versal Gen 2:
- Add support for 2VM3654 device
- Add missing MAINTAINERS fragment

AMD:
- Fix fwu dfu_string generation not to alter with generic DFU

Firmware/ufs:
- UFS interface cleanup
- Remove ZynqMP firmware dependency from UFS

zynqmp_gqspi:
- Fix quad mode bus conflict

MB-V:
- shrink SPL size and enforce size limits
- remake ELF from BIN
2026-08-12 08:31:54 -06:00
Luca JonesandJerome Forissier 5eb45fb291 net: lwip: dhcp: fix DHCP fine timer interval
dhcp_fine_tmr() was called every 10ms, but lwIP expects it to be
called every DHCP_FINE_TIMER_MSECS (500ms).

Since the fine timer ticks are currently 50 times faster than lwIP
expects, the client burns through the bounded exponential backoff
sequence for the DHCPREQUEST messages in 2.44 seconds rather than 122
seconds, after which it uses a new xid and returns to sending
DHCPDISCOVER messages. If there is enough latency in the server, the
client could receive an ACK response within DHCP_TIMEOUT_MS (10
seconds), but reject it because it has already moved on with another
xid after 2.44 seconds.

We have seen this occur with our boards. When our rack of 16 boards
get powered on together, they all request for an address from the
network switch's DHCP server in near lock-step and we see that only a
few of the boards actually obtain a lease. Fixing the timing to 500ms
allowed all of the boards to obtain a lease consistently.

Fixes: 98ad145db6 ("net: lwip: add DHCP support and dhcp commmand")
Signed-off-by: Luca Jones <ljones@t0.technology>
2026-08-12 14:23:14 +02:00
Michal Simek 86cc9f2fb5 MAINTAINERS: Add missing fragment for Versal Gen 2
Versal Gen 2 and especially march-versal2 is not covered by own fragment
that's why add it.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/11956eca5ebd0b3626b7e2d0fa52331cbd3dc1ec.1786361819.git.michal.simek@amd.com
2026-08-12 07:06:12 +02:00
Michal Simek fafbcbdc97 ufs: amd-versal2: Remove ZYNQMP_FIRMWARE dependency
There are EEMI firmware hooks available but they are also IO versions of it
that's why remove ZYNQMP_FIRMWARE depency from UFS driver.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/85cbacdc7492890c76396974d24fff607c2088ad.1785394153.git.michal.simek@amd.com
2026-08-12 06:55:15 +02:00
Michal Simek f2294a98b2 xilinx: versal2: Clean UFS firmware interface
The M-PHY and SRAM readiness poll loops move out of the UFS controller
driver and into the firmware backend, exposed as blocking waits with
a caller-owned timeout budget. This keeps the UFS driver backend-agnostic
and lets an other backends offload the wait to the platform in a single
call instead of round-tripping every poll.

set_sram_bypass() now performs the SRAM_CSR read-modify-write in the
firmware layer.

Hook up functions are also update to reflect their usage.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/26bc9aa2c02921690e126ab3401f7974ef04ad6e.1785394153.git.michal.simek@amd.com
2026-08-12 06:55:15 +02:00
Michal Simek 9e8a0f54b0 ufs: amd-versal2: Perform controller reset in the init callback
Move the controller/PHY reset and SRAM-bypass sequence from
hce_enable_notify(PRE_CHANGE) into ufs_versal2_init().
The reset sequence releases the host controller from reset, and the UFS
core reads the capability and version registers right after .init() and
before ufshcd_hba_enable() (the only caller of hce_enable_notify()).
Doing the reset in .init() ensures those registers are read after the
controller is out of reset, and keeps the driver aligned with Linux.
ufs_versal2_phy_init() stays in POST_CHANGE.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/6b4cbfa6cc58bef86da86971e4b27726a4e510f0.1785394153.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek 661b6e44a4 xilinx: versal2: Add PM UFS firmware interface
Add firmware interface for UFS access but also keep IO interface when
firmware is not enabled.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/6419fe4f6f1f451aee624c7762b7aa690d50e498.1784870711.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek 63c228d0a0 firmware: zynqmp: Remove duplicated sys_proto.h header
asm/arch/sys_proto.h is included twice that's why remove one.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/cd3c11a7e09ed8db3945910cdfed0eb860dcd61e.1784870326.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek f81d620a82 xilinx: zynqmp: Enable SPL for zynqmp mini
The only purpose to enable SPL is to simplify testing of mini
configuration. SPL initializes the system also with DDR that mini
configuration can directly run.
psu_init already targets zcu102 like for mini_qspi
(symlink zynqmp-mini -> zynqmp-zcu102-rev1.0).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/9c9a2699c97241fa599b65fd336699ace7577833.1784722595.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek 4710d760b9 xilinx: zynqmp: Setup BOARD_SIZE_LIMIT for mini configurations
Setup BOARD_SIZE_LIMIT to 128KB (131072 bytes) for ZynqMP mini/qspi
configurations and enable CONFIG_SKIP_RELOCATE as there is no need
for relocation.

For configurations running from OCM (xilinx_zynqmp_mini_defconfig and
xilinx_zynqmp_mini_qspi_defconfig), move TEXT_BASE from 0xFFFC0000 to
0xFFFE0000. The initial 128KB of OCM (0xFFFC0000-0xFFFDFFFF) is used
for data buffer.

Memory layout in OCM (256KB total):
- 0xFFFC0000 - 0xFFFDFFFF: Data buffer (128KB)
- 0xFFFE0000 - 0xFFFFFFFF: U-Boot code + stack (128KB)
  - TEXT_BASE at 0xFFFE0000 (code grows up)
  - EARLY SP at 0xFFFE0000 (stack grows down)

EARLY SP is released when new stack location is calculated before U-Boot
prompt that's why no conflict with Data buffer location.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/6d91337d971fa9e22f6f57371f8bc656ea6bb4a3.1784722595.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Sandeep Gundlupet RajuandMichal Simek 74467fdf1d xilinx: mbv: Enable SPL_REMAKE_ELF support
For MicroBlaze-V SPI boot, the u-boot-spl.elf should be embedded into
the BRAM (Block RAM) of bitstream or rcdo. This requires SPL_REMAKE_ELF
to be enabled so that the SPL ELF is generated during the build.

Enable SPL_REMAKE_ELF for MB-V devices to support this flow.

Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/aa144c8002ba86154dcb62624a1d9d7cbe8c2cdf.1777962845.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek 84e3df261f xilinx: mbv: Disable arch-specific memory functions in SPL
Disable CONFIG_SPL_USE_ARCH_MEMCPY, CONFIG_SPL_USE_ARCH_MEMMOVE, and
CONFIG_SPL_USE_ARCH_MEMSET to use generic C implementations instead
of RISC-V assembly versions. The generic implementations are smaller
for SPL's constrained code size requirements.

   spl/u-boot-spl: all -446 text -446

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/4885b1983ec158ed98e727091be38f7de104108e.1777550623.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Michal Simek 90ddf602cf xilinx: mbv: Disable CPU driver in SPL
Disable CONFIG_SPL_CPU to remove the CPU driver from SPL. The CPU
driver provides runtime CPU information and enumeration which is not
needed during the early SPL boot phase, saving significant code space.

   spl/u-boot-spl: all -922 data -208 rodata -100 text -614

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/96dcbd196206f48aa4552624b562124c11cafbce.1777550623.git.michal.simek@amd.com
2026-08-12 06:55:14 +02:00
Suraj KakadeandMichal Simek 93332d403a spi: zynqmp_gqspi: fix quad mode bus conflict
Starting the GENFIFO after each CMD and ADDR entry creates a gap
between the address phase (TX) and data phase (RX). For read commands
without dummy cycles, the controller is still driving DQ2/DQ3 HIGH
when the flash switches to output mode, causing a bus conflict.

Split the GENFIFO helper into a write-only variant and a
start-and-wait variant. Queue CMD, ADDR and dummy entries without
starting the GENFIFO. The data phase appends its entry and starts
the queued sequence, keeping the address-to-data transition
continuous.

Since genfifo_cmd() no longer triggers after each entry, operations
without a data phase have no trigger path. Call start_gen_fifo()
from exec_op() before deasserting chip select to execute the queued
CMD and ADDR entries.

Fixes: 22cca1730e ("spi: zynqmp_gqspi: Add support for ZynqMP qspi driver")
Signed-off-by: Suraj Kakade <suraj.hanumantkakade@amd.com>
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20260709083757.1851446-1-suraj.hanumantkakade@amd.com
2026-08-12 06:54:37 +02:00
Michal Simek 40727c4f38 board: xilinx: Generate FWU capsule dfu_alt_info from fwu_platform_hook()
Commit 371a6c1744 ("board: xilinx: Add capsule and FWU support") and
commit 818c06faa1 ("board: amd: Add capsule and FWU support")
introduced a separate set_dfu_alt_info() for the FWU multi-bank case
(Versal and Versal Gen 2 respectively) which set the dfu_alt_info
environment variable directly, while configure_capsule_updates() handled
the non-FWU case by filling update_info.dfu_string.

Fold the FWU multi-bank generation (fwu_gen_alt_info_from_mtd() over the
nor0 MTD partitions) into fwu_platform_hook() and drop the
standalone set_dfu_alt_info().

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/33c118b8177f8d0dc182a6f4c5cffedca4e02448.1782986903.git.michal.simek@amd.com
2026-08-12 06:54:37 +02:00
Michal Simek 5bca08783b arm64: versal2: Select GIC redistributor base at runtime
The GIC redistributor base address depends on the part: the 2VM3654
device has 4 APU cores and 3 GIC ITS blocks, which shifts the
redistributor region up compared to the base 8 core / single ITS part.
A single U-Boot binary must therefore pick the right base at runtime
instead of relying on the compile-time GICR_BASE used by the generic
lowlevel_init().

Add a SoC specific lowlevel_init() that reads the PMC TAP IDCODE and
selects GICR_BASE_2VM3654 for the 2VM3654 device, otherwise keeps the
default GICR_BASE. CONFIG_ARMV8_MULTIENTRY is not supported on Versal
Gen 2 so the generic slave handling is intentionally dropped.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/4c0dc2b6e29d300db15be0844879ab4d028d98a9.1783493630.git.michal.simek@amd.com
2026-08-12 06:54:37 +02:00
Michal Simek fcf44934df arm64: versal2: Make hardware.h assembly safe
The register address and bootmode defines in this header are useful from
early assembly (e.g. lowlevel_init reading PMC_TAP_IDCODE), but the file
could not be included from .S because the C-only declarations were not
guarded.

Reorder the header so all plain address/value defines are visible to both
C and assembly, and move every C-only construct (the linux/bitops.h
include, the register structs, the base pointer-cast macros and the
platform enum) into a single #ifndef __ASSEMBLY__ block.

No functional change for C consumers.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/de4de47ea457b285c5870e7ba25b4baf554561e7.1783493630.git.michal.simek@amd.com
2026-08-12 06:54:37 +02:00
Jonas KarlmanandQuentin Schulz c8cac405f2 rockchip: rk3576: Disable force_jtag by default
Rockchip SoCs can automatically switch between jtag and sdmmc based on
the following rules:
- all the SDMMC pins including SDMMC_DET set as SDMMC function in GRF,
- force_jtag bit in GRF is 1,
- SDMMC_DET is low (no card detected),

Note that the BootROM may mux all SDMMC pins in their SDMMC function or
not, depending on the boot medium that were tried.

Because SDMMC_DET pin is not guaranteed to be used as an SD card card
detect pin, it could be low at boot or even switch at runtime, which
would enable the jtag function and render the SD card unusable.

Or boards using cd-gpios may switch the SDMMC_DET pin to GPIO function,
which would enable the jtag function and render the SD card unusable.

With commit d0a838bdc6 ("Subtree merge tag 'v7.1-dts' of dts repo [1]
into dts/upstream") there are now RK3576 boards that have changed to use
cd-gpios for the SDMMC_DET pin, e.g. NanoPi R76S, that may have issues
detecting SD card unless force_jtag is disabled.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260803184314.2240153-3-jonas@kwiboo.se
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
2026-08-11 17:35:22 +02:00
Jonas KarlmanandQuentin Schulz 0c68b88ce5 include: linux: Import hw_bitfield.h from Linux v6.18
Hardware of various vendors, but very notably Rockchip, often uses
32-bit registers where the upper 16-bit half of the register is a
write-enable mask for the lower half.

Add hw_bitfield.h with two macros: FIELD_PREP_WM16, and
FIELD_PREP_WM16_CONST. The latter is a version that can be used in
initializers, like FIELD_PREP_CONST.

Import hw_bitfield.h from Linux commit 21368fcbb124 ("bitmap: introduce
hardware-specific bitfield operations"), first introduced in v6.18-rc1.

This contains two changes compared to the Linux version:
- include of linux/limit.h was dropped
- use of const_true() in FIELD_PREP_WM16_CONST() was dropped

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Link: https://patch.msgid.link/20260803184314.2240153-2-jonas@kwiboo.se
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
2026-08-11 17:35:22 +02:00
Tom Rini 77bc032645 Merge tag 'fsl-qoriq-for-2026.10-rc3' of https://git.u-boot-project.org/u-boot/custodians/u-boot-fsl-qoriq
CI: https://git.u-boot-project.org/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/946

- Add support for vendor protocol IDs 0x81 for SCMI
- Fix LDO selector boundaries and make the driver fail gracefully when
  the
- regulators DT node is absent for TPS65219 PMIC/Regulator:
- Fix a hotplug issue with pci_iommu_extra on Layerscape platforms for
  PCIe Layerscape.
- Fix a GIC LPI table corruption on LS1028A boards with 2 GiB of RAM
  caused by an unbounded TF-A DRAM bank loop and an integer underflow
  when gd->arch.resv_ram is inadvertently left at zero due to empty DRAM
  banks.
- Also includes a minor DT cosmetic cleanup.
2026-08-11 08:49:22 -06:00
Patryk BielandPeng Fan 5a32ebc962 armv8: layerscape: Fix TF-A DRAM reservation with empty banks
The TF-A DRAM bank setup currently assumes that the number of
banks reported by TF-A matches the number of entries available in
gd->bd->bi_dram[].  Limit the loop by CONFIG_NR_DRAM_BANKS so that
a platform with fewer configured DRAM banks does not write past the
array.

The reserved RAM setup also checks higher DRAM banks before falling
back to bank 0.  When a higher bank is empty and board_reserve_ram_top()
returns 0, the old test succeeds for a zero-sized bank.  This can set
gd->arch.resv_ram to 0.

On systems with CONFIG_GIC_V3_ITS this value is later used by
ls_gic_rd_tables_init() to place the GIC LPI tables:

  gd->arch.resv_ram - GIC_LPI_SIZE

If gd->arch.resv_ram is 0, the subtraction underflows and the GIC LPI
tables are placed at an invalid high address.

Skip empty banks when selecting the reserved RAM area and fail GIC LPI
table setup if no reserved RAM address was established.

This fixes LS1028A systems with 2 GiB of RAM, where TF-A reports only
one populated DRAM bank.

Tested on an LS1028ARDB with TF-A modified to report 2 GiB of RAM, and
on a custom LS1028A-based board equipped with 2 GiB of RAM.

Signed-off-by: Patryk Biel <pbiel7@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-08-11 16:05:24 +08:00
Udit KumarandPeng Fan 9f82dcd489 scmi: pinctrl: Rename SCMI_PIN_DEFUALT to SCMI_PIN_DEFAULT
Fix typo in enum scmi_config_type in include/scmi_protocols.h.

The enum value SCMI_PIN_DEFUALT was misspelled and should be
SCMI_PIN_DEFAULT to match the correct English spelling. This fixes
potential compilation issues and improves code clarity for any code
that references this enum value

Fixes: 0cb160f1b6 ("scmi: pinctrl: add pinctrl driver for SCMI")
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-08-11 15:51:15 +08:00
Kumara Bhimeswararao MatsaandPeng Fan d57e3e4c75 power: regulator: tps65219: Fix LDO selector boundaries
According to the TPS65219 datasheet, selectors 0x38 through 0x3f
saturate at 3.4 V for LDO1 and LDO2.

For LDO3 and LDO4, selectors 0x00 through 0x0c saturate at
1.2 V, while selectors 0x36 through 0x3f saturate at 3.3 V.

The driver currently uses 0x56, 0x12, and 0x54 as selector boundary
values. These values do not match the selector boundaries defined by
the datasheet.

Use the correct selector boundary values of 0x38, 0x0c, and 0x36
for interpolation.

Fixes: b5cfa0c7ca ("power: add driver for the TPS65219 PMIC")
Signed-off-by: Kumara Bhimeswararao Matsa <bhimesh.matsa@gmail.com>
Acked-by: Maarten Brock <maarten.brock@sttls.nl>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-08-11 15:50:22 +08:00
Vincent JardinandPeng Fan 289b1bae1c pci: layerscape: fix pci_iommu_extra hotplug
We can have many pci hotplug groups, each introduced
by a "pci@<addr>" token such as,

  pci_iommu_extra=pci@0x3600000,1.0.0,hp,pci@0x3700000,1.0.0,hp,
                  pci@0x3800000,1.0.0,hp,pci@0x3900000,1.0.0,hp

Without this fix, we have the error:
  Added iommu map for hotplug 1.0.0
  ERROR: invalid action in extra iommu entry
  ERROR: invalid action in extra iommu entry
  ERROR: invalid action in extra iommu entry

Fixes: 2a5bbb13cc ("pci: layerscape: add a way of specifying additional iommu mappings")
Signed-off-by: Vincent Jardin <vjardin@free.fr>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-08-11 15:48:22 +08:00