summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2022-06-13arm: tegra: Update some DT compatiblesPeter Robinson
Some of the DT compatibles have changed upstream so add new DT compatibles to ensure things continue to keep working if the device trees are updated. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Tom Warren <[email protected]>
2022-06-13pci: tegra: Update error prints with new linesPeter Robinson
Add new lines to make errorr messages easier to read. Signed-off-by: Peter Robinson <[email protected]> Signed-off-by: Tom Warren <[email protected]>
2022-06-10firmware: ti_sci_static_data: add static DMA chan dataVignesh Raghavendra
Add range of DMA channels available for R5 SPL usage before DM firmware is loaded. Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-06-10dma: ti: Add PSIL data for AM62x DMASSVignesh Raghavendra
Add PSIL data for AM62x SoC. Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-06-10arm: mach-k3: am62: Introduce autogenerated SoC dataSuman Anna
Introduce autogenerated SoC data support clk and device data for the AM62. Hook it upto to power-domain and clk frameworks of U-Boot. Signed-off-by: Dave Gerlach <[email protected]> Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]>
2022-06-10arm: mach-k3: Introduce the basic files to support AM62Suman Anna
The AM62 SoC family is the follow on AM335x built on K3 Multicore SoC architecture platform, providing ultra-low-power modes, dual display, multi-sensor edge compute, security and other BOM-saving integration. The AM62 SoC targets broad market to enable applications such as Industrial HMI, PLC/CNC/Robot control, Medical Equipment, Building Automation, Appliances and more. Some highlights of this SoC are: * Quad-Cortex-A53s (running up to 1.4GHz) in a single cluster. Pin-to-pin compatible options for single and quad core are available. * Cortex-M4F for general-purpose or safety usage. * Dual display support, providing 24-bit RBG parallel interface and OLDI/LVDS-4 Lane x2, up to 200MHz pixel clock support for 2K display resolution. * Selectable GPUsupport, up to 8GFLOPS, providing better user experience in 3D graphic display case and Android. * PRU(Programmable Realtime Unit) support for customized programmable interfaces/IOs. * Integrated Giga-bit Ethernet switch supporting up to a total of two external ports (TSN capable). * 9xUARTs, 5xSPI, 6xI2C, 2xUSB2, 3xCAN-FD, 3x eMMC and SD, GPMC for NAND/FPGA connection, OSPI memory controller, 3xMcASP for audio, 1x CSI-RX-4L for Camera, eCAP/eQEP, ePWM, among other peripherals. * Dedicated Centralized System Controller for Security, Power, and Resource Management. * Multiple low power modes support, ex: Deep sleep,Standby, MCU-only, enabling battery powered system design. AM625 is the first device of the family. Add DT bindings for the same. More details can be found in the Technical Reference Manual: https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Gowtham Tammana <[email protected]> Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Nishanth Menon <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-06-10soc: ti: k3-socinfo: Add entry for AM62X SoC familySuman Anna
Add support for AM62x SoC identification. Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2022-06-10drivers: mmc: am654_sdhci: Add new compatible for AM62 SoCAswath Govindraju
The phy used in the 8 bit instance has been changed to the phy used in 4 bit instance on AM62 SoC. This implies the phy configuration required for both the instances of mmc are similar. Therefore, add a new compatible for AM62 SoC using the driver data of am64 4 bit instance. Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Vignesh Raghavendra <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]>
2022-06-10rng: nuvoton: Add NPCM7xx rng driverJim Liu
Add Nuvoton BMC NPCM750 rng driver. Signed-off-by: Jim Liu <[email protected]>
2022-06-10spi: synquacer: simplify tx completion checkingMasahisa Kojima
There is a TX-FIFO and Shift Register empty(TFES) status bit in spi controller. This commit checks the TFES bit to wait the TX transfer completes. Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Satoru Okamoto <[email protected]> Acked-by: Jassi Brar <[email protected]>
2022-06-10spi: synquacer: DMSTART bit must not be set while transferringMasahisa Kojima
DMSTART bit must not be set while there is active transfer. This commit sets the DMSTART bit only when the transfer begins. Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Satoru Okamoto <[email protected]> Acked-by: Jassi Brar <[email protected]>
2022-06-10spi: synquacer: wait until slave is deselectedMasahisa Kojima
synquacer_cs_set() function does not wait the chip select is deasserted when the driver sets the DMSTOP to deselect the slave. This commit checks the Slave Select Released(SRS) bit to wait until the slave is deselected. Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Satoru Okamoto <[email protected]> Acked-by: Jassi Brar <[email protected]>
2022-06-10spi: synquacer: busy variable must be initialized before useMasahisa Kojima
"busy" variable is ORed without being initialized, must be zeroed before use. Signed-off-by: Masahisa Kojima <[email protected]> Signed-off-by: Satoru Okamoto <[email protected]> Acked-by: Jassi Brar <[email protected]>
2022-06-10pinctrl: nuvoton: Add NPCM7xx pinctrl driverJim Liu
Add Nuvoton BMC NPCM750 Pinmux and Pinconf support. Signed-off-by: Jim Liu <[email protected]>
2022-06-08test: Load mac address using misc deviceSean Anderson
This loads a mac address using a misc device using the nvmem interface. Signed-off-by: Sean Anderson <[email protected]>
2022-06-08test: Load mac address using RTCSean Anderson
This uses the nvmem API to load a mac address from an RTC. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08test: Load mac address with i2c eepromSean Anderson
This uses an i2c eeprom to load a mac address using the nvmem interface. Enable I2C_EEPROM for sandbox SPL since it is the only sandbox config which doesn't enable it eeprom. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08misc: Add support for nvmem cellsSean Anderson
This adds support for "nvmem cells" as seen in Linux. The nvmem device class in Linux is used for various assorted ROMs and EEPROMs. In this sense, it is similar to UCLASS_MISC, but also includes UCLASS_I2C_EEPROM, UCLASS_RTC, and UCLASS_MTD. New drivers corresponding to a Linux-style nvmem device should be implemented as one of the previously-mentioned uclasses. The nvmem API acts as a compatibility layer to adapt the (slightly different) APIs of these uclasses. It also handles the lookup of nvmem cells. While nvmem devices can be accessed directly, they are most often used by reading/writing contiguous values called "cells". Cells typically hold information like calibration, versions, or configuration (such as mac addresses). nvmem devices can specify "cells" in their device tree: qfprom: eeprom@700000 { #address-cells = <1>; #size-cells = <1>; reg = <0x00700000 0x100000>; /* ... */ tsens_calibration: calib@404 { reg = <0x404 0x10>; }; }; which can then be referenced like: tsens { /* ... */ nvmem-cells = <&tsens_calibration>; nvmem-cell-names = "calibration"; }; The tsens driver could then read the calibration value like: struct nvmem_cell cal_cell; u8 cal[16]; nvmem_cell_get_by_name(dev, "calibration", &cal_cell); nvmem_cell_read(&cal_cell, cal, sizeof(cal)); Because nvmem devices are not all of the same uclass, supported uclasses must register a nvmem_interface struct. This allows CONFIG_NVMEM to be enabled without depending on specific uclasses. At the moment, nvmem_interface is very bare-bones, and assumes that no initialization is necessary. However, this could be amended in the future. Although I2C_EEPROM and MISC are quite similar (and could likely be unified), they present different read/write function signatures. To abstract over this, NVMEM uses the same read/write signature as Linux. In particular, short read/writes are not allowed, which is allowed by MISC. The functionality implemented by nvmem cells is very similar to that provided by i2c_eeprom_partition. "fixed-partition"s for eeproms does not seem to have made its way into Linux or into any device tree other than sandbox. It is possible that with the introduction of this API it would be possible to remove it. Signed-off-by: Sean Anderson <[email protected]>
2022-06-08misc: i2c_eeprom: Make i2c_eeprom_write use a const bufSean Anderson
i2c_eeprom_ops->write uses a const buf, so use one for the wrapper function as well. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08sandbox: net: Remove fake-host-hwaddrSean Anderson
Instead of reading a pseudo-rom mac address from the device tree, just use whatever we get from write_hwaddr. This has the effect of using the mac address from the environment (or from the device tree, if it is specified). Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ramon Fried <[email protected]>
2022-06-08virtio: rng: Check length before copyingAndrew Scull
Check the length of data written by the device is consistent with the size of the buffers to avoid out-of-bounds memory accesses in case values aren't consistent. Signed-off-by: Andrew Scull <[email protected]> Cc: Sughosh Ganu <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio: sandbox: Bind RNG rather than block deviceAndrew Scull
The virtio-rng driver is extremely simple, making it suitable for testing more of the virtio uclass logic. Have the sandbox driver bind the virtio-rng driver rather than the virtio-blk driver so it can be used in tests. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio: sandbox: Fix device features bitfieldAndrew Scull
The virtio sandbox transport was setting the device features value to the bit index rather than shifting a bit to the right index. Fix this using the bit manipulation macros. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Check used descriptors are chain headsAndrew Scull
When the device returns used buffers, it should refer to the descriptor that is the head of the descriptor chain for that buffer. Confirm this to be the case by tracking the head of descriptor chains that have been made available to the device. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Maintain a shadow copy of descriptorsAndrew Scull
The shared descriptors should only be written by the guest driver, however, the device is still able to overwrite and corrupt them. Maintain a private shadow copy of the descriptors for the driver to use for state tracking, removing the need to read from the shared descriptors. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Add helper to attach vring descriptorAndrew Scull
Move the logic for attaching a descriptor to its own function. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2022-06-08virtio_ring: Merge identical variablesAndrew Scull
The variables `total_sg` and `descs_used` have the same value. Replace the few uses of `total_sg` with `descs_used` to simplify the situation. Signed-off-by: Andrew Scull <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Bin Meng <[email protected]>
2022-06-07misc: Port USB251xB/xBi Hi-Speed Hub Controller Driver from LinuxMarek Vasut
This patch adds a driver for configuration of the Microchip USB251xB/xBi USB 2.0 hub controller series with USB 2.0 upstream connectivity, SMBus configuration interface and two to four USB 2.0 downstream ports. This is ported from Linux as of Linux kernel commit 5c2b9c61ae5d8 ("usb: usb251xb: add boost-up property support") Signed-off-by: Marek Vasut <[email protected]> Cc: Bin Meng <[email protected]> Cc: Michal Simek <[email protected]> Cc: Simon Glass <[email protected]>
2022-06-07usb: xhci-mtk: disable all ports when disable host controllerChunfeng Yun
This is used to avoid the ports status of IPPC being brought in kernel stage, it may cause ports error especially when the xhci controller is a component of dual-role controller. Reported-by: Yun-Chien Yu <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]>
2022-06-06serial: Replace CONFIG_DEBUG_UART_BASE by CONFIG_VAL(DEBUG_UART_BASE)Pali Rohár
CONFIG_VAL(DEBUG_UART_BASE) expands to CONFIG_DEBUG_UART_BASE or CONFIG_SPL_DEBUG_UART_BASE or CONFIG_TPL_DEBUG_UART_BASE and allows boards to set different values for SPL, TPL and U-Boot Proper. For ns16550 driver this support is there since commit d293759d55cc ("serial: ns16550: Add support for SPL_DEBUG_UART_BASE"). Signed-off-by: Pali Rohár <[email protected]>
2022-06-06pci: Handle failed calloc in decode_regions()Pierre-Clément Tosi
Add a check for calloc() failing to allocate the requested memory. Make decode_regions() return an error code. Cc: Bin Meng <[email protected]> Cc: Simon Glass <[email protected]> Cc: Stefan Roese <[email protected]> Signed-off-by: Pierre-Clément Tosi <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-06-06drivers:optee:rpmb: initialize drivers of mmc devices in UCLASS_BLK for rpmb ↵Judy Wang
access CONFIG_MMC only initializes drivers for devices in UCLASS_MMC, we need to initialize drivers for devices of type IF_TYPE_MMC in UCLASS_BLK as well because they are the child devices of devices in UCLASS_MMC. This is required for feature RPMB since it will access eMMC in optee-os. Signed-off-by: Judy Wang <[email protected]> [trini: Add my SoB line and adjust Judy's name in git, having emailed off-list] Signed-off-by: Tom Rini <[email protected]>
2022-06-06serial: smh: Fake tstcSean Anderson
ARM semihosting provides no provisions for determining if there is pending input. The only way to determine if there is console input is to do a read (and block until the user types something). For this reason, we always return true for tstc (since you will always get input if you try). However, this behavior can cause problems for code which expects tstc to eventually be empty. In query_console_serial, there is the following construct: /* empty input buffer */ while (tstc()) getchar(); with the current implementation, this effectively turns into an infinite loop. To avoid this, fake tstc by returning false half of the time. This is generally OK because the other common construct looks like do { if (tstc()) process(getchar()); } while (!timeout()); so it's fine if we only read a new character every other loop. This will break things like CYGACC_COMM_IF_GETC_TIMEOUT, but that could be reworked to test on the timeout instead of calling tstc again (and ymodem over semihosted serial is not that useful in the first place). Signed-off-by: Sean Anderson <[email protected]>
2022-06-06dm: core: convert of_machine_is_compatible to livetreePatrick Delaunay
Replace in the function of_machine_is_compatible(), the used API fdt_node_check_compatible() by ofnode_device_is_compatible() to support a live tree. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Patrice Chotard <[email protected]>
2022-06-06mtd: mtdpart: Change size type from fdt_addr_t to fdt_size_tPali Rohár
Set correct type for 3rd argument of ofnode_get_addr_size_index_notrans() function. It expects fdt_size_t * and not fdt_addr_t *. When these two types do not have same size then U-Boot throw compile warning: drivers/mtd/mtdpart.c: In function ‘add_mtd_partitions_of’: drivers/mtd/mtdpart.c:906:57: warning: passing argument 3 of ‘ofnode_get_addr_size_index_notrans’ from incompatible pointer type [-Wincompatible-pointer-types] offset = ofnode_get_addr_size_index_notrans(child, 0, &size); ^~~~~ In file included from include/dm/device.h:13, from include/linux/mtd/mtd.h:26, from include/ubi_uboot.h:28, from drivers/mtd/mtdpart.c:27: include/dm/ofnode.h:530:25: note: expected ‘fdt_size_t *’ {aka ‘long long unsigned int *’} but argument is of type ‘fdt_addr_t *’ {aka ‘long unsigned int *’} fdt_size_t *size); ~~~~~~~~~~~~^~~~ Signed-off-by: Pali Rohár <[email protected]> Reviewed-by: Marek Behún <[email protected]>
2022-06-06misc: Correct Kconfig dependencies for a number of optionsTom Rini
We have many cases of SPL (or TPL or VPL) drivers that don't depend on SPL_MISC (and so on) but rather just MISC. Cc: Sean Anderson <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Sean Anderson <[email protected]>
2022-06-06dm: fix DM_EVENT dependenciesHeinrich Schuchardt
CONFIG_DM_EVENT without CONFIG_EVENT is non-functional. Let CONFIG_DM_EVENT depend on CONFIG_EVENT. Remove superfluous stub in include/event.h. Fixes: 5b896ed5856f ("event: Add events for device probe/remove") Reported-by: Jan Kiszka <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-06-06Convert CONFIG_FIXED_SDHCI_ALIGNED_BUFFER to KconfigChris Packham
CONFIG_FIXED_SDHCI_ALIGNED_BUFFER is needed on some Marvell SoCs when booting from MMC. All existing usages of this have the same value so make this the default and have the Kconfig option depend on SPL && MVEBU_SPL_BOOT_DEVICE_MMC. Signed-off-by: Chris Packham <[email protected]> Reviewed-by: Marek Behún <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
2022-06-06Convert CONFIG_TPL_NAND_INIT to KconfigTom Rini
This converts the following to Kconfig: CONFIG_TPL_NAND_INIT Signed-off-by: Tom Rini <[email protected]>
2022-06-06arm: pxa: Remove CONFIG_CPU_PXA25XTom Rini
There are no platforms that set this, remove the code. Signed-off-by: Tom Rini <[email protected]>
2022-06-06Convert CONFIG_SPL_COMMON_INIT_DDR to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SPL_COMMON_INIT_DDR Signed-off-by: Tom Rini <[email protected]>
2022-06-06Convert CONFIG_SPL_SYS_MALLOC_SIMPLE to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SPL_SYS_MALLOC_SIMPLE The problem here is that a few platforms have been doing: #ifdef CONFIG_SPL_BUILD #define CONFIG_SYS_MALLOC_SIMPLE #endif instead of defining CONFIG_SPL_SYS_MALLOC_SIMPLE directly. Correct this and update the documentation in a few places to match usage. Signed-off-by: Tom Rini <[email protected]>
2022-06-06Convert CONFIG_SYS_CFI_FLASH_STATUS_POLL to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_CFI_FLASH_STATUS_POLL Signed-off-by: Tom Rini <[email protected]>
2022-06-06Convert CONFIG_SYS_FLASH_CFI_WIDTH to KconfigTom Rini
This converts the following to Kconfig: CONFIG_SYS_FLASH_CFI_WIDTH Signed-off-by: Tom Rini <[email protected]>
2022-06-06arm: omap2plus: Move CONFIG_SYS_PTV out of CONFIG namespaceTom Rini
This is always defined to 2, and referenced in two places. Move the define to <asm/omap_common.h> and make sure the code that uses this includes that file. Make <asm/arch-omap*/clock.h> not include that file, as we don't need to be doing so. Signed-off-by: Tom Rini <[email protected]>
2022-06-03net: enetc: unregister mdiobusMichael Walle
If the device fails to probe - for example, when there is no ethaddr set - then the private data is automatically freed but the mdiobus remains registered. Fixes: 1e354cb39314 ("drivers: net: fsl_enetc: register internal MDIO bus") Signed-off-by: Michael Walle <[email protected]>
2022-05-26net: e1000: Depend on CONFIG_PCISean Anderson
This driver depends on PCI. Update the Kconfig accordingly. Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Tim Harvey <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2022-05-25Merge tag 'xilinx-for-v2022.07-rc4' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2022.07-rc4 zynqmp: - Fix DP PLL configuration for zcu102/zcu106 and SOM - Fix split mode for starting R5s - DT fixes - Remove firmware node for mini configurations - Wire TEE for multi DTB fit image xilinx: - Handle board_get_usable_ram_top(0) properly phy: - Extend psgtr timeout mmc: - Fix mini configuration which misses zynqmp_pm_is_function_supported()
2022-05-24Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini
The bulk of it is (finally!) some DT sync from the kernel. We refrained from syncing one incompatible change, as this would spoil booting Linux kernels before v5.13 with U-Boot's DT (via UEFI, for instance). I test booted Linux v5.18 and v5.4 with that new DT on some boards, and the headless peripherals (MMC, USB, Ethernet) seemed to work. The rest are fixes: - silencing missing clock warnings due to the new pinctrl driver - fixing "UART0 on PortF", allowing UART access through the SD card pins - add an F1C100s clock driver, to enable MMC support (SPI comes later) - some cleanups for CONS_INDEX_n in Kconfig Tested on BananaPi-M1, Pine64-LTS, Pine-H64, X96-Mate (H616) and OrangePi-Zero.
2022-05-24Merge tag 'tpm-24052022' of https://source.denx.de/u-boot/custodians/u-boot-tpmTom Rini
Add support for i2c devices