[PATCH 2/2] usb: udc: dwc3: Fold dwc3_uboot_handle_interrupt into dm_usb_gadget_handle_interrupts

2024-03-16 Thread Marek Vasut
The only call site of dwc3_uboot_handle_interrupt() is the dm_usb_gadget_handle_interrupts(), fold the former into the later. This makes dwc3_uboot_handle_interrupt() unavailable to be called from board code as well. Signed-off-by: Marek Vasut --- Cc: Angus Ainslie Cc: Caleb Connolly Cc: Eugen

[PATCH 1/2] usb: udc: dwc3: Fold board dm_usb_gadget_handle_interrupts() into DWC3 gadget

2024-03-16 Thread Marek Vasut
The dm_usb_gadget_handle_interrupts() has no place in board code. Move this into DWC3 driver. The OMAP implementation is special, add new weak dwc3_uboot_interrupt_status() function to decide whether DWC3 interrupt handling should be called, and override it in OMAP DWC3 code, to repair the special

Re: [PATCH v2] mmc: Unconditionally call mmc_deinit()

2024-03-16 Thread Dragan Simic
On 2024-03-17 04:01, Marek Vasut wrote: Place the SDR104/HS200/HS400 checks into the mmc_deinit() and always call it. This simplifies the code and removes ifdeffery. No functional change is expected. Reviewed-by: Jaehoon Chung Signed-off-by: Marek Vasut Looking good to me. Reviewed-by:

[PATCH v2] net: phy: Factor out PHY GPIO reset code

2024-03-16 Thread Marek Vasut
Pull the PHY GPIO reset code into separate function, since this is and will be reused multiple times. Set up default reset assert and deassert timing to generous 20ms and 1ms for maximum compatibility in case those DT properties are missing. Reviewed-by: Ramon Fried Signed-off-by: Marek Vasut

[PATCH v2] mmc: Unconditionally call mmc_deinit()

2024-03-16 Thread Marek Vasut
Place the SDR104/HS200/HS400 checks into the mmc_deinit() and always call it. This simplifies the code and removes ifdeffery. No functional change is expected. Reviewed-by: Jaehoon Chung Signed-off-by: Marek Vasut --- Cc: Jaehoon Chung Cc: Peng Fan --- V2: - Add sd_select_mode_and_width and

[PATCH 13/13] rockchip: rk3308-rock-pi-s: Update defconfig

2024-03-16 Thread Jonas Karlman
Update defconfig for rk3308-rock-pi-s with new defaults. Add OF_LIBFDT_OVERLAY=y to support device tree overlays. Remove the SPL_DRIVERS_MISC=y option, no misc driver is used in SPL. Remove BOOTDELAY=0, SYS_CONSOLE_INFO_QUIET=y and enable more CMD to allow use of U-Boot cmdline. Add

[PATCH 12/13] rockchip: rk3308-roc-cc: Update defconfig

2024-03-16 Thread Jonas Karlman
Update defconfig for rk3308-roc-cc with new defaults. Add OF_LIBFDT_OVERLAY=y to support device tree overlays. Remove the SPL_DRIVERS_MISC=y option, no misc driver is used in SPL. Remove BOOTDELAY=0, SYS_CONSOLE_INFO_QUIET=y and enable more CMD to allow use of U-Boot cmdline. Add DM_ETH_PHY=y

[PATCH 10/13] rockchip: rk3308: Sync device tree from linux v6.8

2024-03-16 Thread Jonas Karlman
Sync device tree from linux v6.8 and rename the rockchip,rk3308-mac compatible in gmac_rockchip driver to match upstream linux. Also move rk3308-roc-cc gmac node to u-boot.dtsi to not break features not enabled in upstream device tree. Signed-off-by: Jonas Karlman ---

[PATCH 11/13] rockchip: rk3308-evb: Update defconfig

2024-03-16 Thread Jonas Karlman
Update defconfig for rk3308-evb with new defaults. Add OF_LIBFDT_OVERLAY=y to support device tree overlays. Remove the SPL_DRIVERS_MISC=y option, no misc driver is used in SPL. Remove BOOTDELAY=0, SYS_CONSOLE_INFO_QUIET=y and enable more CMD to allow use of U-Boot cmdline. Add DM_ETH_PHY=y and

