Re: [PATCH v2 9/9] doc: introduce led.rst documentation

2024-08-07 Thread Alexander Dahl
Hello Christian, Am Wed, Aug 07, 2024 at 09:54:12PM +0200 schrieb Christian Marangi: > Introduce simple led.rst documentation to document all the additional > Kconfig and the current limitation of LED_BLINK and GPIO software blink. This is a good idea. An overview of all the LED possibilities in

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Sughosh Ganu
On Thu, 8 Aug 2024 at 11:05, Michal Simek wrote: > > > > On 8/7/24 23:12, Tom Rini wrote: > > On Tue, Aug 06, 2024 at 05:37:00PM +0530, Prasad Kummari wrote: > > > >> Added LMB API to prevent SF command from overwriting reserved > >> memory areas. The current SPI code does not use LMB APIs for > >

[PATCH 4/4] mtd: spi-nor: add generic flash driver

2024-08-07 Thread tkuw584924
From: Takahiro Kuwano Our SFDP parsing is everything we need to support all basic operations of a flash device. If the flash isn't found in our in-kernel flash database, gracefully fall back to a driver described solely by its SFDP tables. This patch ports the commit in Linux: 773bbe104497 ("mtd

[PATCH 3/4] mtd: spi-nor: Remove SPI_NOR_SKIP_SFDP flag

2024-08-07 Thread tkuw584924
From: Takahiro Kuwano This flag is not used in INFO table so checking info->flags has no effect. Signed-off-by: Takahiro Kuwano --- drivers/mtd/spi/sf_internal.h | 9 - drivers/mtd/spi/spi-nor-core.c | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/mtd

[PATCH 2/4] mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data

2024-08-07 Thread tkuw584924
From: Takahiro Kuwano This patch partially ports the Linux commit: 4e53ab0c292d ("mtd: spi-nor: Set the 4-Byte Address Mode method based on SFDP data") BFPT[DWORD(16)] defines the methods to enter and exit the 4-Byte Address Mode. Parse BFPT to determine the method. Will rename th

[PATCH 1/4] mtd: spi-nor: Rework set_4byte()

2024-08-07 Thread tkuw584924
From: Takahiro Kuwano Synchronize set_4byte() with Linux v6.10 as much as possible. Introduce {nor, params}->set_4byte_addr_mode(). The params->set_4byte_addr_mode is initialized with one of the manufacturer specific methods, copied to nor->set_4byte_addr_mode, then it is called from spi_nor_set

[PATCH 0/4] mtd: spi-nor: add generic flash driver

2024-08-07 Thread tkuw584924
From: Takahiro Kuwano The goal of series is to port spi-nor-generic feature based on SFDP parsing. This feature will suppress the increase of spi_nor_ids{} size and reduce our effort to maintain it. We need to rework 4-byte address mode entry/exit functions and enhance SFDP parsing to select pro

[PATCH] MAINTAINERS: Update path for U-Boot environment variables YAML

2024-08-07 Thread Rafał Miłecki
From: Rafał Miłecki This file was moved to the layouts/ subdirectory. Signed-off-by: Rafał Miłecki --- I missed this MAINTAINERS change in the commit 1b3f5b88c541 ("dt-bindings: nvmem: convert U-Boot env to a layout"). Srini: I believe your policy is to rebase your tree and send PATCHes to Gre

Re: [PATCH] arm: dts: keystone: Move to OF_UPSTREAM

2024-08-07 Thread Neha Malcom Francis
Hi Andrew On 07/08/24 20:26, Andrew Davis wrote: Enable OF_UPSTREAM for Keystone boards. Remove DT files that are now available in dts/upstream. Signed-off-by: Andrew Davis --- arch/arm/dts/Makefile | 7 - arch/arm/dts/keystone-clocks.dtsi | 411 ---

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Michal Simek
On 8/7/24 23:12, Tom Rini wrote: On Tue, Aug 06, 2024 at 05:37:00PM +0530, Prasad Kummari wrote: Added LMB API to prevent SF command from overwriting reserved memory areas. The current SPI code does not use LMB APIs for loading data into memory addresses. To resolve this, LMB APIs were added

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Michal Simek
On 8/7/24 16:36, Simon Glass wrote: Hi Prasad, On Tue, 6 Aug 2024 at 23:05, Kummari, Prasad wrote: Hi Glass, -Original Message- From: Simon Glass Sent: Wednesday, August 7, 2024 3:21 AM To: Kummari, Prasad Cc: u-boot@lists.denx.de; git (AMD-Xilinx) ; Simek, Michal ; Abbarapu, V

[PATCH] riscv: resume needs to be a global

