|
| 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 |
0 commit comments