summaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)Author
3 daysmisc: Remove DS4510 driverTom Rini
As no platforms use this driver anymore and it's not been converted from to DM_I2C for use, remove it. Fixes: ed7fe2bee12a ("ppc: Remove xpedite boards") Signed-off-by: Tom Rini <trini@konsulko.com>
3 daysdrivers: misc: Remove pca9551_led driverTom Rini
This driver has not been converted to DM_I2C and the last platform that used it was removed as well. Remove the driver. Fixes: 4bbcec08ebec ("arm: Remove mx6dlarm2 board") Signed-off-by: Tom Rini <trini@konsulko.com>
3 daysmisc: Tighten requirements on IHS_FPGA driverTom Rini
This driver requires that the gdsys legacy driver option also be enabled in order to build. Express that requirement in Kconfig as well. Signed-off-by: Tom Rini <trini@konsulko.com>
4 daysnxp: Move FSL_SEC_MON related options to arch/Kconfig.nxpTom Rini
The options related to FSL_SEC_MON are part of the chain of trust related options and should be under that menu, so move it there. Furthermore we don't need to prompt for the driver itself but do need to allow for configuration of the monitor endianess. Signed-off-by: Tom Rini <trini@konsulko.com>
7 dayscros_ec: sandbox: Use correct value for number of slotsAndrew Goodbody
In the definition of struct ec_state the number of slots that are created is VSTORE_SLOT_COUNT (==4) but the value of req->slot is checked against EC_VSTORE_SLOT_MAX (==32) so this can lead to memory access beyond that allocated. Instead change the size check to use VSTORE_SLOT_COUNT to ensure it matches what has actually been allocated. This issue found by Smatch. Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
11 daysarm: imx: Remove the rest of i.MX31 supportTom Rini
With the removal of the last i.MX31 platform we can remove the rest of the underlying architecture code as well. Fixes: f247354708ec ("arm: Remove mx31pdk board") Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2025-06-11reset: stm32mp25: add stm32mp25 reset driverGabriel Fernandez
Implement STM32MP25 reset drivers using stm32-core-reset API. This reset stm32-reset-core API and will be able to use DT binding index started from 0. This patch also moves legacy reset into stm32 directory reset. Signed-off-by: Gabriel Fernandez <gabriel.fernandez@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-06-06rockchip: io-domain: Add CONFIG_SPL_ROCKCHIP_IODOMAINJustin Klaassen
Allows use of the Rockchip IO-domain driver in SPL to configure the GPIO to match the voltage supplied by specific regulators (e.g. "vcc_sdio"). Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-06-06rockchip: io-domain: Add debug logging for regulators during probeJustin Klaassen
Log the value of the regulators during initialization of the IO-domain driver to aid in debugging GPIO voltage configuration problems. Signed-off-by: Justin Klaassen <justin@tidylabs.net> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-05-06rockchip: io-domain: Enable by default for all supported SoCsChen-Yu Tsai
The IO domain driver controls the I/O voltage for various pins, MMC included. Enable it by default for all supported Rockchip SoCs. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Paul Kocialkowski <paulk@sys-base.io> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Anand Moon <linux.amoon@gmail.com>
2025-04-28cros_ec_sandbox.c: Drop spi.h includeTom Rini
As this driver needs to use the special sandbox <asm/malloc.h> header rather than normal malloc, it must be careful of the includes it brings in. It does not need <spi.h> for anything, so drop it. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-23rockchip: otp: Add support for RK3576Heiko Stuebner
Add support for RK3576 compatible. The RK3576 OTP uses the same read mechanism as the RK3588, just with different values for offset and size. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-04-23rockchip: otp: Add support for RK3528Jonas Karlman
Add support for the OTP controller in RK3528. The OTPC is similar to the OTPC in RK3568 and can use the same ops for reading OTP data. Signed-off-by: Jonas Karlman <jonas@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-04-11Merge patch series "Switch to using $(PHASE_) in Makefiles"Tom Rini
Tom Rini <trini@konsulko.com> says: This series switches to always using $(PHASE_) in Makefiles when building rather than $(PHASE_) or $(XPL_). It also starts on documenting this part of the build, but as a follow-up we need to rename doc/develop/spl.rst and expand on explaining things a bit. Link: https://lore.kernel.org/r/20250401225851.1125678-1-trini@konsulko.com
2025-04-11Kbuild: Always use $(PHASE_)Tom Rini
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our Makefiles as part of the macros to determine when to do something in our Makefiles based on what phase of the build we are in. For consistency, bring this down to a single macro and use "$(PHASE_)" only. Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-11smbios: select CONFIG_BLOBLISTHeinrich Schuchardt
Since commit 53d5a221632e ("emulation: Use bloblist to hold tables") `make qemu-riscv64_smode_defconfig acpi.config && make` fails with drivers/misc/qfw_smbios.c:93:(.text.qfw_evt_write_smbios_tables+0xe): undefined reference to `bloblist_add' Build with bloblist support. Fixes: 53d5a221632e ("emulation: Use bloblist to hold tables") Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-08Merge branch 'next'Tom Rini
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
2025-04-04Merge patch series "cmd: fuse: Introduce fuse writebuff sub-system and clean up"Tom Rini
Harsha Vardhan V M <h-vm@ti.com> says: This patch series introduces the fuse writebuff sub-system command and makes improvements to the existing fuse implementation by removing the custom string functions. The patches are required to be applied in sequence. The series consists of the following changes: Patch 1 removes custom string functions and replaces them with standard string functions. Patch 2 introduces fuse.rst documentation for fuse commands. Patch 3 introduces the fuse writebuff sub-system command, allowing to write a structured buffer in memory to fuses, and implementing the necessary function calls. Patch 4 enables the fuse sub-system in the K3 platform. Patch 5 updates the fuse.rst documentation to include details about the new fuse writebuff command. These changes aim to improve the fuse sub-system by the removal of custom string functions and the addition of the fuse writebuff command improves fuse programming workflows by allowing to write a structured buffer in memory to efuses. Link: https://lore.kernel.org/r/20250319084714.335777-1-h-vm@ti.com
2025-04-04drivers: k3_fuse: Add fuse sub-system func callsHarsha Vardhan V M
Add K3_FUSE config option to add and enable fuse sub-system implementation function calls. Signed-off-by: Harsha Vardhan V M <h-vm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2025-04-03x86: emulation: Support BLOBLIST_TABLES properlySimon Glass
The existing QEMU implementation mostly ignored BLOBLIST_TABLES and allocates the bulk of the tables with malloc(). Update it to place all tables in the bloblist. Since QEMU declares a size of 128KB regardless of the size of its tables, this requires a larger bloblist. Fix up the e820 table to handle this, keeping the old code as an option for now, to assist with any future bug-fixing. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-04-03acpi: Fix table length for QEMUIlias Apalodimas
The end of the ACPI table is set to 'addr' instead of 'end'. The ACPI code for QEMU relies on those values to mark memory as 'ACPI Reclaim' and as a result the ACPI RSDP ends up in Boot services Data. Reported-by: Björn Töpel <bjorn@kernel.org> Fixes: commit 638cc363484b ("acpi: enable writing ACPI tables on QEMU") Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-01-22Merge patch series "upl: Prerequite patches for updated spec"Tom Rini
Simon Glass <sjg@chromium.org> says: The current UPL spec[1] has been tidied up and improved over the last year, since U-Boot's original UPL support was written. This series includes some prerequisite patches needed for the real UPL patches. It is split from [2] [1] https://github.com/UniversalPayload/spec/tree/3f1450d [2] https://patchwork.ozlabs.org/project/uboot/list/?series=438574&state=* Link: https://lore.kernel.org/r/20250111000029.245022-1-sjg@chromium.org
2025-01-22emulation: Use bloblist to hold tablesSimon Glass
QEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot copies out the SMBIOS tables but points directly to the ACPI ones. The ACPI tables are not aligned on a 4KB boundary, which means that UPL cannot use them directly, since it uses a reserved-memory node for the tables and that it assumed (by EDK2) to be 4KB-aligned. On x86, QEMU provides the tables in a mapped memory region and U-Boot makes use of these directly, thus making it difficult to use any common code. Adjust the logic to fit within the existing table-generation code. Use a bloblist always and ensure that the ACPI tables is placed in an aligned region. Set a size of 8K for QEMU. This does not actually put all the tables in one place, for QEMU, since it currently adds a pointer to the tables in QFW. On ARM, enable bloblist so that SMBIOS tables can be added to the bloblist. Signed-off-by: Simon Glass <sjg@chromium.org>
2025-01-14Merge patch series "SMBIOS improvements"Tom Rini
Raymond Mao <raymond.mao@linaro.org> says: Motivations for changes: Current SMBIOS library and command-line tool is not fully matching with the requirements: 1. Missing support for other mandatory types (#7, #9, #16, #17, #19). 2. Only a few platforms support SMBIOS node from the device tree. 3. Values of some fields are hardcoded in the library other than fetching from the device hardware. 4. Embedded data with dynamic length is not supported (E.g. Contained Object Handles in Type #2 and Contained Elements in Type #3) Changes: 1. Refactor the SMBIOS library and command-line tool to better align with the SMBIOS spec. 2. Create an arch-specific driver for all aarch64-based platforms to fetch SMBIOS private data from the device hardware (processor and cache). 3. Create a sysinfo driver to poppulate platform SMBIOS private data. 4. Add generic SMBIOS DTS file for arm64 platforms for those common strings and values which cannot be retrieved from the system registers. Vendors can create their own SMBIOS node using this as an example. For those boards without SMBIOS nodes, this DTS file can be included to have a generic SMBIOS information of the system. 5. Add support for Type #7 (Cache Information) and link its handles to Type #4. 6. To minimize size-growth for those platforms which have not sufficient ROM spaces or the platforms which don't need detailed SMBIOS information, new added fields are only being built when kconfig GENERATE_SMBIOS_TABLE_VERBOSE is selected. Once this patch is acceptted, subsequent patch sets will add other missing types (#9, #16, #17, #19). Tests: To test this with QEMU arm64, please follow the guide on dt_qemu.rst to get a merged DT to run with. ``` qemu-system-aarch64 -machine virt -machine dumpdtb=qemu.dtb cat <(dtc -I dtb qemu.dtb) <(dtc -I dtb ./dts/dt.dtb | grep -v /dts-v1/) \ | dtc - -o merged.dtb qemu-system-aarch64 -machine virt -nographic -bios u-boot.bin \ -dtb merged.dtb ``` Link: https://lore.kernel.org/r/20241206225438.13866-1-raymond.mao@linaro.org
2025-01-14configs: Enable sysinfo for QEMU Arm64Raymond Mao
Enable sysinfo smbios by default for arm64. When SYSINFO_SMBIOS is enabled, disable QFW_SMBIOS. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-12-23drivers: misc: gsc: add support for prescaledTim Harvey
Add support for Gateworks System Controller pre-scaled ADC input. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-23drivers: misc: gsc: add support for fan controllerTim Harvey
Add support for Gateworks System Controller fan tach input. Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2024-12-04Merge patch series "Add OPP_LOW support for J7200"Tom Rini
Aniket Limaye <a-limaye@ti.com> says: This series adds OPP_LOW spec data in k3_avs driver and enables a config option to select the OPP_LOW performance point. J7200 SOC supports OPP_LOW and OPP_NOM as two Operating Performance Points as per (7.5 Operating Performance Points) section in the Datasheet [0]. - A72SS/MSMC at 2 GHz/1GHz operation must use OPP_NOM. - A72SS/MSMC at 1 GHz/500 MHz operation can use OPP_NOM or OPP_LOW voltage (though OPP_LOW voltage is recommended to reduce power consumption). The actual OPP voltage for the device is read from the efuse and updated in k3_avs_probe(). The default j7200 devicetree and k3_avs driver set OPP_NOM spec frequency and voltage. In the board init file, if K3_OPP_LOW config is enabled, Check if OPP_LOW AVS voltage read from efuse is valid and update frequency (A72 and MSMC) and voltage (VDD_CPU) as per the OPP_LOW spec. [0]: https://www.ti.com/lit/gpn/dra821u (J7200 Datasheet) Test logs: https://gist.github.com/aniket-l/328ad93ed60c2419ed7be9f85e6b6075 - With series applied on master and CONFIG_K3_OPP_LOW enabled in j7200_evm_r5_defconfig - Logs shown with and without efuse register programmed for OPP_0 (Errors out if OPP_0 not found, programs OPP_LOW spec if found) - Voltage update verified using 'i2c md 0x4c 0xe' in u-boot - Frequency update verified using 'k3conf clock dump' in linux Link: https://lore.kernel.org/r/20241119003617.1871183-1-a-limaye@ti.com
2024-12-04misc: k3_avs: Check validity of efuse voltage dataReid Tonking
k3_avs driver checks opp_ids when probing and overwrites the voltage values in vd_data for the respective board. The new k3_avs_check_opp() can be called from board files to check the efuse data and returns 0 if valid. Also add the same check in k3_avs_program_voltage() to error out if the efuse data was not valid. Signed-off-by: Reid Tonking <reidt@ti.com> Signed-off-by: Aniket Limaye <a-limaye@ti.com> Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-12-04misc: k3_avs: Add OPP_LOW voltage and frequency to vd_dataReid Tonking
J7200 SOC supports OPP_LOW and OPP_NOM as two Operating Performance Points as per (7.5 Operating Performance Points) section in the Datasheet [0]. - A72SS/MSMC at 2 GHz/1GHz operation must use OPP_NOM. - A72SS/MSMC at 1 GHz/500 MHz operation can use OPP_NOM or OPP_LOW voltage (though OPP_LOW voltage is recommended to reduce power consumption). Add OPP_LOW frequency->voltage entry to vd_data. The actual OPP voltage for the device is read from the efuse and updated in k3_avs_probe(). OPP_NOM corresponds to OPP_1 and OPP_LOW to OPP_0 efuse register fields, as described in the Datasheet [0] The register offsets and fields are described in the TRM (5.2.6.1.5 WKUP_VTM_VD_OPPVID_j Register) [1]. [0]: https://www.ti.com/lit/gpn/dra821u (J7200 Datasheet) [1]: https://www.ti.com/lit/pdf/spruiu1 (J7200 TRM) Signed-off-by: Reid Tonking <reidt@ti.com> Signed-off-by: Aniket Limaye <a-limaye@ti.com>
2024-12-04eeprom: at24: add ST M24256E Additional Write lockable page supportMarek Vasut
The ST M24256E behaves as a regular M24C256, except for the E variant which uses up another I2C address for Additional Write lockable page. This page is 64 Bytes long and can contain additional data. Add entry for it, so users can describe that page in DT. Note that users still have to describe the main M24C256 area separately as that is on separate I2C address from this page. Unlike M24C32-D and M24C64-D, this part is specifically ST and does not have any comparable M24* counterparts from other vendors, hence the st, vendor prefix. Furthermore, the part name is M24256E without C between the 24 and 256, this is not a typo. Finally, there is M24C256-D part, which does contain 32 Bytes long Additional Write lockable page, which is a different part and not supported by this patch. Datasheet: https://www.st.com/resource/en/datasheet/m24256e-f.pdf From Linux kernel commit: 339cb28b9ee6 ("eeprom: at24: add ST M24256E Additional Write lockable page support") Signed-off-by: Marek Vasut <marex@denx.de>
2024-11-25wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCUHeiko Schocher
Driver for a PMIC watchdog timer controlled via Siemens SCU firmware extensions. Only useful on some Siemens i.MX8-based platforms as special SCFW is needed which provides the needed SCU API. Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Stefan Roese <sr@denx.de>
2024-10-27Merge patch series "Implement ACPI on aarch64"Tom Rini
Patrick Rudolph <patrick.rudolph@9elements.com> says: Based on the existing work done by Simon Glass this series adds support for booting aarch64 devices using ACPI only. As first target QEMU SBSA support is added, which relies on ACPI only to boot an OS. As secondary target the Raspberry Pi4 was used, which is broadly available and allows easy testing of the proposed solution. The series is split into ACPI cleanups and code movements, adding Arm specific ACPI tables and finally SoC and mainboard related changes to boot a Linux on the QEMU SBSA and RPi4. Currently only the mandatory ACPI tables are supported, allowing to boot into Linux without errors. The QEMU SBSA support is feature complete and provides the same functionality as the EDK2 implementation. The changes were tested on real hardware as well on QEMU v9.0: qemu-system-aarch64 -machine sbsa-ref -nographic -cpu cortex-a57 \ -pflash secure-world.rom \ -pflash unsecure-world.rom qemu-system-aarch64 -machine raspi4b -kernel u-boot.bin -cpu cortex-a72 \ -smp 4 -m 2G -drive file=raspbian.img,format=raw,index=0 \ -dtb bcm2711-rpi-4-b.dtb -nographic Tested against FWTS V24.03.00. Known issues: - The QEMU rpi4 support is currently limited as it doesn't emulate PCI, USB or ethernet devices! - The SMP bringup doesn't work on RPi4, but works in QEMU (Possibly cache related). - PCI on RPI4 isn't working on real hardware since the pcie_brcmstb Linux kernel module doesn't support ACPI yet. Link: https://lore.kernel.org/r/20241023132116.970117-1-patrick.rudolph@9elements.com
2024-10-27drivers: misc: irq-uclass: Update irq_get_by_indexPatrick Rudolph
Support reading the "interrupts" property from the devicetree in case the "interrupts-extended" property isn't found. As the "interrupts" property is commonly used, this allows to parse all existing FDT and makes irq_get_by_index() more useful. The "interrupts" property doesn't contain a phandle as "interrupts-extended" does, so implement a new method to locate the interrupt-parent called irq_get_interrupt_parent(). TEST: Read the interrupts from the GIC node for ACPI MADT generation. Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-by: Moritz Fischer <moritzf@google.com>
2024-10-21Merge patch series "Add AVS support for J721S2"Tom Rini
Manorit Chawdhry <m-chawdhry@ti.com> says: This series adds support for Adaptive voltage scaling on J721S2 device [0]. [0]: https://www.ti.com/lit/pdf/spruj28 (Section 5.2.4.1 AVS Support) AVS Test for J721S2: https://gist.github.com/manorit2001/b2fd9f6764a863294d4aa0755c83c84f Boot Test results: https://gist.github.com/manorit2001/d44e035552cb19aadeb0d928d5cb5f26 Link: https://lore.kernel.org/r/20241015-b4-upstream-j721s2-avs-v5-0-5c8087387dc5@ti.com
2024-10-21drivers: misc: k3_avs: Extract MPU clk and dev ID from DTManorit Chawdhry
Different devices have different MPU clk and dev ID. Currently it had been hardcoded. Move it to DT based extraction. Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-21drivers: misc: k3_avs: Check return code while programming AVSManorit Chawdhry
Check if AVS could not be programmed and print a warning. Fixes: 9d233b4e3ed6 ("misc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0") Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com> Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2024-10-13misc: fuse: Update fuse driverYe Li
When OSCCA is enabled, FSB fuse shadow (offset 0x8000) access is disabled for SOC. So update the driver to read fuse from ELE API. The ELE has supported to read all shadow fuses like FSB, reuse the table of FSB for the word index used by ELE API. Add ELE shadow fuse read and write to current ELE fuse driver. But when LC is OEM closed, the ELE read/write shadow fuse APIs are forbidden. Reading from any fuse will return error. This causes problem to u-boot which must read out some fuse no matter whatever LC. So we have to change back to read from FSB and ELE common fuse read API. For using ELE shadow read API for development purpose like checking the ELE shadow fuse write result, user can set env variable "enable_ele_shd" to y to switch it. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13misc: fuse: Fix FSB redundancy fuse word check and clear resYe Li
There is a bug when checking fuse word with redundancy fuse in FSB table. The redundancy fuses are combined into 4 words, so we can't directly use word index to do the check, otherwise the high 4 words will fail to match. And When calling ELE API, res parameter will pass to ELE API to get ELE response value for failure. So most of usage does not initialize this variable and print it after calling ELE API. However, when ELE API returns failure, we can't ensure this res is always set because there may be other failure like MU failure. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13misc: ele_api: Add read/write shadow fuse APIsYe Li
Add ELE APIs to support read and write shadow fuses Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13misc: ele_api: Update ELE read common fuse APIPeng Fan
On iMX8ULP, the word index 1 is used to read OTP_UNIQ_ID with 4 words data responsed. However this special index does not apply others. So restrict the check to i.MX8ULP to avoid problem when reading from fuse word 1 for others, such as i.MX93. Also update header order Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13misc: ele_mu: Clear RR when initialize MUPeng Fan
When OS is doing ELE API call, before OS get the response, OS is force reseted, then it is possible that MU RR has data during initialization in SPL stage. So clear the RR registers, otherwise SPL ELE API call will work abnormal. Cc: Alice Guo <alice.guo@nxp.com> Cc: Marek Vasut <marex@denx.de> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-10-13misc: ele_mu: Update ELE MU to get TR/RR number from HWYe Li
The MU parameter register can provide the TR and RR number. For i.MX95 which has 8 RR is different with i.MX93 and i.MX8ULP, so update the driver to read the PAR for exact TR and RR number. Also update compatible string for i.MX95 ELE MU. Cc: Alice Guo <alice.guo@nxp.com> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com>
2024-10-11Merge patch series "Tidy up use of 'SPL' and CONFIG_SPL_BUILD"Tom Rini
Simon Glass <sjg@chromium.org> says: When the SPL build-phase was first created it was designed to solve a particular problem (the need to init SDRAM so that U-Boot proper could be loaded). It has since expanded to become an important part of U-Boot, with three phases now present: TPL, VPL and SPL Due to this history, the term 'SPL' is used to mean both a particular phase (the one before U-Boot proper) and all the non-proper phases. This has become confusing. For a similar reason CONFIG_SPL_BUILD is set to 'y' for all 'SPL' phases, not just SPL. So code which can only be compiled for actual SPL, for example, must use something like this: #if defined(CONFIG_SPL_BUILD) && !defined(CONFIG_TPL_BUILD) In Makefiles we have similar issues. SPL_ has been used as a variable which expands to either SPL_ or nothing, to chose between options like CONFIG_BLK and CONFIG_SPL_BLK. When TPL appeared, a new SPL_TPL variable was created which expanded to 'SPL_', 'TPL_' or nothing. Later it was updated to support 'VPL_' as well. This series starts a change in terminology and usage to resolve the above issues: - The word 'xPL' is used instead of 'SPL' to mean a non-proper build - A new CONFIG_XPL_BUILD define indicates that the current build is an 'xPL' build - The existing CONFIG_SPL_BUILD is changed to mean SPL; it is not now defined for TPL and VPL phases - The existing SPL_ Makefile variable is renamed to SPL_ - The existing SPL_TPL Makefile variable is renamed to PHASE_ It should be noted that xpl_phase() can generally be used instead of the above CONFIGs without a code-space or run-time penalty. This series does not attempt to convert all of U-Boot to use this new terminology but it makes a start. In particular, renaming spl.h and common/spl seems like a bridge too far at this point. The series is fully bisectable. It has also been checked to ensure there are no code-size changes on any commit.
2024-10-11global: Rename SPL_TPL_ to PHASE_Simon Glass
Use PHASE_ as the symbol to select a particular XPL build. This means that SPL_TPL_ is no-longer set. Update the comment in bootstage to refer to this symbol, instead of SPL_ Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11global: Rename SPL_ to XPL_Simon Glass
Use XPL_ as the symbol to indicate an SPL build. This means that SPL_ is no-longer set. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11drivers: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-11xpl: Rename spl_phase() to xpl_phase()Simon Glass
Rename this function to indicate that it refers to any xPL phase. Signed-off-by: Simon Glass <sjg@chromium.org>
2024-10-04rockchip: Provid SPL control over otp presenceJonas Karlman
The series "rockchip: Add efuse and otp support to more SoCs" [1], merged in v2023.04, refactored and extended the Rockchip efuse and otp driver to support reading eFUSE/OTP for all supported Rockchip SoCs. Due to use of different licenses the drivers were never combined into a single driver, however anything non SoC specific should be applied to both drivers. The commit fe38b88453d2 ("rockchip: Provided SPL control over efuse presence") changed Makefile options for only one of the two drivers, apply same change to keep these two drivers in sync. [1] https://lore.kernel.org/r/20230222224436.1570224-1-jonas@kwiboo.se/ Fixes: fe38b88453d2 ("rockchip: Provided SPL control over efuse presence") Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
2024-10-03rockchip: Provided SPL control over efuse presenceSimon Glass
This driver should not generally be present in SPL, even if misc devices are enabled. Update the Makefile rule accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>