|
| 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 | +Display Subsystem (DSS) supports SSC configuration for its pixel clocks through device tree properties. This helps you meet EMI compliance requirements. For DPI, DSS typically uses Phase-Locked Loop (PLL) 17. You can also use PLL 16 or PLL 18. |
| 23 | + |
| 24 | +This guide shows how to configure SSC for DSS pixel clocks on supported TI SoCs. |
| 25 | + |
| 26 | +.. important:: |
| 27 | + |
| 28 | + The pixel clock frequency for DPI from the DSS PLL must not exceed 165MHz. When using center spread mode, calculate the highest peak frequency to ensure it stays under this limit: |
| 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 PLL 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. Consider 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 | +*************** |
| 132 | +Troubleshooting |
| 133 | +*************** |
| 134 | + |
| 135 | +Display artifacts |
| 136 | +================= |
| 137 | + |
| 138 | +If you observe display artifacts, flickering, or other visual anomalies after enabling SSC: |
| 139 | + |
| 140 | +1. Reduce the modulation depth to a smaller value (for example, try 0.1% or 10 in device tree) |
| 141 | +2. Try a different modulation frequency (typical range: 32-100 kHz) |
| 142 | +3. Switch from center spread to down spread mode if not already using it |
| 143 | +4. Consult your display panel data sheet for spread spectrum tolerance specifications |
| 144 | + |
| 145 | +Clock not found error |
| 146 | +===================== |
| 147 | + |
| 148 | +If you experience errors during boot about clock assignment: |
| 149 | + |
| 150 | +1. Verify the clock ID is correct for your SoC (check the technical reference manual) |
| 151 | +2. Ensure the Device Manager supports SSC for the specified clock |
| 152 | +3. Check that the kernel version includes SSC support for the clock subsystem |
| 153 | + |
| 154 | +**************************** |
| 155 | +Requirements and limitations |
| 156 | +**************************** |
| 157 | + |
| 158 | +Hardware support |
| 159 | +================ |
| 160 | + |
| 161 | +- SSC is currently supported only on display PLL for these SoCs: AM62x, AM62Ax, AM62Dx, AM62Px |
| 162 | +- The display PLL is typically PLL 17. You can also use PLL 16 or PLL 18 for DPI applications |
| 163 | + |
| 164 | +Configuration |
| 165 | +============= |
| 166 | + |
| 167 | +- Configure SSC together with ``assigned-clocks`` and ``assigned-clock-sscs`` to specify which clock receives the SSC settings |
| 168 | +- SSC causes the instantaneous clock frequency to deviate from the nominal rate |
| 169 | +- Some panels have strict jitter requirements |
| 170 | + |
| 171 | +Firmware capability |
| 172 | +=================== |
| 173 | + |
| 174 | +Check if your firmware supports SSC by using the capability flag: |
| 175 | + |
| 176 | +.. code-block:: console |
| 177 | +
|
| 178 | + # Check firmware capabilities (requires ti-sci driver) |
| 179 | + cat /sys/kernel/debug/ti-sci/fw_caps |
| 180 | +
|
| 181 | +Look for ``TISCI_MSG_FLAG_FW_CAP_CLOCK_SSC`` in the capabilities list. |
| 182 | + |
| 183 | +********************************** |
| 184 | +Best practices and recommendations |
| 185 | +********************************** |
| 186 | + |
| 187 | +- Start with low modulation depth (0.1% to 0.5%) and increase only if needed |
| 188 | +- Use down spread mode (3) for display interfaces to ensure the clock never exceeds the specified maximum frequency |
| 189 | +- Apply the 1.2 factor when using center spread mode |
| 190 | +- Validate configuration with your display panel to ensure timing margins meet requirements |
| 191 | + |
| 192 | +************************* |
| 193 | +Customer responsibilities |
| 194 | +************************* |
| 195 | + |
| 196 | +.. warning:: |
| 197 | + |
| 198 | + **You assume all responsibility for the configuration and usage of spread spectrum clocking.** You must: |
| 199 | + |
| 200 | + 1. Research the clock limitations associated with your selected display panel |
| 201 | + 2. Configure SSC to be compatible with that specific display panel |
| 202 | + 3. Verify that the SSC configuration does not cause any system-related issues for any operating condition |
| 203 | + 4. Work with the display panel vendor to resolve any issues caused by enabling SSC |
| 204 | + 5. Validate displays to have enough functional margin with the jitter introduced by spread spectrum modulation |
| 205 | + |
| 206 | + Some display panels have clocking limitations not mentioned in their data sheets. Work directly with the display panel manufacturer on any display-related issues from SSC. |
| 207 | + |
| 208 | +********** |
| 209 | +References |
| 210 | +********** |
| 211 | + |
| 212 | +- :ref:`dss7` |
| 213 | +- SoC Technical Reference Manual (TRM) |
| 214 | +- System Firmware Documentation - PM Clock API |
| 215 | +- Linux kernel device tree bindings: ``Documentation/devicetree/bindings/display/ti/`` |
| 216 | +- Linux kernel clock framework documentation: ``Documentation/driver-api/clk.rst`` |
0 commit comments