docs: correct i2cdetect usage and ignore archived notes
The engine exposes only SMBus BYTE_DATA/WORD_DATA, so i2cdetect (which needs SMBus QUICK or READ_BYTE) cannot scan the bus. Replace the misleading "i2cdetect -r/-y" scan instructions with a direct i2cget byte-data read in the README, the cover letter and the smoke test. Also gitignore the archived internal working documents (docs/archive-*.md). Signed-off-by: Simone Chifari <simone.chifari@gmail.com>
This commit is contained in:
+2
-1
@@ -43,11 +43,12 @@ patches/
|
||||
|
||||
# Internal working documents (not for public repo)
|
||||
TODO.md
|
||||
submission-analysis.md
|
||||
docs/archive-submission-analysis.md
|
||||
README.local.md
|
||||
AGENTS.md
|
||||
docs/mainline-plan.md
|
||||
docs/archive-i2c-imc-driver-plan.md
|
||||
docs/archive-v3-review-fixes.md
|
||||
docs/submission/submission-instructions.md
|
||||
|
||||
# Private Gitea CI (replaced by .github/workflows/ for public repo)
|
||||
|
||||
@@ -111,9 +111,9 @@ i2c-6 smbus iMC SMBus Skylake-X channel 0 SMBus adapt
|
||||
i2c-7 smbus iMC SMBus Skylake-X channel 1 SMBus adapter
|
||||
```
|
||||
|
||||
You can scan for SPD EEPROMs (usually located at addresses `0x50-0x57`) on channel 0:
|
||||
The engine has no SMBus QUICK/BYTE primitive, so `i2cdetect` cannot scan the bus. Read a device directly with a byte-data access (a register offset is always required), e.g. SPD byte 2 (DDR4 type code `0x0c`) from the EEPROM at `0x50` on channel 0:
|
||||
```bash
|
||||
sudo i2cdetect -y 6
|
||||
sudo i2cget -y 6 0x50 0x02
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
@@ -89,8 +89,9 @@ on both read and write paths.
|
||||
|
||||
Since the hardware requires a register offset for every transaction,
|
||||
I2C_SMBUS_QUICK and I2C_SMBUS_BYTE (which have no offset) are not supported
|
||||
(returning -EOPNOTSUPP). Use `i2cdetect -r` (read byte data probe) to scan
|
||||
for devices. Standard kernel drivers such as ee1004 (for DDR4 SPD) load
|
||||
(returning -EOPNOTSUPP). For the same reason i2cdetect cannot scan the bus;
|
||||
access a device directly with a byte-data read, e.g. `i2cget -y <bus> 0x50 0x02`
|
||||
reads SPD byte 2. Standard kernel drivers such as ee1004 (for DDR4 SPD) load
|
||||
and bind successfully via BYTE_DATA reads.
|
||||
|
||||
udev autoloads the module on PCI add event (MODULE_DEVICE_TABLE present).
|
||||
|
||||
+18
-7
@@ -32,13 +32,25 @@ else
|
||||
_fail "ch1 adapter not found"
|
||||
fi
|
||||
|
||||
# The engine has no QUICK/BYTE primitive, so `i2cdetect` cannot scan the bus
|
||||
# ("Bus doesn't support detection commands"). Probe SPD addresses directly with
|
||||
# a byte-data read of register 0x00 instead.
|
||||
_scan_spd() {
|
||||
local bus=$1 found=""
|
||||
echo "--- SPD scan bus $bus (byte-data read of reg 0x00) ---"
|
||||
for a in 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57; do
|
||||
if v=$(i2cget -y "$bus" "$a" 0x00 2>/dev/null); then
|
||||
echo " $a present (reg0=$v)"
|
||||
found="$a"
|
||||
fi
|
||||
done
|
||||
[ -n "$found" ]
|
||||
}
|
||||
|
||||
if [ -n "$CH0" ]; then
|
||||
echo ""
|
||||
echo "=== SPD scan ch0 (expect 0x50-0x57) ==="
|
||||
i2cdetect -r -y "$CH0" 2>/dev/null
|
||||
# at least one SPD slot must respond
|
||||
if i2cdetect -r -y "$CH0" 2>/dev/null | grep '50' >/dev/null; then
|
||||
_ok "SPD device at 0x50 on ch0"
|
||||
if _scan_spd "$CH0"; then
|
||||
_ok "SPD device present on ch0"
|
||||
else
|
||||
_fail "no SPD device on ch0"
|
||||
fi
|
||||
@@ -46,8 +58,7 @@ fi
|
||||
|
||||
if [ -n "$CH1" ]; then
|
||||
echo ""
|
||||
echo "=== SPD scan ch1 ==="
|
||||
i2cdetect -r -y "$CH1" 2>/dev/null
|
||||
_scan_spd "$CH1" && _ok "SPD device present on ch1" || true
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user