2024-08-07 Thread Anton Blanchard
If we take an exception before u-boot is relocated, there's a good chance we will end up in an endless loop of exceptions because resume is invalid until after relocation. Signed-off-by: Anton Blanchard --- arch/riscv/include/asm/global_data.h | 1 + arch/riscv/lib/interrupts.c | 10 ++

RE: [PATCH] imx: imx8: fix build when CONFIG_IMX_BOOTAUX is set

2024-08-07 Thread Peng Fan
> Subject: [PATCH] imx: imx8: fix build when CONFIG_IMX_BOOTAUX is > set > > From: Max Krummenacher > > Use correct function name. > > Fixes: e8cd1f60d964 ("imx: imx8: bootaux: Add i.MX8 M4 boot > support") > Signed-off-by: Max Krummenacher > --- > > arch/arm/mach-imx/imx8/cpu.c | 4 ++-- >

[PATCH v5 38/38] doc: samsung: Mention enabled eMMC in E850-96 board doc

2024-08-07 Thread Sam Protsenko
eMMC is enabled on E850-96 board now. Mention that in the board documentation. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) doc/board/samsung/e850-96.rst | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH v5 35/38] mmc: exynos_dw_mmc: Improve coding style

2024-08-07 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos/include/mach/dwmmc.h | 36 +

[PATCH v5 37/38] configs: e850-96: Enable MMC

2024-08-07 Thread Sam Protsenko
Enable MMC subsystem and DW MMC driver support to make eMMC functional. Also enable a couple of related commands so the user can make use of eMMC from U-Boot shell. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent master Changes in

[PATCH v5 32/38] mmc: exynos_dw_mmc: Pull all init code into probe function

2024-08-07 Thread Sam Protsenko
There is no logical sense to split the initialization code between multiple functions. Pull both do_dwmci_init() and exynos_dwmci_core_init() into exynos_dwmmc_probe() to make the code more simple and obvious. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Chan

[PATCH v5 34/38] mmc: exynos_dw_mmc: Use dev->name as driver's displayed name

2024-08-07 Thread Sam Protsenko
Reduce U-Boot footprint by reusing dev->name as a driver's displayed name. This changes boot device name (and "mmc info" output) from "EXYNOS DWMMC" to something like "mmc@1210". Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none)

[PATCH v5 36/38] arm: dts: exynos: Remove outdated DW MMC properties in all Exynos dts

2024-08-07 Thread Sam Protsenko
Upstream properties were added to device trees to follow current Linux kernel. DW MMC driver was updated accordingly. Safely remove outdated MMC properties. Details on removed properties are as follows: * samsung,removable: replaced by non-removable * samsung,bus-width: replaced by bus-width * sam

[PATCH v5 33/38] mmc: exynos_dw_mmc: Don't call dwmci_setup_cfg() after add_dwmci()

2024-08-07 Thread Sam Protsenko
add_dwmci() is already calling dwmci_setup_cfg() internally, there is no needed to call dwmci_setup_cfg() again in case when add_dwmci() is used (for non-DM cases). Fix it by calling dwmci_setup_cfg() only in DM cases, when add_dwmci() wasn't called. Also, this assignment: host->mmc = &plat->m

[PATCH v5 31/38] mmc: exynos_dw_mmc: Add support for ARM64 Exynos chips

