Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/36807 )
Change subject: Incorporate protocol-notes.txt into specification ......................................................................
Incorporate protocol-notes.txt into specification
We now know that these values from the config files are FPGA register writes. Hence let's include them in the spec and drop the additional file. Unfortunately these are not very well documented at this time.
Change-Id: I4eefdde358299428b751baee15e57b4ee7b2d16c Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- D protocol-notes.txt M usb-protocol.md 2 files changed, 97 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/07/36807/1
diff --git a/protocol-notes.txt b/protocol-notes.txt deleted file mode 100644 index 15da29f..0000000 --- a/protocol-notes.txt +++ /dev/null @@ -1,16 +0,0 @@ -= Some protocol notes = - - out 16 bytes: 0x23 x a0 a1: write chip reg x with a0.a1 (x is always even) - x = 0x32: always 0xff 0xff (?) - x = 0x3a: set chip size to (a1+1) * 0x10000 - x = 0x38: various values (?) - x = 0x40: sometimes: a0 = lowbyte of device id (for 16bit did?), a1 = device id (for 8bit did) ? - x = 0x42: a0 = vendor id, a1 = highbyte of device id for 16bit did or device id for 8bit did (?) - x = 0x44: always 0x03 0x18 (?) - x = 0x46: a0 = various, a1 = always 0x30? (?) - x = 0x48: a0 = various, a1 = always 0xc0? (?) - - out 16 bytes: 0x11 x a0 a1: write reg x with a0.a1 -> Set Voltage - x = 2: REF+ voltage - x = 3: REF- voltage - x = 4: Buffer VCC diff --git a/usb-protocol.md b/usb-protocol.md index cfdf61d..f27dba2 100644 --- a/usb-protocol.md +++ b/usb-protocol.md @@ -187,7 +187,7 @@ Value: Register Value ```
-See chapter 7 for more information on FPGA commands. +See chapter 2.6 for more information on FPGA commands.
### 2.5. Switch FPGA configuration image
@@ -227,11 +227,103 @@ EM100Pro-G2 | 3.3 | 2.014 |
-### 2.6. FPGA Reconfiguration +### 2.6. FPGA Registers
-Description of some FPGA command registers (incomplete). +Description of some FPGA command registers (incomplete). Each register +has a 1 byte address and is 2 bytes wide (referred to as a0, a1). This includes +some information of the former file protocol-notes.txt. Please help complete this +information.
-#### 2.6.1. Default Address Length Setting +#### 2.6.1. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x32 | ?/W | ?? | + +Written through the config files for each emulated chip. +Data written is always observed as 0xff 0xff (?) + +#### 2.6.2. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x38 | ?/W | ?? | + +Written through the config files for each emulated chip. +Data written is various values (?) + +#### 2.6.3. Set Chip Size + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x3a | ?/W | Set Chip Size | + +Written through the config files for each emulated chip. +Sets chip size to (a1+1) * 0x10000 (?) + +#### 2.6.4. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x40 | ?/W | ?? | + +Written through the config files for each emulated chip. +sometimes: a0 = lowbyte of device id (for 16bit did?), a1 = device id (for 8bit +did) + +#### 2.6.5. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x42 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = vendor id, a1 = highbyte of device id for 16bit did or device id for 8bit did (?) + +#### 2.6.6. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x44 | ?/W | ?? | + +Written through the config files for each emulated chip. +Always 0x03 0x18 (?) + +#### 2.6.7. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x46 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = various, a1 = always 0x30? (?) + +#### 2.6.8. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x48 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = various, a1 = always 0xc0? (?) + +#### 2.6.9. Default Address Length Setting
FPGA command:
@@ -250,7 +342,7 @@ EM100Pro | 2.27 | 0.091 | EM100Pro-G2 | 3.3 | 2.014 |
-#### 2.6.2. CS Pin Selection +#### 2.6.10. CS Pin Selection
FPGA command:
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/em100/+/36807
to look at the new patch set (#2).
Change subject: Incorporate protocol-notes.txt into specification ......................................................................
Incorporate protocol-notes.txt into specification
We now know that these values from the config files are FPGA register writes. Hence let's include them in the spec and drop the additional file. Unfortunately these are not very well documented at this time.
Change-Id: I4eefdde358299428b751baee15e57b4ee7b2d16c Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org --- D protocol-notes.txt M usb-protocol.md 2 files changed, 98 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/07/36807/2
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/em100/+/36807 )
Change subject: Incorporate protocol-notes.txt into specification ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/em100/+/36807 )
Change subject: Incorporate protocol-notes.txt into specification ......................................................................
Patch Set 3: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/em100/+/36807 )
Change subject: Incorporate protocol-notes.txt into specification ......................................................................
Incorporate protocol-notes.txt into specification
We now know that these values from the config files are FPGA register writes. Hence let's include them in the spec and drop the additional file. Unfortunately these are not very well documented at this time.
Change-Id: I4eefdde358299428b751baee15e57b4ee7b2d16c Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Reviewed-on: https://review.coreboot.org/c/em100/+/36807 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: David Hendricks david.hendricks@gmail.com Reviewed-by: Patrick Georgi pgeorgi@google.com --- D protocol-notes.txt M usb-protocol.md 2 files changed, 98 insertions(+), 22 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved David Hendricks: Looks good to me, approved
diff --git a/protocol-notes.txt b/protocol-notes.txt deleted file mode 100644 index 15da29f..0000000 --- a/protocol-notes.txt +++ /dev/null @@ -1,16 +0,0 @@ -= Some protocol notes = - - out 16 bytes: 0x23 x a0 a1: write chip reg x with a0.a1 (x is always even) - x = 0x32: always 0xff 0xff (?) - x = 0x3a: set chip size to (a1+1) * 0x10000 - x = 0x38: various values (?) - x = 0x40: sometimes: a0 = lowbyte of device id (for 16bit did?), a1 = device id (for 8bit did) ? - x = 0x42: a0 = vendor id, a1 = highbyte of device id for 16bit did or device id for 8bit did (?) - x = 0x44: always 0x03 0x18 (?) - x = 0x46: a0 = various, a1 = always 0x30? (?) - x = 0x48: a0 = various, a1 = always 0xc0? (?) - - out 16 bytes: 0x11 x a0 a1: write reg x with a0.a1 -> Set Voltage - x = 2: REF+ voltage - x = 3: REF- voltage - x = 4: Buffer VCC diff --git a/usb-protocol.md b/usb-protocol.md index cfdf61d..34aa785 100644 --- a/usb-protocol.md +++ b/usb-protocol.md @@ -148,7 +148,7 @@
``` Pass: 1, Fail: 0 -```` +```
### 2.3. Read FPGA Registers
@@ -187,7 +187,7 @@ Value: Register Value ```
-See chapter 7 for more information on FPGA commands. +See chapter 2.6 for more information on FPGA commands.
### 2.5. Switch FPGA configuration image
@@ -227,11 +227,103 @@ EM100Pro-G2 | 3.3 | 2.014 |
-### 2.6. FPGA Reconfiguration +### 2.6. FPGA Registers
-Description of some FPGA command registers (incomplete). +Description of some FPGA command registers (incomplete). Each register +has a 1 byte address and is 2 bytes wide (referred to as a0, a1). This includes +some information of the former file protocol-notes.txt. Please help complete this +information.
-#### 2.6.1. Default Address Length Setting +#### 2.6.1. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x32 | ?/W | ?? | + +Written through the config files for each emulated chip. +Data written is always observed as 0xff 0xff (?) + +#### 2.6.2. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x38 | ?/W | ?? | + +Written through the config files for each emulated chip. +Data written is various values (?) + +#### 2.6.3. Set Chip Size + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x3a | ?/W | Set Chip Size | + +Written through the config files for each emulated chip. +Sets chip size to (a1+1) * 0x10000 (?) + +#### 2.6.4. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x40 | ?/W | ?? | + +Written through the config files for each emulated chip. +sometimes: a0 = lowbyte of device id (for 16bit did?), a1 = device id (for 8bit +did) + +#### 2.6.5. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x42 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = vendor id, a1 = highbyte of device id for 16bit did or device id for 8bit did (?) + +#### 2.6.6. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x44 | ?/W | ?? | + +Written through the config files for each emulated chip. +Always 0x03 0x18 (?) + +#### 2.6.7. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x46 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = various, a1 = always 0x30? (?) + +#### 2.6.8. ???? + +FPGA command: + +| Address | R/W | Description | +|---------|-----|---------------------------| +| 0x48 | ?/W | ?? | + +Written through the config files for each emulated chip. +a0 = various, a1 = always 0xc0? (?) + +#### 2.6.9. Default Address Length Setting
FPGA command:
@@ -250,7 +342,7 @@ EM100Pro | 2.27 | 0.091 | EM100Pro-G2 | 3.3 | 2.014 |
-#### 2.6.2. CS Pin Selection +#### 2.6.10. CS Pin Selection
FPGA command: