1- #########
2- DDRSS ECC
3- #########
1+ ###
2+ DDR
3+ ###
44
55********
66Overview
77********
88
9- The DDR subsystem (DDRSS) comprises DDR controller, DDR PHY and wrapper logic
10- to integrate these blocks in the device. For SDRAM data integrity, the DDRSS
9+ The DDR subsystem (DDRSS) comprises DDR controller, DDR PHY and wrapper logic to
10+ integrate these blocks in the device. The K3 DDRSS driver
11+ (:file: `drivers/ram/k3-ddrss/k3-ddrss.c `) runs during the R5 SPL stage and is
12+ responsible for initializing and configuring the DDR subsystem.
13+
14+ ******************
15+ DDR Initialization
16+ ******************
17+
18+ The driver utilizes an auto-generated configuration file containing the
19+ necessary settings for the DDR. It configures the frequency, timing parameters,
20+ training algorithms etc. for DDR initialization. The configuration DTSI can be
21+ generated using the `Sysconfig tool <https://dev.ti.com/sysconfig >`_ and
22+ selecting the software product as "DDR Configuration for \* " as well as the
23+ required device.
24+
25+ **********
26+ Inline ECC
27+ **********
28+
29+ .. ifconfig :: CONFIG_part_variant in ('J7200', 'J721E')
30+
31+ .. note ::
32+
33+ Inline ECC is currently not tested and supported for J721E and J7200
34+
35+ For SDRAM data integrity, the DDRSS
1136bridge supports inline ECC on the data written to or read from the SDRAM. ECC
1237is stored together with the data so that a dedicated SDRAM device for ECC is
1338not required. The 8-bit single error correction double error detection (SECDED)
1439ECC data is calculated over 64-bit data quanta. For every 256-byte data block
15- 32 bytes of ECC is stored inline. Thus 1/9th of the total SDRAM space is used
40+ 32 bytes of ECC is stored inline. Thus, 1/9th of the total SDRAM space is used
1641for ECC storage and the remaining 8/9th of the SDRAM data space are seen as
1742consecutive byte addresses. Even if there are non-ECC protected regions the
1843previously described 1/9th-8/9th rule still applies and consecutive byte
@@ -25,8 +50,8 @@ protected by it. 1-bit error is correctable by ECC, but multi-bit and
2550multiple 1-bit errors are not correctable and will be treated as an
2651uncorrectable error. Any uncorrectable error will cause a bus abort.
2752
28- DDRSS inline ECC handling
29- =========================
53+ ECC Handling
54+ ============
3055
3156.. note ::
3257
@@ -35,31 +60,31 @@ DDRSS inline ECC handling
3560Enabling inline ECC
3661-------------------
3762
38- The inline ECC feature of DDRSS can be enabled by adding the
39- ``CONFIG_K3_INLINE_ECC `` config to the R5 defconfig:
63+ The inline ECC feature of DDRSS can be enabled by adding the
64+ ``CONFIG_K3_INLINE_ECC `` config to the R5 defconfig:
4065
41- .. code-block :: kconfig
66+ .. code-block :: kconfig
4267
43- # u-boot/configs/*_r5_defconfig
68+ # u-boot/configs/*_r5_defconfig
4469
45- CONFIG_PINCTRL_SINGLE=y
46- CONFIG_POWER_DOMAIN=y
47- CONFIG_TI_POWER_DOMAIN=y
48- CONFIG_K3_INLINE_ECC=y
49- CONFIG_K3_SYSTEM_CONTROLLER=y
50- CONFIG_REMOTEPROC_TI_K3_ARM64=y
51- CONFIG_RESET_TI_SCI=y
70+ CONFIG_PINCTRL_SINGLE=y
71+ CONFIG_POWER_DOMAIN=y
72+ CONFIG_TI_POWER_DOMAIN=y
73+ CONFIG_K3_INLINE_ECC=y
74+ CONFIG_K3_SYSTEM_CONTROLLER=y
75+ CONFIG_REMOTEPROC_TI_K3_ARM64=y
76+ CONFIG_RESET_TI_SCI=y
5277
53- This enables inline ECC for the entire region of the DDR.
78+ This enables inline ECC for the entire region of the DDR.
5479
5580Priming with BIST Engine
5681------------------------
5782
58- The bootloader has the responsibility to pre-load the ECC protected region with
59- known data before functional reads and writes are performed. During the ECC
60- initialization, the R5 SPL fills the entire memory with zeros using the BIST
61- engine in the DDR controller. The BIST engine method allows priming the entire
62- region with zeros in much less time.
83+ The bootloader has the responsibility to pre-load the ECC protected region with
84+ known data before functional reads and writes are performed. During the ECC
85+ initialization, the R5 SPL fills the entire memory with zeros using the BIST
86+ engine in the DDR controller. The BIST engine method allows priming the entire
87+ region with zeros in much less time.
6388
6489Enabling inline ECC for a partial region of the DDR
6590---------------------------------------------------
@@ -73,8 +98,8 @@ the absence of which it resorts to enabling for the entire DDR region:
7398 .. code-block :: dts
7499
75100 inline_ecc: protected@9e780000 {
76- device_type = "ecc";
77- reg = <0x9e780000 0x0080000>;
78- bootph-all;
101+ device_type = "ecc";
102+ reg = <0x9e780000 0x0080000>;
103+ bootph-all;
79104 };
80105
0 commit comments