2024-08-07 Thread Sam Protsenko
Add the compatible entry and corresponding chip data for Exynos7 compatible chips, which covers modern ARM64 based Exynos chips. They have some differences w.r.t. old ARM32 Exynos chips: - CLKSEL register offset is different - 64-bit IDMAC descriptor and 64-bit IDMAC registers are used (imp

[PATCH v5 29/38] mmc: exynos_dw_mmc: Read and use DDR timing when available

2024-08-07 Thread Sam Protsenko
DDR timing values should be defined in "samsung,dw-mshc-ddr-timing" dts property, and used when DDR MMC mode is selected. Read that value from dts and use it. If it's not available, use SDR timing values instead. This change is following upstream Linux kernel implementation. Signed-off-by: Sam Pro

[PATCH v5 30/38] mmc: exynos_dw_mmc: Set requested freq in get_mmc_clk() callback

2024-08-07 Thread Sam Protsenko
By now exynos_dw_mmc driver was relying on the correct CIU clock frequency being set on driver init. But dw_mmc core is actually trying to change CIU clock rate dynamically, on init and in set_ios() callback, which it's requesting via host->get_mmc_clk() callback (the name is misleading: although i

[PATCH v5 28/38] mmc: exynos_dw_mmc: Move quirks from struct dwmci_host to chip data

2024-08-07 Thread Sam Protsenko
host->quirks field is only used internally in exynos_dw_mmc.c driver. To avoid cluttering the scope of struct dwmci_host, move quirks field into Exynos driver's chip data, where it can be statically defined. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Change

[PATCH v5 27/38] mmc: exynos_dw_mmc: Read common clock-frequency property

2024-08-07 Thread Sam Protsenko
Instead of using non-standard "bus_hz" dts property, read common "clock-frequency" property used in upstream Linux kernel. It's safe to do so, as "clock-frequency" property was already added to corresponding nodes in all affected Exynos device tree files. No functional change. Signed-off-by: Sam

[PATCH v5 26/38] mmc: exynos_dw_mmc: Read common bus-width property

2024-08-07 Thread Sam Protsenko
Instead of using non-standard "samsung,bus-width" dts property, read common "bus-width" property used in upstream Linux kernel. It's safe to do so, as "bus-width" property was already added to corresponding nodes in all affected Exynos device tree files. No functional change. Signed-off-by: Sam P

[PATCH v5 25/38] mmc: exynos_dw_mmc: Refactor fixed CIU clock divider

2024-08-07 Thread Sam Protsenko
Some chips like Exynos4412 have fixed internal CIU clock divider. Instead of reading it from non-standard "div" dts property, store its value in the driver internally, in static chip data associated with corresponding compatible. This makes it possible to avoid using host->div for storing it, so th

[PATCH v5 24/38] mmc: exynos_dw_mmc: Abstract CLKSEL register

2024-08-07 Thread Sam Protsenko
CLKSEL register offset may vary between different Exynos chips, e.g. on ARM64 vs ARM32 chips. Provide a way to specify its offset value for each compatible instead of hard-coding its value in read/write calls. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Chan

[PATCH v5 23/38] mmc: exynos_dw_mmc: Read upstream SDR timing properties

2024-08-07 Thread Sam Protsenko
The obsolete "samsung,timing" dts property is now split into "samsung,dw-mshc-ciu-div" (for holding the internal DW MMC divider value) and "samsung,dw-mshc-sdr-timing" (for actual timing values) in upstream Linux kernel. Rework the driver to make use of new properties instead of the old one. All af

[PATCH v5 22/38] mmc: exynos_dw_mmc: Convert to use livetree API

2024-08-07 Thread Sam Protsenko
Update the driver to use livetree API instead of FDT one. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Moved exynos_dwmmc_of_to_plat() under #ifdef CONFIG_DM_MMC stanza drivers/mmc/exy

[PATCH v5 19/38] mmc: exynos_dw_mmc: Don't call pinmux functions on ARM64 chips

2024-08-07 Thread Sam Protsenko
Pinmux configuration on ARM64 platforms must be performed during startup in pinctrl driver using info from device tree. exynos_pinmux_config() and pinmux_decode_periph_id() are only available on ARM32 platforms, so don't call those functions on ARM64 platforms. Instead of the latter function, use "

[PATCH v5 21/38] mmc: exynos_dw_mmc: Use .of_to_plat for device tree parsing

2024-08-07 Thread Sam Protsenko
exynos_dwmci_get_config() is called from the probe function and used to read data from device tree. Make use of .of_to_plat driver callback instead, and convert exynos_dwmci_get_config() to match its signature. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Cha

[PATCH v5 20/38] mmc: exynos_dw_mmc: Obtain and use CIU clock via CCF API

2024-08-07 Thread Sam Protsenko
New Exynos chips should implement clock drivers using CCF framework. In that case corresponding CCF functions can be used to get/set the clock rates. Moreover, already existing get_mmc_clk() and set_mmc_clk() calls are only implemented for CONFIG_CPU_V7A (i.e. ARM32 chips). In case of ARM64 chips t

[PATCH v5 18/38] mmc: exynos_dw_mmc: Fix getting private data in exynos_dwmci_board_init()

2024-08-07 Thread Sam Protsenko
In case of CONFIG_DM_MMC, host->priv actually holds (struct udevice *), and not (struct dwmci_exynos_priv_data *). This makes *priv pointer invalid and may lead to Synchronous Abort during its dereference later in exynos_dwmci_board_init(). Fix it by extracting exynos_dwmmc_get_priv() helper from e

[PATCH v5 17/38] mmc: exynos_dw_mmc: Fix obtaining the base address of controller

2024-08-07 Thread Sam Protsenko
Getting the base address with outdated fdtdec_get_addr() API and further casting it to (void *) leads to next build warning on ARM64 platforms: In function 'exynos_dwmci_get_config': warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] hos

[PATCH v5 16/38] arm: exynos: Add header guard for dwmmc.h

2024-08-07 Thread Sam Protsenko
Add missing header guard to prevent possible build errors. Fixes: 77b55e8cfcee ("ARM: exynos: move SoC sources to mach-exynos") Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none) arch/arm/mach-exynos/includ

