Commit graph

89389 commits

Author SHA1 Message Date
Tom Rini
09a946d45e Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- dns325: Enable 2nd harddrive (Peter & Stefan)
- marvell: cn9310-crb: Misc fixes to SPI / pincntrl in DTS (Chris)
- kirkwood: Add support for ZyXEL NSA325 board (Tony)
- sata_mv: Add bootstd hook to enable sata_bootdev (Tony)
- x240/AC5/AC5X: Disable SMBIOS (Chris)
- Revert "arm: mvebu: x240: Use i2c-gpio instead of built in controller"
  (Chris)
- DS116/N2350: Enable bootstd (Tony)
- clearfog: Support multiple DDR sizes (Josua)
2023-10-16 14:26:12 -04:00
Tom Rini
e0caea4f9c Merge branch '2023-10-16-assorted-cmd-updates'
- Update the mac command a bit, to be more widely useful and add a
  helper macro to declare CONFIG_SYS_LONGHELP text
2023-10-16 14:26:00 -04:00
Tom Rini
1b377a9ffe cmd/ti: Update Kconfig logic and Makefile recursion logic
- Add some dependencies to CMD_DDR3 as this is only valid on some
  platforms (which tend to select it as well).
- The proper gate for going in to cmd/ti is not
  CONFIG_TI_COMMON_CMD_OPTIONS as nothing under there is controlled by
  that symbol but the general TI architecture options.

Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-16 10:25:02 -04:00
Tom Rini
3616218b5a cmd: Convert existing long help messages to the new macro
- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines
  and use U_BOOT_LONGHELP to declare the same variable name as before
- In a few places, either rename the variable to follow convention or
  introduce the variable as it was being done inline before.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-16 10:24:58 -04:00
Tom Rini
dec5777fff command.h: Add a U_BOOT_LONGHELP macro
In order to be able to discard unused long help texts without further
linker lists, add a macro for defining the long help messages which uses
__maybe_unused.  This allows us to discard them as unreferenced as part
of the link.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
ef3ceb2cae eeprom: starfive: add 'mac raw' command
Add a sub-command to print a hexdump of the EEPROM content.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
ede3234df9 eeprom: starfive: raw dump if unsupported data version
If the data version field of the EEPROM is not supported, provide a hexdump
of the data.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
f54c7c533c eeprom: starfive: re-implement mac command
The different implementations of the mac command have board or vendor
specific sub-commands.

Add the command definition specific to the VisionFive 2 board.

Don't call cmd_usage() directly but return CMD_RET_USAGE instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
dd1118227e eeprom: SiFive Unmatched: re-implement mac command
The different implementations of the mac command have board or vendor
specific sub-commands.

Add the command definition specific to the SiFive HiFive Unmatched board.

Don't call cmd_usage() directly but return CMD_RET_USAGE instead.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
f5e921e948 freescale: fix long help handling in mac command
CONFIG_SYS_LONGHELP=n we want to reduce the size of the U-Boot binary.
The long text should be reduced to and empty string in this case.

There is not need to call cmd_usage() directly. It is sufficient to
return CMD_RET_USAGE.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Heinrich Schuchardt
8780cd8211 cmd: move mac command
Board specific implementations of the 'mac' command differ concerning the
supported sub-commands.

Move the Freescale specific mac command definition to the board code.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16 10:22:11 -04:00
Tom Rini
2e1577e836 - add Amlogic A1 clock driver
- add Amlogic A1 reset support
 - add USB Device support for Amlogic A1
 - enable RNG on Amlogic A1 & Amlogic S4
 - move Amlogic Secure Monitor to standalone driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmUrvwIACgkQd9zb2sjI
 SdFhpRAAjJQXAE72iRoAii47hoYY/qhWAHZUe0tlu7lUFbhGRTTISukh3pZ48WCu
 ZXLgIUa30eXzGGa9eItmkt+cH2UuXWOPurQBILXOh/20eCrke47Y41rBfjmfcrWi
 UCDcf7BUojnCnC3zaSDNqUvJtsZvMwep3bjcPFstxZIzdZUML4VcwPNWClVhLABU
 uA5reiJjMiRVrAYp4LDJ1rrG8VgTdEbGt8+E4jPzQRvLfzYC3378SelxNW7UCxfK
 g88CHDNbWWPReiq71ylmKSSiN1TwnbbEjCmVVnv4DwPV8azwR0FkXJcebcpm4myP
 ckrjcb31hIiSEMNTbipytAZtW8qFAsidxuzRY8aEuTrsN+j1cM3QhmZNDUmASYgo
 r0pmkOiGUHFMFFMNXI2g5apJ4vIJfjHo+14TKoTLi+0xj8DqI0bnw5gGnrI6DlGv
 Dk/pOxvjPiiY/3JYxed3LzK3b1vKng4CMLzBp8GvQOZrINNGhFYo9ycML44EUwUs
 QVTW31GJEcuzoYlqV2e1JudGteUG3aoJ3QWW7aAcsG9+nHPHy9nslIcCOAgBA8Ja
 XiB5Z4bcRmTA9XRU93hkc2/rnyeNdsbyCBuqTswmVxsKn+/g5E+1qMG38OPJ9yot
 jVMIxCb6fOEmJIXnfD0FnNLRTySfCLCaS2dZVHIjoYCfLCOI1vk=
 =MjfD
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20231015' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- add Amlogic A1 clock driver
- add Amlogic A1 reset support
- add USB Device support for Amlogic A1
- enable RNG on Amlogic A1 & Amlogic S4
- move Amlogic Secure Monitor to standalone driver
2023-10-16 09:09:54 -04:00
Chris Packham
d2387c6227 arm: mvebu: AC5/AC5X: Disable SMBIOS
The RD-AC5X doesn't make use of EFI or SMBIOS. Recently we started seeing
boot failures such as

    WARNING: SMBIOS table_address overflow 27f60f020
    Failed to write SMBIOS table
    initcall failed at event 10/(unknown) (err=-22)
    ### ERROR ### Please RESET the board ###

