]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
2 years agomtd: spi-nor: Add support for zBIT ZB25VQ128
Andre Przywara [Mon, 13 Nov 2023 01:16:48 +0000 (01:16 +0000)] 
mtd: spi-nor: Add support for zBIT ZB25VQ128

Add support for the zBIT ZB25VQ128 (128M-bit) SPI NOR flash memory chip,
as used on the Xunlong Orange Pi Zero 3 board.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
2 years agosunxi: dts: arm64: update emac for Orange Pi Zero 3
Chukun Pan [Sun, 29 Oct 2023 07:40:09 +0000 (15:40 +0800)] 
sunxi: dts: arm64: update emac for Orange Pi Zero 3

The current emac setting is not suitable for Orange Pi Zero 3,
move it back to Orange Pi Zero 2 DT. Also update phy mode and
delay values for emac on Orange Pi Zero 3.
With these changes, Ethernet now looks stable.

Fixes: 95c3b0635ea4 ("sunxi: dts: arm64: update devicetree files from Linux-v6.6-rc6")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
2 years agosunxi: correct documentation for SPI flashing
Stephen Graf [Fri, 1 Dec 2023 18:50:39 +0000 (10:50 -0800)] 
sunxi: correct documentation for SPI flashing

The mtd_debug write does not work in this context. The flashcp command does
work, provides both the erase and write functions and with the verbose
option gives good feedback.

Signed-off-by: Stephen Graf <stephen.graf@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: h616: (really) lower SPL stack address to avoid BROM data
Andre Przywara [Wed, 13 Jul 2022 15:27:57 +0000 (16:27 +0100)] 
sunxi: h616: (really) lower SPL stack address to avoid BROM data

When using the USB OTG FEL mode on the Allwinner H616, the BootROM
stores some data at the end of SRAM C. This is also the location where
we place the initial SPL stack, so it will overwrite this data.
We still need the BROM code after running the SPL, so should leave that
area alone.
Interestingly this does not seem to have an adverse effect, I guess on
the "way out" (when we return to FEL after the SPL has run), this data
is not needed by the BROM, for just the trailing end of the USB operation.
However this is still wrong, and we should not clobber BROM data.

Lower the SPL stack address to be situated right below the swap buffers
we use in sunxi-fel: that should be out of the way of everyone else.

This obsoletes a previous commit (eb53e7743c8f) with the same name:
that one was changing the address in an *unused* macro in sunxi_common.h,
so the previous patch didn't have any effect at all.

Fixes: eb53e7743c8f ("sunxi: h616: lower SPL stack address to avoid BROM data")
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agosunxi: H616: OrangePi Zero 2: enable USB power supply
Andre Przywara [Sat, 25 Nov 2023 17:43:16 +0000 (17:43 +0000)] 
sunxi: H616: OrangePi Zero 2: enable USB power supply

The OrangePi Zero 2 has a USB VBUS regulator, controlled by pin PC16.
This is correctly described in the DT, but the patches for supporting
this are still pending.

Meanwhile add our good old CONFIG_USB1_VBUS_PIN to the defconfig file,
to enable power on the USB port and allow using a USB flash drive, for
instance.

Fixes: 6acc5fa581b4 ("sunxi: H616: enable USB support for H616 boards")
Reported-by: Mikhail Kalashnikov <iuncuim@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2 years agomtd: spi-nor: Add support for Silicon Kaiser sk25lp128
Jonas Karlman [Wed, 26 Jul 2023 21:44:03 +0000 (21:44 +0000)] 
mtd: spi-nor: Add support for Silicon Kaiser sk25lp128

Add support for Silicon Kaiser sk25lp128 SPI NOR flash found in Pine64
PinePhone Pro and PineTab2.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2 years agospi: bcm63xx-hsspi: Fix compiler warning
William Zhang [Sat, 12 Aug 2023 02:03:19 +0000 (19:03 -0700)] 
spi: bcm63xx-hsspi: Fix compiler warning

When build for arm64 target, comipler reports the following warning:
drivers/spi/bcm63xx_hsspi.c: In function ‘bcm63xx_hsspi_xfer_dummy_cs’:
include/linux/kernel.h:184:17: warning: comparison of distinct pointer
types lacks a cast
  184 |  (void) (&_min1 == &_min2);  \
      |                 ^~
drivers/spi/bcm63xx_hsspi.c:298:22: note: in expansion of macro ‘min’
  298 |   size_t curr_step = min(step_size, data_bytes);

This change fix this warning by casting the data_bytes to size_t.

Fixes: 0e144ec38cbb ("spi: bcm63xx-hsspi: Add prepend mode support")
Signed-off-by: William Zhang <william.zhang@broadcom.com>
2 years agostarfive: visionfive2: add device tree overlay support
John Clark [Mon, 20 Nov 2023 02:35:31 +0000 (02:35 +0000)] 
starfive: visionfive2: add device tree overlay support

device tree overlay support requires fdtoverlay_addr_r to be set

before
~~~~~~
Invalid fdtoverlay_addr_r for loading overlays

after
~~~~~
Retrieving file: /boot/overlay/rtc-ds3231.dtbo

Signed-off-by: John Clark <inindev@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: binman: fix the load field format
Randolph [Fri, 17 Nov 2023 10:39:50 +0000 (18:39 +0800)] 
riscv: binman: fix the load field format

Using /bits/ 64 prefix for 64 bits address

Signed-off-by: Randolph <randolph@andestech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoriscv: andes: Fix enable register settings of PLICSW
Yu Chien Peter Lin [Thu, 16 Nov 2023 12:46:12 +0000 (20:46 +0800)] 
riscv: andes: Fix enable register settings of PLICSW

