Skip to content

Commit 7e2cdee

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 <[email protected]>
1 parent 69871ec commit 7e2cdee

File tree

10 files changed

+146
-1
lines changed

10 files changed

+146
-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: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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 / AM62AX / AM62PX
27+
- Yes
28+
29+
* - AM64X
30+
- Yes
31+
32+
********************************
33+
Building and Enabling the Driver
34+
********************************
35+
36+
.. rubric:: Kernel Configuration
37+
38+
The K3 DDR driver can be enabled in the kernel configuration:
39+
40+
.. code-block:: kconfig
41+
42+
CONFIG_K3_DDR_TEMP=y
43+
CONFIG_HWMON=y
44+
45+
.. _ddr-temperature-monitoring-linux:
46+
47+
************************************
48+
Using the DDR Temperature Monitoring
49+
************************************
50+
51+
By default, the DDR subsystem keeps temperature polling turned off. For allowing
52+
the kernel driver to monitor temperature, the user must enable polling during
53+
DDR configuration and initialization at boot time.
54+
55+
.. ifconfig:: CONFIG_part_variant in ('AM62X', 'AM62AX', 'AM62PX', 'AM64X', 'AM68A', 'AM68', 'AM69A', 'AM69', 'J722S')
56+
57+
See :ref:`ddr-temperature-monitoring-uboot-am6x` in U-Boot documentation.
58+
59+
.. ifconfig:: CONFIG_part_variant in ('J721E', 'J7200', 'J721S2', 'J784S4', 'J742S2')
60+
61+
See :ref:`ddr-temperature-monitoring-uboot-j7` in U-Boot documentation.
62+
63+
The K3 DDR driver creates a hwmon device that provides temperature status
64+
information through sysfs. The driver registers as ``k3_ddr`` in the hwmon
65+
subsystem for temperature monitoring functionality.
66+
67+
The driver reports temperature status according to LPDDR4 specification:
68+
69+
.. list-table::
70+
:header-rows: 1
71+
:stub-columns: 1
72+
73+
* - Value
74+
- Temperature Status
75+
* - 0
76+
- Low temperature
77+
* - 1
78+
- 4x refresh interval
79+
* - 2
80+
- 2x refresh interval
81+
* - 3
82+
- 1x refresh interval (nominal)
83+
* - 4
84+
- 0.5x refresh interval
85+
* - 5
86+
- 0.25x refresh interval
87+
* - 6
88+
- 0.25x refresh interval with derating
89+
* - 7
90+
- High temperature
91+
92+
The hwmon device should now show up in the filesystem.
93+
94+
.. code-block:: console
95+
96+
root@evm:~# ls -l /sys/class/hwmon/
97+
hwmon0
98+
99+
Check the current DDR temperature status:
100+
101+
.. code-block:: console
102+
103+
root@evm:~# cat /sys/class/hwmon/hwmon0/device/k3_ddr_temp_status
104+
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
(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-j7:
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-j7:
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-j7`) 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
.. ifconfig:: CONFIG_part_variant not in ('J7200', 'J721E')
2644

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
(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-am6:
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-am6x:
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-am6`) 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)