The error is because the physical address of the RAM on the AC5X SoC is
above the 32GiB boundary. As we don't need SMBIOS or EFI this can be
safely disabled.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Josua Mayer
ebf1de9372 arm: mvebu: clearfog: support 512MB memory size from tlv eeprom
Handle 2GBit memory size value "2" from tlv eeprom on ddr
initialisation, to support SoMs with 512MB ddr memory.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Josua Mayer
fdd6069515 arm: mvebu: clearfog: read number of ddr channels from tlv data
Extend the existing tlv vendor extension used for ram size by one byte to
also store the number of ddr channels.
The length of the tlv entry can indicate whether the new information is
present. If not default to single channel.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Tony Dinh
335df894ad arm: mvebu: Enable bootstd for Thecus N2350 board
Enable bootstd for Thecus N2350 board, and remove distroboot.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Tony Dinh
1c954fef64 arm: mvebu: Enable bootstd for Synology DS116 board
Enable bootstd for Synology DS116 board, and remove distroboot.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Chris Packham
10c937fa23 Revert "arm: mvebu: x240: Use i2c-gpio instead of built in controller"
This reverts commit 5c1c6b7306. The reason
for switching to i2c-gpio was due to an issue we were seeing in the
Linux kernel where the CPU would lock up on certain adverse I2C bus
conditions. We were never able to reproduce the lockup in U-Boot but
assumed that was probably just luck.

Since then we have discovered that the lock up was due to the I2C
transaction offload engine in the I2C controller not coping with the
adverse bus conditions (basically it thinks there's another master and
waits for a STOP condition that never comes). U-Boot doesn't use the I2C
offload feature so is not susceptible to the lockup.

We can therefore safely return to using the built-in I2C controller.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Chris Packham
5779da5313 arm: mvebu: x240: Disable SMBIOS
The x240 doesn't make use of EFI or SMBIOS. Recently we started seeing
boot failures such as

    WARNING: SMBIOS table_address overflow 23f60c020
    Failed to write SMBIOS table
    initcall failed at event 10/(unknown) (err=-22)
    ### ERROR ### Please RESET the board ###

The error is because the physical address of the RAM on the AC5X SoC is
above the 32GiB boundary. As we don't need SMBIOS or EFI this can be
safely disabled.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 14:00:45 +02:00
Tony Dinh
19acf771c6 arm: mvebu: sata_mv: Add bootstd hook to enable sata_bootdev
Add hook in sata_mv probe to enable bootstd bootdev.

Note: bootdev_setup_for_sibling_blk() invocation is a noop if bootsd is
not enabled for ahci sata yet.

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 11:10:42 +02:00
Tony Dinh
b3f559a147 arm: kirkwood: Add support for ZyXEL NSA325 board
ZyXEL NSA325 specifications:

