summaryrefslogtreecommitdiff
path: root/drivers/ram/renesas
AgeCommit message (Collapse)Author
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-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]>
2024-12-29ram: renesas: Add Renesas R-Car Gen4 DBSC5 driverMarek Vasut
Add Renesas R-Car Gen4 DBSC5 DRAM controller driver. This driver is currently capable of bringing LPDDR5 DRAM on Renesas R-Car V4H Whitehawk board. Further boards can be supported by supplying board specific DRAM configuration data via dbsc5_get_board_data(). Support for R-Car V4M is not implemented, however the driver is already mostly prepared to support this SoC. Signed-off-by: Marek Vasut <[email protected]>
2024-05-20Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"Tom Rini
As part of bringing the master branch back in to next, we need to allow for all of these changes to exist here. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-19Revert "Merge patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet""Tom Rini
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2024-05-07ram: Remove <common.h> and add needed includesTom Rini
Remove <common.h> from this driver directory and when needed add missing include files directly. Signed-off-by: Tom Rini <[email protected]>
2023-05-13board: schneider: add RZN1 board supportRalph Siemsen
Add support for Schneider Electric RZ/N1D and RZ/N1S boards, which are based on the Reneasas RZ/N1 SoC devices. The intention is to support both boards using a single defconfig, and to handle the differences at runtime. Signed-off-by: Ralph Siemsen <[email protected]> Reviewed-by: Marek Vasut <[email protected]>