[PATCH 08/13] clk: rockchip: rk3308: Add dummy support for USB480M clock

2024-03-16 Thread Jonas Karlman
Add dummy support for setting parent of USB480M clock. Signed-off-by: Jonas Karlman --- drivers/clk/rockchip/clk_rk3308.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/clk/rockchip/clk_rk3308.c b/drivers/clk/rockchip/clk_rk3308.c index 7515fc8bb244..c46b58e31626 100644 ---

[PATCH 09/13] phy: rockchip-inno-usb2: Add support for RK3308

2024-03-16 Thread Jonas Karlman
Add clkout_ctl and phy_sus regs to support USB2PHY for RK3308. Based on linux commit 31f840e7ff3e ("phy: phy-rockchip-inno-usb2: add support for RK3308 USB phy"). Signed-off-by: Jonas Karlman --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 20 +++ 1 file changed, 20

[PATCH 07/13] clk: rockchip: rk3308: Add support for SCLK_RTC32K clock

2024-03-16 Thread Jonas Karlman
From: Finley Xiao Add support to get and set the SCLK_RTC32K clock rate. Signed-off-by: Finley Xiao [jo...@kwiboo.se: Update commit message] Signed-off-by: Jonas Karlman --- arch/arm/include/asm/arch-rk3308/cru_rk3308.h | 14 +++ drivers/clk/rockchip/clk_rk3308.c | 95

[PATCH 06/13] rockchip: rk3308: Fix loading FIT from SD-card when booting from eMMC