[PATCH v5 15/38] dt-bindings: exynos: Update bindings doc for DW MMC controller

2024-08-07 Thread Sam Protsenko
Update the bindings doc for Exynos DW MMC block to follow the upstream example and reflect the latest changes made in corresponding Linux kernel bindings. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - (none)

[PATCH v5 14/38] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-08-07 Thread Sam Protsenko
Some device tree properties for DW MMC block were updated in Linux kernel. Let's follow its example and rework corresponding properties in all Exynos device trees. Don't remove outdated properties yet, it'll be done later once DW MMC driver is updated accordingly to read the updated properties inst

[PATCH v5 13/38] mmc: dw_mmc: Improve coding style

2024-08-07 Thread Sam Protsenko
Fix most of checkpatch warnings and other obvious style issues. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent master Changes in v3: - (none) Changes in v2: - Added R-b tag

[PATCH v5 12/38] mmc: dw_mmc: Fix kernel-doc comments in dwmmc.h

2024-08-07 Thread Sam Protsenko
Rework kernel-doc comments in dwmmc.h header so it's actually possible to generate a proper documentation from it usin scripts/kernel-doc script, with no errors. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none)

[PATCH v5 11/38] mmc: dw_mmc: Replace fifoth_val property with fifo-depth

2024-08-07 Thread Sam Protsenko
Replace fifoth_val property with its fifo-depth counterpart in all DW MMC drivers. fifo-depth is a common property used in upstream Linux kernel. The FIFOTH register value will be calculated using fifo-depth value in DW MMC core (dw_mmc.c). This change reduces code duplication in platform drivers,

[PATCH v5 10/38] mmc: dw_mmc: Add support for 64-bit IDMAC

2024-08-07 Thread Sam Protsenko
Some DW MMC blocks (e.g. those on modern Exynos chips) support 64-bit DMA addressing mode. 64-bit DW MMC variants differ from their 32-bit counterparts: - the register layout is a bit different (because there are additional IDMAC registers present for storing upper part of 64-bit addresses)

[PATCH v5 09/38] mmc: dw_mmc: Improve 32-bit IDMAC descriptor namings

2024-08-07 Thread Sam Protsenko
Prepare for adding 64-bit IDMAC descriptors by renaming current 32-bit descriptor and its fields accordingly. While at it, make use of virt_to_phys() to make it more obvious in which places the physical addresses have to be used. No functional change. Signed-off-by: Sam Protsenko --- Changes in

[PATCH v5 07/38] mmc: dw_mmc: Extract DMA transfer handling code into a separate routine

2024-08-07 Thread Sam Protsenko
Make dwmci_send_cmd() easier to read by moving the DMA transfer handling code into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added R

[PATCH v5 08/38] mmc: dw_mmc: Extract setting the DMA descriptor into a separate routine

2024-08-07 Thread Sam Protsenko
Make dwmci_prepare_data() function easier to read by extracting the preparation of IDMAC descriptor into a dedicated function. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - Rebased on top of the most recent maste

[PATCH v5 06/38] mmc: dw_mmc: Extract FIFO data transfer into a separate routine

2024-08-07 Thread Sam Protsenko
FIFO data transfer is implemented as quite a massive chunk of code. Extract it into a dedicated function to make dwmci_data_transfer() easier to read and reduce the indentation level of the code. No functional change. Signed-off-by: Sam Protsenko --- Changes in v5: - (none) Changes in v4: -

[PATCH v5 04/38] mmc: dw_mmc: Extract FIFO init into a separate routine

2024-08-07 Thread Sam Protsenko
Move FIFO threshold initialization into a separate function to make dwmci_init() more readable. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added R-b tag fr

[PATCH v5 05/38] mmc: dw_mmc: Extract divider update to a separate function

2024-08-07 Thread Sam Protsenko
Extract the clock divider update into dwmci_update_div() function. It's a procedure recommended in TRM, so it's better to keep it in a dedicated function to make the code clearer. While at it also extract the clock control code into a separate routine to avoid code duplication in dwmci_setup_bus()

[PATCH v5 03/38] mmc: dw_mmc: Extract waiting for data busy into a separate routine

2024-08-07 Thread Sam Protsenko
Waiting for data busy is a logically separate operation and should be implemented as a separate routine. Follow Linux kernel example and extract it from dwmci_send_cmd(). This way it doesn't clutter dwmci_send_cmd() function, and can be reused later in other cases. No functional change. Signed-of

[PATCH v5 02/38] mmc: dw_mmc: Move struct idmac to dw_mmc.c

2024-08-07 Thread Sam Protsenko
struct idmac is only used in dw_mmc.c, so move it there from dwmmc.h to avoid cluttering the interface in the header. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2

