Files
MiPi_TEST/reports/20260415_142626_analysis.html

127 lines
20 KiB
HTML
Raw Normal View History

2026-04-15 16:02:30 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MIPI Analysis — Captures 11331162</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; 4 of 30 display load sessions (13%) 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>1133</td><td>20260415_141042</td><td>dat</td><td style='color:red'>0.3 ns</td><td>3.4 ns</td><td>1.016 V</td></tr><tr><td>1149</td><td>20260415_141630</td><td>dat</td><td style='color:red'>0.2 ns</td><td>3.4 ns</td><td>1.015 V</td></tr><tr><td>1151</td><td>20260415_141713</td><td>dat</td><td style='color:red'>0.2 ns</td><td>2.4 ns</td><td>1.015 V</td></tr><tr><td>1152</td><td>20260415_141735</td><td>dat</td><td style='color:red'>0.2 ns</td><td>3.1 ns</td><td>1.015 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>1133</td><td>20260415_141042</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1134</td><td>20260415_141104</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1135</td><td>20260415_141126</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1136</td><td>20260415_141147</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1137</td><td>20260415_141209</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1138</td><td>20260415_141231</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1139</td><td>20260415_141252</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1140</td><td>20260415_141314</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1141</td><td>20260415_141336</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1142</td><td>20260415_141358</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1143</td><td>20260415_141420</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1144</td><td>20260415_141442</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1145</td><td>20260415_141503</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1146</td><td>20260415_141525</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1147</td><td>20260415_141547</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1148</td><td>20260415_141608</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1149</td><td>20260415_141630</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1150</td><td>20260415_141652</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1151</td><td>20260415_141713</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1152</td><td>20260415_141735</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1153</td><td>20260415_141757</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1154</td><td>20260415_141819</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1155</td><td>20260415_141840</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1156</td><td>20260415_141902</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1157</td><td>20260415_141924</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1158</td><td>20260415_141946</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1159</td><td>20260415_142007</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1160</td><td>20260415_142029</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1161</td><td>20260415_142051</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr><tr><td>1162</td><td>20260415_142113</td><td>0x00000305</td><td>0x020e0a03</td><td>0x00030605</td></tr>
</table>
</div>
</details>
<p class="meta">
<strong>Generated:</strong> 2026-04-15 14:26:26 &nbsp;|&nbsp;
<strong>Scope:</strong> Captures 11331162 &nbsp;|&nbsp;
<strong>Model:</strong> claude-opus-4-6
</p>
<p># MIPI D-PHY Signal Integrity Analysis — Captures 11331162</p>
<p>## 1. Executive Summary</p>
<p><strong>The system is running with &#x27;Round Best&#x27; PHY timing registers that produce 5 D-PHY v1.1 spec violations on every single capture. The SoT sequence on the data lane is critically degraded: LP-low plateau is absent (0 ns) on all 4 confirmed flicker events, and the LP-11→HS exit time is universally 04 ns (spec ≥ 50 ns) across both good and bad sessions. The difference between State A (good) and State B (flicker) is whether the SN65DSI83 receiver happens to sample the truncated/missing LP-01→LP-00 SoT preamble in time — a race condition caused by timing fields programmed below D-PHY minimums.</strong></p>
<ul><li></li></ul>
<p>## 2. Consistent Spec Concerns</p>
<p>### 2.1 Register Timing Violations (100% of captures)</p>
<p>Every single capture shows identical register values — the &#x27;Round Best&#x27; mode is active throughout:</p>
<p>| Parameter | Programmed | Actual | D-PHY v1.1 Spec | Deficit |<br>|-----------|-----------|--------|-----------------|---------|<br>| <strong>THS_EXIT</strong> | 5 bc | 92.6 ns | ≥ 100.0 ns | <strong>7.4 ns</strong> |<br>| <strong>TCLK_PREPARE</strong> | 2 bc | 37.0 ns | 38.095.0 ns | <strong>1.0 ns</strong> |<br>| <strong>TCLK_TRAIL</strong> | 3 bc | 55.6 ns | ≥ 60.0 ns | <strong>4.4 ns</strong> |<br>| <strong>TCLK_PREPARE+TCLK_ZERO</strong> | 16 bc | 296.3 ns | ≥ 300.0 ns | <strong>3.7 ns</strong> |<br>| <strong>THS_PREPARE+THS_ZERO</strong> | 9 bc | 166.7 ns | ≥ 168.2 ns | <strong>1.5 ns</strong> |</p>
<p><strong>The THS_PREPARE+THS_ZERO violation (1.5 ns) is the smoking gun.</strong> This combined parameter defines the data-lane SoT sequence duration — specifically, how long the receiver sees the HS-zero state before the first valid data bit. At 166.7 ns vs. the 168.2 ns minimum, the SN65DSI83&#x27;s LP-HS state machine has <strong>less than one UI (2.315 ns) of margin</strong> to recognise the SoT. Analog process/voltage/temperature variation inside the bridge&#x27;s receiver comparators will occasionally cause it to miss the SoT entirely — exactly matching the observed bistable behaviour.</p>
<p>### 2.2 LP-11→HS Exit Timing (Universal Violation)</p>
<p>| Metric | Flicker captures (1133, 1149, 1151, 1152) | Non-flicker captures | Spec |<br>|--------|-------------------------------------------|---------------------|------|<br>| LP exit → HS | 23 ns | 04 ns (majority 24 ns) | ≥ 50 ns |<br>| LP-low plateau | <strong>0 ns</strong> | 108343 ns | ≥ TLPX (50 ns) |</p>
<p><strong>Critical finding:</strong> The LP exit duration is below spec in <strong>every capture</strong> (flicker and non-flicker alike), typically 24 ns vs. the 50 ns minimum. This means the LP-11→LP-01→LP-00→HS-0 state machine is running too fast for the scope to resolve the intermediate states — the PHY is essentially slamming from LP-11 directly into HS with no discernible LP-00 dwell.</p>
<p>The <strong>differentiator for flicker</strong> is whether the LP-low plateau is detected at all:<br>- <strong>Flicker events (4/30):</strong> LP-low = 0 ns — the LP-00 state is completely absent<br>- <strong>Good sessions:</strong> LP-low = 108343 ns — some LP-00 dwell is present, enough for the bridge</p>
<p>This is consistent with THS_PREPARE+THS_ZERO being 1.5 ns short: the PHY occasionally collapses the LP-00 state entirely when internal PLL/divider phase alignment happens to truncate it by that extra fraction of a byte clock.</p>
<p>### 2.3 LP-11 Voltage</p>
<p>LP-11 = 1.0151.016 V across all captures. Spec range is 1.01.45 V (derived from VDDIO × 55%80%). At VDDIO = 1.765 V, the expected LP-high range is 0.971.41 V, so <strong>1.015 V is within spec but in the lower quartile</strong>. This is not the failure mechanism but offers minimal noise margin for LP-state detection at the receiver.</p>
<p>### 2.4 HS Amplitude</p>
<ul><li><strong>CLK lane:</strong> 164.6169.0 mV differential — consistently within spec (140270 mV) but at the <strong>low end</strong></li><li><strong>DAT lane:</strong> 177.8199.2 mV differential — healthy</li><li><strong>Below-140 mV samples:</strong> Present on every capture (CLK: 18106 samples; DAT: 73846 samples). These are transition-region excursions and ISI-related dips. The DAT lane shows significantly more sub-140 mV samples, indicating <strong>worse signal integrity on the data path</strong> (likely longer trace, worse impedance match, or coupling).</li></ul>
<ul><li></li></ul>
<p>## 3. Trend Analysis Across 30 Captures</p>
<p>### 3.1 No Temporal Drift<br>- <strong>CLK amplitude:</strong> 166.0166.5 mV — rock-steady, no degradation<br>- <strong>CLK frequency:</strong> 213.1219.2 MHz — variation is capture-window aliasing, nominal 216 MHz<br>- <strong>Jitter:</strong> 140167 ps p-p, 52.655.9 ps RMS — stable, within typical bounds<br>- <strong>Rise times:</strong> 139.9174.1 ps (2080%) — consistent<br>- <strong>1.8 V supply:</strong> Mean 1.76351.7695 V, ripple RMS 5.145.94 mV — stable<br>- <strong>LP-11 voltage:</strong> 1.0151.016 V — no drift</p>
<p><strong>Conclusion:</strong> There is no progressive degradation. The failure mode is purely stochastic at each pipeline-load event.</p>
<p>### 3.2 LP-Low Plateau Distribution</p>
<p>| LP-low plateau (ns) | Count | Flicker? |<br>|---------------------|-------|----------|<br>| 0 | 4 | <strong>YES (all 4 flicker events)</strong> |<br>| 108 | 7 | No |<br>| 342343 | 15 | No |<br>| N/A (capture error) | 1 (cap 1143) | Unknown |</p>
<p>The plateau quantises into three clusters (0, ~108, ~342 ns), suggesting the PHY&#x27;s internal state machine aligns the LP-00 dwell to byte-clock boundaries. When the phase alignment is unfavourable, the dwell collapses to zero — the SoT preamble vanishes entirely.</p>
<ul><li></li></ul>
<p>## 4. Supply Correlation Analysis</p>
<p>### 4.1 Droop vs. Flicker</p>
<p>| Capture | Flicker? | LP-low (ns) | 1.8V droop (mV) | 1.8V min (V) |<br>|---------|----------|-------------|-----------------|--------------|<br>| <strong>1133</strong> | <strong>YES</strong> | <strong>0</strong> | <strong>16.9</strong> | <strong>1.748</strong> |<br>| 1134 | No | 342 | 9.7 | 1.756 |<br>| 1135 | No | 342 | 9.6 | 1.756 |<br>| <strong>1149</strong> | <strong>YES</strong> | <strong>0</strong> | 9.0 | 1.756 |<br>| <strong>1151</strong> | <strong>YES</strong> | <strong>0</strong> | <strong>16.6</strong> | <strong>1.748</strong> |<br>| <strong>1152</strong> | <strong>YES</strong> | <strong>0</strong> | 9.4 | 1.756 |<br>| 1157 | No | 343 | 13.2 | 1.752 |<br>| 1158 | No | 108 | 15.5 | 1.748 |</p>
<p><strong>Mixed correlation.</strong> Captures 1133 and 1151 (flicker) show the deepest droops (16.9/16.6 mV, min 1.748 V), but captures 1149 and 1152 (also flicker) show normal droop (9.0/9.4 mV). Conversely, capture 1158 (no flicker) has 15.5 mV droop.</p>
<p><strong>Conclusion:</strong> Supply droop is a <strong>contributing factor but not the primary cause</strong>. The deeper droops (to 1.748 V) reduce the LP driver swing and PHY PLL stability during the LP→HS transition, which further compresses the already-too-short SoT timing. However, flicker also occurs at normal supply levels, confirming the root cause is the register-level timing violation, not supply.</p>
<ul><li></li></ul>
<p>## 5. Anomaly &amp; Warning Explanations</p>
<p>### 5.1 &quot;Only negative swings in capture window&quot; (≈60% of sig/dat captures)<br><strong>Cause:</strong> The oscilloscope trigger captured a window aligned to a run of identical data bits (e.g., all-zero payload region). In DDR MIPI, a constant &#x27;0&#x27; pattern produces only negative differential swings. This is a <strong>capture-window artifact</strong>, not a signal defect. The amplitude from these captures (~194 mV) is consistent with full-swing measurements from balanced captures.</p>
<p><strong>Action:</strong> No concern. Could refine trigger to capture more diverse bit patterns if balanced amplitude measurement is needed.</p>
<p>### 5.2 &quot;No HS signal detected&quot; on sig/dat (Captures 1136, 1141, 1144, 1147)<br><strong>Cause:</strong> The high-resolution trigger on DAT0 captured a blanking interval or LP idle period between HS bursts. The DAT lane is in LP state during vertical blanking; the narrow capture window occasionally falls in this gap.</p>
<p><strong>Action:</strong> No concern for signal health assessment — the proto captures from the same sessions confirm valid HS operation.</p>
<p>### 5.3 &quot;CLK lane is in continuous HS mode&quot; on lp/clk (all captures)<br><strong>Cause:</strong> Expected behaviour. The Samsung DSIM PHY operates the clock lane in continuous HS mode (not non-continuous clock mode). The clock lane entered HS before the data lane&#x27;s LP capture window and stays there. LP states on the clock lane are only visible during the very first pipeline startup, which occurs before the scope&#x27;s trigger on data-lane LP activity.</p>
<p><strong>Action:</strong> No concern. This is correct DSI Video Mode operation.</p>
<p>### 5.4 &quot;[lp_dat] ERROR: index 200000 is out of bounds&quot; (Capture 1143)<br><strong>Cause:</strong> The LP analysis script&#x27;s edge-detection algorithm attempted to access beyond the capture buffer boundary. Most likely, the LP→HS transition occurred at the very end of the capture window, and the algorithm&#x27;s look-ahead overran. This is a <strong>software bug in the analysis tool</strong>, not a signal issue.</p>
<p><strong>Action:</strong> Extend the capture window by 10% or add bounds checking in the LP analysis script. The LP data for this capture is not available for flicker analysis — it should be repeated.</p>
<p>### 5.5 DAT lane sub-140 mV sample counts vary wildly (73846)<br><strong>Cause:</strong> Data-dependent ISI (inter-symbol interference). Long runs of alternating bits produce clean eye openings; long runs of same-bit produce DC-wander and pre-/post-cursor ISI that momentarily drops the differential swing below 140 mV. Captures with higher counts happened to contain more worst-case bit patterns.</p>
<p><strong>Action:</strong> The maximum count (3846 in capture 1140) suggests the DAT lane&#x27;s SI is marginal. Check trace impedance matching and consider adding 100 Ω differential termination at the SN65DSI83 input if not already present.</p>
<ul><li></li></ul>
<p>## 6. Actionable Recommendations</p>
<p>### 6.1 CRITICAL — Switch to &#x27;Round Up&#x27; Register Values</p>
<p>This is the <strong>single most important fix</strong>. Apply the fully D-PHY v1.1 compliant timing:</p>
<p>```<br># Write &#x27;Round Up&#x27; values via memtool or device tree overlay:<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><strong>Specific impact on the failure mechanism:</strong><br>- THS_PREPARE+THS_ZERO increases from 166.7 ns → <strong>185.2 ns</strong> (+18.5 ns, 10% margin over spec)<br>- TCLK_PREPARE+TCLK_ZERO increases from 296.3 ns → <strong>333.3 ns</strong> (+33 ns, 11% margin)<br>- THS_EXIT increases from 92.6 ns → <strong>111.1 ns</strong> (11% margin)</p>
<p>This eliminates the race condition at SoT by giving the SN65DSI83 receiver substantially more time to detect the LP-00 state and synchronise to the HS preamble.</p>
<p><strong>Implementation:</strong> In the samsung-dsim / sec-dsim driver, the timing calculation is done in `samsung_dsim_set_phy_timing()`. The &#x27;Round Best&#x27; mode truncates fractional byte-clock results downward; switching to ceiling (round-up) ensures all timings meet or exceed spec minimums. This is typically a one-line change in the driver&#x27;s rounding mode or can be forced via device tree properties if supported by the BSP.</p>
<p>### 6.2 HIGH — Verify the Fix Eliminates LP-Low Plateau Collapse</p>
<p>After applying Round Up registers, repeat the 30-cycle load/unload test and verify:<br>- LP-low plateau ≥ 50 ns on <strong>every</strong> capture<br>- LP exit → HS ≥ 50 ns on <strong>every</strong> capture<br>- Zero flicker events across ≥ 100 pipeline-load cycles</p>
<p>### 6.3 MEDIUM — Investigate LP-11 Voltage (1.015 V)</p>
<p>LP-11 at 1.015 V with VDDIO = 1.765 V gives LP-high = 57.5% of VDDIO — barely above the 55% threshold. The LP driver&#x27;s output impedance combined with the 1.016 V level suggests possible over-termination or an impedance mismatch pulling the LP level down.</p>
<p><strong>Check:</strong><br>- SN65DSI83 input termination — the bridge has internal 200 Ω LP termination; verify no external termination resistors are double-loading the LP driver<br>- Trace length on LP lines — should be ≤ 100 mm for 432 Mbit/s</p>
<p>### 6.4 MEDIUM — CLK Lane Differential Asymmetry</p>
<p>The CLK lane consistently shows asymmetric swings: +195 mV / 137 mV (common mode offset ≈ +29 mV). While the total differential amplitude (166 mV) is within spec, the positive/negative asymmetry suggests a <strong>DC offset in the CLK driver or unequal termination on CLK+ vs CLK</strong>.</p>
<p><strong>Check:</strong><br>- AC-coupling capacitor values on CLK+ and CLK (should be matched within 1%)<br>- PCB trace length matching between CLK+ and CLK (should be within 0.1 mm)</p>
<p>### 6.5 LOW — DAT Lane Sub-140 mV Excursions</p>
<p>While not causing the flicker, the DAT lane&#x27;s occasional high sub-140 mV sample counts (up to 3846) indicate marginal eye opening during worst-case data patterns. After fixing the SoT timing:<br>- Monitor for bit errors on long-running sessions<br>- If issues persist, consider reducing DAT lane trace stub lengths or adding matched termination</p>
<ul><li></li></ul>
<p>## 7. Overall Signal Health &amp; Flicker Risk Summary</p>
<p><strong>The HS signal quality is adequate</strong> — amplitudes, rise times, jitter, and supply rail are all within acceptable bounds and show no degradation trend. <strong>The flicker is entirely caused by the &#x27;Round Best&#x27; PHY timing mode</strong>, which programs 5 register fields below D-PHY v</p>
<p class="tokens">Tokens: 45873 in / 4096 out</p>
</body>
</html>