Files
MiPi_TEST/reports/20260413_120809_analysis.html
david rice fa96fef9ea Updates
2026-04-13 15:03:47 +01:00

106 lines
19 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MIPI Analysis — Captures 04690498</title>
<style>
body { font-family: Arial, sans-serif; max-width: 900px; margin: 40px auto; padding: 0 20px; color: #222; }
h1 { color: #1a3a5c; border-bottom: 2px solid #1a3a5c; padding-bottom: 8px; }
.meta { color: #555; font-size: 0.95em; margin-top: -8px; margin-bottom: 24px; }
p { line-height: 1.6; }
ol, ul { line-height: 1.8; padding-left: 24px; }
li { margin: 4px 0; }
.tokens { color: #888; font-size: 0.8em; margin-top: 32px; border-top: 1px solid #ddd; padding-top: 8px; }
.flicker-alert { background: #fff3cd; border: 2px solid #e65100; border-radius: 6px;
padding: 16px 20px; margin-bottom: 28px; }
.flicker-alert h2 { color: #e65100; margin-top: 0; }
.flicker-alert table { border-collapse: collapse; width: 100%; margin-top: 10px; }
.flicker-alert th { background: #e65100; color: white; padding: 6px 10px; text-align: left; }
.flicker-alert td { border: 1px solid #ccc; padding: 5px 10px; }
table { border-collapse: collapse; width: 100%; }
th { background: #1a3a5c; color: white; padding: 6px 10px; text-align: left; }
td { border: 1px solid #ddd; padding: 5px 10px; }
@media print { body { margin: 20px; } }
</style>
</head>
<body>
<h1>MIPI D-PHY Analysis Report</h1>
<div style="background:#fff3cd;border:2px solid #e65100;border-radius:6px;
padding:16px 20px;margin-bottom:28px;">
<h2 style="color:#e65100;margin-top:0">&#9888; FLICKER DETECTED &mdash; 2 of 30 display load sessions (7%) flickered</h2>
<p>Each flagged capture is a genuine flicker event (not an artifact) — the LP pass fires at
pipeline startup, so a missing or sub-50&nbsp;ns LP-low plateau means the SN65DSI83 bridge
missed the SoT sequence and dropped a frame.<br>
LP-low plateau &lt; 50&nbsp;ns means the LP-01/LP-00 SoT states are absent or too brief
for the SN65DSI83 bridge to detect start-of-transmission.</p>
<table>
<tr><th>Capture</th><th>Timestamp</th><th>Channel</th>
<th>LP-low plateau</th><th>LP exit&rarr;HS</th><th>LP-11 voltage</th></tr>
<tr><td>0476</td><td>20260413_115521</td><td>dat</td><td style='color:red'>0.2 ns</td><td>347.8 ns</td><td>1.015 V</td></tr><tr><td>0480</td><td>20260413_115648</td><td>dat</td><td style='color:red'>0.3 ns</td><td>3.3 ns</td><td>1.014 V</td></tr>
</table>
</div>
<details style="margin-bottom:24px;">
<summary style="cursor:pointer;font-weight:bold;color:#1a3a5c;font-size:1.05em;">
DSI Register Snapshots (30 captures)
</summary>
<div style="overflow-x:auto;margin-top:8px;">
<table>
<tr><th>Capture</th><th>Timestamp</th><th>0x32e100b4<br><small>DSIM_PHYTIMING</small></th><th>0x32e100b8<br><small>DSIM_PHYTIMING1</small></th><th>0x32e100bc<br><small>DSIM_PHYTIMING2</small></th></tr>
<tr><td>0469</td><td>20260413_115249</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0470</td><td>20260413_115311</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0471</td><td>20260413_115333</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0472</td><td>20260413_115354</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0473</td><td>20260413_115416</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0474</td><td>20260413_115438</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0475</td><td>20260413_115500</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0476</td><td>20260413_115521</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0477</td><td>20260413_115543</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0478</td><td>20260413_115605</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0479</td><td>20260413_115626</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0480</td><td>20260413_115648</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0481</td><td>20260413_115710</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0482</td><td>20260413_115732</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0483</td><td>20260413_115753</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0484</td><td>20260413_115815</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0485</td><td>20260413_115836</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0486</td><td>20260413_115858</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0487</td><td>20260413_115920</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0488</td><td>20260413_115941</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0489</td><td>20260413_120003</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0490</td><td>20260413_120025</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0491</td><td>20260413_120046</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0492</td><td>20260413_120108</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0493</td><td>20260413_120130</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0494</td><td>20260413_120151</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0495</td><td>20260413_120213</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0496</td><td>20260413_120235</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0497</td><td>20260413_120256</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>0498</td><td>20260413_120318</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr>
</table>
</div>
</details>
<p class="meta">
<strong>Generated:</strong> 2026-04-13 12:08:09 &nbsp;|&nbsp;
<strong>Scope:</strong> Captures 04690498 &nbsp;|&nbsp;
<strong>Model:</strong> claude-opus-4-6
</p>
<p># MIPI D-PHY Signal Integrity Analysis — Captures 04690498</p>
<p>## 1. Consistent Spec Concerns</p>
<p>### Register Timing Violations (100% of captures — systemic)<br>All 30 captures show identical register values confirming the system is running <strong>&#x27;Round Best&#x27; mode</strong> with <strong>5 D-PHY v1.1 violations</strong>:</p>
<p>| Parameter | Measured | Spec Min | Deficit | Severity |<br>|---|---|---|---|---|<br>| THS_EXIT | 92.6 ns | 100.0 ns | 7.4 ns (7.4%) | <strong>High — SoT critical</strong> |<br>| TCLK_PREPARE | 37.0 ns | 38.0 ns | 1.0 ns (2.6%) | <strong>High — clock SoT</strong> |<br>| TCLK_TRAIL | 55.6 ns | 60.0 ns | 4.4 ns (7.3%) | Moderate |<br>| TCLK_PREPARE+TCLK_ZERO | 296.3 ns | 300.0 ns | 3.7 ns (1.2%) | <strong>High — clock SoT</strong> |<br>| THS_PREPARE+THS_ZERO | 166.7 ns | 168.2 ns | 1.5 ns (0.9%) | <strong>High — data SoT</strong> |</p>
<p><strong>These are the root cause of the intermittent flicker.</strong> All five violations affect the SoT handshake sequence, and all shortfalls are within ~1 byte-clock (18.5 ns) of the spec minimum — small enough that PVT (process/voltage/temperature) variation and internal clock jitter make the outcome non-deterministic, exactly matching the observed bistable behaviour.</p>
<p>### LP Exit Duration — Universally Violated<br>- <strong>26 of 27 measurable captures</strong> show LP exit → HS of <strong>04 ns</strong> (spec ≥ 50 ns). Only 4 captures (0470, 0485, 0487, 0496) show ~113 ns, and Capture 0494 shows ~348 ns.<br>- This means the LP-01 → LP-00 intermediate states are being traversed in ≤ 4 ns rather than the required ≥ 50 ns. The PHY is skipping or compressing the SoT escape sequence.<br>- <strong>Direct cause:</strong> THS_EXIT = 5 bc (92.6 ns) is below the 100 ns minimum, and the too-short THS_PREPARE+THS_ZERO (166.7 ns vs 168.2 ns) means the data lane does not hold LP-00 long enough for the bridge to recognise SoT.</p>
<p>### LP-Low Plateau — Bimodal Distribution<br>The LP-low plateau clusters at three values:<br>- <strong>~108 ns</strong> (14 captures) — marginal but functional<br>- <strong>~343 ns</strong> (13 captures) — comfortable<br>- <strong>0 ns</strong> (2 captures: <strong>0476 and 0480</strong>) — <strong>both are confirmed flicker events</strong></p>
<p>The 0 ns plateau means the SN65DSI83 never sees LP-00 at all. With THS_PREPARE+THS_ZERO only 1.5 ns under spec, the PHY occasionally produces a prepare+zero sequence so short that LP-00 vanishes entirely from the wire. The bridge cannot detect SoT, never locks to the HS data stream, and flickers indefinitely.</p>
<p>### HS Voltage Below 140 mV Threshold<br>Every capture shows some samples below the 140 mV D-PHY minimum:<br>- <strong>CLK lane:</strong> 15269 sub-threshold samples per capture (consistent, moderate)<br>- <strong>DAT0 lane:</strong> 29142 sub-threshold samples (highly variable)</p>
<p>The data lane violation count is notably higher in flicker captures: <strong>0476 has 2357, 0480 has 7209</strong> (the two worst after 0486&#x27;s 9142). This suggests that when the SoT sequence is malformed, the bridge misaligns to the HS stream and the receiver samples data at sub-optimal points, inflating the below-140 mV count. This is likely a consequence of SoT failure, not a cause.</p>
<p>### LP-11 Voltage — Consistently Low<br>- Range: <strong>1.0141.016 V</strong> across all captures<br>- D-PHY spec: <strong>1.01.45 V</strong> → technically passing but at the <strong>absolute floor</strong> of the valid range<br>- Expected LP-11 with 1.8 V VDDIO: ~1.2 V (with typical LP driver divider)<br>- <strong>1.015 V is 200 mV below expected</strong>, suggesting either excessive resistive drop in the LP driver path, impedance mismatch on the LP lines, or a weak pull-up/driver configuration in the PHY.<br>- While within spec, this low LP-11 voltage reduces the noise margin for LP state detection by the SN65DSI83 to only <strong>~15 mV</strong> above the LP-11 recognition threshold. This further degrades the reliability of LP state transitions during SoT.</p>
<p>## 2. Trends Across Captures</p>
<p>### No Significant Drift<br>| Parameter | Range | Trend |<br>|---|---|---|<br>| CLK Vdiff amplitude | 165.4166.0 mV | Flat — no degradation |<br>| DAT0 Vdiff amplitude | 186.5199.8 mV | Flat — normal variation |<br>| CLK jitter (RMS) | 53.256.4 ps | Flat |<br>| CLK jitter (p-p) | 142.6178.4 ps | Flat |<br>| Rise time (CLK/DAT) | 147.9184.6 ps | Flat |<br>| LP-11 voltage | 1.0141.016 V | Flat |<br>| 1.8 V supply mean | 1.76451.7705 V | Flat |<br>| 1.8 V supply min | 1.75201.7600 V | Flat |<br>| Droop depth | 8.512.6 mV | Flat |</p>
<p><strong>No temperature drift, ageing, or supply degradation is observed.</strong> The problem is purely timing non-determinism at each SoT event, consistent with the bistable description.</p>
<p>### Clock Frequency Variation<br>Most captures report ~216 MHz but several show 212.7219.1 MHz. This ±1.5% spread is within PLL settling tolerance and likely reflects measurement window position (capturing during PLL lock). Not a direct concern but indicates the measurement sometimes catches the very first HS bursts.</p>
<p>## 3. Anomalies</p>
<p>### Flicker Events (Captures 0476 and 0480)<br>| | Capture 0476 | Capture 0480 |<br>|---|---|---|<br>| LP-low plateau | <strong>0 ns</strong> | <strong>0 ns</strong> |<br>| LP exit → HS | 348 ns ✓ | 3 ns ✗ |<br>| HS amplitude (SE) | 108 mV | 110 mV |<br>| DAT0 below-140mV | 2357 | <strong>7209</strong> |<br>| CLK jitter p-p | <strong>174.2 ps</strong> | <strong>178.4 ps</strong> |<br>| Supply droop | 9.4 mV | 8.5 mV |</p>
<p><strong>Key observation:</strong> Capture 0476 shows a long LP exit (348 ns) but <strong>zero LP-low plateau</strong> — the line transitioned from LP-11 directly to HS without dwelling in LP-00. This is a classic symptom of THS_PREPARE being executed but THS_ZERO being so short that LP-00 is never asserted on the wire. The 1.5 ns shortfall in THS_PREPARE+THS_ZERO (166.7 vs 168.2 ns) means the PHY&#x27;s internal counter is right at the rounding boundary; internal clock jitter (~55 ps RMS → ~330 ps 6σ) can easily push it 12 ns shorter on some attempts.</p>
<p><strong>Capture 0480</strong> additionally has the shortest LP exit (3 ns) AND zero LP-low plateau — a double failure where both the LP-01 and LP-00 states were essentially skipped.</p>
<p>Both flicker captures show slightly elevated CLK jitter p-p (174, 178 ps vs batch median ~160 ps), which could reflect the PHY operating with marginal internal timing at the moment of SoT.</p>
<p>### DAT0 sig Captures — Intermittent &quot;No HS Signal&quot;<br>Captures 0469, 0471, 0479, 0486, 0498 show DAT0 sig amplitude = 0.0 mV (&quot;No HS signal detected&quot;). This occurs because the high-res sig capture window is very narrow and the data lane is between HS bursts (LP or idle) at that instant. Not a hardware fault — the proto captures always show valid DAT0 amplitude.</p>
<p>### DAT0 &quot;Only Negative Swings&quot;<br>Approximately 60% of captures show DAT0 with only negative differential swings in the sig/proto window. This indicates the trigger point consistently lands on a data pattern dominated by one polarity (e.g., a run of 0x00 or 0xFF bytes). Not a signal integrity concern — the full differential amplitude is still 186200 mV.</p>
<p>### CLK Common Mode Offset<br>The CLK lane shows a consistent <strong>+29 mV common mode offset</strong>. D-PHY spec allows ±25 mV variation around Vcm; at +29 mV this is slightly out of family but the absolute Vcm is within the receiver&#x27;s 200 mV tolerance band. <strong>Not a direct flicker cause</strong> but indicates slight impedance asymmetry in the CLK pair routing.</p>
<p>### Capture 0497 — LP DAT Processing Error<br>`[lp_dat] ERROR: index 200000 is out of bounds for axis 0 with size 200000` — the LP capture buffer was exactly full, and the analysis script attempted to read past the end. This means the LP→HS transition occurred very late in the capture window, or the HS burst extended to the end of the buffer. <strong>Not a hardware fault</strong> — adjust trigger position or increase buffer depth to avoid this.</p>
<p>## 4. Supply Correlation Analysis</p>
<p>### 1.8 V Supply vs. LP Anomalies</p>
<p>| Parameter | Flicker (0476/0480) | Non-flicker (all others) |<br>|---|---|---|<br>| Mean 1.8 V | 1.765 / 1.765 V | 1.7641.771 V |<br>| Min 1.8 V | 1.756 / 1.756 V | 1.7521.760 V |<br>| Droop | 9.4 / 8.5 mV | 8.512.6 mV |<br>| Ripple RMS | 5.65 / 5.38 mV | 5.246.14 mV |</p>
<p><strong>There is no correlation between supply droop/ripple and flicker.</strong> The flicker captures have average-to-good supply metrics. The worst droop (12.6 mV, Capture 0470) produced a clean SoT with 113 ns LP exit. The supply is solidly within spec at all times (min 1.752 V vs 1.71 V spec floor).</p>
<p><strong>Conclusion: The 1.8 V supply is not the flicker trigger.</strong> The root cause is purely the PHY timing register configuration, with the probabilistic outcome determined by internal PHY clock jitter at the SoT moment.</p>
<p>### LP-11 Voltage vs. Supply<br>LP-11 at ~1.015 V with VDDIO at ~1.765 V gives a ratio of 0.575, well below the expected ~0.67. This suggests the LP driver output impedance is higher than expected or there is a series resistance in the LP signal path. However, this is constant across all captures and does not differentiate flicker from non-flicker events.</p>
<p>## 5. Warning/Error Explanations</p>
<p>| Warning | Count | Likely Cause | Action |<br>|---|---|---|---|<br>| &quot;LP exit duration N ns below spec min 50 ns&quot; | 23/27 | <strong>THS_EXIT=5 bc (92.6 ns) and THS_PREPARE+THS_ZERO shortfall</strong> — PHY compresses LP-01→LP-00 states below detection threshold | <strong>Switch to &#x27;Round Up&#x27; registers</strong> |<br>| &quot;FLICKER SUSPECT: LP-low plateau absent&quot; | 2/27 | THS_PREPARE+THS_ZERO ~1.5 ns short; internal jitter occasionally eliminates LP-00 entirely | <strong>Switch to &#x27;Round Up&#x27; registers</strong> |<br>| &quot;No HS signal detected&quot; on DAT0 sig | 5/30 | Narrow capture window landed during LP/idle; data is bursty (video mode) | Widen sig capture window or trigger on HS preamble |<br>| &quot;Only negative swings in capture window&quot; | ~18/30 | Capture window hits a run of identical data bits | Not a concern — normal for video data |<br>| &quot;Settled samples below 140 mV&quot; on CLK | 30/30 | CLK amplitude ~166 mV with ~55 ps RMS jitter means crossing transitions occasionally dip below 140 mV | Moderate concern — increase CLK drive strength if possible |<br>| &quot;Settled samples below 140 mV&quot; on DAT0 | 29/30 | ISI from data transitions + ~1.5 ns short zero state → sampling during transition | Will improve with compliant timing |<br>| &quot;index 200000 out of bounds&quot; (0497) | 1/30 | Analysis buffer overflow — LP→HS transition at edge of capture window | Move trigger earlier or extend buffer |</p>
<p>## 6. Actionable Recommendations</p>
<p>### CRITICAL — Fix Immediately</p>
<p><strong>① Switch to &#x27;Round Up&#x27; PHY timing registers.</strong> This is the single change that will eliminate the flicker:</p>
<p>```<br># Apply via memtool, device tree, or driver patch:<br>DSIM_PHYTIMING (0x32e100b4) = 0x00000306 # THS_EXIT=6 → 111.1 ns ✓<br>DSIM_PHYTIMING1 (0x32e100b8) = 0x030f0a04 # TCLK_PREPARE=3, TCLK_ZERO=15, TCLK_TRAIL=4 ✓<br>DSIM_PHYTIMING2 (0x32e100bc) = 0x00030706 # THS_ZERO=7, THS_TRAIL=6 ✓<br>```</p>
<p>This adds exactly <strong>1 byte-clock (18.5 ns) of margin</strong> to each violated parameter, bringing all five into full D-PHY v1.1 compliance. The cost is ~1837 ns additional latency per SoT sequence — completely negligible for a 60 Hz video stream.</p>
<p><strong>Driver-level fix:</strong> In the samsung-dsim (or sec-dsim) driver, the timing calculation function uses `DIV_ROUND_UP()` vs. truncating division for these fields. Ensure the driver is configured for ceiling rounding. On NXP BSPs, check `imx8mm-{board}.dts` for `samsung,phy-timing` overrides, or patch `samsung_dsim_set_phy_timing()` in `drivers/gpu/drm/bridge/samsung-dsim.c` to always round up.</p>
<p><strong>② Verify the fix eliminates LP-low = 0 ns events.</strong> After applying Round Up registers, re-run 50+ pipeline load cycles and confirm:<br>- LP-low plateau ≥ 50 ns on every capture<br>- LP exit → HS ≥ 50 ns on every capture<br>- Zero flicker events</p>
<p>### IMPORTANT — Address After Fix</p>
<p><strong>③ Investigate low LP-11 voltage (1.015 V).</strong> While in-spec, this is anomalously low:<br>- Check for series resistance in LP signal path (ferrite beads, ESD protection, connector contact resistance)<br>- Verify VDDIO_MIPI is directly connected to 1.8 V rail (not through a long trace or shared via)<br>- Confirm the PHY LP driver strength setting is correct for the load</p>
<p><strong>④ Address CLK lane common-mode offset (+29 mV).</strong> This suggests:<br>- Slight trace length mismatch on CLK± pair (~0.3 mm at 216 MHz)<br>- Or asymmetric loading (e.g., one CLK line has a test point or probe stub the other doesn&#x27;t)<br>- Verify CLK± differential pair routing is tightly coupled with matched lengths</p>
<p><strong>⑤ Consider adding margin beyond bare minimum.</strong> The &#x27;Round Up&#x27; values are still close to spec minimums. For production robustness, consider adding</p>
<p class="tokens">Tokens: 45337 in / 4096 out</p>
</body>
</html>