[PATCH v5 01/38] mmc: dw_mmc: Remove unused version field from struct dwmci_host

2024-08-07 Thread Sam Protsenko
Nobody seems to use it, so just remove it. No functional change. Signed-off-by: Sam Protsenko Reviewed-by: Quentin Schulz --- Changes in v5: - (none) Changes in v4: - (none) Changes in v3: - (none) Changes in v2: - Added R-b tag from Quentin include/dwmmc.h | 1 - 1 file changed, 1

[PATCH v5 00/38] mmc: dw_mmc: Enable eMMC on E850-96 board

2024-08-07 Thread Sam Protsenko
Bring 64-bit support to dw_mmc core and Exynos dw_mmc drivers, and enable it on E850-96 board. Additionally do some related cleanups and device tree updates. 64-bit version of DesignWare MMC can be often found on modern ARM64 chips. It's different from its older 32-bit version (which is already im

Re: [PATCH v4 14/38] arm: dts: exynos: Add upstream DW MMC properties to all Exynos dts

2024-08-07 Thread Sam Protsenko
On Sat, Aug 3, 2024 at 6:33 PM Henrik Grimler wrote: > > Hi Sam, > > Thanks for working on this, makes switching to upstream dts'es easier > :) > > I tested the series on exynos4412-odroid-u2 and exynos5422-odroid-xu4. > One issue for exynos4412-odroid to resolve below, with that fixed > booting f

[PATCH 0/6] bootstd: sunxi: Migrate to standard boot

2024-08-07 Thread Simon Glass
This series attempts to migrate all sunxi boards to use standard boot, along with a text environment. Simon Glass (6): sunxi: Drop BOOTCMD_SUNXI_COMPAT sunxi: Add a bootmeth for FEL sunxi: Move to bootstd sunxi: Drop old distro boot variables env: Provide a work-around for unquoting fdt

pinctrl warning on sandbox

2024-08-07 Thread Simon Glass
Hi Sean, I was looking at [1] and bisected the message to this commit: 7f0f1806e3a (refs/bisect/bad) test: pinmux: Add test for pin muxing I'm not quite sure what is going on, but could you please take a look? Regards, Simon [1] https://source.denx.de/u-boot/u-boot/-/issues/2

[PATCH v4 21/21] upl: Add an end-to-end test

2024-08-07 Thread Simon Glass
Now that sandbox_vpl supports UPL, add a test that checks that the payload can be loaded by SPL and the handoff information passed through to U-Boot proper. Signed-off-by: Simon Glass --- Changes in v4: - Rebase to -next Changes in v2: - Rework to use alist instead of fixed-length arrays - Supp

[PATCH v4 20/21] sandbox: Add an SPL loader for UPL

2024-08-07 Thread Simon Glass
Add support for loading a UPL image from SPL. This uses the simple FIT implementation, but also loads the full FIT just to permit more testing. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/spl.c | 49 +- arch/sandbox/include/asm/

[PATCH v4 19/21] sandbox: Add a flag to enable UPL

2024-08-07 Thread Simon Glass
UPL significantly alters the boot flow for sandbox. Add a flag to enable this so that it can be enabled only on tests which need it. Signed-off-by: Simon Glass --- (no changes since v1) arch/sandbox/cpu/start.c | 13 - arch/sandbox/include/asm/state.h | 1 + 2 files change

[PATCH v4 18/21] upl: Add initial documentation

2024-08-07 Thread Simon Glass
Add some documentation to explain the basic concept along with a link to the full spec. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add a link to the command - Add a link to the spec MAINTAINERS | 1 + doc/usage/cmd/upl.rst | 4 ++-- doc/usage/index.rst

[PATCH v4 17/21] sandbox_vpl: Enable Universal Payload

2024-08-07 Thread Simon Glass
Use the sandbox_vpl build to test UPL since it supports a real devicetree in SPL. The sandbox_spl build uses OF_PLATDATA. Enable writing the UPL handoff in SPL and reading it in U-Boot proper. Provide a test to check that this handoff works. Note that the test uses the standard devicetree rather

[PATCH v4 16/21] upl: Plumb in universal payload to the init process

2024-08-07 Thread Simon Glass
Read the UPL early in boot so that it is available. For now none of the information is used. Signed-off-by: Simon Glass --- (no changes since v1) boot/Kconfig | 12 +++- common/board_f.c | 22 ++ common/board_r.c | 2 ++ 3 files changed, 35 insertions(+), 1 del

[PATCH v4 15/21] spl: Plumb in the Universal Payload handoff

