Skip to content

Commit dd2f73c

Browse files
committed
feat(linux): add SSC configuration guide for DSS PLLs
Add comprehensive how-to guide for enabling Spread Spectrum Clocking (SSC) on Display Subsystem (DSS) Phase-locked loops (PLLs). The guide covers: - SSC configuration parameters via device tree - Three configuration examples (center spread, down spread, greater depth) - Supported SoCs: AM62x, AM62Ax, AM62Dx, AM62Px - Troubleshooting and best practices - Customer responsibilities Signed-off-by: Sparsh Kumar <sparsh-kumar@ti.com>
1 parent c9002c6 commit dd2f73c

File tree

7 files changed

+254
-0
lines changed

7 files changed

+254
-0
lines changed

configs/AM62AX/AM62AX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ linux/How_to_Guides/Target/How_to_test_MCAN_on_AM62x
124124
linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux
125125
linux/How_to_Guides/Target/How_To_Enable_M2CC3301_in_linux
126126
linux/How_to_Guides/Target/How_to_playback_audio_over_HDMI
127+
linux/How_to_Guides/Target/How_to_enable_SSC_for_DSS
127128
linux/How_to_Guides/Target/How_to_Use_K3Conf_Tool
128129
linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
129130
linux/How_to_Guides/Target/How_to_Tune_Real_Time_Linux

configs/AM62DX/AM62DX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ linux/How_to_Guides
7575
linux/How_to_Guides_Developer_Notes
7676
linux/How_to_Guides/Host/SYSFW_Trace_Parser
7777
linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux
78+
linux/How_to_Guides/Target/How_to_enable_SSC_for_DSS
7879
linux/How_to_Guides/Target/How_to_emmc_boot
7980
linux/How_to_Guides/Target/How_to_mmcsd_boot_emmc_uda
8081
linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device

configs/AM62PX/AM62PX_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ linux/How_to_Guides/Target/How_to_test_MCAN_on_AM62x
161161
linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux
162162
linux/How_to_Guides/Target/How_to_playback_audio_over_HDMI
163163
linux/How_to_Guides/Target/How_to_enable_display_sharing_between_remotecore_and_Linux
164+
linux/How_to_Guides/Target/How_to_enable_SSC_for_DSS
164165
linux/How_to_Guides/Target/How_to_boot_quickly
165166
linux/How_to_Guides/Target/How_to_enable_Microtips_LVDS_Panel
166167
linux/How_to_Guides/Target/How_To_Enable_M2CC3301_in_linux

configs/AM62X/AM62X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ linux/How_to_Guides/Target/How_to_enable_DT_overlays_in_linux
168168
linux/How_to_Guides/Target/How_to_playback_audio_over_HDMI
169169
linux/How_to_Guides/Target/How_to_enable_Microtips_LVDS_Panel
170170
linux/How_to_Guides/Target/How_To_Enable_M2CC3301_in_linux
171+
linux/How_to_Guides/Target/How_to_enable_SSC_for_DSS
171172
linux/How_to_Guides/Target/How_to_Use_K3Conf_Tool
172173
linux/How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
173174
linux/How_to_Guides/Target/How_to_Tune_Real_Time_Linux

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _dss7:
2+
13
DSS
24
#################
35

@@ -375,6 +377,8 @@ Device Tree Node
375377
Documentation for tidss device tree node and its properties can be found in linux kernel device tree bindings in below directory
376378
``Documentation/devicetree/bindings/display/ti/``. Seperate binding files are present for different version of the DSS controller.
377379

380+
For information about configuring Spread Spectrum Clocking (SSC) for DSS, see :ref:`how-to-enable-ssc-for-dss`.
381+
378382