Marvell Kirkwood 88F6282 SoC
1.6 GHz CPU
1x GBE LAN port (Marvell MV88E1318)
512 MB RAM
128 MB Eon NAND, SLC
I2C
1x USB 3.0 (on PCIe bus)
2x USB 2.0
2x SATA (hot swap slots)
Serial console

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 11:10:42 +02:00
Chris Packham
4df539c0c5 ARM64: dts: marvell: cn9310-crb: Remove duplicate pinctrl
The cn9130.dtsi defines a pinctrl node for SPI1 (until recently it was
mislabeled as spi0). Use this instead of having a duplicate definition
with a different label.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 11:10:32 +02:00
Chris Packham
6b8efc66ea ARM64: dts: marvell: cn9310: Use appropriate label for spi1 pins
The CN9130-DB uses the SPI1 interface but had the pinctrl node labelled
as "cp0_spi0_pins". Use the label "cp0_spi1_pins" and update the node
name to "cp0-spi-pins-1" to avoid confusion with the pinctrl options for
SPI0.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
2023-10-16 11:10:32 +02:00
Stefan Roese
fec5462647 kirkwood: dns325: Enable 2nd harddrive
The 2nd HD is not enabled in U-Boot on the D-Link DNS325. This patch
sets the responsible GPIO to high, enabling the drive.

Suggested-by: Peter Granilla
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Tony Dinh <mibodhi@gmail.com>
2023-10-16 11:10:32 +02:00
Alexey Romanov
7cd53e0d52 arch: meson: use secure monitor driver
Now we have to use UCLASS_SM driver instead of
raw smc_call() function call.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-9-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
67c03a9474 arch: meson: sm: set correct order of the includes
The common.h header should always be first, followed
by other headers in order, then headers with directories,
then local files.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-8-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
ef2eb106ee drivers: introduce Meson Secure Monitor driver
This patch adds an implementation of the Meson Secure Monitor
driver based on UCLASS_SM.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-7-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
9a04e36170 sandbox: defconfig: enable CONFIG_SM option
We use this option to test UCLASS_SM.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-6-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
c8e477ede3 sandbox: add tests for UCLASS_SM
This patchs adds simple tests for Secure Monitor uclass.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-5-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
c3be2f18dd sandbox: dts: add meson secure monitor node
We need this to test UCLASS_SM.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-4-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
9ec6db32ca sandbox: add sandbox sm uclass driver
This patch adds sandbox secure monitor driver.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-3-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Alexey Romanov
c52cd07407 drivers: introduce Secure Monitor uclass
At the moment, we don't have a common API for working with
SM, only the smc_call() function. This approach is not generic
and difficult to configure and maintain.

This patch adds UCLASS_SM with the generic API:

- sm_call()
- sm_call_write()
- sm_call_read()

These functions operate with struct pt_regs, which describes
Secure Monitor arguments.

Signed-off-by: Alexey Romanov <avromanov@salutedevices.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/20230921081346.22157-2-avromanov@salutedevices.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-10-15 12:23:48 +02:00
Tom Rini
3c3f162691 improvements with dev_read_addr_..._ptr()
scan all entries in multi-device boot_targets
 EFI empty-capsule support
 -----BEGIN PGP SIGNATURE-----
 
 iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmUpvTQRHHNqZ0BjaHJv
 bWl1bS5vcmcACgkQfxc6PpAIreabCwgAimB2fGpK3FjFMrH1Ko4Qh3j0D/0XomiQ
 1KYVbn3YrswLmq1tav9HSKWR3Ep/Uet6jthpH2RPxhcGWNGqxkkk2k4LUudSlIYd
 0KKoovMwBK9jZcojoBAjFGaoRIaEBlbFspW/RoXPJnr7ctxf6HSYkW2TPH09zqtD
 FrL5Jjf6t0h6QShxhCYXbiHGCnp2zYZRzFnrYpaXy8IIavqWNJTAhkIGveMy+Qa8
 TzhmuRamLgtZZwtFcHt8sZuV4+FtBrtHAyiEasnJFPJ5Kv6tFVBiHdYuygZMu/og
 +F57ufgqgHTlDjzW72CJyhrHIcVn/mWjNYrulufqHAsSFD7cizISeA==
 =qOUT
 -----END PGP SIGNATURE-----

Merge tag 'dm-pull-13oct23' of https://source.denx.de/u-boot/custodians/u-boot-dm

improvements with dev_read_addr_..._ptr()
scan all entries in multi-device boot_targets
EFI empty-capsule support
2023-10-14 10:50:20 -04:00
Tom Rini
25edd247a8 Merge branch '2023-10-13-firmware-scmi-updates'
- Fix a memset call in the optee_agent code.

Then to quote the author for the rest of the changes:
This patch series allows users to access SCMI base protocol provided by
SCMI server (platform). See SCMI specification document v3.2 beta[1]
for more details about SCMI base protocol.

What is currently not implemented is
- SCMI_BASE_NOTIFY_ERRORS command and notification callback mechanism

This feature won't be very useful in the current U-Boot environment.

[1] https://developer.arm.com/documentation/den0056/e/?lang=en
2023-10-14 10:47:52 -04:00
Francois Berder
66abf2bba3 firmware: scmi: Fix clearing variable
The sess variable in open_channel was not entirely
cleared to zero at the start of this function.

