Skip to content

Commit 8d55e70

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 8d55e70

File tree

4 files changed

+88
-41
lines changed

4 files changed

+88
-41
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: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,43 @@
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
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
1136
bridge supports inline ECC on the data written to or read from the SDRAM. ECC
1237
is stored together with the data so that a dedicated SDRAM device for ECC is
1338
not required. The 8-bit single error correction double error detection (SECDED)
1439
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
40+
32 bytes of ECC is stored inline. Thus, 1/9th of the total SDRAM space is used
1641
for ECC storage and the remaining 8/9th of the SDRAM data space are seen as
1742
consecutive byte addresses. Even if there are non-ECC protected regions the
1843
previously 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
2550
multiple 1-bit errors are not correctable and will be treated as an
2651
uncorrectable 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,22 +60,22 @@ DDRSS inline ECC handling
3560
Enabling 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

5580
Priming with BIST Engine
5681
------------------------
@@ -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

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)