2024-08-07 Thread Simon Glass
Specify the FIT and include information about each loaded image, as required by the UPL handoff. Write the UPL handoff into the bloblist before jumping to the next phase. Control this using a runtime flag to avoid conflicting with other handoff mechanisms. Signed-off-by: Simon Glass --- (no ch

[PATCH v4 13/21] upl: Add support for Universal Payload in SPL

2024-08-07 Thread Simon Glass
Add the basic code to create a handoff structure in SPL, so it can be passed to the next phase. For now this is not plumbed in. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Add a function to init the UPL process in SPL MAINTAINERS | 1 + boot/Kconfig

[PATCH v4 14/21] spl: Set SPL_FIT_FOUND for full FIT also

2024-08-07 Thread Simon Glass
This flag is set for simple FIT, so set it for full FIT too. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Split out into its own commit common/spl/spl_fit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 2a097f446

[PATCH v4 12/21] upl: Add a command

2024-08-07 Thread Simon Glass
Add a 'upl' command to work with Universal Payload features. For now it only supports reading and writing a handoff structure. Signed-off-by: Simon Glass --- (no changes since v1) MAINTAINERS | 2 + boot/Kconfig | 1 + cmd/Kconfig

[PATCH v4 11/21] upl: Add basic tests

2024-08-07 Thread Simon Glass
Add some unit tests to check that we can write a UPL handoff and read it back. Signed-off-by: Simon Glass --- Changes in v4: - Update alist_add() calls Changes in v2: - Put the upl tests under their own subcommand to avoid bootstd init MAINTAINERS | 1 + include/test/suites.h |

[PATCH v4 09/21] upl: Add support for reading a upl handoff

2024-08-07 Thread Simon Glass
Universal Payload provides a standard way of handing off control between two firmware phases. Add support for reading the handoff information into a structure. Signed-off-by: Simon Glass --- Changes in v4: - Mention the return value in upl_add_image() - Update alist_add() calls - Update upl_add_

[PATCH v4 10/21] upl: Add support for writing a upl handoff

2024-08-07 Thread Simon Glass
Universal Payload provides a standard way of handing off control between two firmware phases. Add support for writing the handoff information from a structure. Signed-off-by: Simon Glass --- (no changes since v1) boot/Kconfig | 8 + boot/Makefile| 1 + boot/upl_write.c | 622 ++

[PATCH v4 08/21] sandbox: Set up global_data earlier

2024-08-07 Thread Simon Glass
It is possible for U-Boot functions such as printf() to be called within state_init(). This can end up checking gd->flags (e.g. in putc()) before global_data is set up. Move the setup earlier to avoid this. This fixes the suppression of some debug output in memory allocation (when enabled). Signe

[PATCH v4 07/21] sandbox: Add ELF file to VPL u-boot.img

2024-08-07 Thread Simon Glass
At present sandbox builds package up u-boot.bin in the .img file. This cannot actually be executed, since it is not an ELF file. For sandbox_vpl we want to be able to run the full boot flow. Adjust the build rule for sandbox_vpl to package the ELF file and thereby allow full testing of the sandbo

[PATCH v4 06/21] sandbox: Return error code from read/write/seek

2024-08-07 Thread Simon Glass
The existing API for these functions is different from the rest of U-Boot, in that any error code must be obtained from the errno variable on failure. This variable is part of the C library, so accessing it outside of the special 'sandbox' shim-functions is not ideal. Adjust the API to return an e

[PATCH v4 05/21] sandbox: fdt: Avoid overwriting an existing fdt

2024-08-07 Thread Simon Glass
Since the removal of OF_HOSTFILE logic in board_fdt_blob_setup(), the logic for obtaining the DT is handled in the OF_BOARD option. If a devicetree comes from a bloblist it is immediately overwritten by this function. Fix this by skipping the function if a devicetree is already present. This is s

[PATCH v4 04/21] fdt: Don't overwrite bloblist devicetree

2024-08-07 Thread Simon Glass
When the devicetree comes from a bloblist, it is currently overwritten by the appended one, if present. It should be preserved. Adjust the logic to support this. Fixes: 70fe2385943 ("fdt: Allow the devicetree to come from a bloblist") Signed-off-by: Simon Glass --- (no changes since v1) lib/

[PATCH v4 03/21] test: Move some SPL-loading test-code into sandbox common

2024-08-07 Thread Simon Glass
This code is useful for loading an image in sandbox_spl so move it into a place where it can be called as needed. Signed-off-by: Simon Glass --- (no changes since v3) Changes in v3: - Use -errno instead of inventing a new error - Use a block size of 1 if !CONFIG_SPL_LOAD_BLOCK - Use longer erro

[PATCH v4 02/21] sandbox: Fix a comment in os_find_u_boot()

2024-08-07 Thread Simon Glass
Fix a missing dot in a comment, since '..' is confusing. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- (no changes since v1) arch/sandbox/cpu/os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index a04eb5aa

[PATCH v4 01/21] sandbox: Use const in os_jump_to_file()

2024-08-07 Thread Simon Glass
The argument array is not changed by the callee, so mark it const. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- (no changes since v1) arch/sandbox/cpu/os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c

[PATCH v4 00/21] Universal Payload initial series

2024-08-07 Thread Simon Glass
Universal Payload (UPL) is an Industry Standard for firmware components[1]. UPL is designed to improve interoperability within the firmware industry, allowing mixing and matching of projects with less friction and fewer project-specific implementations. UPL is cross-platform, supporting ARM, x86 an

[PATCH v2 08/11] board: vining_2000: convert to DM_I2C

2024-08-07 Thread Anatolij Gustschin
Conversion to DM_I2C is mandatory, enable DM_I2C to disable board removal warning. Signed-off-by: Anatolij Gustschin --- Cc: Silvio Fricke Cc: Fabio Estevam Cc: Heiko Schocher Cc: Tom Rini --- Changes in v2: do not remove CONFIG_SYS_I2C_MXC_I2C* to fix build warnings/errors board/softing/

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Tom Rini
On Tue, Aug 06, 2024 at 05:37:00PM +0530, Prasad Kummari wrote: > Added LMB API to prevent SF command from overwriting reserved > memory areas. The current SPI code does not use LMB APIs for > loading data into memory addresses. To resolve this, LMB APIs > were added to check the load address of a

Re: [PATCH] cmd: sf: prevent overwriting the reserved memory

2024-08-07 Thread Simon Glass
Hi Prasad, On Wed, 7 Aug 2024 at 08:46, Kummari, Prasad wrote: > > Hi Simon, > > > -Original Message- > > From: Simon Glass > > Sent: Wednesday, August 7, 2024 8:06 PM > > To: Kummari, Prasad > > Cc: u-boot@lists.denx.de; git (AMD-Xilinx) ; Simek, Michal > > ; Abbarapu, Venkatesh > > ;

Re: [PATCH 1/1] boot: set correct block device name in set_efi_bootdev()

2024-08-07 Thread Simon Glass
Hi Heinrich, On Wed, 7 Aug 2024 at 08:39, Heinrich Schuchardt wrote: > > On 07.08.24 16:36, Simon Glass wrote: > > On Tue, 6 Aug 2024 at 18:13, Heinrich Schuchardt > > wrote: > >> > >> For SATA devices the class name is 'ahci' but the block device name is > >> 'sata'. > >> > >> Use function blk_

[PATCH 6/6] sunxi: Move to text environment

2024-08-07 Thread Simon Glass
Convert these boards to use a text environment. For the boards check, the only differences are extra spaces after the semicolons in 'dfu_alt_info_ram' and 'partitions', both of which are permitted. Signed-off-by: Simon Glass --- board/sunxi/sunxi.env | 138

[PATCH 5/6] env: Provide a work-around for unquoting fdtfile

2024-08-07 Thread Simon Glass
Some boards use a CONFIG option to specify the value of this variable. This is normally handled by efi_get_distro_fdt_name() but in the case of sunxi this does not work, since 'soc' is sunxi, but the files are in the allwinner directory. Provide a work-around for this particular case. Signed-off-

[PATCH 4/6] sunxi: Drop old distro boot variables

2024-08-07 Thread Simon Glass
These are not needed as bootstd handles the boot now. Drop them. Signed-off-by: Simon Glass --- include/configs/sunxi-common.h | 75 +- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h i

[PATCH 3/6] sunxi: Move to bootstd

2024-08-07 Thread Simon Glass
Drop support for distroboot and move to using bootstd instead. Signed-off-by: Simon Glass --- arch/arm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index ba0359fed5a..5fb14cb23c0 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kcon

[PATCH 2/6] sunxi: Add a bootmeth for FEL

2024-08-07 Thread Simon Glass
Add support for booting from a script loaded over FEL. This mirrors the bootcmd_fel provided by distro boot. Signed-off-by: Simon Glass --- boot/Kconfig| 14 boot/Makefile | 1 + boot/bootmeth_fel.c | 81 + 3 files changed, 96

[PATCH 1/6] sunxi: Drop BOOTCMD_SUNXI_COMPAT

2024-08-07 Thread Simon Glass
This dates from 2015 and talks about 'old' 3.x kernels. Perhaps we can drop this functionality now? Signed-off-by: Simon Glass --- arch/arm/include/asm/arch-sunxi/clock_sun4i.h | 10 -- arch/arm/mach-sunxi/Kconfig | 12 arch/arm/mach-sunxi/dram_sun4i.c

Re: [PATCH v8 00/23] Introduce the lwIP network stack

2024-08-07 Thread Tom Rini
On Wed, Aug 07, 2024 at 07:11:44PM +0200, Jerome Forissier wrote: > This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip > library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP > stack [2] [3] as an alternative to the current implementation in net/, > sele

[PATCH v2 9/9] doc: introduce led.rst documentation

2024-08-07 Thread Christian Marangi
Introduce simple led.rst documentation to document all the additional Kconfig and the current limitation of LED_BLINK and GPIO software blink. Signed-off-by: Christian Marangi --- doc/api/index.rst | 1 + doc/api/led.rst | 10 ++ include/led.h | 38

[PATCH v2 8/9] ubi: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal ubi write operation. Signed-off-by: Christian Marangi --- cmd/ubi.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/cmd/ubi.c b/cmd/ubi.c index 92998af2b02..

[PATCH v2 7/9] mtd: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal mtd write or erase operations. Signed-off-by: Christian Marangi --- cmd/mtd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/cmd/mtd.c b/cmd/mtd.c index 795aaa2b37d..b

[PATCH v2 6/9] tftp: implement support for LED activity

2024-08-07 Thread Christian Marangi
Implement support for LED activity. If the feature is enabled, make the defined ACTIVITY LED to signal traffic. Signed-off-by: Christian Marangi --- net/tftp.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/tftp.c b/net/tftp.c index 2e073183d5a..45c2455336a 100644 --- a/net/tftp.

[PATCH v2 5/9] led: implement LED activity API

2024-08-07 Thread Christian Marangi
Implement LED activity API similar to BOOT LED API. Usual activity might be a file transfer with TFTP, a flash write... User of this API will call led_activity_on/off/blink() to signal these kind of activity. New Kconfig are implemented similar to BOOT LED, LED_ACTIVITY_ENABLE to enable support

[PATCH v2 4/9] common: board_r: rework BOOT LED handling

2024-08-07 Thread Christian Marangi
Rework BOOT LED handling. There is currently one legacy implementation for BOOT LED from Status Led API. This work on ancient implementation wused by BOOTP by setting the LED to Blink on boot and to turn it OFF when the firmware was correctly received by network. Now that we new LED implementatio

[PATCH v2 3/9] led: implement LED boot API

2024-08-07 Thread Christian Marangi
Implement LED boot API to signal correct boot of the system. led_boot_on/off/blink() are introduced to turn ON, OFF and BLINK the designated boot LED. New Kconfig are introduced, CONFIG_LED_BOOT_ENABLE to enable the feature, CONFIG_LED_BOOT_LABEL to declare the LED label in DT to reference the LE

[PATCH v2 2/9] led: implement led_set_state/period_by_label

2024-08-07 Thread Christian Marangi
Introduce new API led_set_state/period_by label as a shorthand to set LED state and LED blink period by referencing them by label. This is needed for the upcoming additional API that will declare LED in .confg and reference them by their LED label name. Signed-off-by: Christian Marangi --- driv

[PATCH v2 1/9] led: turn LED ON on initial SW blink

2024-08-07 Thread Christian Marangi
We currently init the LED OFF when SW blink is triggered when on_state_change() is called. This can be problematic for very short period as the ON/OFF blink might never trigger. Turn LED ON on initial SW blink to handle this corner case and better display a LED blink from the user. Signed-off-by:

[PATCH v2 0/9] led: introduce LED boot and activity function

2024-08-07 Thread Christian Marangi
This series is a reworked version of the previous seried: misc: introduce STATUS LED activity function This series port and expand the legacy concept of LED boot from the legacy Status LED API to new LED API. One thing that many device need is a way to communicate to the user that the device is

Re: [PATCH v5 00/20] Introduce the lwIP network stack

2024-08-07 Thread Tom Rini
On Wed, Aug 07, 2024 at 08:54:08PM +0200, Michael Nazzareno Trimarchi wrote: > Hi Jerome > > On Thu, Jul 25, 2024 at 2:58 PM Jerome Forissier > wrote: > > > > This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip > > library for the network stack" [1]. The goal is to introduce t

Re: [PATCH v5 00/20] Introduce the lwIP network stack

2024-08-07 Thread Michael Nazzareno Trimarchi
Hi Jerome On Thu, Jul 25, 2024 at 2:58 PM Jerome Forissier wrote: > > This is a rework of a patch series by Maxim Uvarov: "net/lwip: add lwip > library for the network stack" [1]. The goal is to introduce the lwIP TCP/IP > stack [2] [3] as an alternative to the current implementation in net/, > s

  1   2   3   >