Skip to content

Commit 6295144

Browse files
author
Neha Malcom Francis
committed
chore(linux): Make U-Boot DDR documentation generic
Current U-Boot documentation only describes one of the many functionalities of the U-Boot DDR driver i.e. Inline ECC. Modify it to become generic and make sure to add the page for missing platforms (J7200 and J721E) where Inline ECC is presently not tested officially (yet). Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
1 parent d61076a commit 6295144

File tree

4 files changed

+106
-63
lines changed

4 files changed

+106
-63
lines changed

configs/J7200/J7200_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ linux/Foundational_Components/U-Boot/UG-NOR
3737
linux/Foundational_Components/U-Boot/UG-UART
3838
linux/Foundational_Components/U-Boot/UG-SATA
3939
linux/Foundational_Components/U-Boot/UG-UFS
40+
linux/Foundational_Components/U-Boot/UG-DDRSS-J7
4041
linux/Foundational_Components/U-Boot/UG-HyperBus
4142
linux/Foundational_Components/U-Boot/UG-RemoteProc
4243
linux/Foundational_Components/U-Boot/UG-AVS

configs/J721E/J721E_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ linux/Foundational_Components/U-Boot/UG-NOR
3737
linux/Foundational_Components/U-Boot/UG-UART
3838
linux/Foundational_Components/U-Boot/UG-SATA
3939
linux/Foundational_Components/U-Boot/UG-UFS
40+
linux/Foundational_Components/U-Boot/UG-DDRSS-J7
4041
linux/Foundational_Components/U-Boot/UG-HyperBus
4142
linux/Foundational_Components/U-Boot/UG-RemoteProc
4243
linux/Foundational_Components/U-Boot/UG-AVS
Lines changed: 66 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
1-
#########
2-
DDRSS ECC
3-
#########
1+
###
2+
DDR
3+
###
44

55
********
66
Overview
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
11-
bridge supports inline ECC on the data written to or read from the SDRAM. ECC
12-
is stored together with the data so that a dedicated SDRAM device for ECC is
13-
not required. The 8-bit single error correction double error detection (SECDED)
14-
ECC 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
16-
for ECC storage and the remaining 8/9th of the SDRAM data space are seen as
17-
consecutive byte addresses. Even if there are non-ECC protected regions the
18-
previously described 1/9th-8/9th rule still applies and consecutive byte
19-
addresses are seen from system point of view. |__PART_FAMILY_DEVICE_NAMES__|
20-
supports up to 3 ECC protected non-overlapping memory ranges. The current
21-
U-Boot release supports a single region covering the entire SDRAM space.
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.
2213

23-
ECC is calculated for all accesses that are within the address ranges
24-
protected by it. 1-bit error is correctable by ECC, but multi-bit and
25-
multiple 1-bit errors are not correctable and will be treated as an
26-
uncorrectable error. Any uncorrectable error will cause a bus abort.
14+
******************
15+
DDR Initialization
16+
******************
2717

28-
DDRSS inline ECC handling
29-
=========================
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.
3024

31-
.. note::
25+
.. ifconfig:: CONFIG_part_variant not in ('J7200', 'J721E')
3226

33-
The inline ECC feature of DDRSS is not enabled by default in U-Boot.
27+
**********
28+
Inline ECC
29+
**********
3430

35-
Enabling inline ECC
36-
-------------------
31+
For SDRAM data integrity, the DDRSS
32+
bridge supports inline ECC on the data written to or read from the SDRAM. ECC
33+
is stored together with the data so that a dedicated SDRAM device for ECC is
34+
not required. The 8-bit single error correction double error detection (SECDED)
35+
ECC data is calculated over 64-bit data quanta. For every 256-byte data block
36+
32 bytes of ECC is stored inline. Thus 1/9th of the total SDRAM space is used
37+
for ECC storage and the remaining 8/9th of the SDRAM data space are seen as
38+
consecutive byte addresses. Even if there are non-ECC protected regions the
39+
previously described 1/9th-8/9th rule still applies and consecutive byte
40+
addresses are seen from system point of view. |__PART_FAMILY_DEVICE_NAMES__|
41+
supports up to 3 ECC protected non-overlapping memory ranges. The current
42+
U-Boot release supports a single region covering the entire SDRAM space.
3743

38-
The inline ECC feature of DDRSS can be enabled by adding the
39-
``CONFIG_K3_INLINE_ECC`` config to the R5 defconfig:
44+
ECC is calculated for all accesses that are within the address ranges
45+
protected by it. 1-bit error is correctable by ECC, but multi-bit and
46+
multiple 1-bit errors are not correctable and will be treated as an
47+
uncorrectable error. Any uncorrectable error will cause a bus abort.
48+
49+
ECC Handling
50+
============
51+
52+
.. note::
53+
54+
The inline ECC feature of DDRSS is not enabled by default in U-Boot.
55+
56+
Enabling inline ECC
57+
-------------------
58+
59+
The inline ECC feature of DDRSS can be enabled by adding the
60+
``CONFIG_K3_INLINE_ECC`` config to the R5 defconfig:
4061

