-
Notifications
You must be signed in to change notification settings - Fork 73
linux: How_to_Guides: Add instructions to enable SSC on DSS PLLs #529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -375,6 +375,8 @@ Device Tree Node | |
| Documentation for tidss device tree node and its properties can be found in linux kernel device tree bindings in below directory | ||
| ``Documentation/devicetree/bindings/display/ti/``. Seperate binding files are present for different version of the DSS controller. | ||
|
|
||
| For information about configuring Spread Spectrum Clocking (SSC) for DSS, see <../../../../How_to_Guides/Target/How_to_enable_SSC_for_DSS.html>`__ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use [0] - https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref |
||
|
|
||
|
|
||
| Driver Usage | ||
| ============ | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,201 @@ | ||||||
| .. _how-to-enable-ssc-for-dss: | ||||||
|
|
||||||
| How to enable spread spectrum clocking for display subsystem | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This entire new file doesn't seem to follow sphinx guidelines for section headers https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections |
||||||
| ============================================================ | ||||||
|
|
||||||
| Introduction | ||||||
| ------------ | ||||||
|
|
||||||
| Spread Spectrum Clocking (SSC) reduces electromagnetic interference (EMI). It modulates the clock frequency. SSC varies the frequency over time. This spreads energy across many frequencies. This reduces peak emissions. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spread Spectrum Clocking (SSC) is an EMI reduction technique that: This is a common technique used in electronic systems, particularly in high-speed digital circuits, to help meet EMI compliance requirements without requiring additional shielding or filtering components. |
||||||
|
|
||||||
| Digital clock signals are periodic and square-shaped. Most energy focuses at the center frequency and odd harmonics. SSC spreads this energy across a wider range. This reduces the peak amplitude. SSC adds jitter to the clock signal. The voltage amplitude stays unchanged. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These look like single points and not paragraph. The voltage amplitude stays unchanged -> Do you mean to say that average amplitude stays the same? |
||||||
|
|
||||||
| Display Subsystem (DSS) supports SSC configuration for its pixel clocks. You configure this 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. | ||||||
|
|
||||||
| This guide shows how to configure SSC for DSS pixel clocks on supported TI SoCs. | ||||||
|
|
||||||
| .. important:: | ||||||
| The pixel clock frequency for DPI from the DSS PLL must not exceed 165MHz. Center spread adds a 20% overshoot to the modulation depth. Account for this when you calculate the maximum frequency. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| Spread spectrum clocking configuration parameters | ||||||
| ------------------------------------------------- | ||||||
|
|
||||||
| The ``assigned-clock-sscs`` device tree property is used to configure SSC and takes three parameters: | ||||||
|
|
||||||
| +-----------------------+----------------------------------------------------------------+ | ||||||
| | Parameter | Description | | ||||||
| +=======================+================================================================+ | ||||||
| || Modulation Frequency || The frequency at which the spread spectrum modulation occurs | | ||||||
| || (Hz) || - Minimum: 32,000 Hz (32 kHz) | | ||||||
| || || - Maximum: Reference clock frequency / 200 | | ||||||
| || || - Typical values: 32 kHz to 120 kHz | | ||||||
| +-----------------------+----------------------------------------------------------------+ | ||||||
| || Modulation Depth || The amount of frequency spread as a percentage | | ||||||
| || - Minimum: 10 (0.1%) || - Maximum: 310 (3.1%) | | ||||||
| || || - Adjustable in increments of 10 (0.1%) | | ||||||
| || || - Example: 50 = 0.5% spread | | ||||||
| || || - Units: 1/10,000 (for example, 50 represents 0.5%) | | ||||||
| +-----------------------+----------------------------------------------------------------+ | ||||||
| || Spread Type || - 1: Center spread (frequency varies on both higher and lower | | ||||||
| || || frequencies than nominal) | | ||||||
| || || - 3: Down spread (frequency varies only lower than nominal) | | ||||||
| +-----------------------+----------------------------------------------------------------+ | ||||||
|
|
||||||
| **Modulation Profile** | ||||||
|
|
||||||
| The modulation uses a triangular waveform. The Device Manager automatically configures the PLL hardware based on the modulation frequency specified in the device tree. | ||||||
|
|
||||||
| .. note:: | ||||||
| Down spread mode (value 3) is commonly used for display interfaces. It ensures the clock never exceeds the specified maximum frequency. This is important for meeting display timing specifications and avoiding over-clocking. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| .. note:: | ||||||
| SSC is currently supported only on display PLL for these SoCs: AM62x, AM62Ax, AM62Dx, AM62Px. The display PLL is typically PLL17. You can also use PLL16 or PLL18 for DPI applications. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| .. note:: | ||||||
| The Device Manager automatically converts the modulation depth values from the device tree to the appropriate hardware register values. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| Example 1: Basic SSC configuration (center spread) | ||||||
| -------------------------------------------------- | ||||||
|
|
||||||
| This example shows how to enable SSC for the DSS VP2 clock with the following parameters: | ||||||
|
|
||||||
| - Modulation frequency: 100 kHz | ||||||
| - Modulation depth: 10 (0.1%) | ||||||
| - Spread type: Center spread (1) | ||||||
|
|
||||||
| Add the following properties to the DSS node in your device tree file (for example, ``k3-am62p-j722s-common-main.dtsi``): | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-file |
||||||
|
|
||||||
| .. code-block:: dts | ||||||
| &dss0 { | ||||||
| assigned-clocks = <&k3_clks 186 2>; | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The SSC is only for output DPI clock and not for functional clock ? |
||||||
| assigned-clock-sscs = <100000 10 1>; | ||||||
| }; | ||||||
| In this example: | ||||||
|
|
||||||
| - ``assigned-clocks``: Specifies the clock to configure (DSS VP2 clock, k3_clks 186 2) | ||||||
| - ``assigned-clock-sscs``: Configures SSC with 100 kHz modulation, 0.1% depth, center spread mode (1) | ||||||
|
|
||||||
| .. warning:: | ||||||
| This example uses center spread mode (1). Center spread has a 20% overshoot on the modulation depth. For 0.1% nominal depth, the actual peak deviation is about 0.12%. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Center spread has a 20% overshoot on the modulation depth. -> Is this documented somewhere? For 0.1% nominal depth, the actual peak deviation is about 0.12% -> Is this documented somewhere? |
||||||
|
|
||||||
| When using center spread: | ||||||
|
|
||||||
| 1. Ensure the display panel can handle the higher peak frequency | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How to estimate highest peak frequency as per current modulation params? |
||||||
| 2. Verify the maximum frequency stays below 165MHz including the overshoot | ||||||
| 3. Consider down spread mode (Example 2) to avoid exceeding the nominal frequency | ||||||
|
|
||||||
| Example 2: SSC with down spread mode | ||||||
| ------------------------------------ | ||||||
|
|
||||||
| This example demonstrates down spread mode, which we recommend for display interfaces to ensure the clock never exceeds the nominal frequency: | ||||||
|
|
||||||
| - Modulation frequency: 33 kHz | ||||||
| - Modulation depth: 50 (0.5%) | ||||||
| - Spread type: Down spread (3) | ||||||
|
|
||||||
| .. code-block:: dts | ||||||
| &dss0 { | ||||||
| assigned-clocks = <&k3_clks 186 2>; | ||||||
| assigned-clock-sscs = <33000 50 3>; | ||||||
| }; | ||||||
| Example 3: Greater modulation depth | ||||||
| ----------------------------------- | ||||||
|
|
||||||
| This example shows a configuration with greater modulation depth for better EMI reduction: | ||||||
|
|
||||||
| - Modulation frequency: 50 kHz | ||||||
| - Modulation depth: 250 (2.5%) | ||||||
| - Spread type: Down spread (3) | ||||||
|
|
||||||
| .. code-block:: dts | ||||||
| &dss0 { | ||||||
| assigned-clocks = <&k3_clks 186 2>; | ||||||
| assigned-clock-sscs = <50000 250 3>; | ||||||
| }; | ||||||
| .. note:: | ||||||
| Greater modulation depth provides better EMI reduction but increases clock jitter. Test with your specific display panel to ensure timing margins meet requirements. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||||||
|
|
||||||
| Troubleshooting | ||||||
| --------------- | ||||||
|
|
||||||
| Display artifacts | ||||||
| ^^^^^^^^^^^^^^^^^ | ||||||
|
|
||||||
| If you observe display artifacts, flickering, or other visual anomalies after enabling SSC: | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have some data on any observed side effects after going above X modulation ? Also did we do some internal testing with refresh rate logs enabled to see if any jitter in refresh rate with suggested/example params showed in this doc ? You can test that with kmstest --flip. |
||||||
|
|
||||||
| 1. Reduce the spread percentage to a smaller value (for example, try 0.1% or 10 in device tree) | ||||||
| 2. Try a different modulation frequency (typical range: 32-100 kHz) | ||||||
| 3. Switch from center spread to down spread mode if not already using it | ||||||
| 4. Consult your display panel data sheet for spread spectrum tolerance specifications | ||||||
|
|
||||||
| Clock not found error | ||||||
| ^^^^^^^^^^^^^^^^^^^^^ | ||||||
|
|
||||||
| If you experience errors during boot about clock assignment: | ||||||
|
|
||||||
| 1. Verify the clock ID is correct for your SoC (check the technical reference manual) | ||||||
| 2. Ensure the Device Manager supports SSC for the specified clock | ||||||
| 3. Check that the kernel version includes SSC support for the clock subsystem | ||||||
|
|
||||||
| Requirements and limitations | ||||||
| ---------------------------- | ||||||
|
|
||||||
| - Configure the display clock by using ``assigned-clocks`` and ``assigned-clock-sscs`` | ||||||
|
|
||||||
| **Firmware capability** | ||||||
|
|
||||||
| Check if your firmware supports SSC by using the capability flag: | ||||||
|
|
||||||
| .. code-block:: console | ||||||
| # Check firmware capabilities (requires ti-sci driver) | ||||||
| cat /sys/kernel/debug/ti-sci/fw_caps | ||||||
| Look for ``TISCI_MSG_FLAG_FW_CAP_CLOCK_SSC`` in the capabilities list. | ||||||
|
|
||||||
| Best practices and recommendations | ||||||
| ---------------------------------- | ||||||
|
|
||||||
| - Start with low modulation depth (0.1% to 0.5%) and increase only if needed to meet EMI requirements | ||||||
| - Use down spread mode (3) for display interfaces to ensure the clock never exceeds the nominal frequency | ||||||
| - If using center spread mode (1), account for 20% overshoot on the modulation depth | ||||||
| - Test with your specific display panel to ensure timing margins meet requirements | ||||||
|
|
||||||
| Important considerations | ||||||
| ------------------------ | ||||||
|
|
||||||
| .. important:: | ||||||
|
|
||||||
| - Configure SSC together with ``assigned-clocks`` to specify which clock receives the SSC settings | ||||||
| - When you enable SSC, the instantaneous clock frequency deviates from the nominal rate | ||||||
| - Always validate SSC parameters with the specific display panel you use. Some panels might have strict jitter requirements | ||||||
|
|
||||||
| Customer responsibilities | ||||||
| ------------------------- | ||||||
|
|
||||||
| .. warning:: | ||||||
|
|
||||||
| **You assume all responsibility for the configuration and usage of spread-spectrum clocking.** You must: | ||||||
|
|
||||||
| 1. Research the clock limitations associated with your selected display panel | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about HDMI monitors? |
||||||
| 2. Configure SSC to be compatible with that specific display panel | ||||||
| 3. Verify that the SSC configuration does not cause any system-related issues for any operating condition | ||||||
| 4. Work with the display panel vendor to resolve any issues caused by enabling SSC | ||||||
| 5. Validate displays to have enough functional margin with the jitter introduced by spread spectrum modulation | ||||||
|
|
||||||
| Some display panels have clocking limitations not in their data sheets. Work directly with the display panel manufacturer on any display-related issues from SSC. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. did you mean?
Suggested change
|
||||||
|
|
||||||
| References | ||||||
| ---------- | ||||||
|
|
||||||
| - `DSS Driver Documentation <../../Foundational_Components/Kernel/Kernel_Drivers/Display/DSS7.html>`__ | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use [0] - https://www.sphinx-doc.org/en/master/usage/referencing.html#role-ref |
||||||
| - SoC Technical Reference Manual (TRM) | ||||||
| - System Firmware Documentation - PM Clock API | ||||||
| - Linux kernel device tree bindings: ``Documentation/devicetree/bindings/display/ti/`` | ||||||
| - Linux kernel clock framework documentation: ``Documentation/driver-api/clk.rst`` | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need a similar guide for AM62L as well?