summaryrefslogtreecommitdiff
path: root/drivers/ram
AgeCommit message (Collapse)Author
12 daysMerge patch series "arm: aspeed: add initial AST2700 SoC support"Tom Rini
Ryan Chen <[email protected]> says: AST2700 is the 8th generation of Integrated Remote Management Processor introduced by ASPEED Technology Inc. It is a Board Management Controller (BMC) SoC family with a dual-die architecture: SoC0 ("CPU" die with four ARM Cortex-A35 application cores) and SoC1 ("IO" die with peripherals) each SoC have its own SCU PLLs, clock dividers and reset domains. Link: https://lore.kernel.org/r/[email protected]
12 daysram: aspeed: add SDRAM controller driver for AST2700Ryan Chen
Add a SDRAM controller driver for the AST2700, derived from the existing AST2700 controller code used by the Ibex SPL but adapted to run from ARM U-Boot proper on the Cortex-A35 cores. The DDR4/DDR5 controller and its DesignWare PHY are programmed by the Ibex SPL before ARM U-Boot proper takes over. This driver reads back the configuration left by the SPL, probes the controller, and exposes ram_info (base and size, with the VGA carve-out subtracted) via UCLASS_RAM so that dram_init() can populate gd->ram_size. The PHY firmware-load entry points (dwc_ddrphy_phyinit_userCustom_*) are kept compiled but call a __weak fmc_hdr_get_prebuilt() stub when ARM U-Boot proper is the caller; the real implementation is provided by the Ibex SPL via the same fmc_hdr.h descriptor format (here added for the ARM build). Adds the supporting register-layout headers under arch/arm/include/asm/arch-aspeed/: - sdram.h: SDRAM controller and DWC PHY register definitions - scu.h: SCU bits referenced by the SDRAM driver - fmc_hdr.h: prebuilt-blob descriptor (binary-compatible with arch/riscv/include/asm/arch-ast2700/fmc_hdr.h used by the Ibex SPL) Signed-off-by: Ryan Chen <[email protected]>
2026-06-25Kconfig: drivers: restyle remainingJohan Jonker
Restyle all Kconfigs for the rest of "drivers": Menu entries : no space left Menu attributes: 1 TAB Help text : 1 TAB + 2 spaces Replace '---help---' by 'help' Signed-off-by: Johan Jonker <[email protected]> [trini: Add missing indentation on a few more multi-paragraph help texts] Signed-off-by: Tom Rini <[email protected]>
2026-06-22Merge tag 'v2026.07-rc5' into nextTom Rini
Prepare v2026.07-rc5
2026-06-16ram: renesas: dbsc5: Add Renesas R-Car Gen5 DBSC5 driverMarek Vasut
Add Renesas R-Car Gen5 DBSC5 DRAM controller driver. This driver is currently capable of bringing LPDDR5X DRAM on Renesas R-Car X5H Ironhide board. Further boards can be supported by supplying board specific DRAM configuration data via dbsc5_get_board_data(). The driver reuses parts of previous DBSC5 driver, but due to hardware changes, can not be fully integrated into existing DBSC and DRAM driver, therefore the currentl DBSC and DRAM drivers are moved into R8A779G0 V4H specific files, and the R8A78000 X5H files are added in parallel. The Gen5 DBSC driver is meant to be used in RSIP context, while the Gen4 DBSC driver is meant to be used in SPL, therefore the Kconfig conditionals have been adjusted to match. Signed-off-by: Marek Vasut <[email protected]>
2026-06-16ram: renesas: rtvram: Add support for Renesas R-Car Gen5Marek Vasut
Add support for Renesas R-Car Gen5 R8A78000 SoC into RT-VRAM initialization driver. The changes are only a slight adjustment to the register programming, therefore reuse the existing RT-VRAM driver and parametrize those changes using driver data. Signed-off-by: Marek Vasut <[email protected]>
2026-06-09ram: aspeed: Use dev_read_addr_x() APIPeng Fan
Use dev_read_addr_ptr() and dev_read_addr_index_ptr() which support both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. While at here, also use ofnode_read_s32_default() to replace fdtdec_get_int(). No functional changes. Signed-off-by: Peng Fan <[email protected]>
2026-03-10Merge tag 'u-boot-rockchip-20260309' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-rockchip into next CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/29452 - New SoC support: RK3506, RK3582; - New Board support: RK3528 FriendlyElec NanoPi Zero2; - Other fixes
2026-03-10ram: rockchip: Add basic support for RK3506Jonas Karlman
Add support for reading DRAM size information from PMUGRF os_reg2 reg. Signed-off-by: Jonas Karlman <[email protected]> Tested-by: Aaron Griffith <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2026-02-17treewide: Clean up DECLARE_GLOBAL_DATA_PTR usagePeng Fan
Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard <[email protected]> #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal <[email protected]> #TI boards Acked-by: Yao Zi <[email protected]> #TH1520 Signed-off-by: Peng Fan <[email protected]>
2026-01-25sunxi: extend R528/T113-s3/D1(s) DRAM initialisationLukas Schmid
The T113-s4 SoC is using the same die as the T113-s3, but comes with 256MiB of co-packaged DRAM. Besides the doubled size, the DRAM chip seems to be connected slightly differently, which requires to use a different pin remapping. Extend the DRAM initialisation code to add support for the T113-S4 aka T113M4020DC0 by checking the SoC's CHIPID, which is stored in the first word of the SID efuses. Signed-off-by: Lukas Schmid <[email protected]> Tested-by: John Watts <[email protected]> Reviewed-by: John Watts <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Signed-off-by: Andre Przywara <[email protected]>
2026-01-02kbuild: Bump the build system to 6.1Sughosh Ganu
Our last sync with the kernel was 5.1. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefiles to 6.1. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call for the bump to 5.1, so we are following the same guidelines here. Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>a #rebased on -next
2025-12-08ram: starfive: fix typo for unsupported DDR sizeE Shattow
Fix typo for "unsupport" size and improve description to Unknown DDR size. Signed-off-by: E Shattow <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-12-08ram: starfive: use SZ_8G for 8GB memory sizeE Shattow
Replace numeric literal with SZ_8G consistent with other uses of types from linux/types.h Signed-off-by: E Shattow <[email protected]> Acked-by: Hal Feng <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2025-12-08ram: starfive: drop references to 16GB memory sizeE Shattow
16GB memory size is not addressable on StarFive JH-7110 SoC because the DRAM uncached alias begins at +8GB offset from start of DRAM. The logic for 16GB memory size is a fall-through to the default for an unknown size. Let's drop this unnecessary 16GB memory size and rely on the case default. Signed-off-by: E Shattow <[email protected]>
2025-08-25Merge tag 'v2025.10-rc3' into nextTom Rini
Prepare v2025.10-rc3
2025-08-20ram: renesas: dbsc5: Fix off by 1 errorsAndrew Goodbody
In dbsc5_read_vref_training the arrays dvw_min_byte0_table and dvw_min_byte1_table have 128 elements per channel. The variable vref_stop_index is limited to be a maximum of 128. This means that the index used to access the arrays must use a test of '< vref_stop_index' rather than '<= vref_stop_index' in order to prevent out of bounds accesses to the arrays. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Tested-by: Marek Vasut <[email protected]>
2025-08-19ram: k3-ddrss: Support multiple ECC regions for a single controllerNeha Malcom Francis
K3 Inline ECC mechanism can support up to 3 regions of inline ECC, add this support for single controller. Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add support for partial inline ECC in multi-DDR systemsNeha Malcom Francis
The existing approach does not account for interleaving in the DDRs when setting up regions. There is support for MSMC to calculate the regions for each DDR, so modify k3_ddrss_probe to set the regions accordingly for multi-DDR systems. Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regionsNeha Malcom Francis
Add support for calculation of the protected regions for each DDR in multi-DDR systems. Since MSMC is the parent node of the individual DDRs as well as responsible for their interleaving, it only makes sense for MSMC to contain the logic for dividing the regions. Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add support for number of controllers under MSMCNeha Malcom Francis
In K3 multi-DDR systems, the MSMC is responsible for the interleave mechanism across all the DDR controllers. Add support for MSMC to obtain the number of controllers it's responsible for using the DT. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add CONFIG_K3_MULTI_DDRNeha Malcom Francis
As we increase the functionalities that the K3 DDRSS sub-system support, it is becoming more evident that the same logic cannot apply to both single as well as multiple DDR controller devices. Add CONFIG_K3_MULTI_DDR to be used to differentiate between the two. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add support for a partial inline ECC regionNeha Malcom Francis
Instead of defaulting to choosing the entire DDR region when enabling inline ECC, allow picking of a range within the DDR space using DT to enable. It expects such a node within the memory node, in the absence of which we resort to enabling inline ECC for the entire DDR region: inline_ecc: protected@9e780000 { device_type = "ecc"; reg = <0x9e780000 0x0080000>; bootph-all; }; Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Add comment about ecc_reserved_spaceNeha Malcom Francis
The reserved space needed for storing the parity remains the same no matter the size of the region that is being protected. Add this as a comment for better code understanding. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REGNeha Malcom Francis
To prevent checkpatch warning once we start using this macro more frequently, shorten the length of it. While at it, also move the structure k3_ddrss_ecc_region above k3_msmc so that future patches can have it as a member of k3_msmc. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-19ram: k3-ddrss: Use DDR address instead of system address for ecc_regionsNeha Malcom Francis
Let ecc_regions[x].start reflect the start of the ECC region in terms of DDR addressing rather than system addressing. This will make it easier to extend the usage of the same ecc_regions structure for multi-DDR systems as well. Reviewed-by: Udit Kumar <[email protected]> Signed-off-by: Neha Malcom Francis <[email protected]>
2025-08-15ram: k3-ddrss: Use logical and not bitwiseAndrew Goodbody
The test for the interrupt LPDDR4_INTR_BIST_DONE is using a bitwise and but the test is simple logic so use the more appropriate logical and. This issue was found by Smatch. Signed-off-by: Andrew Goodbody <[email protected]>
2025-08-14ram: Tighten some ram driver dependenciesTom Rini
A few ram drivers cannot build without access to some platform specific header files. Express those requirements in Kconfig as well. Signed-off-by: Tom Rini <[email protected]>
2025-06-14Merge patch series "Hex value prefix case cleanup"Tom Rini
E Shattow <[email protected]> says: Make consistent use of lowercase hexadecimal prefix '0x' throughout U-Boot. There are a few remaining uses of uppercase 'X' to denote hexadecimal prefix or placeholder in documentation and error messages. External devicetree-rebasing dts/upstream and the generated code of xilinx/zynq are ignored for the series. Link: https://lore.kernel.org/r/[email protected]
2025-06-14drivers: use lowercase hex prefix styleE Shattow
Use consistent lowercase hex prefix style in drivers/* Does not change hex prefix case in allcaps uppercase style error messages Signed-off-by: E Shattow <[email protected]>
2025-06-12ram: Move Kconfig options into their own menu entryYao Zi
RAM drivers using Device Model currently lack of their own Kconfig menu entry, which makes Kconfig put all options of the class in the top-level menu of device drivers. These options are also incorrectly grouped with pinctrl options in the generated .config, which is hard to read. Let's create a menu entry for these drivers. Fixes: 6c51df6859f ("dm: Add support for RAM drivers") Signed-off-by: Yao Zi <[email protected]> Reviewed-by: Quentin Schulz <[email protected]> Reviewed-by: Tom Rini <[email protected]>
2025-06-11ram: stm32mp1: Add STM32MP13xx supportMarek Vasut
Add support for configuring DRAM controller on STM32MP13xx SoC. The DRAM controller is basically identical to the DWC controller on STM32MP15xx SoC, except the bus width is reduced from 32bit to 16bit and a few registers and bits are therefore not present. Handle the difference by factoring these parts out. Use IS_ENABLE() as much as possible to assure code which is not enabled on builds for a single SoC gets compiled out. Handle the different offset of RCC_DDRITFCR register and missing DDRC2 clock the same way. Signed-off-by: Marek Vasut <[email protected]>
2025-06-06ram: rockchip: Fix dependency of RAM_ROCKCHIP_DEBUGLukasz Czechowski
The RAM_ROCKCHIP_DEBUG can be used only if DEBUG_UART is available. The next commit introduces changes in definition of debug uart functions, so that DEBUG_UART is required to be defined in order to initialize uart and use print functions. Signed-off-by: Lukasz Czechowski <[email protected]> Reviewed-by: Kever Yang <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2025-05-21ram: thead: Add initial DDR controller support for TH1520Yao Zi
This patch cleans the vendor code of DDR initialization up, converts the driver to fit in DM framework and use a firmware[1] packaged by binman to ship PHY configuration. Currently the driver is only capable of initializing the controller to work with dual-rank 3733MHz LPDDR4, which is shipped by 16GiB variants of LicheePi 4A boards and I could test with. Support for other configurations could be easily added later. Link: https://github.com/ziyao233/th1520-firmware # [1] Signed-off-by: Yao Zi <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
2025-04-23ram: rockchip: Add rk3576 ddr driver supportHeiko Stuebner
Add ddr driver for rk3576 to get the ram capacity. Signed-off-by: Heiko Stuebner <[email protected]> Reviewed-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-23ram: rockchip: Add basic support for RK3528Jonas Karlman
Add support for reading DRAM size information from PMUGRF os_reg18 reg. Compared to most Rockchip SoCs the RK3528 use os_reg18 for DRAM info, instead of os_reg2. Signed-off-by: Jonas Karlman <[email protected]> Reviewed-by: Kever Yang <[email protected]>
2025-04-05arm: mach-k3: j721e: Split out J7200 SoC support from J721eAndrew Davis
Currently in j721e_init.c we check which firewalls to remove using the board configuration (e.g CONFIG_TARGET_J721E_R5_EVM). We do this as J721e and J7200 have different IP and firewalls but use the same SoC definition (SOC_K3_J721E) even though they are different SoCs. The idea was they would be similar enough that they both could use the same SoC config to help with common code sharing. Board checks would then be used differentiate. This has grown far too messy to maintain any more, especially now that there is more than one board using J721e (EVM, SK, Beagle AI64). As differentiation is done based on board, every one of these boards would have to have checks added for them. Instead let's split J7200 support out from J721e like how normal new SoC support is done. This patch touches several subsystems and could not be split much better as when we add SOC_K3_J7200 we want to make use of it in all spots that once used the combined SOC_K3_J721E so we can turn off SOC_K3_J721E when building for J7200 boards. Signed-off-by: Andrew Davis <[email protected]>
2025-03-29ram: renesas: dbsc5: Pass udevice and MODEMR0 to dbsc5_get_board_data()Marek Vasut
Pass DBSC5 udevice and MODEMR0 register values to board specific function dbsc5_get_board_data(). The board specific implementation of dbsc5_get_board_data() can return struct renesas_dbsc5_board_config which matches the board based on the content of MODEMR0 or content of DT accessible via the udevice. Signed-off-by: Marek Vasut <[email protected]>
2025-03-29ram: renesas: dbsc5: Factor out dbsc5_wait_dbwait()Marek Vasut
Extract wait for completion code from dbsc5_send_dbcmd2() into new separate function dbsc5_wait_dbwait(). This extracted code can be used to implement MR register read in the future. Signed-off-by: Marek Vasut <[email protected]>
2025-03-29ram: renesas: dbsc5: Improve dbsc5_send_dbcmd2() signatureMarek Vasut
Update dbsc5_send_dbcmd2() such that it takes multiple parameters instead of one magic register content value. These parameters are used to form the same resulting register value internally in the dbsc5_send_dbcmd2() function, but from well defined input constants. The new input constants are the operation code, channel, rank, and operation argument. The argument is operation code specific, therefore it is still a 16-bit magic number, but the rest of the arguments are now split up. No functional change. Signed-off-by: Marek Vasut <[email protected]>
2025-03-29ram: renesas: dbsc5: Drop space before dbsc5_ddr_setval_all_ch()Marek Vasut
Remove leading space before dbsc5_ddr_setval_all_ch() , no functional change. Signed-off-by: Marek Vasut <[email protected]>
2025-03-29ram: renesas: dbsc5: Clarify MR27/MR28/MR57 register operationsMarek Vasut
Rename dbsc5_ddr_register_read() to dbsc5_ddr_register_mr27_mr57_read() and dbsc5_ddr_register_set() to dbsc5_ddr_register_mr28_set() to make it clear what those functions really do. No functional change. Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Make struct renesas_dbsc5_board_config publicMarek Vasut
Make struct renesas_dbsc5_board_config {} definition public via include/dbsc5.h, so this structure can be defined in board files and passed into the DBSC5 DRAM driver by overriding weak function dbsc5_get_board_data() on board level. Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Add V4H-3/V4H-5/V4H-7 OTP based detectionMarek Vasut
Add auto-detection and handling of Renesas R-Car V4H-3 and V4H-5 in addition to V4H-7 SoC variants based on OTP fuse programming. The V4H-3 and V4H-5 variants have reduced DRAM frequency options. Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Synchronize initialization code to rev.1.10Marek Vasut
Update the DRAM initialization code to match DBSC5 initialization code rev.1.10 , which is currently the latest version available. This makes DRAM initialization operational on Renesas R-Car V4H R8A779G0 rev.3.0. Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Fix DBTR11 calculationMarek Vasut
Reinstate missing increment by two in DBTR11 calculation based on the original DBSC5 initialization code rev.0.80. The original code did ... ODTLon - (js2[JS2_tODTon_min] - 1) + 1 , which was incorrectly converted into ODTLon - js2[JS2_tODTon_min], but should have been converted to ODTLon - js2[JS2_tODTon_min] + 2. Add the missing +2 . Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Fix JS1 index calculationMarek Vasut
The JS1 index is calculated correctly, but the limiter cannot be the max() function because the index should be lower than JS1_USABLEC_SPEC_HI and the max() function would unconditionally override the JS1 index to JS1_USABLEC_SPEC_HI. Use clamp() to limit the JS1 index instead. Signed-off-by: Marek Vasut <[email protected]>
2025-03-16ram: renesas: dbsc5: Fix bitrate MD pin parsingMarek Vasut
Fix copy paste error in MD pin handling for 5500 Mbps and 4800 Mbps case, each should be handled by MD[19,17] == 2 and MD[19,17] == 3 respectively. Signed-off-by: Marek Vasut <[email protected]>
2025-01-27ram: 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 K3 family of SoCs. Signed-off-by: Santhosh Kumar K <[email protected]> Reviewed-by: Neha Malcom Francis <[email protected]>
2025-01-14ram: k3-ddrss: Remove 'ti,ecc-enable' supportSanthosh Kumar K
The functionality of enabling Inline ECC is now controlled by CONFIG_K3_INLINE_ECC. So, remove the support for 'ti,ecc-enable' property to avoid redundancy and to ensure the Inline ECC feature is mananged through build-time config. Signed-off-by: Santhosh Kumar K <[email protected]> Reviewed-by: Wadim Egorov <[email protected]>