summaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)Author
2023-07-14misc: nuvoton: fix type errorJim Liu
Signed-off-by: Jim Liu <[email protected]>
2023-07-13imx: imx8ulp: start the ELE RNG at bootPeng Fan
On the imx8ulp A1 SoC, the ELE RNG needs to be manually started. Signed-off-by: Clement Faure <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: misc: ele_mu: Update ELE MU driverYe Li
Extend the RX timeout value to 10s, because when authentication is failed the ELE needs long time (>2s for 28M image) to return the result. Print rx wait info per 1s. Also correct TX and RX status registers in debug. Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: misc: ele_mu: Update MU TR registers countYe Li
According to SRM, the Sentinel MU has 8 TR and 4 RR registers. All of them are used for ELE message. So update TR count to 8 and fix a typo in receive msg Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: ele_api: add DEK Blob generationPeng Fan
- Add crc computation. - Add ele_generate_dek_blob API for encrypted boot support. Signed-off-by: Clement Faure <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: ele_api: support program secure fuse and return lifecyclePeng Fan
Add two ELE API: ele_return_lifecycle_update and ele_write_secure_fuse Add two cmd: ahab_return_lifecycle and ahab_sec_fuse_prog Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: use generic name ele(EdgeLockSecure Enclave)Peng Fan
Per NXP requirement, we rename all the NXP EdgeLock Secure Enclave code including comment, folder and API name to ELE to align. Signed-off-by: Peng Fan <[email protected]>
2023-07-13imx: scu_api: update to version 1.16 and add more APIsPeng Fan
Upgrade SCFW API to 1.16 Add more APIs: sc_misc_get_button_status sc_pm_reboot sc_seco_v2x_build_info Signed-off-by: Peng Fan <[email protected]>
2023-05-21imx: move imx8 sci header file to include/firmware/imxPeng Fan
Move imx8 sci header file to include/firmware/imx, then we could use build macro to reuse some i.MX8 drivers for i.MX9, such as drivers/cpu/imx8_cpu.c. Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Stefano Babic <[email protected]>
2023-05-04k3: pmic: Clear ESM masksNeha Malcom Francis
ESM MCU masks must be set to 0h so that PMIC can handle errors that require attention for example SYS_SAFETY_ERRn. The required bits must be cleared: ESM_MCU_RST_MASK, ESM_MCU_FAIL_MASK, ESM_MCU_PIN_MASK. If PMIC expected to handle errors, make sure EVM is configured to connect SOC_SAFETY_ERRz (Main) to the PMIC. Note that even though the User Guide for TPS65941 for J721E mentions that these bits are reset to 0h; it is not reflected once board boots to kernel, possibly due to NVM configurations. Eithercase, it is best to account for this from R5 SPL side as well. Signed-off-by: Neha Malcom Francis <[email protected]>
2023-05-02misc: add Qualcomm GENI SE QUP device driverVladimir Zapolskiy
This change adds a Qualcomm GENI SE QUP device driver as a wrapper for actually enabled and used serial devices found on a board. At the moment the driver is pretty simple, its intention is to populate childred devices and provide I/O mem read interface to them as clients, this is needed for GENI UART driver to set up a proper clock divider and provide the actually asked baud rate. Signed-off-by: Vladimir Zapolskiy <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]>
2023-04-21rockchip: otp: fix misc_read() return valuesJohn Keeping
The documentation for misc_read() says: Return: number of bytes read if OK (may be 0 if EOF), -ve on error The Rockchip efuse driver implements this so it should return the number of bytes read rather than zero on success. Fix this so that the driver follows the usual contract for read operations. Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Jonas Karlman <[email protected]> Signed-off-by: John Keeping <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-04-21rockchip: efuse: fix misc_read() return valuesJohn Keeping
The documentation for misc_read() says: Return: number of bytes read if OK (may be 0 if EOF), -ve on error The Rockchip efuse driver implements this so it should return the number of bytes read rather than zero on success. Fix this so that the driver follows the usual contract for read operations. Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Jonas Karlman <[email protected]> Signed-off-by: John Keeping <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-04-08misc: ub251xb: Fix use of CONFIG_IS_ENABLED on DM_REGULATORMarek Vasut
The DM_REGULATOR symbol has SPL counterpart in: drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR Use CONFIG_IS_ENABLED() macro to match on the correct variant depending on the build stage. Signed-off-by: Marek Vasut <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-31Merge tag 'u-boot-imx-next-20230331' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next u-boot-imx-next-20230331 for next --------------------------------- CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15819 i.MX patches queued for next: - Conversions to DM_SERIAL - Fixes for Toradex boards - Gateworks Boards - i.MX8ULP - EQoS support / fixes, changes in boards
2023-03-30drivers: pci: sandbox: Add stub sandbox PCI MPS supportStephen Carlson
Reports the sandbox swapcase PCI Express device to support a 256 byte Maximum Payload Size for MPS tuning tests. Signed-off-by: Stephen Carlson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-03-30misc: imx: remove DM dependency for ocotp driver in SPLJean-Marie Lemetayer
The ocotp driver is available for regular and SPL builds using the (SPL_)MXC_OCOTP configuration. Also, the ocotp driver does not support the driver model (DM) configuration. But, for SPL builds, the SPL_MXC_OCOTP configuration depends on SPL_MISC which implies on SPL_DM. This commit replaces the dependency on SPL_MISC with SPL_DRIVERS_MISC. So the only requirement is to have enabled miscellaneous drivers for the SPL. Signed-off-by: Jean-Marie Lemetayer <[email protected]>
2023-03-29misc: sentinel: s400_api: Use new command request definitionsYe Li
Remove legacy command definitions, change to use new ELE_xxx command request. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29misc: sentinel: s400_api: Add get_events APIYe Li
Add get_events API to retrieve any singular events that has occurred since the FW has started from sentinel Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29misc: fuse: Lock 8ULP ECC-protected fuse when programmingYe Li
The ECC fuse on 8ULP can't be written twice. If any user did it, the ECC value would be wrong then cause accessing problem to the fuse. The patch will lock the ECC fuse word to avoid this problem. For iMX9, the OTP controller automatically prevents an ECC fuse word to be written twice. So it does not need the setting. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]>
2023-03-29misc: fuse: Update fuse mapping for 8ULP S400 APIYe Li
Since new 8ULP A1 S400 FW (v0.0.8-e329b760) can support to read more fuses: like PMU trim, Test flow/USB, GP1-5, GP8-10. Update the u-boot driver for the new mapping. Signed-off-by: Ye Li <[email protected]> Reviewed-by: Peng Fan <[email protected]> Reviewed-by: Alice Guo <[email protected]>
2023-02-28rockchip: efuse: Add support for RK3036Jonas Karlman
Add support for rk3036 compatible. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: efuse: Add support for RK3128Jonas Karlman
Add support for rk3128 compatible. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: efuse: Add support for RK3328Jonas Karlman
Add support for rk3328 compatible. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: efuse: Add support for RK3288 and moreJonas Karlman
Add support for rk3066a, rk3188, rk322x and rk3288 compatible. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: efuse: Refactor to use driver data and opsJonas Karlman
Refactor the driver to use driver data and ops to simplify handling of SoCs that require a unique read op. Move handling of the aligned bounce buffer to main read op in order to keep the SoC unique read op simple. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: otp: Add dump_otp debug commandJonas Karlman
Add a simple debug command to dump the content of the otp. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: otp: Add support for RK3588Jonas Karlman
Add support for rk3588 compatible. Adjust offset using driver data in main read op. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: otp: Add support for RK3568Jonas Karlman
Add support for rk3568 compatible. Handle allocation of an aligned bounce buffer in main read op in order to keep the SoC unique read op simple. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-28rockchip: otp: Refactor to use driver data and opsJonas Karlman
Refactor the driver to use driver data and ops to simplify handling of SoCs that require a unique read op. Use readl_poll_sleep_timeout instead of a custom poll loop, and add validation of input parameter to main read op. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2023-02-09Correct SPL use of A003399_NOR_WORKAROUNDSimon Glass
This converts 1 usage of this option to the non-SPL form, since there is no SPL_A003399_NOR_WORKAROUND defined in Kconfig Signed-off-by: Simon Glass <[email protected]>
2023-02-07misc: Drop mc9sdz60 driverSimon Glass
Drop this unused driver. Signed-off-by: Simon Glass <[email protected]>
2023-02-07misc: Drop ali512xSimon Glass
Drop this unused driver. Signed-off-by: Simon Glass <[email protected]>
2023-02-06qemu: Add a bootdev for qfwSimon Glass
Add a bootdev device for qfw so that it can be used with standard boot. This simply checks for the correct method and then does the read. Most of the other logic is handed in a new bootmeth driver. Signed-off-by: Simon Glass <[email protected]>
2023-02-01Merge tag 'fsl-qoriq-2023-2-1' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq make QSPI clock selection optional during SoC init for ls102xa Fix regulator name for ls2_sfp Update NXP RCW github repo
2023-02-01misc: ls2_sfp: Fix regulator nameSean Anderson
Unlike in Linux, -supply is not automatically appended to regulator requests. Add it. Fixes: 2645bc0e12 ("arm: layerscape: Add sfp driver") Signed-off-by: Sean Anderson <[email protected]> Signed-off-by: Peng Fan <[email protected]>
2023-01-31imx8: scu_api: sync sc_rm_is_pad_owned api changeYe Li
SCFW has fixed a overflow issue in sc_rm_is_pad_owned API. This requires u-boot to update API implementation, since it will cause compatible issue. Otherwise all pad checking will have problem and cause pad setting not continue. Due to the compatible issue, the new u-boot only works with new SCFW (API version: 1.21 and later). old scfw + old u-boot: API overflow issue old scfw + new u-boot, or new scfw + old u-boot: API compatible issue new scfw + new u-boot: Working Signed-off-by: Ye Li <[email protected]> Reviewed-by : Jason Liu <[email protected]> Signed-off-by: Marcel Ziswiler <[email protected]>
2023-01-20global: Finish CONFIG -> CFG migrationTom Rini
At this point, the remaining places where we have a symbol that is defined as CONFIG_... are in fairly odd locations. While as much dead code has been removed as possible, some of these locations are simply less obvious at first. In other cases, this code is used, but was defined in such a way as to have been missed by earlier checks. Perform a rename of all such remaining symbols to be CFG_... rather than CONFIG_... Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2023-01-12misc: fs_loader: Add function to get the chosen loaderSean Anderson
The fs_loader device is used to pull in settings via the chosen node. However, there was no library function for this, so arria10 was doing it explicitly. This function subsumes that, and uses ofnode_get_chosen_node instead of navigating the device tree directly. Because fs_loader pulls its config from the environment by default, it's fine to create a device with nothing backing it at all. Doing this allows enabling CONFIG_FS_LOADER without needing to modify the device tree. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-12-23kbuild: Remove uncmd_spl logicTom Rini
At this point in the conversion there should be no need to have logic to disable some symbol during the SPL build as all symbols should have an SPL counterpart. The main real changes done here are that we now must make proper use of CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we developed prior to CONFIG_IS_ENABLED() being available. Signed-off-by: Tom Rini <[email protected]>
2022-12-05Convert CONFIG_SMSC_LPC47M et al to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SMSC_LPC47M CONFIG_SMSC_SIO1007 Signed-off-by: Tom Rini <[email protected]>
2022-12-05Convert CONFIG_MXS_OCOTP to KconfigTom Rini
This converts the following to Kconfig: CONFIG_MXS_OCOTP Signed-off-by: Tom Rini <[email protected]>
2022-12-05Convert CONFIG_FSL_IIM to KconfigTom Rini
This converts the following to Kconfig: CONFIG_FSL_IIM Signed-off-by: Tom Rini <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_* to CFG_SYS_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-12-05global: Move remaining CONFIG_SYS_NUM_* to CFG_SYS_NUM_*Tom Rini
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NUM namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-11-10global: Migrate CONFIG_SYS_FSL* symbols to the CFG_SYS namespaceTom Rini
Migrate all of COFIG_SYS_FSL* to the CFG_SYS namespace. Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-09-14misc: usb251xb: Support 8/16 bit device tree valuesStefan Herbrechtsmeier
The device tree binding [1] specify the vendor-id, product-id, device-id and language-id as 16 bit values and the linux driver reads the boost-up value as 8 bit value. [1] https://www.kernel.org/doc/Documentation/devicetree/bindings/usb/usb251xb.txt Signed-off-by: Stefan Herbrechtsmeier <[email protected]> Reviewed-by: Marek Vasut <[email protected]>
2022-08-09misc: atsha204a: Don't check for error when waking up the devicePali Rohár
The device ignores any levels or transitions on the SCL pin when the device is idle, asleep or during waking up. Linux kernel driver for atsha204a (atmel-sha204a.ko) also ignores return value from i2c wakeup send command, see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/crypto/atmel-i2c.c?h=v5.19#n174 And also userspace Turris libatsha204 library ignores return value from wakeup send command, see: https://gitlab.nic.cz/turris/libatsha204/-/blob/v29.2/src/libatsha204/layer_ni2c.c#L75-76 U-Boot driver should do same thing. Fixes waking up ATSHA204 on Turris 1.x boards. Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Tested-by: Paweł Anikiel <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-08-04Audit <flash.h> inclusionTom Rini
A large number of files include <flash.h> as it used to be how various SPI flash related functions were found, or for other reasons entirely. In order to migrate some further CONFIG symbols to Kconfig we need to not include flash.h in cases where we don't have a NOR flash of some sort enabled. Furthermore, in cases where we are in common code and it doesn't make sense to try and further refactor the code itself in to new files we need to guard this inclusion. Signed-off-by: Tom Rini <[email protected]>
2022-07-26misc: fuse: update the code for accessing fuse of i.MX93Alice Guo
Sentinel have read access of OTP shadow register 0-511, and fsb have read access of shadow 0-51/312-511. Reviewed-by: Ye Li <[email protected]> Signed-off-by: Alice Guo <[email protected]> Signed-off-by: Peng Fan <[email protected]>