All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Support multiple DDR configs in PX30 TPL
@ 2026-08-29 17:03 Massimo Pegorer
  2026-08-29 17:03 ` [PATCH 1/2] ram: rockchip: improve ddr type configs selection Massimo Pegorer
  2026-08-29 17:03 ` [PATCH 2/2] ram: rockchip: px30: allow multiple DDR types selection Massimo Pegorer
  0 siblings, 2 replies; 3+ messages in thread
From: Massimo Pegorer @ 2026-08-29 17:03 UTC (permalink / raw)
  To: Simon Glass, u-boot; +Cc: Quentin Schulz, Kever Yang, Tom Rini, Massimo Pegorer

TPL max size for Rockchip PX30 SoC is very low, but 10240 bytes are
enough to store in two DDR configuration parameters sets if option
CONFIG_RAM_ROCKCHIP_DEBUG is deselected.

The approach is trivial: apply supported DDR config sets in a predefined
order (DDR4, LPDDR2, LPDDR3, DDR3) stopping at the first one that makes
SDRAM initialization function to complete with success. If a smarter
cleverer or more reliable approach exists, suggestions are welcome.

The patches have been tested on two boards, one equipped with DDR3 and
the other with DDR4. All possible sets selections have been tested,
even with orders different from predefined one (e.g. DDR3, LPDDR2,
LPDDR3, DDR4). It would be useful if further tests will be run on other
PX30 based boards.

The patches does not affect binary code of TPL for any of the existing
U-Boot configurations.

The first patch improves clarity of DDR type support selection for
Rockchip SoCs at Kconfig level. Not all the DDR type config options
named in the Kconfig are supported by each one of the Rockchip SoCs.
Moreover, the LPDDR4 option has a different meaning in the context of
the RK3399 SoC than in the RV1126 one. Thus, split options with ad-hoc
specific help sections and use depends on conditionals.

The second patch splits RV1126 options (at most one should be selected)
from PX30 options (more options can be selected), and adds DDR3 option
for PX30. The PX30 sdram driver includes all of the selected DDR type
sets or just the DDR3 one if none is selected: not like it too much but
I preferred to preserve default fallback behavior (include DDR3 support
if no option is selected) to avoid modifing boards configs relying on
it. The parameters sets are applied as already described.

Signed-off-by: Massimo Pegorer <massimo.pegorer+oss@gmail.com>
---
Massimo Pegorer (2):
      ram: rockchip: improve ddr type configs selection
      ram: rockchip: px30: allow multiple DDR types selection

 drivers/ram/rockchip/Kconfig      | 78 ++++++++++++++++++++++++++++++++++++---
 drivers/ram/rockchip/sdram_px30.c | 35 +++++++++++-------
 2 files changed, 93 insertions(+), 20 deletions(-)
---
base-commit: 964ad5b5c91b7be56e443e899d7f873e6aa8c9fc
change-id: 20260828-ddr-multi-2c4fd64344c8

Best regards,
--  
Massimo Pegorer <massimo.pegorer+oss@gmail.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-29 22:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-29 17:03 [PATCH 0/2] Support multiple DDR configs in PX30 TPL Massimo Pegorer
2026-08-29 17:03 ` [PATCH 1/2] ram: rockchip: improve ddr type configs selection Massimo Pegorer
2026-08-29 17:03 ` [PATCH 2/2] ram: rockchip: px30: allow multiple DDR types selection Massimo Pegorer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.