On 32-core platform, hart31 gets stuck at secondary_hart_loop
as the corresponding enable bit is not set in enable_ipi().
We should program the next word (0x2f84) which is assigned
as the enable register of hart31. It should be done in the same
way when we invoke riscv_send_ipi() to trigger software interrupt
on hart31.

The following diagram shows the enable bits of the fixed PLICSW
scheme.

   Pending regs: 0x1000  x---0---0---0---0------0---0
Pending hart ID:             0   1   2   3 ... 30  31
   Interrupt ID:         0   1   2   3   4 ... 31  32
                         |   |   |   |   |      |   |
    Enable regs: 0x2000  x---1---0---0---0-...--0---0---> hart0
                         |   |   |   |   |      |   |
                 0x2080  x---0---1---0---0-...--0---0---> hart1
                         |   |   |   |   |      |   |
                 0x2100  x---0---0---1---0-...--0---0---> hart2
                         |   |   |   |   |      |   |
                 0x2180  x---0---0---0---1-...--0---0---> hart3
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                         .   .   .   .   .      .   .
                 0x2f00  x---0---0---0---0-...--1---0---> hart30
                         |   |   |   |   |      |   |
                 0x2f80  x---0---0---0---0-...--0---1---> hart31
                         <-------- word 0 -------><--- word 1 --->

This patch includes some cleanups to macros/functions.

Fixes: ebf11273220a ("riscv: andes: Rearrange Andes PLICSW to single-bit-per-hart strategy")
Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Reviewed-by: Randolph <randolph@andestech.com>
2 years agorisc-v: qemu: imply NVME_PCI
Heinrich Schuchardt [Thu, 16 Nov 2023 10:22:51 +0000 (11:22 +0100)] 
risc-v: qemu: imply NVME_PCI

CONFIG_NVME=y without CONFIG_NVME_PCI=y does not provide working NVMe
support. Instead of implying CONFIG_NVME we must imply CONFIG_NVME_PCI
which will select CONFIG_NVME.

Fixes: e64db0d92e32 ("riscv: qemu: Enable e1000 and nvme support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2 years agoconfigs: visionfive2: Enable watchdog driver
Chanho Park [Sun, 5 Nov 2023 23:13:18 +0000 (08:13 +0900)] 
configs: visionfive2: Enable watchdog driver

Enables StarFive Watchdog driver and WDT command.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoriscv: dts: jh7110: Add watchdog device tree node
Chanho Park [Sun, 5 Nov 2023 23:13:17 +0000 (08:13 +0900)] 
riscv: dts: jh7110: Add watchdog device tree node

Adds jh7110 watchdog device tree node.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agowatchdog: Add StarFive Watchdog driver
Chanho Park [Sun, 5 Nov 2023 23:13:16 +0000 (08:13 +0900)] 
watchdog: Add StarFive Watchdog driver

Add to support StarFive watchdog driver. The driver is imported from
linux kernel's drivers/watchdog/starfive-wdt.c without jh7100 support
because there is no support of jh7100 SoC in u-boot yet.
Howver, this patch has been kept the variant coding style because JH7100
can be added later and have a consistency with the linux driver.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoclk: starfive: jh7110: Add watchdog clocks
Chanho Park [Sun, 5 Nov 2023 23:13:15 +0000 (08:13 +0900)] 
clk: starfive: jh7110: Add watchdog clocks

Add JH7110_SYSCLK_WDT_APB and JH7110_SYSCLK_WDT_CORE clocks for JH7110
watchdog device.

Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2 years agoMerge tag 'v2024.01-rc4' into next
Tom Rini [Tue, 5 Dec 2023 02:39:57 +0000 (21:39 -0500)] 
Merge tag 'v2024.01-rc4' into next

Prepare v2024.01-rc4

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmVuHrwACgkQFHw5/5Y0
# tyy3Tgv+LB/X0ZR3IHnu1mvQ7kpOFvAjjKr0BUpcEEzsrDZeJnS6sy06m+REez2E
# UmuLeKFj5NUCYXNKtxn2+gVnJt8Tk6ftxhMTiZHmR4Y4NVc5aPtqYmVsv6Q29j0U
# mcg7AGcZTniu9/naNM+ZcDeHzLDAB0whmE9eVfixXVgyitILoLHNdFiQ7W4oR7Kh
# /mBgdMDBS3rqiRi6CuqKUnl4ADX8T3AXaSfi3hqOC5Pj+HPkZSUfyWx31mu9mN1D
# wXTHASZX06Dop25fm/ZSdWk1blBw29WqRiJBdwNatvyC5pqMsotTvAfH2AcHBEYg
# tpoper+WDOBAipt6b6Y1B7q4VPvJ97L9dFCAYqN0nGCe+rkdi+k+cly7M6Ye9xLt
# e7rVUfnKgIMP8jkLcVBYoWkFY5FiJ82O5qjoF5N3dAuHeWacDFsB5TugDTOQvblH
# LWCmcIyU1N9Ma/Ib0rTvNduvpBUYBKXYlD1+rjPZUbTUnfc79mf+ReFpcoW6Kxh+
# bkz81p8P
# =ebIZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 04 Dec 2023 01:47:24 PM EST
# gpg:                using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C
# gpg: Good signature from "Thomas Rini <trini@konsulko.com>" [ultimate]

2 years agoefi_loader: Make DisconnectController follow the EFI spec
Ilias Apalodimas [Tue, 28 Nov 2023 19:10:31 +0000 (21:10 +0200)] 
efi_loader: Make DisconnectController follow the EFI spec

commit 239d59a65e20 ("efi_loader: reconnect drivers on failure")
tried to fix the UninstallProtocol interface which must reconnect
any controllers it disconnected by calling ConnectController()
in case of failure. However, the reconnect functionality was wired in
efi_disconnect_all_drivers() instead of efi_uninstall_protocol().

As a result some SCT tests started failing.
Specifically, BBTestOpenProtocolInterfaceTest333CheckPoint3() test
 - Calls ConnectController for DriverImageHandle1
 - Calls DisconnectController for DriverImageHandle1 which will
   disconnect everything apart from TestProtocol4. That will remain
   open on purpose.
 - Calls ConnectController for DriverImageHandle2. TestProtocol4
   which was explicitly preserved was installed wth BY_DRIVER attributes.
   The new protocol will call DisconnectController since its attributes
   are BY_DRIVER|EXCLUSIVE, but TestProtocol4 will not be removed. The
   test expects EFI_ACCESS_DENIED which works fine.

   The problem is that DisconnectController, will eventually call
   EFI_DRIVER_BINDING_PROTOCOL.Stop(). But on the aforementioned test
   this will call CloseProtocol -- the binding protocol is defined in
   'DBindingDriver3.c' and the .Stop function uses CloseProtocol.
   If that close protocol call fails with EFI_NOT_FOUND, the current code
   will try to mistakenly reconnect all drivers and the subsequent tests
   that rely on the device being disconnected will fail.

Move the reconnection in efi_uninstall_protocol() were it belongs.

Fixes: commit 239d59a65e20 ("efi_loader: reconnect drivers on failure")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi_loader: create memory reservations in ACPI case
Heinrich Schuchardt [Thu, 16 Nov 2023 09:29:28 +0000 (10:29 +0100)] 
efi_loader: create memory reservations in ACPI case

ACPI tables cannot convey memory reservations for ARM and RISC-V.
x86 uses the BIOS E820 table for this purpose. We cannot simply ignore the
device-tree when booting via ACPI. We have to assign EfiReservedMemory
according to the prior stage device-tree ($fdtaddr) or as fallback the
control device-tree ($fdtcontroladdr).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoefi: Correct display of table GUIDs
Simon Glass [Sun, 12 Nov 2023 20:55:10 +0000 (13:55 -0700)] 
efi: Correct display of table GUIDs

The printf() %pU option decodes GUIDs so it is not necessary to do this
first. Drop the incorrect code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoefi: Collect the ACPI tables in the app
Simon Glass [Sun, 12 Nov 2023 20:55:09 +0000 (13:55 -0700)] 
efi: Collect the ACPI tables in the app

Locate these so that they can be displayed using the 'acpi' command.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoscripts/Makefile.lib: print error when no public key is specified
Masahisa Kojima [Fri, 27 Oct 2023 07:43:26 +0000 (16:43 +0900)] 
scripts/Makefile.lib: print error when no public key is specified

The current build system embeds the EFI Signature List(ESL)
into the dtb to be used in the EFI capsule authentication.
This ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE
Kconfig option. If CONFIG_EFI_CAPSULE_ESL_FILE is not specified,
U-boot build ends up with failure but the cause of failure is not
easily understandable. Current error message is as follows.

FATAL ERROR: Error reading file into data: Is a directoryCheck /home/ubuntu/src/ledge/u-boot/arch/arm/dts/.synquacer-sc2a11-developerbox.dtb.pre.tmp for errors
make[2]: *** [scripts/Makefile.lib:355: arch/arm/dts/synquacer-sc2a11-developerbox.dtb] Error 1
make[1]: *** [dts/Makefile:44: arch-dtbs] Error 2
make: *** [Makefile:1165: dts/dt.dtb] Error 2
make: *** Waiting for unfinished jobs....

This commit shows the error message that CONFIG_EFI_CAPSULE_ESL_FILE
must be specified when the EFI capsule authentication is enabled, then
terminate the build with error.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Reviewed-by: Weizhao Ouyang <o451686892@gmail.com>
2 years agodoc: sending_patches.rst: s/Superseeded/Superseded
Mattijs Korpershoek [Tue, 21 Nov 2023 16:27:38 +0000 (17:27 +0100)] 
doc: sending_patches.rst: s/Superseeded/Superseded

This is a common typo listed in scripts/spelling.txt. Fix it to match the
patchwork status, which is superseded.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agodoc: clang: Update and correct support notes
Tom Rini [Tue, 21 Nov 2023 15:41:07 +0000 (10:41 -0500)] 
doc: clang: Update and correct support notes

At this point, clang can be used on both 32bit and 64bit targets without
issue. Make note of logic we have that will inform clang of the
architecture to build for.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agosandbox: Fix VPL instructions
Simon Glass [Sun, 19 Nov 2023 15:18:07 +0000 (08:18 -0700)] 
sandbox: Fix VPL instructions

Fix the devicetree used with sandbox. This is needed because the
default (full) devicetree must be used by all phases of boot, with
sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 years agoPrepare v2024.01-rc4 v2024.01-rc4
Tom Rini [Mon, 4 Dec 2023 18:46:56 +0000 (13:46 -0500)] 
Prepare v2024.01-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoefi_loader: generated SMBIOS table below 4 GiB
Heinrich Schuchardt [Mon, 20 Nov 2023 22:25:58 +0000 (23:25 +0100)] 
efi_loader: generated SMBIOS table below 4 GiB

We currently use an outdated format 32-bit format for SMBIOS tables.
So we must allocate SMBIOS tables below 4 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog
Tom Rini [Mon, 4 Dec 2023 18:37:18 +0000 (13:37 -0500)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-watchdog

- Correct watchdog timeout print message (Chanho Park)

2 years agowatchdog: Correct watchdog timeout print message
Chanho Park [Sun, 3 Dec 2023 08:30:40 +0000 (17:30 +0900)] 
watchdog: Correct watchdog timeout print message

The wdt_start function takes timeout_ms as a parameter and starts the
watchdog with this value. However, when you output the message, it shows
the default timeout value for the watchdog device.
So this patch fixes that part to output the correct timeout value.

Before -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (60s timeout)

After -->
StarFive # wdt start 3000
WDT:   Started watchdog@13070000 without servicing  (3s timeout)

Fixes: c2fd0ca1a822 ("watchdog: Integrate watchdog triggering into the cyclic framework")
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoMerge branch 'master-rpc-off' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 3 Dec 2023 21:30:32 +0000 (16:30 -0500)] 
Merge branch 'master-rpc-off' of https://source.denx.de/u-boot/custodians/u-boot-sh

2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Sat, 2 Dec 2023 18:37:27 +0000 (13:37 -0500)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb

- USB XHCI fixes

2 years agoARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board
Cong Dang [Mon, 19 Jun 2023 22:41:50 +0000 (00:41 +0200)] 
ARM: dts: renesas: Disable RPC driver on R8A779G0 V4H White Hawk board

As requirement of CR side, QSPI Flash usage via RPC driver shall
be disabled and leaving the control of this module to CR side.
Perform DT modification to disable the RPC SPI.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Cong Dang <cong.dang.xn@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Do not modify defconfig, modify the DT instead, this way
        the RPC SPI can be enabled without recompiling the U-Boot
itself. Update commit message accordingly.]