2024-03-16 Thread Jonas Karlman
When RK3308 boards run SPL from eMMC and fail to load FIT from eMMC due to it being missing or checksum validation fails there can be a fallback to read FIT from SD-card. However, without proper pinctrl configuration reading FIT from SD-card may fail: U-Boot SPL 2024.04-rc4 (Mar 16 2024 -

[PATCH 05/13] rockchip: rk3308: Enable random generator

2024-03-16 Thread Jonas Karlman
The RK3308 SoC contain a crypto engine block that can generate random numbers. Add rng node to soc u-boot.dtsi and enable Kconfig options to take advantage of the random generator. Signed-off-by: Jonas Karlman --- arch/arm/dts/rk3308-u-boot.dtsi | 5 + arch/arm/mach-rockchip/Kconfig | 2

[PATCH 04/13] rockchip: rk3308: Generate ethaddr based on cpu id

2024-03-16 Thread Jonas Karlman
Like other Rockchip SoCs the RK3308 has cpu id programmed into OTP memory. The rockchip_otp driver already support the RK3308 variant. However, the device tree is missing a node to enable use of OTP. Add the missing otp node to soc u-boot.dtsi, enable the rockchip_otp driver and enable use of

[PATCH 03/13] rockchip: rk3308: Enable ARMv8 crypto and FIT checksum validation

2024-03-16 Thread Jonas Karlman
The RK3308 SoC support ARMv8 Cryptography Extensions and use of the ARMv8 crypto extensions help speed up FIT checksum validation in SPL. Imply ARMV8_SET_SMPEN and ARMV8_CRYPTO to take advantage of the crypto extensions for SHA256 when validating checksum of FIT images. Imply SPL_FIT_SIGNATURE

[PATCH 02/13] rockchip: rk3308: Sort imply statements alphabetically

2024-03-16 Thread Jonas Karlman
Sort imply statements under ROCKCHIP_RK3308 alphabetically and remove the config SPL_SERIAL statement from soc Kconfig file, it is already implyed in arch Kconfig. Signed-off-by: Jonas Karlman --- arch/arm/mach-rockchip/Kconfig| 8 arch/arm/mach-rockchip/rk3308/Kconfig | 3 ---

[PATCH 00/13] rockchip: rk3308: Sync DT with linux v6.8 and update defconfigs

2024-03-16 Thread Jonas Karlman
This series adds support for new clocks used in linux v6.8 device trees, enables use of FIT signature check for checksum validation and fixes loading FIT from SD-card when loading FIT from eMMC fails. After this series it should be possible to move RK3308 boards to use OF_UPSTREAM in a future

[PATCH 01/13] board: rockchip: rk3308: Add device tree files and myself to MAINTAINERS

2024-03-16 Thread Jonas Karlman
Update MAINTAINERS files for RK3308 boards to include related device tree files. Also add myself as a reviewer for the ROCK Pi S board. Signed-off-by: Jonas Karlman --- board/firefly/firefly-rk3308/MAINTAINERS | 1 + board/rockchip/evb_rk3308/MAINTAINERS| 5 +++-- 2 files changed, 4

[PATCH v3 7/7] efi_selftest: Update StrToFat() unit test after CP473 map extension

2024-03-16 Thread Janne Grunau via B4 Relay
From: Janne Grunau Test that Unicode code points which map to CP437 code points 1-31 are converted to '_'. This ensures no FAT file names do not contain chars which are control characters in other code pages (CP 1250 for example). Signed-off-by: Janne Grunau ---

[PATCH v3 2/7] video: console: Parse UTF-8 character sequences

2024-03-16 Thread Janne Grunau via B4 Relay
From: Janne Grunau efi_console / UEFI applications (grub2, sd-boot, ...) pass UTF-8 character sequences to vidconsole which results in wrong glyphs for code points outside of ASCII. The truetype console expects Unicode code points and bitmap font based consoles expect code page 437 code points.

[PATCH v3 1/7] lib: charset: Fix and extend utf8_to_utf32_stream() documentation

2024-03-16 Thread Janne Grunau via B4 Relay
From: Janne Grunau Suggested-by: Heinrich Schuchardt Reviewed-by: Heinrich Schuchardt Signed-off-by: Janne Grunau --- include/charset.h | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/include/charset.h b/include/charset.h index 44034c71d3..f1050c903d

[PATCH v3 6/7] efi_selftest: Add geometric shapes character selftest

2024-03-16 Thread Janne Grunau via B4 Relay
From: Janne Grunau Draw symbols from Unicode's "Geometric shapes" page which translate to code page 437 code points 1-31. These are used by UEFI applications to draw user interfaces using EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. The output has to be checked manually on the screen for correctness.

[PATCH v3 5/7] efi_selftest: Add box drawing character selftest

2024-03-16 Thread Janne Grunau via B4 Relay
From: Andre Przywara UEFI applications rely on Unicode output capability, and might use that for drawing pseudo-graphical interfaces using Unicode defined box drawing characters. Add a simple test to display the most basic box characters, which would need to be checked manually on the screen

[PATCH v3 4/7] efi_selftest: Add international characters test

2024-03-16 Thread Janne Grunau via B4 Relay
From: Andre Przywara UEFI relies entirely on unicode output, which actual fonts displayed on the screen might not be ready for. Add a test displaying some international characters, to reveal missing glyphs, especially in our builtin fonts. This would be needed to be manually checked on the

[PATCH v3 0/7] video: Add UTF-8 support for UEFI applications

2024-03-16 Thread Janne Grunau via B4 Relay
Andre submitted 2 years ago DM_VIDEO improvements for UEFI applications using UEFI's EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL but did not follow with suggested changes. This series takes care of the UTF-8 support which required to draw symbol and box drawing characters used by UEFI applications like grub2

[PATCH v3 3/7] lib/charset: Map Unicode code points to CP437 code points 1-31

2024-03-16 Thread Janne Grunau via B4 Relay
From: Janne Grunau Code page 437 uses code points 1-31 for glyphs instead of control characters. Map the appropriate Unicode code points to this code points. Fixes rendering of grub2's menu as EFI application using the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL on a console with bitmap fonts.

[PATCH v4] mmc: Poll CD in case cyclic framework is enabled

2024-03-16 Thread Marek Vasut
In case the cyclic framework is enabled, poll the card detect of already initialized cards and deinitialize them in case they are removed. Since the card initialization is a longer process and card initialization is done on first access to an uninitialized card anyway, avoid initializing newly

[PATCH 3/3] configs: amlogic: set board family to avoid random MAC on WeTek Hub/Play2

2024-03-16 Thread Christian Hewitt
Add CONFIG_SYS_BOARD="p200" to the Hub/Play2 board configs to ensure the factory programmed MAC is correctly read from efuse. Signed-off-by: Christian Hewitt --- configs/wetek-hub_defconfig | 1 + configs/wetek-play2_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git

[PATCH 2/3] ARM: board: meson: update efuse MAC reading code

2024-03-16 Thread Christian Hewitt
Current code used for reading the factory programmed MAC from efuse on p200 boards does not appear to work resulting in a random MAC being generated. Update the p200 board data reusing the function from the VIM3 source. Signed-off-by: Christian Hewitt --- board/amlogic/p200/p200.c | 35

[PATCH 1/3] ARM: dts: fix Ethernet on WeTek Hub/Play2

2024-03-16 Thread Christian Hewitt
Placing the snps,reset content needed for Ethernet to probe in a common uboot.dtsi results in the content not being used and broken Ethernet. Fix this by creating two board specific dtsi files with the right content. Fixes: 67d5128df950 ("ARM: dts: add support for WeTek Hub and WeTek Play2")

[PATCH 0/3] ARM: dts: fix Ethernet and random MAC's on WeTek Hub/Play2

2024-03-16 Thread Christian Hewitt
In submitting the original patches for WeTek Hub/Play2 I appear to have squashed an experimental change to place the u-boot.dtsi file on the common board dtsi, but this was incorrect and results in broken Ethernet. Patch 1 creates per-board u-boot.dtsi files to fix that. However, while the NIC is

[PATCH 1/1] doc: typo Synopis

2024-03-16 Thread Heinrich Schuchardt
%s/Synopis/Synopsis/g Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/acpi.rst | 4 ++-- doc/usage/cmd/bootdev.rst | 4 ++-- doc/usage/cmd/bootflow.rst | 4 ++-- doc/usage/cmd/bootmeth.rst | 4 ++-- doc/usage/cmd/cbsysinfo.rst | 4 ++-- doc/usage/cmd/cedit.rst | 4 ++--

[PATCH] doc: man-page for if

2024-03-16 Thread Heinrich Schuchardt
Provide a man-page for the if command. Signed-off-by: Heinrich Schuchardt --- doc/usage/cmd/if.rst | 72 doc/usage/index.rst | 1 + 2 files changed, 73 insertions(+) create mode 100644 doc/usage/cmd/if.rst diff --git a/doc/usage/cmd/if.rst

[PATCH 3/3] cmd: bootefi: error handling bootefi selftest

2024-03-16 Thread Heinrich Schuchardt
If bootefi selftest is executed and a problem with the device-tree installation occurs, efi_install_fdt() writes sensible error messages. It never returns EFI_INVALID_PARAMETER. It neither makes sense to check for EFI_INVALID_PARAMETER nor to show the usage help for the bootefi command in this

[PATCH 1/3] efi_loader: correct handling of EFI binary return code

2024-03-16 Thread Heinrich Schuchardt
Running an EFI binary loaded via tftp using the bootefi command results in showing the usage help. We should not try to remove protocol interfaces from a NULL handle. Fixes: 6422820ac3e5 ("efi_loader: split unrelated code from efi_bootmgr.c") Signed-off-by: Heinrich Schuchardt ---

[PATCH 2/3] cmd: bootefi: Don't show usage help if EFI binary fails.

2024-03-16 Thread Heinrich Schuchardt
If an EFI binary returns an error code EFI_INVALID_PARAMETER, we show the usage help for the bootefi command: Shell> exit 0x8002 ## Application failed, r = 2 bootefi - Boots an EFI payload from memory Usage: bootefi [:] [] - boot EFI payload bootefi

[PATCH 0/3] cmd: bootefi: fix error handling

2024-03-16 Thread Heinrich Schuchardt
efi_run_image() tries to remove protocol interfaces from a NULL handle and returns EFI_INVALID_PARAMETER. If an EFI binary returns an error code EFI_INVALID_PARAMETER, we show the usage help for the bootefi command which makes no sense. If bootefi selftest is executed and a problem with the