Skip to content

Commit 50d0dc9

Browse files
author
Neha Malcom Francis
committed
feat(linux): Add documentation for dynamic DDR refresh rate change
Add driver documentation for kernel DDR driver and how to enable DDR temperature monitoring. Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
1 parent bb9d584 commit 50d0dc9

File tree

10 files changed

+137
-1
lines changed

10 files changed

+137
-1
lines changed

configs/AM62AX/AM62AX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ linux/Foundational_Components_Kernel_Drivers
5555
linux/Foundational_Components/Kernel/Kernel_Drivers/Audio
5656
linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
58+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5859
linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7
5960
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
6061
linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP

configs/AM62PX/AM62PX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ linux/Foundational_Components_Kernel_Drivers
5656
linux/Foundational_Components/Kernel/Kernel_Drivers/Audio
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX
5858
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
59+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5960
linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7
6061
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
6162
linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP

configs/AM62X/AM62X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ linux/Foundational_Components_Kernel_Drivers
5555
linux/Foundational_Components/Kernel/Kernel_Drivers/Audio
5656
linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
58+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5859
linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7
5960
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
6061
linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP

configs/AM64X/AM64X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ linux/Foundational_Components_Kernel
4848
linux/Foundational_Components_Kernel_Drivers
4949
linux/Foundational_Components/Kernel/Kernel_Drivers/ADC
5050
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
51+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5152
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
5253
linux/Foundational_Components/Kernel/Kernel_Drivers/EQEP
5354
linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO

configs/J7200/J7200_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ linux/Foundational_Components_Kernel
5050
linux/Foundational_Components_Kernel_Drivers
5151
linux/Foundational_Components/Kernel/Kernel_Drivers/ADC
5252
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
53+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5354
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
5455
linux/Foundational_Components/Kernel/Kernel_Drivers/MCAN
5556
linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO

configs/J721E/J721E_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/ADC
5252
linux/Foundational_Components/Kernel/Kernel_Drivers/Audio
5353
linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX
5454
linux/Foundational_Components/Kernel/Kernel_Drivers/Crypto/SA2UL_OMAP
55+
linux/Foundational_Components/Kernel/Kernel_Drivers/DDR
5556
linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7
5657
linux/Foundational_Components/Kernel/Kernel_Drivers/DM-Timer
5758
linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
.. _K3-DDR-Driver:
2+
.. _ddr-driver:
3+
4+
######
5+
K3 DDR
6+
######
7+
8+
************
9+
Introduction
10+
************
11+
12+
The K3 DDR driver provides management and monitoring capabilities for DDR memory
13+
subsystems on Texas Instruments K3 SoCs.
14+
15+
The following is a list of supported K3 DDR driver features by device family:
16+
17+
.. list-table:: K3 DDR Driver Feature Support
18+
:header-rows: 1
19+
20+
* - Device Family
21+
- Temperature Monitoring
22+
23+
* - J7200
24+
- Yes
25+
26+
* - AM62x LP SK/ AM62Ax / AM62Px
27+
- Yes
28+
29+
********************************
30+
Building and Enabling the Driver
31+
********************************
32+
33+
.. rubric:: Kernel Configuration
34+
35+
The following kernel configuration enables the K3 DDR driver:
36+
37+
.. code-block:: kconfig
38+
39+
CONFIG_K3_DDR_TEMP=y
40+
CONFIG_HWMON=y
41+
42+
.. _ddr-temperature-monitoring-linux:
43+
44+
************************************
45+
Using the DDR Temperature Monitoring
46+
************************************
47+
48+
By default, the DDR subsystem keeps temperature polling turned off. For allowing
49+
the kernel driver to monitor temperature, the user must enable polling during
50+
DDR configuration and initialization at boot time.
51+
52+
See :ref:`ddr-temperature-monitoring-uboot` in U-Boot documentation.
53+
54+
The K3 DDR driver creates a hwmon device that provides temperature status
55+
information through sysfs. The driver registers as ``k3_ddr`` in the hwmon
56+
subsystem for temperature monitoring functionality.
57+
58+
The driver reports temperature status according to LPDDR4 specification:
59+
60+
.. list-table::
61+
:header-rows: 1
62+
:stub-columns: 1
63+
64+
* - Value
65+
- Temperature Status
66+
* - 0
67+
- Low temperature
68+
* - 1
69+
- 4x refresh interval
70+
* - 2
71+
- 2x refresh interval
72+
* - 3
73+
- 1x refresh interval (nominal)
74+
* - 4
75+
- 0.5x refresh interval
76+
* - 5
77+
- 0.25x refresh interval
78+
* - 6
79+
- 0.25x refresh interval with derating
80+
* - 7
81+
- High temperature
82+
83+
The hwmon device should now show up in the filesystem.
84+
85+
.. code-block:: console
86+
87+
root@evm:~# ls -l /sys/class/hwmon/
88+
hwmon0
89+
90+
Check the current DDR temperature status:
91+
92+
.. code-block:: console
93+
94+
root@evm:~# cat /sys/class/hwmon/hwmon0/device/k3_ddr_temp_status
95+
1x refresh interval

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ integrate these blocks in the device. The K3 DDRSS driver
1111
(:file:`drivers/ram/k3-ddrss/k3-ddrss.c`) runs during the R5 SPL stage and is
1212
responsible for initializing and configuring the DDR subsystem.
1313