2 years agoARM: dts: renesas: Clean up R8A779G0 V4H RPC SPI DT node
Marek Vasut [Mon, 19 Jun 2023 22:41:49 +0000 (00:41 +0200)] 
ARM: dts: renesas: Clean up R8A779G0 V4H RPC SPI DT node

Use the phandle reference to &rpc node in arch/arm/dts/r8a779g0.dtsi
and remove properties which are already in arch/arm/dts/r8a779g0.dtsi.
No functional change and no resulting DT change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 years agousb: USB_XHCI_PCI depends on PCI
Heinrich Schuchardt [Mon, 20 Nov 2023 14:56:36 +0000 (15:56 +0100)] 
usb: USB_XHCI_PCI depends on PCI

Compiling with CONFIG_USB_XHCI_PCI and CONFIG_PCI=n results in

    usb/host/xhci-pci.c:48:(.text.xhci_pci_probe+0x44):
    undefined reference to `dm_pci_write_config32

Add the missing Kconfig dependency.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: dwc3-generic: Use combined glue and ctrl node for RK3588
Jonas Karlman [Sun, 12 Nov 2023 15:25:25 +0000 (15:25 +0000)] 
usb: dwc3-generic: Use combined glue and ctrl node for RK3588

Like Rockchip RK3328 and RK3568, the RK3588 also have a single node to
represent the glue and ctrl for USB 3.0.

Use rk_ops as driver data to select correct ctrl node for RK3588 DWC3.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: storage: Use the correct CBW lengths
Hector Martin [Sun, 29 Oct 2023 07:23:30 +0000 (16:23 +0900)] 
usb: storage: Use the correct CBW lengths

USB UFI uses fixed 12-byte commands (as does RBC, which is not
supported), but SCSI does not have this limitation. Use the correct
command block lengths depending on the subclass.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: hub: Add missing reset recovery delay
Hector Martin [Sun, 29 Oct 2023 07:09:09 +0000 (16:09 +0900)] 
usb: hub: Add missing reset recovery delay

Some devices like YubiKeys need more time before SET_ADDRESS. The spec
says we need to wait 10ms.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Fix DMA address calculation in queue_trb
Hector Martin [Sun, 29 Oct 2023 06:37:44 +0000 (15:37 +0900)] 
usb: xhci: Fix DMA address calculation in queue_trb

We need to get the DMA address before incrementing the pointer, as that
might move us onto another segment.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Do not panic on event timeouts
Hector Martin [Sun, 29 Oct 2023 06:37:43 +0000 (15:37 +0900)] 
usb: xhci: Do not panic on event timeouts

Now that we always check the return value, just return NULL on timeouts.
We can still log the error since this is a problem, but it's not reason
to panic.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Fail on attempt to queue TRBs to a halted endpoint
Hector Martin [Sun, 29 Oct 2023 06:37:42 +0000 (15:37 +0900)] 
usb: xhci: Fail on attempt to queue TRBs to a halted endpoint

This isn't going to work, don't pretend it will and then end up timing
out.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Recover from halted bulk endpoints
Hector Martin [Sun, 29 Oct 2023 06:37:41 +0000 (15:37 +0900)] 
usb: xhci: Recover from halted bulk endpoints

There is currently no codepath to recover from this case. In principle
we could require that the upper layer do this explicitly, but let's just
do it in xHCI when the next bulk transfer is started, since that
reasonably implies whatever caused the problem has been dealt with.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Allow context state errors when halting an endpoint
Hector Martin [Sun, 29 Oct 2023 06:37:40 +0000 (15:37 +0900)] 
usb: xhci: Allow context state errors when halting an endpoint

There is a race where an endpoint may halt by itself while we are trying
to halt it, which results in a context state error. See xHCI 4.6.9 which
mentions this case.

This also avoids BUGging when we attempt to stop an endpoint which was
already stopped to begin with, which is probably a bug elsewhere but
not a good reason to crash.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Better error handling in abort_td()
Hector Martin [Sun, 29 Oct 2023 06:37:39 +0000 (15:37 +0900)] 
usb: xhci: Better error handling in abort_td()

If the xHC has a problem with our STOP ENDPOINT command, it is likely to
return a completion directly instead of first a transfer event for the
in-progress transfer. Handle that more gracefully.

We still BUG() on the error code, but at least we don't end up timing
out on the event and ending up with unexpected event errors.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agousb: xhci: Guard all calls to xhci_wait_for_event
Hector Martin [Sun, 29 Oct 2023 06:37:38 +0000 (15:37 +0900)] 
usb: xhci: Guard all calls to xhci_wait_for_event

xhci_wait_for_event returns NULL on timeout, so the caller always has to
check for that. This addresses immediate explosions in this part
of the code when timeouts happen, but not the root cause for the
timeout.

Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Marek Vasut <marex@denx.de>
2 years agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into...
Tom Rini [Thu, 30 Nov 2023 14:33:31 +0000 (09:33 -0500)] 
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra into next

Device tree improvents for Paz00 and DM PMIC convertion of recently
merged Tegra boards.

2 years agoMerge branch '2023-11-29-assorted-platform-updates' into next
Tom Rini [Wed, 29 Nov 2023 16:16:13 +0000 (11:16 -0500)] 
Merge branch '2023-11-29-assorted-platform-updates' into next

- Add a TFTP put test, a few TI Keystone 2 updates, fix stack-protector
  for PowerPC, fixes in lib/slre, timer-uclass and pvblock.

2 years agoARM: keystone2: Remove unneeded inclusions of common.h
Andrew Davis [Fri, 17 Nov 2023 22:38:29 +0000 (16:38 -0600)] 
ARM: keystone2: Remove unneeded inclusions of common.h

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoconfigs: keystone2: Do not include hardware.h
Andrew Davis [Fri, 17 Nov 2023 22:38:28 +0000 (16:38 -0600)] 
configs: keystone2: Do not include hardware.h

This is a hacky way to have this file included in all source files that
include common.h, instead just include from the files that need it.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoconfigs: keystone2: Remove unused SPL_MALLOC_F_SIZE and KEYSTONE_SPL_STACK_SIZE
Andrew Davis [Fri, 17 Nov 2023 22:38:27 +0000 (16:38 -0600)] 
configs: keystone2: Remove unused SPL_MALLOC_F_SIZE and KEYSTONE_SPL_STACK_SIZE

These are leftover definitions. While here cleanup some leftover comments.

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoFix stack-protector for powerpc
Christophe Leroy [Wed, 15 Nov 2023 18:36:36 +0000 (19:36 +0100)] 
Fix stack-protector for powerpc

On powerpc, stack protector expects a function called
__stack_chk_fail_local() instead of __stack_chk_fail()

And some versions of GCC for powerpc default to TLS canary
instead of global canary, so always force GCC to use global
canary with -mstack-protector-guard=global

Cc: Joel Peshkin <joel.peshkin@broadcom.com>
Fixes: 4e9bce12432 ("Add support for stack-protector")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2 years agoxen: pvblock: fix the maximum io size in one operation
AKASHI Takahiro [Wed, 15 Nov 2023 01:53:45 +0000 (10:53 +0900)] 
xen: pvblock: fix the maximum io size in one operation

The current implementation may cause BUG_ON() in blkfront_aio()
BUG_ON(n > BLKIF_MAX_SEGMENTS_PER_REQUEST);

In pvblock_iop(), a read/write operation will be split into smaller
chunks of data so that the size in one access (aio_nbytes) is limited
to, at the maximum,
BLKIF_MAX_SEGMENTS_PER_REQUEST * PAGE_SIZE

But this works only if when the *buffer* passed in to pvblock_io()
is page-aligned. If not, the given data region may stand across
(BLKIF_MAX_SEGMENTS_PER_REQUEST + 1) pages. See the logic in
blkfront_aio():
start = (uintptr_t)aiocbp->aio_buf & PAGE_MASK;
end = ((uintptr_t)aiocbp->aio_buf + aiocbp->aio_nbytes +
       PAGE_SIZE - 1) & PAGE_MASK;
Then this will lead to BUG_ON() above.

This can be fixed by decreasing the maximum size of aio_nbytes.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: commit 3a739cc6c948 ("xen: pvblock: Implement front-back protocol and do IO")
2 years agotimer-uclass: Always use "clock-frequency" property as fallback
Alex Bee [Tue, 14 Nov 2023 21:11:27 +0000 (22:11 +0100)] 
timer-uclass: Always use "clock-frequency" property as fallback

Currently the "clock-frequency" DT property is only being considered as an
fallback if either there is no clock driver, the clock driver implements
the request-op correctly or there is no clock defined for the timer at all.

This patch makes "clock-frequency" also being picked as a fallback if
getting the clock-rate fails, since clk_get(_by_index) will return no
error, if a clock driver does not implement the request-op and does also
not support getting the rate of the clock in question.
timer_post_probe will take care if the property does not exist in the DT or
is defined as 0.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
2 years agolib/slre: Fix memory leak if regex compilation fails
Francois Berder [Sun, 12 Nov 2023 19:16:50 +0000 (20:16 +0100)] 
lib/slre: Fix memory leak if regex compilation fails

Signed-off-by: Francois Berder <fberder@outlook.fr>
2 years agotest/py: net: Add a TFTP put test
Love Kumar [Wed, 8 Nov 2023 07:10:31 +0000 (12:40 +0530)] 
test/py: net: Add a TFTP put test

Execute tftpput command for uploading files to a server and validate its
size & CRC32.

Signed-off-by: Love Kumar <love.kumar@amd.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoMerge patch series "cmd: add scmi command"
Tom Rini [Wed, 29 Nov 2023 03:31:09 +0000 (22:31 -0500)] 
Merge patch series "cmd: add scmi command"

To quote the author:

"Scmi" command will be re-introduced per Michal's request.
The functionality is the same as I put it in my patch set of adding
SCMI base protocol support, but made some tweak to make UT, "ut dm
scmi_cmd," more flexible and tolerable when enabling/disabling a specific
SCMI protocol for test purpose.

Each commit may have some change history inherited from the preceding
patch series.

Test
====
The patch series was tested on the following platforms:
* sandbox

2 years agotest: dm: add scmi command test
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:28 +0000 (11:14 +0900)] 
test: dm: add scmi command test

In this test, "scmi" command is tested against different sub-commands.
Please note that scmi command is for debug purpose and is not intended
in production system.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2 years agodoc: cmd: add documentation for scmi
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:27 +0000 (11:14 +0900)] 
doc: cmd: add documentation for scmi

This is a help text for scmi command.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2 years agocmd: add scmi command for SCMI firmware
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:26 +0000 (11:14 +0900)] 
cmd: add scmi command for SCMI firmware

This command, "scmi", may provide a command line interface to various SCMI
protocols. It supports at least initially SCMI base protocol and is
intended mainly for debug purpose.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2 years agofirmware: scmi: support protocols on sandbox only if enabled
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:25 +0000 (11:14 +0900)] 
firmware: scmi: support protocols on sandbox only if enabled

This change will be useful when we manually test SCMI on sandbox
by enabling/disabling a specific SCMI protocol.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agotest: dm: skip scmi tests against disabled protocols
AKASHI Takahiro [Tue, 14 Nov 2023 02:14:24 +0000 (11:14 +0900)] 
test: dm: skip scmi tests against disabled protocols

This is a precautionary change to make scmi tests workable whether or not
a specific protocol be enabled. If a given protocol is not configured,
we skip the test by returning -EAGAIN.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge patch series "fs: fat: calculate FAT type based on cluster count"
Tom Rini [Wed, 29 Nov 2023 01:10:36 +0000 (20:10 -0500)] 
Merge patch series "fs: fat: calculate FAT type based on cluster count"

To quote the author:

This series fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

This issue occures, for example, if a partition is formatted by
swupdate using its diskformat handler. swupdate uses the FAT library
from http://elm-chan.org/fsw/ff/ internally.

See https://groups.google.com/g/swupdate/c/7Yc3NupjXx8 for a
discussion in the swupdate mailing list.

Please refer to the commit messages for more details.

1. Added bootsector checks

Most tests from https://www.win.tue.nl/~aeb/linux/fs/fat/fat-2.html
are added in the commit 'fs: fat: add bootsector validity check'.
Only the tests VIII, IX and X are not implemented.

I also checked the Linux kernel code (v6.6) and did not find any
checks on 'vistart->fs_type'. This is the reason why is skipped them
here.

See section '2. Size comparisons' for the impact on the binary size.

2. Size comparisons

I executed bloat-o-meter from the Linux kernel for an arm64
target (config xilinx_zynqmp_mini_emmc0_defconfig):

Comparison of the binary spl/u-boot-spl between master (rev
e17d174773e9ba9447596708e702b7382e47a6cf) and this patch
series (including the added validity checks of the boot sector):

add/remove: 0/0 grow/shrink: 1/1 up/down: 100/-12 (88)
Function                                     old     new   delta
read_bootsectandvi                           308     408    +100
fat_itr_root                                 444     432     -12
Total: Before=67977, After=68065, chg +0.13%

When compare the size of the binary spl/u-boot-spl between master this
series without the the validity checks of the boot sector:

add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24 (-24)
Function                                     old     new   delta
read_bootsectandvi                           308     296     -12
fat_itr_root                                 444     432     -12
Total: Before=67977, After=67953, chg -0.04%

So the size of the spl on this arm64 target increases by 88 bytes for
this series. When i remove the validity check the size decreases by 24 bytes.

2 years agotest: fs: Add test to detect fat type
Christian Taedcke [Wed, 15 Nov 2023 12:44:24 +0000 (13:44 +0100)] 
test: fs: Add test to detect fat type

Ensure that a large FAT12 filesystem and a small FAT16 filesystem are
detected correctly.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agotest: Add size granularity parameter to mk_fs
Christian Taedcke [Wed, 15 Nov 2023 12:44:23 +0000 (13:44 +0100)] 
test: Add size granularity parameter to mk_fs

Without this commit it is only possible to create filesystem images
with a size granularity of 1MB.
This commit adds the option to create file systems with different
sizes, e.g 8.5MB.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agotest: fs: Add fat12 to supported fs of some tests
Christian Taedcke [Wed, 15 Nov 2023 12:44:22 +0000 (13:44 +0100)] 
test: fs: Add fat12 to supported fs of some tests

The tests fs_ext, fs_mkdir and fs_unlink support fat12 without
modifications.
The fs_basic test uses a partition that is too large for fat12, so it
is omitted here.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agotest: Add support to create a fat12 fs
Christian Taedcke [Wed, 15 Nov 2023 12:44:21 +0000 (13:44 +0100)] 
test: Add support to create a fat12 fs

This enables to implement tests for fat12 filesystem.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agofs: fat: add bootsector validity check
Christian Taedcke [Wed, 15 Nov 2023 12:44:20 +0000 (13:44 +0100)] 
fs: fat: add bootsector validity check

The performed checks are similar to the checks performed by the Linux
kernel in the function fat_read_bpb() in the file fs/fat/inode.c.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agofs: fat: simplify gotos from read_bootsectandvi
Christian Taedcke [Wed, 15 Nov 2023 12:44:19 +0000 (13:44 +0100)] 
fs: fat: simplify gotos from read_bootsectandvi

This simplifies the code a little bit.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agofs: fat: calculate FAT type based on cluster count
Christian Taedcke [Wed, 15 Nov 2023 12:44:18 +0000 (13:44 +0100)] 
fs: fat: calculate FAT type based on cluster count

This fixes an issue where the FAT type (FAT12, FAT16) is not
correctly detected, e.g. when the BPB field BS_FilSysType contains the
valid value "FAT     ".

According to the FAT spec the field BS_FilSysType has only
informational character and does not determine the FAT type.

The logic of this code is based on the linux kernel implementation
from the file fs/fat/inode.c function fat_fill_super().

For details about FAT see http://elm-chan.org/docs/fat_e.html

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agotest: spl: Remove usage of FAT32_SIGN
Christian Taedcke [Wed, 15 Nov 2023 12:44:17 +0000 (13:44 +0100)] 
test: spl: Remove usage of FAT32_SIGN

FAT32_SIGN is removed in the following commits.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agofs: fat: use get_unaligned_le16 to convert u8[2] to u16
Christian Taedcke [Wed, 15 Nov 2023 12:44:16 +0000 (13:44 +0100)] 
fs: fat: use get_unaligned_le16 to convert u8[2] to u16

This reduces code duplications.

Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
2 years agoMerge patch series "Import "string" I/O functions from Linux"
Tom Rini [Tue, 28 Nov 2023 21:19:19 +0000 (16:19 -0500)] 
Merge patch series "Import "string" I/O functions from Linux"

To quote the author:

This series imports generic versions of ioread_rep/iowrite_rep and
reads/writes from Linux. Some cleanup is done to make sure that all
platforms have proper defines for implemented functions and there are no
redefinitions.

2 years agomusb-new: Remove implementation of io.h functions
Igor Prusov [Tue, 14 Nov 2023 11:02:57 +0000 (14:02 +0300)] 
musb-new: Remove implementation of io.h functions

Since {read,write}s{l, w, b}() functions are now supported in linux/io.h
there is no need to add custom implementation to driver.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agotreewide: Include linux/io.h instead of asm-generic/io.h
Igor Prusov [Tue, 14 Nov 2023 11:02:56 +0000 (14:02 +0300)] 
treewide: Include linux/io.h instead of asm-generic/io.h

Directly including asm-generic/io.h may break build because it will
cause redefenition of generic io macros if linux/io.h gets included
later, hence replace it with direct include of linux/io.h

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agospi: meson_spifc_a1: Switch to io{read,write}32_rep()
Igor Prusov [Tue, 14 Nov 2023 11:02:55 +0000 (14:02 +0300)] 
spi: meson_spifc_a1: Switch to io{read,write}32_rep()

Use io{read,write}32_rep() functions to sync code with Linux version.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agoasm-generic: Import functions from Linux
Igor Prusov [Tue, 14 Nov 2023 11:02:54 +0000 (14:02 +0300)] 
asm-generic: Import functions from Linux

Currently {read,write}s{b,w,lq}() functions are available only on some
architectures, and there are no io{read,write}{8,16,32,64}_rep()
functions in u-boot. This patch adds generic versions that may be used
without arch-specific implementation.

Since some of added functions were already added locally in some files,
remove them to avoid redeclaration errors.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agoxtensa: io.h: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:53 +0000 (14:02 +0300)] 
xtensa: io.h: Add defines for ins/outs functions

Add defines for {in,out}s{b,w,l}() functions to make asm-generic/io.h
aware of them.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agopowerpc: io.h: Add defines for __raw_{read, write} functions
Igor Prusov [Tue, 14 Nov 2023 11:02:52 +0000 (14:02 +0300)] 
powerpc: io.h: Add defines for __raw_{read, write} functions

Add defines for __raw_{read,write}{b,w,l}() functions to make
make asm-generic/io.h aware of them.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agonios2: io.h: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:51 +0000 (14:02 +0300)] 
nios2: io.h: Add defines for ins/outs functions

Add defines for {in,out}s{b,w,l}  functions to make asm-generic/io.h
aware of them.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agoriscv: io.h: Fix signatures of reads/writes functions
Igor Prusov [Tue, 14 Nov 2023 11:02:50 +0000 (14:02 +0300)] 
riscv: io.h: Fix signatures of reads/writes functions

Change type of address parameter from int* to volatile void* for
{read,write}s{b,w,l}() functions and add const qualifier for reads. This
is done to keep function signatures in sync with asm-generic/io.h and
other platforms.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agoriscv: io.h: Add defines for reads/writes functions
Igor Prusov [Tue, 14 Nov 2023 11:02:49 +0000 (14:02 +0300)] 
riscv: io.h: Add defines for reads/writes functions

Add defines for {read,write}s{b,w,l} functions to make asm-generic/io.h
aware of them.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agomips: io.h: Add defines for read/write/in/out functions
Igor Prusov [Tue, 14 Nov 2023 11:02:48 +0000 (14:02 +0300)] 
mips: io.h: Add defines for read/write/in/out functions

Add defines for {read,write}{b,w,l,q}(), {read,write}s{b,w,l,q}() and
{in,out}s{b,w,l,q}() functions to make asm-generic/io.h aware of them.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agomips: io.h: Add const to reads functions params
Igor Prusov [Tue, 14 Nov 2023 11:02:47 +0000 (14:02 +0300)] 
mips: io.h: Add const to reads functions params

Currently reads{b,w,l}() functions don't have const qualifier for their
address parameter. Since asm-generic/io.h in Linux has const for all
read functions, add it here as well to keep signatures in sync.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agox86: Add defines for ins/outs functions
Igor Prusov [Tue, 14 Nov 2023 11:02:46 +0000 (14:02 +0300)] 
x86: Add defines for ins/outs functions

Add defines for {in,out}s{b,w,l}() functions to make sure that
they will be used by asm-generic/io.h

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
2 years agosandbox: move asm-generic include to the end of file
Igor Prusov [Tue, 14 Nov 2023 11:02:45 +0000 (14:02 +0300)] 
sandbox: move asm-generic include to the end of file

Generic version of io.h should be included at the end of
architecture-specific ones to make sure that arch implementations are
used and to avoid redefinitions.

Signed-off-by: Igor Prusov <ivprusov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agoMerge patch series "sysinfo: Expand sysinfo with some more banner information"
Tom Rini [Tue, 28 Nov 2023 17:53:14 +0000 (12:53 -0500)] 
Merge patch series "sysinfo: Expand sysinfo with some more banner information"

To quote the author:

The show_board_info() function was adjusted to weak so that it could be
entirely replaced with a board-specific implementation.

The intended way for boards to provide their own information is via a
sysinfo driver. But currently there is no way to show anything other
than the model name.

This series adds support for showing a few more items, in a way that is
easy for boards to extend.

Since there is already a weak checkboard() function, we don't need to
have two levels of weak function here. So this series drops the weak
attribute from show_board_info()

Existing boards will see a slight change in output, in that the model
name will appear first, before any custom output. If that is a problem,
then the solution is to implement a sysinfo driver for the board.

2 years agox86: coreboot: Add a sysinfo driver
Simon Glass [Mon, 13 Nov 2023 02:58:29 +0000 (19:58 -0700)] 
x86: coreboot: Add a sysinfo driver

Create a sysinfo driver to avoid needing a custom checkboard()
function. With this the following information is printed when booting
from coreboot under QEMU:

   Model: Standard PC (i440FX + PIIX, 1996)
   Manufacturer: QEMU
   Prior-stage version: 4.21-885-g2a87ef1eca56
   Prior-stage date: 11/11/2023

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosysinfo: Allow displaying more info on startup
Simon Glass [Mon, 13 Nov 2023 02:58:28 +0000 (19:58 -0700)] 
sysinfo: Allow displaying more info on startup

At present only the model name is shown on start. Some boards want to
display more information. Add some more options to allow display of the
manufacturer as well as the version and date of any prior-stage
firmware.

This is useful for coreboot, at least. If other boards have more
information to display, it is easy to add it, now.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoRevert "generic-board: make show_board_info a weak function"
Simon Glass [Mon, 13 Nov 2023 02:58:27 +0000 (19:58 -0700)] 
Revert "generic-board: make show_board_info a weak function"

We already have:

- a sysinfo driver-interface which can obtain the model
- a weak function called checkboard() for showing board info

The current implementation has a weak function on top of a weak
function. Now that all boards have been updated to use checkboard()
instead, drop the __weak on show_board_info()

This reverts commit f7637cc01414b9c87b6b0f861f34d83c19bfaaaf.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoudoo: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:26 +0000 (19:58 -0700)] 
udoo: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agotoradex: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:25 +0000 (19:58 -0700)] 
toradex: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Make all the checkboard() functions call the new tdx_checkboard() so
that the same information is displayed.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agosolidrun: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:24 +0000 (19:58 -0700)] 
solidrun: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoturris: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:23 +0000 (19:58 -0700)] 
turris: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agomeson: Use checkboard() instead of show_board_info()
Simon Glass [Mon, 13 Nov 2023 02:58:22 +0000 (19:58 -0700)] 
meson: Use checkboard() instead of show_board_info()

Boards can use a sysinfo driver if a particular model name is needed.
Update this board to use checkboard() directly, rather than having a
weak function laid on top of a weak function.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2 years agoboard: Move show_board_info() comment to header file
Simon Glass [Mon, 13 Nov 2023 02:58:21 +0000 (19:58 -0700)] 
board: Move show_board_info() comment to header file

Move this comment to its prototype and tidy it up a bit.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2 years agoMAINTAINERS: Step up as co-maintainer of Tegra SOC platform
Svyatoslav Ryhel [Tue, 31 Oct 2023 18:46:50 +0000 (20:46 +0200)] 
MAINTAINERS: Step up as co-maintainer of Tegra SOC platform

Update maintainers for Tegra SoC platform. Include device trees
and drivers which contain tegra in the name.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Tue, 28 Nov 2023 15:05:25 +0000 (10:05 -0500)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung

2 years agoARM: dts: tegra30: enable USB PHY node on some devices
Svyatoslav Ryhel [Fri, 25 Aug 2023 17:23:14 +0000 (20:23 +0300)] 
ARM: dts: tegra30: enable USB PHY node on some devices

Enable USB PHY nodes on ASUS Transformers, Grouper, Enadevoru
and LG X3. This is not mandatory since driver will use default
values but preferable for new devices.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoboard: grouper: convert ASUS Google Nexus 7 (2012) to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:46:27 +0000 (18:46 +0300)] 
board: grouper: convert ASUS Google Nexus 7 (2012) to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoboard: transformer-t30: convert ASUS Transformers to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:39:29 +0000 (18:39 +0300)] 
board: transformer-t30: convert ASUS Transformers to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoboard: endeavoru: convert HTC One X to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:35:35 +0000 (18:35 +0300)] 
board: endeavoru: convert HTC One X to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 years agoboard: lg-x3: convert LG Optimus 4X and Vu to use DM PMIC
Svyatoslav Ryhel [Sat, 26 Aug 2023 15:32:55 +0000 (18:32 +0300)] 
board: lg-x3: convert LG Optimus 4X and Vu to use DM PMIC

Since required drivers were merged, we can safely clean up the
board and switch to DM based driver with device tree support.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>