This commit ensures that the entire struct is cleared.

Signed-off-by: Francois Berder <fberder@outlook.fr>
2023-10-13 21:21:07 -04:00
AKASHI Takahiro
8057d8a66f firmware: scmi: add a check against availability of protocols
Now that we have Base protocol support, we will be able to check if a given
protocol is really supported by the SCMI server (firmware).

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-13 16:59:24 -04:00
AKASHI Takahiro
93ecae9eea test: dm: add SCMI base protocol test
Added is a new unit test for SCMI base protocol, which will exercise all
the commands provided by the protocol, except SCMI_BASE_NOTIFY_ERRORS.
  $ ut dm scmi_base
It is assumed that test.dtb is used as sandbox's device tree.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-13 16:59:24 -04:00
AKASHI Takahiro
8c5def59e8 sandbox: remove SCMI base node definition from test.dts
SCMI base protocol is mandatory and doesn't need to be listed in a device
tree.

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>
2023-10-13 16:59:24 -04:00
AKASHI Takahiro
7eb4eb541c firmware: scmi: install base protocol to SCMI agent
SCMI base protocol is mandatory, and once SCMI node is found in a device
tree, the protocol handle (udevice) is unconditionally installed to
the agent. Then basic information will be retrieved from SCMI server via
the protocol and saved into the agent instance's local storage.

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>
2023-10-13 16:59:24 -04:00
AKASHI Takahiro
bddcd3af9c test: dm: simplify SCMI unit test on sandbox
Adding SCMI base protocol makes it inconvenient to hold the agent instance
(udevice) locally since the agent device will be re-created per each test.
Just remove it and simplify the test flows.
The test scenario is not changed at all.

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>
2023-10-13 16:59:24 -04:00
AKASHI Takahiro
b76fdc14e3 firmware: scmi: fake base protocol commands on sandbox
This is a simple implementation of SCMI base protocol for sandbox.
The main use is in SCMI unit test.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
58543c0d41 firmware: scmi: add a version check against base protocol
In SCMI base protocol version 2 (0x20000), new interfaces,
BASE_SET_DEVICE_PERMISSIONS/BASE_SET_PROTOCOL_PERMISSIONS/
BASE_RESET_AGENT_CONFIGURATION, were added. Moreover, the api of
BASE_DISCOVER_AGENT was changed to support self-agent discovery.

So the driver expects SCMI firmware support version 2 of base protocol.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
ec8727b7e1 firmware: scmi: implement SCMI base protocol
SCMI base protocol is mandatory according to the SCMI specification.

With this patch, SCMI base protocol can be accessed via SCMI transport
layers. All the commands, except SCMI_BASE_NOTIFY_ERRORS, are supported.
This is because U-Boot doesn't support interrupts and the current transport
layers are not able to handle asynchronous messages properly.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
a89d9f41e0 test: dm: add protocol-specific channel test
Any SCMI protocol may have its own channel.
Test this feature on sandbox as the necessary framework was added
in a prior commit.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
55de62baa1 firmware: scmi: framework for installing additional protocols
This framework allows SCMI protocols to be installed and bound to the agent
so that the agent can manage and utilize them later.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
bb8079ae38 firmware: scmi: move scmi_bind_protocols() backward
Move the location of scmi_bind_protocols() backward for changes
in later patches.
There is no change in functionality.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
a70a897e31 firmware: scmi: support dummy channels for sandbox agent
In sandbox scmi agent, channels are not used at all. But in this patch,
dummy channels are supported in order to test protocol-specific channels.

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>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
689204be97 firmware: scmi: use a protocol's own channel if assigned
SCMI specification allows any protocol to have its own channel for
the transport. While the current SCMI driver may assign its channel
from a device tree, the core function, devm_scmi_process_msg(), doesn't
use a protocol's channel, but always use an agent's channel.

With this commit, devm_scmi_process_msg() tries to find and use
a protocol's channel. If it doesn't exist, use an agent's.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-13 16:59:23 -04:00
AKASHI Takahiro
c6230cd842 scmi: refactor the code to hide a channel from devices
The commit 85dc582892 ("firmware: scmi: prepare uclass to pass channel
reference") added an explicit parameter, channel, but it seems to make
the code complex.

Hiding this parameter will allow for adding a generic (protocol-agnostic)
helper function, i.e. for PROTOCOL_VERSION, in a later patch.

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>
2023-10-13 16:59:23 -04:00
Tom Rini
ab9fbac816 Merge https://source.denx.de/u-boot/custodians/u-boot-usb
- atmel gadget controller fix
2023-10-13 16:14:34 -04:00