379383
Driver Usage
380384
============
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
.. _how-to-enable-ssc-for-dss:
2+
3+
############################################################
4+
How to enable spread spectrum clocking for display subsystem
5+
############################################################
6+
7+
************
8+
Introduction
9+
************
10+
11+
Spread Spectrum Clocking (SSC) is an electromagnetic interference (EMI) reduction technique that:
12+
13+
- Modulates the clock frequency rather than keeping it constant
14+
- Varies the frequency over time in a controlled way
15+
- Spreads energy across many frequencies instead of focusing it at one frequency
16+
- Reduces peak emissions by spreading the electromagnetic energy
17+
18+
This technique is common in electronic systems, especially in high-speed digital circuits. It helps meet EMI compliance without needing extra shielding or filters.
19+
20+
Digital clock signals have a square wave shape. Most energy focuses at the center frequency and odd harmonics. In the frequency domain, SSC reduces the peak amplitude of the digital clock signal by spreading the energy across a wider frequency range. In the time domain, SSC adds jitter to the clock signal, but the voltage amplitude remains unchanged.
21+
22+
The Display Subsystem (DSS) supports Spread Spectrum Clocking (SSC) for its pixel clock sources. These pixel clocks feed the DSS video ports.
23+
24+
This guide shows how to configure SSC for DSS pixel clocks on supported TI SoCs.
25+
26+
.. important::
27+
28+
When you enable SSC, the instantaneous peak pixel clock frequency can exceed the nominal frequency. Ensure this peak does not exceed the maximum frequency supported by your display components. This includes external encoders and panels. When using center spread mode, calculate the highest peak frequency:
29+
30+
- For center spread: Highest frequency = Nominal frequency × (1 + (Modulation depth × 1.2) / 100)
31+
- For down spread: Highest frequency = Nominal frequency (no overshoot)
32+
33+
Example: With 100 MHz nominal frequency and 0.5% modulation depth in center spread mode:
34+
35+
- Highest frequency = 100 MHz × (1 + (0.5 × 1.2) / 100) = 100.6 MHz
36+
37+
The 1.2 factor accounts for the 20% overshoot on the modulation depth in center spread mode.
38+
39+
*************************************************
40+
Spread spectrum clocking configuration parameters
41+
*************************************************
42+
43+
The ``assigned-clock-sscs`` device tree property configures SSC and takes three parameters:
44+
45+
.. list-table::
46+
:header-rows: 1
47+
:widths: 30 70
48+
49+
* - Parameter
50+
- Description
51+
* - Modulation Frequency (Hz)
52+
- The frequency at which the spread spectrum modulation occurs:
53+
54+
- Minimum: 32,000 Hz (32 kHz)
55+
- Maximum: Reference clock frequency / 200
56+
- Typical values: 32 kHz to 120 kHz
57+
* - Modulation Depth
58+
- The amount of frequency spread as a percentage:
59+
60+
- Minimum: 10 (0.1%)
61+
- Maximum: 310 (3.1%)
62+
- Adjustable in increments of 10 (0.1%)
63+
- Example: 50 = 0.5% spread
64+
- Units: 1/10,000 (for example, 50 represents 0.5%)
65+
* - Spread Type
66+
- Spread mode options:
67+
68+
- 1: Center spread (frequency varies on both higher and lower frequencies than nominal)
69+
- 3: Down spread (frequency varies only lower than nominal)
70+
71+
The modulation uses a triangular waveform. The Device Manager automatically configures the hardware based on the parameters specified in the device tree.
72+
73+
********
74+
Examples
75+
********
76+
77+
Example 1: Basic SSC configuration (center spread)
78+
==================================================
79+
80+
This example shows how to enable SSC for the DSS VP2 clock with the following parameters:
81+
82+
- Modulation frequency: 100 kHz
83+
- Modulation depth: 10 (0.1%)
84+
- Spread type: Center spread (1)
85+
86+
Add the following properties to the DSS node in your device tree file (for example, :file:`k3-am62p-j722s-common-main.dtsi`):
87+
88+
.. code-block:: dts
89+
90+
&dss0 {
91+
assigned-clocks = <&k3_clks 186 2>;
92+
assigned-clock-sscs = <100000 10 1>;
93+
};
94+
95+
.. warning::
96+
97+
This example uses center spread mode (1). Remember to apply the 1.2 factor for the 20% overshoot when calculating peak frequency. Use down spread mode (Example 2) if you need to avoid exceeding the nominal frequency.
98+
99+
Example 2: SSC with down spread mode
100+
====================================
101+
102+
This example demonstrates down spread mode, which we recommend for display interfaces:
103+
104+
- Modulation frequency: 33 kHz
105+
- Modulation depth: 50 (0.5%)
106+
- Spread type: Down spread (3)
107+
108+
.. code-block:: dts
109+
110+
&dss0 {
111+
assigned-clocks = <&k3_clks 186 2>;
112+
assigned-clock-sscs = <33000 50 3>;
113+
};
114+
115+
Example 3: Greater modulation depth
116+
===================================
117+
118+
Here is a configuration with greater modulation depth for better EMI reduction:
119+
120+
- Modulation frequency: 50 kHz
121+
- Modulation depth: 250 (2.5%)
122+
- Spread type: Down spread (3)
123+
124+
.. code-block:: dts
125+
126+
&dss0 {
127+
assigned-clocks = <&k3_clks 186 2>;
128+
assigned-clock-sscs = <50000 250 3>;
129+
};
130+
131+
Example 4: Many pixel clocks
132+
============================
133+
134+
Some SoCs, such as AM62Px, have many DSS instances. This example shows how to configure SSC for many pixel clocks together.
135+
136+
For DSS0:
137+
138+
- Modulation frequency: 50 kHz
139+
- Modulation depth: 50 (0.5%)
140+
- Spread type: Down spread (3)
141+
142+
For DSS1:
143+
144+
- Modulation frequency: 33 kHz
145+
- Modulation depth: 50 (0.5%)
146+
- Spread type: Down spread (3)
147+
148+
.. code-block:: dts
149+
150+
&dss0 {
151+
assigned-clocks = <&k3_clks 186 2>;
152+
assigned-clock-sscs = <50000 50 3>;
153+
};
154+
155+
&dss1 {
156+
assigned-clocks = <&k3_clks 232 4>;
157+
assigned-clock-sscs = <33000 50 3>;
158+
};
159+
160+
***************
161+
Troubleshooting
162+
***************
163+
164+
Display artifacts
165+
=================
166+
167+
If you observe display artifacts, flickering, or other visual anomalies after enabling SSC:
168+
169+
1. Reduce the modulation depth to a smaller value (for example, try 0.1% or 10 in device tree)
170+
2. Try a different modulation frequency (typical range: 32-100 kHz)
171+
3. Switch from center spread to down spread mode if not already using it
172+
4. Consult your display panel data sheet for spread spectrum tolerance specifications
173+
174+
Clock not found error
175+
=====================
176+
177+
If you experience errors during boot about clock assignment:
178+
179+
1. Verify the clock ID is correct for your SoC (check the technical reference manual)
180+
2. Ensure the Device Manager supports SSC for the specified clock
181+
3. Check that the kernel version includes SSC support for the clock subsystem
182+
183+
****************************
184+
Requirements and limitations
185+
****************************
186+
187+
Hardware support
188+
================
189+
190+
- SSC is currently supported for display pixel clocks on these SoCs: AM62x, AM62Ax, AM62Dx, AM62Px
191+
192+
Configuration
193+
=============
194+
195+
- Use ``assigned-clocks`` and ``assigned-clock-sscs`` together to specify which clock receives the SSC settings
196+
- SSC causes the instantaneous clock frequency to deviate from the nominal rate
197+
- Some panels have strict jitter requirements
198+
199+
Firmware capability
200+
===================
201+
202+
Check if your firmware supports SSC by using the capability flag:
203+
204+
.. code-block:: console
205+
206+
# Check firmware capabilities (requires ti-sci driver)
207+
cat /sys/kernel/debug/ti-sci/fw_caps
208+
209+
Look for ``TISCI_MSG_FLAG_FW_CAP_CLOCK_SSC`` in the capabilities list.
210+
211+
**********************************
212+
Best practices and recommendations
213+
**********************************
214+
215+
- Start with low modulation depth (0.1% to 0.5%) and increase only if needed
216+
- Use down spread mode (3) for display interfaces. This ensures the clock never exceeds the maximum frequency
217+
- Apply the 1.2 factor when using center spread mode
218+
- Validate configuration with your display panel. Ensure timing margins meet requirements
219+
220+
*************************
221+
Customer responsibilities
222+
*************************
223+
224+
.. warning::
225+
226+
**You assume all responsibility for the configuration and usage of spread spectrum clocking.** You must:
227+
228+
1. Research the clock limitations associated with your selected display panel
229+
2. Configure SSC to be compatible with that specific display panel
230+
3. Verify that the SSC configuration does not cause any system-related issues for any operating condition
231+
4. Work with the display panel vendor to resolve any issues caused by enabling SSC
232+
5. Validate displays to have enough functional margin with the jitter introduced by spread spectrum modulation
233+
234+
Some display panels have clocking limitations not mentioned in their data sheets. Work directly with the display panel manufacturer to resolve any issues from SSC.
235+
236+
**********
237+
References
238+
**********
239+
240+
- :ref:`dss7`
241+
- `Application Note: AM62x, AM62Ax, AM62Px, AM62Lx Spread-Spectrum Clocking <https://www.ti.com/lit/pdf/spradk1>`__
242+
- SoC Technical Reference Manual (TRM)
243+
- System Firmware Documentation - PM Clock API
244+
- Linux kernel device tree bindings: ``Documentation/devicetree/bindings/display/ti/``
245+
- Linux kernel clock framework documentation: ``Documentation/driver-api/clk.rst``

source/linux/How_to_Guides_Developer_Notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Developer Notes
3232
How_to_Guides/Target/How_to_Use_K3Conf_Tool
3333
How_to_Guides/Target/How_to_Tune_Real_Time_Linux
3434
How_to_Guides/Target/How_to_enable_display_sharing_between_remotecore_and_Linux
35+
How_to_Guides/Target/How_to_enable_SSC_for_DSS
3536
How_to_Guides/Target/How_to_boot_quickly
3637
How_to_Guides/Target/Runtime_debug_unlock_on_secure_device
3738
How_to_Guides/FAQ/How_to_Verify_Ipc_Linux_R5

0 commit comments

Comments
 (0)