summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-10-16kirkwood: dns325: Enable 2nd harddriveStefan Roese
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 <[email protected]> Cc: Tom Rini <[email protected]> Reviewed-by: Tony Dinh <[email protected]>
2023-10-16toradex: verdin-imx8mm/imx8mp: Remove bootcmd_mfgJoao Paulo Goncalves
The bootcmd_mfg env variable is legacy from IMX downstream u-boot branch and is not needed on mainline. Signed-off-by: Joao Paulo Goncalves <[email protected]> Signed-off-by: Francesco Dolcini <[email protected]> Acked-by: Marcel Ziswiler <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16smegw01: Remove misuse of CONFIG_ENV_IS_NOWHEREEduard Strehlau
When using a list of writeable variables, the initial values come from the built-in default environment since commit 5ab81058364b ("env: Complete generic support for writable list"). Remove unnecessary misuse of CONFIG_ENV_IS_NOWHERE as default environment. Based on the fix done by commit b16fd7f75f6d ("imx6q: acc: Remove misuse of env is nowhere driver"). Signed-off-by: Eduard Strehlau <[email protected]> Signed-off-by: Fabio Estevam <[email protected]>
2023-10-16mx28evk: Add USB Mass Storage supportFabio Estevam
Select the USB options to allow running "ums 0 mmc 0". Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-10-16usb: ehci: mxs: Use regulator_set_enable_if_allowed()Fabio Estevam
Since commit 4fcba5d556b4 ("regulator: implement basic reference counter") the return value of regulator_set_enable() may be EALREADY or EBUSY for fixed/GPIO regulators. Switch to using the more relaxed regulator_set_enable_if_allowed() to continue if regulator already was enabled or disabled. This fixes the following error when running the 'ums' command: => ums 0 mmc 0 UMS: LUN 0, dev mmc 0, hwpart 0, sector 0x0, count 0xece000 Error enabling VBUS supply g_dnl_register: failed!, error: -114 g_dnl_register failed Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-10-16usb: ehci: mxs: Fix the USB node pointer retrievalFabio Estevam
Use dev_ofnode() to retrieve the USB node pointer from the udevice structure. This fixes the following build error: drivers/usb/host/ehci-mxs.c:143:38: error: 'struct udevice' has no member named 'node_' Signed-off-by: Fabio Estevam <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-10-16arm: mach-imx: Makefile: Extend u-boot-nand.imx paddingHiago De Franco
Extend the padding process of u-boot-nand.imx target by adding 10k bytes of zeros to the end of the binary using the 'dd' command. The existing padding method did not generate a functional binary, as discussed in more detail in this thread [1]. Instead, we adopt the end-padding calculation method documented in 'board/doc/colibri_imx7.rst' as a reference, which is relevant for iMX7 with NAND storage. Adding 10k bytes of zeros provides an approximate value that makes the proper padding for these NAND devices. [1] https://lore.kernel.org/all/CAC4tdFUqffQzRQFv5AGe_xtbFy1agr2SEpn_FzEdexhwjdryyw@mail.gmail.com/ Signed-off-by: Hiago De Franco <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16toradex: colibri_imx7: Enable nand/emmc detection and set boot variantHiago De Franco
Add detection of eMMC vs NAND devices on the Colibri iMX7 board. A GPIO is configured to detect the presence of an on-board resistor that is configured differently based on the flash memory used. Depending on the detection result, the 'variant' environment variable is set to '-emmc' or cleared, indicating the type of storage device. This enhancement improves variant detection during system initialization through USB recovery mode, where U-Boot is loaded directly to RAM. This allows variant detection for an accurate device tree selection. Signed-off-by: Hiago De Franco <[email protected]> Acked-by: Marcel Ziswiler <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16board: toradex: verdin-imx8mm: set fixed LPDDR4 refresh rate as per errata ↵Andrejs Cainikovs
ERR050805 Update lpddr4 configuration and training using updated spreadsheet and tools from NXP using data from previous spreadsheet and verified toward datasheet: - MX8M_Mini_LPDDR4_RPA_v22.xlsx - mscale_ddr_tool_v3.31_setup.exe The most relevant update is related to errata ERR050805: "DRAM: Controller automatic derating logic may not work when the LPDDR4 memory temperature is above 85 °C at initialization" Other relevant fixes: - DRAMTMG7 register: corrected calculation of T_CKPDX parameter (equal to tCKCKEH for LPDDR4) - RANKCTL register: corrected calculations for ODTLon and ODTLoff to follow the JEDEC specification - ADDRMAP7 register: added support for 17-row devices As per errata ERR050805: An issue exists with the automatic derating logic of the DDR controller that only samples the LPDDR4 MR4 register when the Temperature Update Flag (TUF) field (MR4[7] ) is 1’b1. If the LPDDR4 memory is initialized and starts operation above 85 °C (MR4[2:0] > 3’b011), the MR4 Temperature Update Flag (TUF) will not be set. The DDR Controller will therefore not automatically adjust the memory refresh rate or de-rate memory timings based on the LPDDR4 memory temperature. This may cause the controller incorrectly setting the refresh period, potentially cause the LPDDR4 memory losing data contents and lead to possible data integrity issues above 85 °C. Errata provides three possible workaround options, while option 2 is the most reasonable: Disable the automatic derating logic of the DDR controller and apply fixed x2 refresh rate (0.5x refresh). This option is suitable for designs that are expected to boot at or above 85 °C and memory’s MR4[2:0] (Refresh Rate) DOES NOT report the following conditions: 3b101: 0.25x refresh, no de-rating 3b110: 0.25x refresh, with de-rating 3b111: SDRAM High temperature operating limit exceeded [1]: https://www.nxp.com/docs/en/errata/IMX8MM_0N87W.pdf Signed-off-by: Andrejs Cainikovs <[email protected]> Acked-by: Marcel Ziswiler <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16usbarmory: Add DM_I2C and DM_SERIAL supportAndrej Rosano
Use DM_I2C and DM_SERIAL as it is now mandatory. Signed-off-by: Andrej Rosano <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16mx8m: csf.sh: pad csf blob for u-boot.itb to CSF_SIZE minus IVT headerRasmus Villemoes
When built with CONFIG_IMX_HAB, the full FIT image, including stuff tacked on beyond the end of the fdt structure, is expected to be (fdt size rounded up to 0x1000 boundary)+CONFIG_CSF_SIZE. Now, when the FIT image is loaded from a storage device, it doesn't really matter that the flash.bin that gets written to target isn't quite that big - we will just load some garbage bytes that are never read or used for anything. But when flash.bin is uploaded via uuu, it's important that we actually serve at least as many bytes as the target expects, or we will hang in rom_api_download_image(). Extend the logic in the csf.sh script so that the csf blob is padded to CONFIG_CSF_SIZE minus the size of the IVT header. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2023-10-16imx: spl_imx_romapi.c: remove dead codeRasmus Villemoes
These IS_ENABLED(CONFIG_SPL_LOAD_FIT) cases can no longer be reached, and thus get_fit_image_size() is also redundant. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16imx: spl_imx_romapi: avoid tricky use of spl_load_simple_fit() to get full ↵Rasmus Villemoes
FIT size Currently, spl_imx_romapi uses a somewhat tricky workaround for the fact that a FIT image with external data doesn't directly allow one to know the full size of the file: It does a dummy spl_load_simple_fit(), having the ->read callback remember the largest offset requested, and then does a last call to rom_api_download_image() to fetch the remaining part of the full FIT image. We can avoid that by just keeping track of how much we have downloaded already, and if the ->read() requests something outside the current valid buffer, fetch up to the end of the current request. The current method also suffers from not working when CONFIG_IMX_HAB is enabled: While in that case u-boot.itb is not built with external data, so the fdt header does contain the full size of the dtb structure. However, it does not account for the extra CONFIG_CSF_SIZE added by board_spl_fit_size_align(). And also, the data it hands out during the first dummy spl_load_simple_fit() is of course garbage, and wouldn't pass the verification. So we really need to call spl_load_simple_fit() only once, let that figure out just how big the FIT image is (including whatever data, CSF or "ordinary" external data, has been tacked on beyond the fdt structure), and always provide valid data from the ->read callback. This only affects the CONFIG_SPL_LOAD_FIT case - I don't have any hardware or experience with the CONFIG_SPL_LOAD_IMX_CONTAINER case, so I leave that alone for now. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16imx8mp: binman: rename spl and u-boot nodesRasmus Villemoes
The hab signing script doc/imx/habv4/csf_examples/mx8m/csf.sh does fdtget -t x u-boot.dtb /binman/imx-boot/uboot offset to figure out the offset of u-boot.itb inside flash.bin. That works fine for imx8mm, imx8mn, imx8mq, but fails for imx8mp because in that case 'uboot' is merely a label and not actually the node name. Homogenize these cases and make imx8mp the same as the other imx8m* variants. The binman type is explicitly given and no longer derived from the node name, and the csf.sh script will work for all four SOCs. Signed-off-by: Rasmus Villemoes <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16verdin-imx8mp: drop unused tdx easy installer ifdefHiago De Franco
Drop unused code related to CONFIG_TDX_EASY_INSTALLER, that existed only on toradex downstream branch. Signed-off-by: Hiago De Franco <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16imx: hab: Use CONFIG_SPL_LOAD_FIT_ADDRESS in the CSF exampleMarek Vasut
The SPL authenticates image starting from CONFIG_SPL_LOAD_FIT_ADDRESS address, update the csf_fit.txt to match. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16arm: imx: imx8m: add optee configuration to ft_system_setupTim Harvey
If optee is detected configure it in the Linux device-tree: - add /firmware/optee node - add /reserved-memory nodes for optee_core and optee_shm Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-10-16arm: dts: imx8m: move CAAM nodes into common u-boot.dtsiTim Harvey
Move the crypto and sec_jr* nodes from board-specific u-boot.dtsi files into the common files. Additionally protect the nodes with ifdef CONFIG_FSL_CAAM as they don't serve any purpose if that is not enabled. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Marcel Ziswiler <[email protected]>
2023-10-16arm: dts: imx8mn: protect the firmware/optee node with ifdefTim Harvey
There is no need to include the firmware/optee node if the optee driver is not enabled. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16arm: dts: imx8mp: move firmware/optee node to common imx8mp-u-boot.dtsiTim Harvey
Move the firmware/optee node to the common imx8mp-u-boot.dtsi and protect it with an ifdef CONFIG_OPTEE as it is a meaningless node without the optee driver enabled. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16arm: dts: imx8mm: move firmware/optee node to common imx8mm-u-boot.dtsiTim Harvey
Move the firmware/optee node to the common imx8mm-u-boot.dtsi and protect it with an ifdef CONFIG_OPTEE as it is a meaningless node without the optee driver enabled. Signed-off-by: Tim Harvey <[email protected]> Reviewed-by: Fabio Estevam <[email protected]> Reviewed-by: Marcel Ziswiler <[email protected]>
2023-10-16board: toradex: verdin-imx8mm: enable usb sdp spl recovery supportMarcel Ziswiler
Enable USB SDP SPL aka serial downloader recovery mode support. While at it also enable fastboot support which may be used to subsequently load further stages like a Toradex Easy Installer FIT image. Signed-off-by: Marcel Ziswiler <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2023-10-16board: gateworks: venice: updates for imx8mp-venice-gw74xx revB PCBTim Harvey
Update the imx8mp-venice-gw74xx for revB: - add CAN1 - add TIS-TPM on SPI2 - add FAN controller - fix PMIC I2C bus (revA PMIC I2C was non-functional so no need for backward compatible option) - M2 socket GPIO's moved Signed-off-by: Tim Harvey <[email protected]>
2023-10-16board: gateworks: venice: add imx8mm-gw7905-0x supportTim Harvey
The Gateworks imx8mm-venice-gw7905-0x consists of a SOM + baseboard. The GW700x SOM contains the following: - i.MX8M Mini SoC - LPDDR4 memory - eMMC Boot device - Gateworks System Controller (GSC) with integrated EEPROM, button controller, and ADC's - RGMII PHY - PMIC - SOM connector providing: - FEC GbE MII - 1x SPI - 2x I2C - 4x UART - 2x USB 2.0 - 1x PCI - 1x SDIO (4-bit 3.3V) - 1x SDIO (4-bit 3.3V/1.8V) - GPIO The GW7905 Baseboard contains the following: - GPS - microSD - off-board I/O connector with I2C, SPI, GPIO - EERPOM - PCIe clock generator - 1x full-length miniPCIe socket with PCI/USB3 (via mux) and USB2.0 - 1x half-length miniPCIe socket with USB2.0 and USB3.0 - USB 3.0 HUB - USB Type-C with USB PD Sink capability and peripheral support - USB Type-C with USB 3.0 host support Signed-off-by: Tim Harvey <[email protected]>
2023-10-16board: gateworks: venice: add imx8mp-gw73xx-2x supportTim Harvey
The Gateworks imx8mp-venice-gw73xx-2x consists of a SOM + baseboard. The GW702x SOM contains the following: - i.MX8M Plus SoC - LPDDR4 memory - eMMC Boot device - Gateworks System Controller (GSC) with integrated EEPROM, button controller, and ADC's - PMIC - SOM connector providing: - eQoS GbE MII - 1x SPI - 2x I2C - 4x UART - 2x USB 3.0 - 1x PCI - 1x SDIO (4-bit 3.3V) - 1x SDIO (4-bit 3.3V/1.8V) - GPIO The GW73xx Baseboard contains the following: - 1x RJ45 GbE (eQoS from SOM) - 1x RJ45 GbE (PCI) - off-board I/O connector with MIPI-CSI (3-lane), MIPI-DSI (4-lane), - off-board I/O connector with RS232/RS485 - off-board I/O connector with SPI - off-board I/O connector with I2C, UART, and GPIO I2C, I2S and GPIO - microSD (1.8V/3.3V) - GPS - Accelerometer - EERPOM - USB 3.0 Hub - Front Panel bi-color LED - re-chargeable battery (for RTC) - PCIe clock generator - PCIe switch - on-board 802.11abgnac 1x1 WiFi and Bluetooth 5.2 - 1x USB Type-A host socket with USB 3.0 support - 1x USB OTG with USB 2.0 support - 2x MiniPCIe socket with PCI and USB 2.0 - 1x MiniPCIe socket with SIM, PCI/USB 3.0 (mux), and USB 2.0 - Wide range DC input supply Signed-off-by: Tim Harvey <[email protected]>
2023-10-16board: gateworks: venice: add imx8mp-gw72xx-2x supportTim Harvey
The Gateworks imx8mp-venice-gw72xx-2x consists of a SOM + baseboard. The GW702x SOM contains the following: - i.MX8M Plus SoC - LPDDR4 memory - eMMC Boot device - Gateworks System Controller (GSC) with integrated EEPROM, button controller, and ADC's - PMIC - SOM connector providing: - eQoS GbE MII - 1x SPI - 2x I2C - 4x UART - 2x USB 3.0 - 1x PCI - 1x SDIO (4-bit 3.3V) - 1x SDIO (4-bit 3.3V/1.8V) - GPIO The GW72xx Baseboard contains the following: - 1x RJ45 GbE (eQoS from SOM) - 1x RJ45 GbE (PCI) - off-board I/O connector with MIPI-CSI (3-lane), MIPI-DSI (4-lane), - off-board I/O connector with RS232/RS485 - off-board I/O connector with SPI - off-board I/O connector with I2C, UART, and GPIO I2C, I2S and GPIO - microSD (1.8V/3.3V) - GPS - Accelerometer - EERPOM - USB 3.0 Hub - Front Panel bi-color LED - re-chargeable battery (for RTC) - PCIe clock generator - PCIe switch - 1x USB Type-A host socket with USB 3.0 support - 1x USB OTG with USB 2.0 support - 1x MiniPCIe socket with PCI and USB 2.0 - 1x MiniPCIe socket with SIM, PCI/USB 3.0 (mux), and USB 2.0 - Wide range DC input supply Signed-off-by: Tim Harvey <[email protected]>
2023-10-16board: gateworks: venice: add imx8mp-gw71xx-2x supportTim Harvey
The Gateworks imx8mp-venice-gw71xx-2x consists of a SOM + baseboard. The GW702x SOM contains the following: - i.MX8M Plus SoC - LPDDR4 memory - eMMC Boot device - Gateworks System Controller (GSC) with integrated EEPROM, button controller, and ADC's - PMIC - SOM connector providing: - eQoS GbE MII - 1x SPI - 2x I2C - 4x UART - 2x USB 3.0 - 1x PCI - 1x SDIO (4-bit 3.3V) - 1x SDIO (4-bit 3.3V/1.8V) - GPIO The GW71xx Baseboard contains the following: - 1x RJ45 GbE (eQoS from SOM) - off-board I/O connector with I2C, SPI, UART, and GPIO - Front Panel bi-color LED - re-chargeable battery (for RTC) - PCIe clock generator - 1x USB Type-C connector supporting USB 2.0 host mode with VBUS - 1x MiniPCIe socket with SIM, PCI/USB 3.0 (mux), and USB 2.0 - GPS - Accelerometer - EERPOM - Wide range DC input supply Signed-off-by: Tim Harvey <[email protected]>
2023-10-16arm: dts: imx6ull-14x14-evk-u-boot: add rngbRicardo Salveti
Linux microPlatform uses an rngb device in optee-os in boot scheme SPL -> OPTEE -> U-Boot. To make rngb available for optee-os, enable it in SPL. Signed-off-by: Ricardo Salveti <[email protected]> Co-developed-by: Oleksandr Suvorov <[email protected]> Signed-off-by: Oleksandr Suvorov <[email protected]>
2023-10-16imx: syscounter: allow timer_init for SPL buildMichael Scott
With enabled SKIP_LOWLEVEL_INIT, the weak function timer_init() is used in the SPL build. For iMX6 SoC, this leads MMC to fail once u-boot proper is booted due to a timing issue. Always use iMX-specific timer_init() in SPL to fix timing issues. Fixes: be277c3a89 ("imx: mx7: avoid some initialization if low level is skipped") Signed-off-by: Michael Scott <[email protected]> Co-developed-by: Oleksandr Suvorov <[email protected]> Signed-off-by: Oleksandr Suvorov <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-10-15arch: meson: use secure monitor driverAlexey Romanov
Now we have to use UCLASS_SM driver instead of raw smc_call() function call. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15arch: meson: sm: set correct order of the includesAlexey Romanov
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15drivers: introduce Meson Secure Monitor driverAlexey Romanov
This patch adds an implementation of the Meson Secure Monitor driver based on UCLASS_SM. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15sandbox: defconfig: enable CONFIG_SM optionAlexey Romanov
We use this option to test UCLASS_SM. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15sandbox: add tests for UCLASS_SMAlexey Romanov
This patchs adds simple tests for Secure Monitor uclass. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15sandbox: dts: add meson secure monitor nodeAlexey Romanov
We need this to test UCLASS_SM. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15sandbox: add sandbox sm uclass driverAlexey Romanov
This patch adds sandbox secure monitor driver. Signed-off-by: Alexey Romanov <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-15drivers: introduce Secure Monitor uclassAlexey Romanov
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
2023-10-14Merge tag 'dm-pull-13oct23' of ↵Tom Rini
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-14Merge branch '2023-10-13-firmware-scmi-updates'Tom Rini
- 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-13firmware: scmi: Fix clearing variableFrancois Berder
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 <[email protected]>
2023-10-13firmware: scmi: add a check against availability of protocolsAKASHI Takahiro
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 <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-13test: dm: add SCMI base protocol testAKASHI Takahiro
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 <[email protected]> Reviewed-by: Etienne Carriere <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-10-13sandbox: remove SCMI base node definition from test.dtsAKASHI Takahiro
SCMI base protocol is mandatory and doesn't need to be listed in a device tree. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: install base protocol to SCMI agentAKASHI Takahiro
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13test: dm: simplify SCMI unit test on sandboxAKASHI Takahiro
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: fake base protocol commands on sandboxAKASHI Takahiro
This is a simple implementation of SCMI base protocol for sandbox. The main use is in SCMI unit test. Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: add a version check against base protocolAKASHI Takahiro
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 <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: implement SCMI base protocolAKASHI Takahiro
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13test: dm: add protocol-specific channel testAKASHI Takahiro
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>
2023-10-13firmware: scmi: framework for installing additional protocolsAKASHI Takahiro
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Etienne Carriere <[email protected]>