4162
.. code-block:: kconfig
4263
@@ -50,31 +71,31 @@ The inline ECC feature of DDRSS can be enabled by adding the
5071
CONFIG_REMOTEPROC_TI_K3_ARM64=y
5172
CONFIG_RESET_TI_SCI=y
5273
53-
This enables inline ECC for the entire region of the DDR.
74+
This enables inline ECC for the entire region of the DDR.
5475

55-
Priming with BIST Engine
56-
------------------------
76+
Priming with BIST Engine
77+
------------------------
5778

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.
79+
The bootloader has the responsibility to pre-load the ECC protected region with
80+
known data before functional reads and writes are performed. During the ECC
81+
initialization, the R5 SPL fills the entire memory with zeros using the BIST
82+
engine in the DDR controller. The BIST engine method allows priming the entire
83+
region with zeros in much less time.
6384

64-
Enabling inline ECC for a partial region of the DDR
65-
---------------------------------------------------
85+
Enabling inline ECC for a partial region of the DDR
86+
---------------------------------------------------
6687

67-
Instead of defaulting to enable inline ECC for the entire DDR region, a partial
68-
range can also be selected.
88+
Instead of defaulting to enable inline ECC for the entire DDR region, a partial
89+
range can also be selected.
6990

70-
In this case, the DDRSS driver expects such a node within the memory node, in
71-
the absence of which it resorts to enabling for the entire DDR region:
91+
In this case, the DDRSS driver expects such a node within the memory node, in
92+
the absence of which it resorts to enabling for the entire DDR region:
7293

73-
.. code-block:: dts
94+
.. code-block:: dts
7495
75-
inline_ecc: protected@9e780000 {
96+
inline_ecc: protected@9e780000 {
7697
device_type = "ecc";
7798
reg = <0x9e780000 0x0080000>;
7899
bootph-all;
79-
};
100+
};
80101

source/linux/Foundational_Components/U-Boot/UG-DDRSS.rst

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,44 @@
1-
#########
2-
DDRSS ECC
3-
#########
1+
###
2+
DDR
3+
###
44

55
********
66
Overview
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
11-
bridge supports inline ECC on the data written to or read from the SDRAM. ECC
12-
is stored together with the data so that a dedicated SDRAM device for ECC is
13-
not required. The 8-bit single error correction double error detection (SECDED)
14-
ECC 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
16-
for ECC storage and the remaining 8/9th of the SDRAM data space are seen as
17-
consecutive byte addresses. Even if there are non-ECC protected regions the
18-
previously described 1/9th-8/9th rule still applies and consecutive byte
19-
addresses are seen from system point of view. |__PART_FAMILY_DEVICE_NAMES__|
20-
supports up to 3 ECC protected non-overlapping memory ranges. The current
21-
U-Boot release supports a single region covering the entire SDRAM space.
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+
Error Correction Code (ECC)
27+
**************************
28+
29+
For SDRAM data integrity, the DDRSS bridge supports inline ECC on the data
30+
written to or read from the SDRAM. ECC is stored together with the data so that
31+
a dedicated SDRAM device for ECC is not required. The 8-bit single error
32+
correction double error detection (SECDED) ECC data is calculated over 64-bit
33+
data quanta. For every 256-byte data block 32 bytes of ECC is stored inline.
34+
Thus 1/9th of the total SDRAM space is used for ECC storage and the remaining
35+
8/9th of the SDRAM data space are seen as consecutive byte addresses. Even if
36+
there are non-ECC protected regions the previously described 1/9th-8/9th rule
37+
still applies and consecutive byte addresses are seen from system point of view.
38+
39+
|__PART_FAMILY_DEVICE_NAMES__| supports up to 3 ECC protected non-overlapping
40+
memory ranges. The current U-Boot release supports a single region covering the
41+
entire SDRAM space.
2242

2343
ECC is calculated for all accesses that are within the address ranges
2444
protected by it. 1-bit error is correctable by ECC, but multi-bit and
@@ -38,8 +58,8 @@ three ways to handle it:
3858
Options 1 and 2 doesn't report the reason. So, if there is a need to report
3959
the reason behind uncorrectable error handle it the third way.
4060

41-
DDRSS ECC handling
42-
==================
61+
ECC Handling
62+
============
4363

4464
.. note::
4565

0 commit comments

Comments
 (0)