Hi Massimo,
On 10/22/26 7:57 PM, Massimo Pegorer wrote:
Hi Quentin,
Il giorno gio 8 ott 2026 alle ore 22:49 Quentin Schulz ha scritto:
Hi Massimo,
On 8/29/26 7:03 PM, Massimo Pegorer wrote:
Allow the inclusion of more than one DDR parameters set in the PX30
SDRAM driver. The driver applies included sets in a predefined order
(DDR4, LPDDR2, LPDDR3, DDR3), stopping at the first one that makes
What made you decide on this order?
I've just followed the original order the data header files are included and
thus added to sdram_configs[] array. I have no hints to do any fine reasoning
about this. Maybe Rockchip could help.
Rockchip's DRAM init blob is usually unique for the SoC, regardless of
the populated DRAM type. I'm thinking they do something similar we want
to do in here, but I suspect this is "secret sauce". Ideally, someone
could reverse the blob and figure out in which order they test the DRAM
types. I know some people reversed RK356x's (and I vaguely remember
RK3576 and RK3588 being looked at as well?), so maybe they could help,
but who knows.
SDRAM initialization function to complete with success.
The default fallback behaviour is preserved: if no DDR configuration
option is selected, DDR3 parameters set is included.
We shouldn't do that, we instead should have the DDR3 symbol default to
y for PX30 (and other SoCs if applicable), to preserve the current
state. I don't like hidden defaults like that because you may end up
with RAM_ROCKCHIP_DDR3 not selected and build a DRAM driver that only
supports DDR3, which is kinda odd to be honest.
Due to limited PX30 TPL maximum size, including support for more than
one DDR type requires disabling some configuration options such as
CONFIG_RAM_ROCKCHIP_DEBUG.
Good to know, thanks. But i'm assuming this likely means we can only
have up to two DRAM configurations enabled at the same time?
There are some optimizations that can be made to include all four DDR
configurations. I will provide them as a further patch if these are merged.
Moreover, with the work done by Jonas, we would have more space in PX30 TPL:
I need to test these on top of his patches.
I think the information printed by sdram_print_dram_type() is still
interesting. Maybe we should have some log level for the DRAM init so we
can select the verbosity of the debug output. In any case, just a
thought and not a blocker for this series at all.
Signed-off-by: Massimo Pegorer <[email protected]>
---
drivers/ram/rockchip/Kconfig | 67
+++++++++++++++++++++++++++++++--------
No to those changes. Keep it simple please, no redefinition of the
symbol based on the SoC. For the RAM_ROCKCHIP_DEBUG needing to be
disabled, the information is quite nice for end users so i could see it
being added to all RAM_ROCKCHIP_ symbols as a hint (or have it somewhere
in doc/board/rockchip for example).
OK, but I'm providing multi DDR support just for PX30, not for RV1126.
Therefore, the logic behind DDR config options common to both of them (such as
DDR4) will be different in the two scenarios. Would you prefer a single config
option with two paragraphs in the help text, one describing the PX30 scenario
and another for the RV1126 one?
Just say what this symbol means "support for X DRAM type" and that would
be enough, the "depends on" part of the symbol should be enough for
people to figure out whether it applies to their SoC or not.
Cheers,
Quentin