diff --git a/.gitignore b/.gitignore index ec87b1f..161f28e 100644 --- a/.gitignore +++ b/.gitignore @@ -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) diff --git a/README.md b/README.md index f1f2c49..3d8d5b3 100644 --- a/README.md +++ b/README.md @@ -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 ``` --- diff --git a/docs/submission/cover-letter.txt b/docs/submission/cover-letter.txt index b16a076..8cd786a 100644 --- a/docs/submission/cover-letter.txt +++ b/docs/submission/cover-letter.txt @@ -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 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). diff --git a/test-smoke.sh b/test-smoke.sh index c80dd06..8a7b0ae 100755 --- a/test-smoke.sh +++ b/test-smoke.sh @@ -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 ""