feat(multiphase): Add a way back from a margin without a power cycle

blanton_multiphase_margin.sh gains 'normal', which returns all 38 rails
to their nominal set point from tools/Multiphase_Normal.txt. Same rails,
same per-rail reporting, same -u 0|1|all as the margin profiles.

Until now the tool could apply high3/low3/comboA/comboB and commit with
save, but had no way to undo. That left a power cycle as the only exit -
and worse, a save run while still margined would have written the offsets
into NVM, which a power cycle does not undo either.

Emitted commands were diffed against the source file: argv identical.

The nominal labels in the source carry extra text ("0.900V (nominal)",
"0.8V(nominal) , 0.8591V with load line"); the per-rail line prints just
the voltage so the column matches the other profiles. The load-line note
is kept as a comment above the data block, because reading 0.859 V back
from TH6_CORE after 'normal' looks like a failed write and is not one.

Script A -> V1.1.7.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
2026-09-04 09:23:25 +08:00
co-authored by Claude Opus 5
parent 78a8f641c9
commit a9c56ee1d4
3 changed files with 405 additions and 2 deletions
+188
View File
@@ -0,0 +1,188 @@
//0.900V (nominal)
i2cset -f -y 13 0x25 0x00 0
i2ctransfer -f -y 13 w3@0x25 0x21 0x83 0x00
i2cset -f -y 13 0x25 0x00 2
i2ctransfer -f -y 13 w3@0x25 0x0D 0x74 0x10
//0.900V (nominal)
i2cset -f -y 15 0x26 0x00 0
i2ctransfer -f -y 15 w3@0x26 0x21 0x83 0x00
i2cset -f -y 15 0x26 0x00 2
i2ctransfer -f -y 15 w3@0x26 0x0D 0x74 0x10
//0.75V (nominal)
i2cset -f -y 13 0x25 0x00 1
i2ctransfer -f -y 13 w3@0x25 0x21 0x65 0x00
i2cset -f -y 13 0x25 0x00 2
i2ctransfer -f -y 13 w3@0x25 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 15 0x26 0x00 1
i2ctransfer -f -y 15 w3@0x26 0x21 0x65 0x00
i2cset -f -y 15 0x26 0x00 2
i2ctransfer -f -y 15 w3@0x26 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 13 0x21 0x00 0
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
i2cset -f -y 13 0x21 0x00 2
i2ctransfer -f -y 13 w3@0x21 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 13 0x21 0x00 1
i2ctransfer -f -y 13 w3@0x21 0x21 0x65 0x00
i2cset -f -y 13 0x21 0x00 2
i2ctransfer -f -y 13 w3@0x21 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 13 0x22 0x00 0
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
i2cset -f -y 13 0x22 0x00 2
i2ctransfer -f -y 13 w3@0x22 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 13 0x22 0x00 1
i2ctransfer -f -y 13 w3@0x22 0x21 0x65 0x00
i2cset -f -y 13 0x22 0x00 2
i2ctransfer -f -y 13 w3@0x22 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 15 0x23 0x00 0
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
i2cset -f -y 15 0x23 0x00 2
i2ctransfer -f -y 15 w3@0x23 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 15 0x23 0x00 1
i2ctransfer -f -y 15 w3@0x23 0x21 0x65 0x00
i2cset -f -y 15 0x23 0x00 2
i2ctransfer -f -y 15 w3@0x23 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 15 0x24 0x00 0
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
i2cset -f -y 15 0x24 0x00 2
i2ctransfer -f -y 15 w3@0x24 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 15 0x24 0x00 1
i2ctransfer -f -y 15 w3@0x24 0x21 0x65 0x00
i2cset -f -y 15 0x24 0x00 2
i2ctransfer -f -y 15 w3@0x24 0x1D 0x5A 0x06
//1.5V (nominal)
i2cset -f -y 13 0x29 0x00 0
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
i2cset -f -y 13 0x29 0x00 2
i2ctransfer -f -y 13 w3@0x29 0x0D 0x71 0x1F
//1.5V (nominal)
i2cset -f -y 13 0x29 0x00 1
i2ctransfer -f -y 13 w3@0x29 0x21 0xFB 0x00
i2cset -f -y 13 0x29 0x00 2
i2ctransfer -f -y 13 w3@0x29 0x1D 0xB9 0x0F
//0.720V
i2cset -f -y 13 0x27 0x00 0
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
i2cset -f -y 13 0x27 0x00 2
i2ctransfer -f -y 13 w3@0x27 0x0D 0xF4 0x0B
//0.720V
i2cset -f -y 13 0x27 0x00 1
i2ctransfer -f -y 13 w3@0x27 0x21 0x5F 0x00
i2cset -f -y 13 0x27 0x00 2
i2ctransfer -f -y 13 w3@0x27 0x1D 0xFC 0x05
//0.720V
i2cset -f -y 15 0x28 0x00 0
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
i2cset -f -y 15 0x28 0x00 2
i2ctransfer -f -y 15 w3@0x28 0x0D 0xF4 0x0B
//0.720V
i2cset -f -y 15 0x28 0x00 1
i2ctransfer -f -y 15 w3@0x28 0x21 0x5F 0x00
i2cset -f -y 15 0x28 0x00 2
i2ctransfer -f -y 15 w3@0x28 0x1D 0xFC 0x05
//0.8V(nominal) , 0.8591V with load line
i2cset -f -y 13 0x20 0x00 0
i2ctransfer -f -y 13 w3@0x20 0x21 0x57 0x01
//0.900V (nominal)
i2cset -f -y 14 0x25 0x00 0
i2ctransfer -f -y 14 w3@0x25 0x21 0x83 0x00
i2cset -f -y 14 0x25 0x00 2
i2ctransfer -f -y 14 w3@0x25 0x0D 0x74 0x10
//0.900V (nominal)
i2cset -f -y 16 0x26 0x00 0
i2ctransfer -f -y 16 w3@0x26 0x21 0x83 0x00
i2cset -f -y 16 0x26 0x00 2
i2ctransfer -f -y 16 w3@0x26 0x0D 0x74 0x10
//0.75V (nominal)
i2cset -f -y 14 0x25 0x00 1
i2ctransfer -f -y 14 w3@0x25 0x21 0x65 0x00
i2cset -f -y 14 0x25 0x00 2
i2ctransfer -f -y 14 w3@0x25 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 16 0x26 0x00 1
i2ctransfer -f -y 16 w3@0x26 0x21 0x65 0x00
i2cset -f -y 16 0x26 0x00 2
i2ctransfer -f -y 16 w3@0x26 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 14 0x21 0x00 0
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
i2cset -f -y 14 0x21 0x00 2
i2ctransfer -f -y 14 w3@0x21 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 14 0x21 0x00 1
i2ctransfer -f -y 14 w3@0x21 0x21 0x65 0x00
i2cset -f -y 14 0x21 0x00 2
i2ctransfer -f -y 14 w3@0x21 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 14 0x22 0x00 0
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
i2cset -f -y 14 0x22 0x00 2
i2ctransfer -f -y 14 w3@0x22 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 14 0x22 0x00 1
i2ctransfer -f -y 14 w3@0x22 0x21 0x65 0x00
i2cset -f -y 14 0x22 0x00 2
i2ctransfer -f -y 14 w3@0x22 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 16 0x23 0x00 0
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
i2cset -f -y 16 0x23 0x00 2
i2ctransfer -f -y 16 w3@0x23 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 16 0x23 0x00 1
i2ctransfer -f -y 16 w3@0x23 0x21 0x65 0x00
i2cset -f -y 16 0x23 0x00 2
i2ctransfer -f -y 16 w3@0x23 0x1D 0x5A 0x06
//0.75V (nominal)
i2cset -f -y 16 0x24 0x00 0
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
i2cset -f -y 16 0x24 0x00 2
i2ctransfer -f -y 16 w3@0x24 0x0D 0xB2 0x0C
//0.75V (nominal)
i2cset -f -y 16 0x24 0x00 1
i2ctransfer -f -y 16 w3@0x24 0x21 0x65 0x00
i2cset -f -y 16 0x24 0x00 2
i2ctransfer -f -y 16 w3@0x24 0x1D 0x5A 0x06
//1.5V (nominal)
i2cset -f -y 14 0x29 0x00 0
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
i2cset -f -y 14 0x29 0x00 2
i2ctransfer -f -y 14 w3@0x29 0x0D 0x71 0x1F
//1.5V (nominal)
i2cset -f -y 14 0x29 0x00 1
i2ctransfer -f -y 14 w3@0x29 0x21 0xFB 0x00
i2cset -f -y 14 0x29 0x00 2
i2ctransfer -f -y 14 w3@0x29 0x1D 0xB9 0x0F
//0.720V (nominal)
i2cset -f -y 14 0x27 0x00 0
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
i2cset -f -y 14 0x27 0x00 2
i2ctransfer -f -y 14 w3@0x27 0x0D 0xF4 0x0B
//0.720V (nominal)
i2cset -f -y 14 0x27 0x00 1
i2ctransfer -f -y 14 w3@0x27 0x21 0x5F 0x00
i2cset -f -y 14 0x27 0x00 2
i2ctransfer -f -y 14 w3@0x27 0x1D 0xFC 0x05
//0.720V (nominal)
i2cset -f -y 16 0x28 0x00 0
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
i2cset -f -y 16 0x28 0x00 2
i2ctransfer -f -y 16 w3@0x28 0x0D 0xF4 0x0B
//0.720V (nominal)
i2cset -f -y 16 0x28 0x00 1
i2ctransfer -f -y 16 w3@0x28 0x21 0x5F 0x00
i2cset -f -y 16 0x28 0x00 2
i2ctransfer -f -y 16 w3@0x28 0x1D 0xFC 0x05
//0.8V(nominal) , 0.8591V with load line
i2cset -f -y 14 0x20 0x00 0
i2ctransfer -f -y 14 w3@0x20 0x21 0x57 0x01