This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RE: AM625: AM625 DDR4 Configuration with uboot

Other Parts Discussed in Thread: SYSCONFIG, AM625

Hi James,

Thank you very much for the memory tester. I was able to run it and get the output.

As I mentioned earlier, we are running good at 400 MHz (800 MTs) and the output of the memtester proved it.

Not surprisingly, it was complete failure with 800 MHz (1600 MTs) but this is another issue.

Now, I have another problem with the U-Boot. The 4 GB memory is properly configured as far as I can tell since we can write to both segments (mw) - 0x8000_0000 and 0x8_8000_0000 - and read the data (md) at the U-Boot prompt. No aliasing.

However, bdinfo displays both memory segments at 0x8000_0000 and modifies the Linux device tree before it boots in Linux, and as a result Linux does not see the full 4GB (just the 2 GB). U-Boot prompt image is attached. Uboot_Prompt.docx

The memory is declared in U-Boot as:

memory@80000000 {
  device_type = "memory";
/* 4G RAM */
reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
      <0x00000008 0x80000000 0x00000000 0x80000000>;

And the correct k3-am62x-ddr-config.dtsi file generated with Sysconfig is used. (Which is proven by the fact that the physical memory segments are configured and accessible)

Here is the text that our software engineers wanted me to add to this message in order to clarify it:

For the question, it is probably useful to give more details, otherwise I am afraid their answer wont tackle our problem directly.
The configuration on u-boot you gave on the topic is correct, but we should probably add some more details.
Basically this simplified diff sums it up:
  1. Include the new ddr config DTSi in R5 DTs.
diff --git a/arch/arm/dts/k3-am625-r5-sk.dts b/arch/arm/dts/k3-am625-r5-sk.dts
index 0912b953db0..66cc937f6ce 100644
--- a/arch/arm/dts/k3-am625-r5-sk.dts
+++ b/arch/arm/dts/k3-am625-r5-sk.dts
@@ -5,7 +5,7 @@
*/

#include "k3-am625-sk.dts"
-#include "k3-am62x-sk-ddr4-1600MTs.dtsi"
+#include "k3-am62x-ddr-config-4gb.dtsi"
#include "k3-am62-ddr.dtsi"
2.  Update  k3-am62x-sk-common.dtsi and k3-am625-sk.dts DTs  to reflect the correct register configuration
diff --git a/arch/arm/dts/k3-am625-sk.dts b/arch/arm/dts/k3-am625-sk.dts
index 5ca722aec43..9c98bc85bcb 100644
--- a/arch/arm/dts/k3-am625-sk.dts
+++ b/arch/arm/dts/k3-am625-sk.dts
@@ -24,9 +24,9 @@

memory@80000000 {
device_type = "memory";
- /* 2G RAM */
- reg = <0x00000000 0x80000000 0x00000000 0x80000000>;
-
+ /* 4G RAM */
+ reg = <0x00000000 0x80000000 0x00000000 0x80000000>,
+ <0x00000008 0x80000000 0x00000000 0x80000000>;
};
3. Add the new dtsi file k3-am62x-ddr-config-4gb.dtsi
One thing that me and Antonio found curious is that the latest Porting u-boot guide from TI, mentions files that do not exist. (This is probably a remnant from previous SDK version that was never rewritten)

Regards,

Kris