summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2024-05-02mmc: am654_sdhci: Fix ITAPDLY for HS400 timingJudith Mendez
At HS400 mode the ITAPDLY value is that from High Speed mode which is incorrect and may cause boot failures. The ITAPDLY for HS400 speed mode should be the same as ITAPDLY as HS200 timing after tuning is executed. Add the functionality to save ITAPDLY from HS200 tuning and save as HS400 ITAPDLY. Upstream-Status: Backport [f13a830e6e4ad884069e25c7cd2dc333b474da98] Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay") Signed-off-by: Judith Mendez <jm@ti.com>
2024-05-02mmc: am654_sdhci: Set ENDLL=1 for DDR52 modeJudith Mendez
According to the device datasheet [0], ENDLL=1 for DDR52 mode, so call am654_sdhci_setup_dll() and write itapdly after since we do not carry out tuning. [0] https://www.ti.com/lit/ds/symlink/am62p.pdf Upstream-Status: Backport [a124e31a97cd2963181d3a8a00678998bf9958a2] Fixes: c964447ea3d6 ("mmc: am654_sdhci: Add support for input tap delay") Signed-off-by: Judith Mendez <jm@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2024-05-02mmc: am654_sdhci: Add itap_del_ena[] to store itapdlyena bitJudith Mendez
Set itap_del_ena if ITAPDLY is found in DT or if the tuning algorithm was executed and found the optimal ITAPDLY. Add the functionality to save ITAPDLYENA that can be referenced later by storing the bit in array itap_del_ena[]. Upstream-Status: Backport [056af04a39aef6d9777a8d4fc29917b4494db4a5] Signed-off-by: Judith Mendez <jm@ti.com>
2024-05-02mmc: am654_sdhci: Fix OTAP/ITAP delay valuesNitin Yadav
U-Boot is failing to boot class U1 UHS SD cards due to incorrect OTAP and ITAP delay select values. Update OTAP and ITAP delay select values from DT. Upstream-Status: Backport [5048b5c61afddddb0a6ff2e6bffdd9dd028e399b] Fixes: c7d106b4eb3 ("mmc: am654_sdhci: Update output tap delay writes") Signed-off-by: Nitin Yadav <n-yadav@ti.com> Signed-off-by: Judith Mendez <jm@ti.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2024-05-02mmc: am654_sdhci: Add tuning algorithm for delay chainJudith Mendez
Currently the sdhci_am654 driver only supports one tuning algorithm which should be used only when DLL is enabled. The ITAPDLY is selected from the largest passing window and the buffer is viewed as a circular buffer. The new tuning algorithm should be used when the delay chain is enabled; the ITAPDLY is selected from the largest passing window and the buffer is not viewed as a circular buffer. This implementation is based off of the following paper: [1]. Also add support for multiple failing windows. [1] https://www.ti.com/lit/an/spract9/spract9.pdf Upstream-Status: Backport [6b8dd9ca6e06bc9ebd3d55cbbe094d4947e197bf] Fixes: a759abf569d4 ("mmc: am654_sdhci: Add support for software tuning") Signed-off-by: Judith Mendez <jm@ti.com> Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2024-03-21video: Assume video to be active if SPL is passing video hand-offDevarsh Thakkar
If SPL is passing video handoff structure to U-boot then it is safe to assume that SPL has already enabled video and that's why it is passing video handoff structure to U-boot so that U-boot can preserve the framebuffer. Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21video: Fill video handoff in video post probeDevarsh Thakkar
Fill video handoff fields in video_post_probe as at this point we have full framebuffer-related information. Also fill all the fields available in video hand-off struct as those were missing earlier and U-boot framework expects them to be filled for some of the functionalities. While filling framebuffer size in video hand-off structure use the actual framebuffer region size as derived from gd->video_top and gd->video_bottom instead of directly using the size populated in video_uc_plat as it contains unaligned size. Reported-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21ram: k3-ddrss: Set SDRAM_IDX using device private data, ddr_ram_sizeSanthosh Kumar K
The SDRAM_IDX in DDRSS_V2A_CTL_REG describes the number of address bits minus 16 that are used to determine the mask used to detect memory rollover and prevent aliasing and false coherency issues. Set SDRAM_IDX using the device private data, ddr_ram_size for AM64x, AM62x and AM62x SIP. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Acked-by: Bryan Brattlof <bb@ti.com>
2024-03-21dma: ti: k3-udma: Fix ring_idx to pair k3 nav rings"Udit Kumar
OSPI boot was broken due to wrong pairing of DMA Fixes: 61ea32c0eb0c ("dma: ti: k3-udma: Use ring_idx to pair k3 nav rings") Reported-by: Minas Hambardzumyan <minas@ti.com> Cc: MD Danish Anwar <danishanwar@ti.com> Cc: Vignesh Raghavendra <vigneshr@ti.com> Cc: Praneeth Bajjuri <praneeth@ti.com> Signed-off-by: Udit Kumar <u-kumar1@ti.com>
2024-03-21ram: k3-ddrss: ram_ops should be a constantBryan Brattlof
I do not think the R5 SPL will initialize non static variables (I didn't find and evidence of it) so we want to ensure this is a constant. Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-21ram: k3-ddrss: limit only the am64x addressable rangeBryan Brattlof
The AM64x and some of the AM62xx family of devices use the same 16b controller though only the AM64x is limited to 2GB addressable. Annoyingly the address alias detection machinery defaults to the full 8GB for the AM64x. Reset this value to 2GB only if we're initializin DDR on an am64x device Signed-off-by: Bryan Brattlof <bb@ti.com>
2024-03-21soc: ti: pruss: Add support for AM64xMD Danish Anwar
Add support for AM64x by adding it's compatible in pruss driver. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21remoteproc: pru: Add support for AM64x PRU / RTU coresMD Danish Anwar
Add support for AM64x PRU cores by adding compatibles for AM64x. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Enforce pinctrl state on the MDIO child nodeMD Danish Anwar
The binding represents the MDIO controller as a child device tree node of the MAC device tree node. The U-Boot driver mostly ignores that child device tree node and just hardcodes the resources it uses to support both the MAC and MDIO in a single driver. However, some resources like pinctrl muxing states are thus ignored. This has been a problem with some device trees that will put some pinctrl states on the MDIO device tree node. Let's rework the driver a bit to create a dummy MDIO driver that we will then get during our initialization to force the core to select the right muxing. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Add support sending FDB command to update rx_flow_idMD Danish Anwar
ICSSG firmware supports FDB commands. Add support to send FDB commands from driver. Once rx_flow_id is obtained from dma, let firmware know that we are using this rx_flow_id by sending a FDB command. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Add ICSSG ethernet driverMD Danish Anwar
This is the PURSS Ethernet driver for TI AM654 Sr2.0 and laterSoCs with the ICSSG PRU Sub-system running EMAC firmware. This driver caters to either of the slices of the icssg subsystem. One and exactly one of the slices is supported as the u-boot ethernet supports probing one interface at a time. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Add icssg queues APIs and macrosMD Danish Anwar
Add icssg_queue.c file. This file introduces macros and APIs related to ICSSG queues. These will be used by ICSSG Ethernet driver. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Add Firmware config and classification APIs.MD Danish Anwar
Add icssg_config.h / .c and icssg_classifier.c files. These are firmware configuration and classification related files. Add MII helper APIs and MACROs. These APIs and MACROs will be later used by ICSSG Ethernet driver. Also introduce icssg_prueth.h which has definition of prueth related structures. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21net: ti: icssg: Add Firmware Interface for ICSSG Ethernet driver.MD Danish Anwar
Add firmware interface related headers and macros for ICSSG Ethernet driver. These macros will be later used by the ICSSG ethernet driver. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21remoteproc: uclass: Add methods to load firmware to rproc and boot rprocMD Danish Anwar
Add APIs to set a firmware_name to a rproc and boot the rproc with the same firmware. Clients can call rproc_set_firmware() API to set firmware_name for a rproc whereas rproc_boot() will load the firmware set by rproc_set_firmware() to a buffer by calling request_firmware_into_buf(). rproc_boot() will then load the firmware file to the remote processor and start the remote processor. Also include "fs-loader.h" and make remoteproc driver select FS_LOADER in Kconfig so that we can call request_firmware_into_buf() from remoteproc driver. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21misc: fs-loader: Use fw_storage_interface instead of storage_interfaceMD Danish Anwar
The fs-loader driver reads env storage_interface and uses it to load firmware file into memory using the medium set by env. Update the driver to use env fw_storage_interface as this variable is only used to load firmwares. This is to keep all variables used by fs-loader driver with 'fw_' prefix. All other variables have 'fw_' prefix except for storage_interface. The env storage_interface will act as fallback so that the existing implementations do not break. Also update the FS Loader documentation accordingly. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21dma: ti: k3-udma: Use ring_idx to pair k3 nav ringsMD Danish Anwar
Use ring_idx to pair rings. ring_idx will be same as tx flow_id for all non-negative flow_ids. For negative flow_ids, ring_idx will be tchan->id added with bchan_cnt. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
2024-03-21power: regulator: tps6287x: Add driver for TPS6287x step down convertorsKeerthy
Add driver for TPS6287x step down convertors Signed-off-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Kamlesh Gurudasani <kamlesh@ti.com>
2024-03-21drivers: ram: Kconfig: Add CONFIG_K3_INLINE_ECCNeha Malcom Francis
Add CONFIG_K3_INLINE_ECC so that ECC functions can be compiled into R5 SPL only when the config has been enabled. Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21ram: k3-ddrss: Enable ECC interruptsSanthosh Kumar K
Enable ECC 1-bit error, 2-bit error, multiple 1-bit error interrupts by setting the respective bits in the DDRSS_V2A_INT_SET_REG register. Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
2024-03-21ram: k3-ddrss: Setup ECC region start and rangeSanthosh Kumar K
Setup the ECC region's start and range using the device private data, ddrss->ddr_bank_base[0] and ddrss->ddr_ram_size. Also, move start and range of ECC regions from 32 bits to 64 bits to accommodate for DDR greater than or equal to 4GB. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21ram: k3-ddrss: Add k3_ddrss_ddr_bank_base_size_calc() to solve 'calculations ↵Santhosh Kumar K
restricted to 32 bits' issue As R5 is a 32 bit processor, the RAM banks' base and size calculation is restricted to 32 bits, which results in wrong values if bank's base is greater than 32 bits or bank's size is greater than or equal to 4GB. So, add k3_ddrss_ddr_bank_base_size_calc() to get the base address and size of RAM's banks from the device tree memory node, and store in a 64 bit device private data which can be used for ECC reserved memory calculation, Setting ECC range and Fixing up bank size in device tree when ECC is enabled. Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21ram: k3-ddrss: Use the DDR controller BIST engine for ECC primingGeorgi Vlaev
The 1-bit inline ECC support in TI's DDRSS bridge requires the configured memory regions to be preloaded with a pattern before use. This is done by the k3-ddrss driver from the R5 SPL in a 'for' loop. It takes around 10 seconds to fill 2GB of memory, for example. Memset can cut the time in half and using DMA currently yields a similar result. The BIST engine of DDR controller provides support for initializing any memory region with a pattern. This bypasses the DDRSS bridge, so the required inline ECC data is not computed and populated in the memory. For some values like zero, the computed ECC syndrome is also zero and we can use these values to preload the memory from the DDR controller, without the assistance of the bridge. The registers involved in the process are described in the 'DDR controller registers' topic in [1] AM62 and [2] J721E reference manuals. The patch replaces the 'for' loop memory fill function with the BIST memory initialization procedure. This cuts the time to preload the 2GB memory from 10 seconds down to 1 second. The bist preload function uses the lpddr4 APIs in the k3-ddrss, so this is compatible with devices with both 16-bit LPDDR4 and 32-bit LPDDR4 interfaces (e.g J721E). [1] AM62x: https://www.ti.com/lit/pdf/spruiv7 [2] DRA829/TDA4VM: https://www.ti.com/lit/zip/spruil1 Signed-off-by: Georgi Vlaev <g-vlaev@ti.com> Signed-off-by: Santhosh Kumar K <s-k6@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21memory: ti-gpmc: Fix lock up at A53 SPL during NAND boot on AM64-EVMRoger Quadros
AM64 ES2.0 bootrom seems to enable WAIT0EDGEDETECTION interrupt. This causes a lockup at A53 SPL when accessing NAND controller or ELM registers. A good option would be to softrest GPMC block at probe but this cannot be done for AM64 as SOFTRESET bit is marked as reserved in SYSCONFIG register. Fix the issue by disabling all IRQs at probe. Signed-off-by: Roger Quadros <rogerq@kernel.org>
2024-03-21memory: ti-gpmc: use printf to dump settings/timingsRoger Quadros
pr_info() depends on CONFIG_LOGLEVEL > 6. If user has enabled CONFIG_TI_GPMC_DEBUG then we should print the GPMC settings/timings regardless of CONFIG_LOGLEVEL. So use printf() instead of pr_info(). Signed-off-by: Roger Quadros <rogerq@kernel.org>
2024-03-21video: tidss: Use DT property names for parsing nodesDevarsh Thakkar
Use device-tree node property names for parsing nodes instead of indexing as indexing could be different between different SoCs based on number of DSS entities available on that particular SoC. Also correct the video layer naming in driver to match to actual one being used in upstream DSS device-tree node [1]. This also fixes AM62x splash screen usage using the latest upstream DSS device-tree nodes where hard-coded indexing which driver was using before this patch was not matching the correct properties in the DT node. [1]: Upstream AM62x DSS node: https://github.com/torvalds/linux/blob/v6.8-rc1/arch/arm64/boot/dts/ti/k3-am62-main.dtsi#L774 Fixes: 5f9f816bb8 ("drivers: video: tidss: TIDSS video driver support for AM62x") Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
2024-03-21arm: mach-k3: J7200: Add support for OPP_LOWReid Tonking
Adds a check for K3_OPP_LOW config and will change MPU freq/voltage and msmc clock according to opp_low spec. Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Reid Tonking <reidt@ti.com>
2024-03-21misc: k3_avs: add k3_check_opp functionReid Tonking
Useful when trying to check if an opp efuse is burned in or not. k3_avs driver checks opp_ids when probing and overwrites the voltage values in vd_data for the respective board. This can be called to check that data and returns 0 if valid. Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Reid Tonking <reidt@ti.com>
2024-03-21misc: k3_avs: Change j7200 vtm compatible to align with upstreamReid Tonking
Upstream u-boot changed to using the ti,j7200-vtm compatible with the Linux 6.6 DT sync, so using the same here Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Reid Tonking <reidt@ti.com>
2024-03-21misc: k3_avs: Add new opp_low to vd_dataReid Tonking
Add opp_low to j721e vd_data Reviewed-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Reid Tonking <reidt@ti.com>
2024-03-21dma: ti: k3-udma: Add DMA PSIL mappings for CSI for J722SJayesh Choudhary
PSIL mapping is same as AM62P other than extra instances of CSI-RX. Reuse the same file and add CSI PSIL mapping there. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-03-21firmware: ti_sci_static_data: Add static DMA channelJayesh Choudhary
Include the static DMA channel data for using DMA at SPL stage for J722S SoC family. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-03-21ram: k3-ddrss: Enable the am62ax's DDR controller for J722SJayesh Choudhary
The J722S family of SoCs uses the same DDR controller as found on the AM62A family. Enable this option when building for the J722S family. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com> Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
2024-03-21arm: mach-k3: j722s: introduce clock and device files for J722S SoCJayesh Choudhary
Introduce support for J722S SoC. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-03-21soc: add info to identify the J722S SoC familyJayesh Choudhary
Include the part number for TI's j722s family of SoC to identify it during boot. Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com> Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2024-03-21mtd: rawnand: omap_elm: Fix elm_init definitionRoger Quadros
The macro ELM_BASE is defined in mach/hardware.h and is not visible at the omap_elm.h header file. Avoid using it in omap_elm.h. Reported-by: Hong Guan <hguan@ti.com> Fixes: 7363cf0581a3 ("mtd: rawnand: omap_elm: u-boot driver model support") Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-12-11Merge tag '09.01.00.008' into toradex_ti-u-boot-2023.04-09.01.00.008Francesco Dolcini
RC Release 09.01.00.008
2023-12-06driver: misc: k3_avs: Add J721S2 supportUdit Kumar
Adding AVS support for J721S2 SOC. Signed-off-by: Udit Kumar <u-kumar1@ti.com>
2023-12-01Merge tag '09.01.00.006' into toradex_ti-09.01.00.006Emanuele Ghidoli
RC Release 09.01.00.006
2023-11-28ram: k3-ddrss: do not touch ctrl regs during trainingBryan Brattlof
commit af7c33c103450e06aecf8adba8cbc8c522295be1 upstream. During LPDDR initialization we will loop through a series of frequency changes in order to train at the various operating frequencies. During this training, accessing the DRAM_CLASS bitfield could happen during a frequency change and cause the read to hang. Store the DRAM type into the main structure to avoid multiple readings while the independent phy is training. Signed-off-by: Bryan Brattlof <bb@ti.com> [praneeth@ti.com: cherrypick from v2023.10] Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
2023-11-24mtd: nand: omap_gpmc: Fix NAND in SPL for AM335xRoger Quadros
AM335x uses a special driver "am335x_spl_bch.c" as SPL NAND loader. This driver expects 1 sector at a time ECC and doesn't work well with multi-sector ECC that was implemented in commit 04fcd2587321. Switch back to 1 sector at a time read/ECC. Fixes: 04fcd2587321 ("mtd: rawnand: omap_gpmc: Fix BCH6/16 HW based correction") Signed-off-by: Roger Quadros <rogerq@kernel.org>
2023-11-24remoteproc: k3-dsp: Avoid reloading of firmwareUdit Kumar
DSP core is going into abnormal state when load callback is called after starting of DSP core. Reload of firmware needs core to be stopped first, followed by load. So avoid loading of firmware, when core is started. Signed-off-by: Udit Kumar <u-kumar1@ti.com> Reviewed-by: Apurva Nandan <a-nandan@ti.com>
2023-10-30dma: ti: k3-udma: Add DMA PSIL mappings for AM62PVignesh Raghavendra
Add PSIL data for AM62P Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
2023-10-24firmware: ti_sci_static_data: add static DMA channel dataHari Nagalla
Include the static DMA channel data for ti_sci Signed-off-by: Hari Nagalla <hnagalla@ti.com> [bb@ti.com: rebased on TI's 2023.04 uboot] Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-10-24ram: k3-ddrss: enable the am62ax's DDR controller for am62pxBryan Brattlof
The am62px family of SoCs uses the same DDR controller as found on the am62ax family. Enable this option when building for the am62px family Signed-off-by: Bryan Brattlof <bb@ti.com>