14+
.. _ddr-init:
15+
1416
******************
1517
DDR Initialization
1618
******************
@@ -22,6 +24,22 @@ generated using the `Sysconfig tool <https://dev.ti.com/sysconfig>`_ and
2224
selecting the software product as "DDR Configuration for \*" as well as the
2325
required device.
2426

27+
.. _ddr-temperature-monitoring-uboot:
28+
29+
**************************
30+
DDR Temperature Monitoring
31+
**************************
32+
33+
For enabling temperature polling in the DDR subsystem the configuration DTSI
34+
(see :ref:`ddr-init`) must be regenerated after selecting 'Yes'
35+
for LPDDR > DDRSS x > Enable DRAM Temperature Polling and also changing the DRAM
36+
Timing Parameters as prompted by the tool.
37+
38+
.. ifconfig:: CONFIG_part_variant in ('J7200', 'J721E')
39+
40+
The kernel DDR driver utilizes this polling feature to provide base support for
41+
dynamic DDR refresh rate changes (see :ref:`ddr-temperature-monitoring-linux`)
42+
2543
**********
2644
Inline ECC
2745
**********

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ integrate these blocks in the device. The K3 DDRSS driver
1111
(:file:`drivers/ram/k3-ddrss/k3-ddrss.c`) runs during the R5 SPL stage and is
1212
responsible for initializing and configuring the DDR subsystem.
1313

14+
.. _ddr-init:
15+
1416
******************
1517
DDR Initialization
1618
******************
@@ -22,10 +24,24 @@ generated using the `Sysconfig tool <https://dev.ti.com/sysconfig>`_ and
2224
selecting the software product as "DDR Configuration for \*" as well as the
2325
required device.
2426

27+
.. _ddr-temperature-monitoring-uboot:
28+
2529
**************************
26-
Error Correction Code (ECC)
30+
DDR Temperature Monitoring
2731
**************************
2832

33+
For enabling temperature polling in the DDR subsystem the configuration DTSI
34+
(see :ref:`ddr-init`) must be regenerated after selecting 'Yes'
35+
for LPDDR > DDRSS x > Enable DRAM Temperature Polling and also changing the DRAM
36+
Timing Parameters as prompted by the tool.
37+
38+
The kernel DDR driver utilizes this polling feature to provide base support for
39+
dynamic DDR refresh rate changes (see :ref:`ddr-temperature-monitoring-linux`)
40+
41+
***************************
42+
Error Correction Code (ECC)
43+
***************************
44+
2945
For SDRAM data integrity, the DDRSS bridge supports inline ECC on the data
3046
written to or read from the SDRAM. ECC is stored together with the data so that
3147
a dedicated SDRAM device for ECC is not required. The 8-bit single error

source/linux/Foundational_Components_Kernel_Drivers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Kernel Drivers
1515
Foundational_Components/Kernel/Kernel_Drivers/MCAN
1616
Foundational_Components/Kernel/Kernel_Drivers/MCRC64
1717
Foundational_Components/Kernel/Kernel_Drivers/DCAN
18+
Foundational_Components/Kernel/Kernel_Drivers/DDR
1819
Foundational_Components/Kernel/Kernel_Drivers/Display/DSS
1920
Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7
2021
Foundational_Components/Kernel/Kernel_Drivers/Display/LCDC

0 commit comments

Comments
 (0)