Skip to content

Commit 3f9e85b

Browse files
ziuziakowskaAlexJones0
authored andcommitted
[ot] docs/opentitan: ot_spi_device: Update SPI Device documentation
Signed-off-by: Alice Ziuziakowska <[email protected]>
1 parent 1bdb2f0 commit 3f9e85b

File tree

3 files changed

+19
-27
lines changed

3 files changed

+19
-27
lines changed

docs/opentitan/ot_darjeeling.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Please check out `hw/opentitan/ot_ref.log`
3434
* SPI data flash (from QEMU upstream w/ fixes)
3535
* [SPI Host controller](ot_spi_host.md)
3636
* HW bus config is ignored (SPI mode, speed, ...)
37+
* [SPI Device](ot_spi_device.md)
3738
* Timer
3839
* [UART](ot_uart.md)
3940
* missing RX timeout, TX break not supported
@@ -67,10 +68,6 @@ Devices in this group implement subset(s) of the real HW.
6768
* [LC controller](lc_ctrl_dmi.md) can be accessed through JTAG using a DM-TL bridge
6869
* Escalation is not supported
6970
* [ROM controller](ot_rom_ctrl.md)
70-
* [SPI device](ot_spi_device.md)
71-
* Flash mode supported
72-
* TPM mode supported, but shares a CS with flash/passthrough mode and so cannot be used together
73-
* Passthrough mode not supported
7471
* SRAM controller
7572
* Initialization and scrambling from OTP key supported
7673
* Wait for init completion (bus stall) emulated
@@ -136,10 +133,10 @@ generate the `.raw` image files.
136133

137134
Darjeeling emulation supports the following buses:
138135

139-
| **Type** | **Num** | **Usage** |
140-
| -------- | ------- | ----------------------------------|
141-
| `mtd` | 0 | [SPI host](ot_spi_host.md) |
142-
| `pflash` | 0 | [OTP](ot_otp.md) |
136+
| **Type** | **Num** | **Usage** |
137+
| -------- | ------- | -----------------------------------------------------------|
138+
| `mtd` | 0 | [SPI host](ot_spi_host.md), [SPI device](ot_spi_device.md) |
139+
| `pflash` | 0 | [OTP](ot_otp.md) |
143140

144141
## Tools
145142

docs/opentitan/ot_earlgrey.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* SPI data flash (from QEMU upstream w/ fixes)
3333
* [SPI Host controller](ot_spi_host.md)
3434
* HW bus config is ignored (SPI mode, speed, ...)
35+
* [SPI Device](ot_spi_device.md)
3536
* Timer
3637
* [UART](ot_uart.md)
3738
* missing RX timeout, TX break not supported
@@ -59,10 +60,6 @@ Devices in this group implement subset(s) of the real HW.
5960
* Masking is not supported
6061
* Lifecycle controller
6162
* [ROM controller](ot_rom_ctrl.md)
62-
* [SPI device](ot_spi_device.md)
63-
* Flash mode supported
64-
* TPM mode supported, but shares a CS with flash/passthrough mode and so cannot be used together
65-
* Passthrough mode not supported
6663
* SRAM controller
6764
* Initialization and scrambling from OTP key supported
6865
* Wait for init completion (bus stall) emulated
@@ -127,12 +124,12 @@ generate the `.raw` image files.
127124

128125
EarlGrey emulation supports the following buses:
129126

130-
| **Type** | **Num** | **Usage** |
131-
| -------- | ------- | ----------------------------------|
132-
| `mtd` | 0 | [SPI host 0](ot_spi_host.md) |
133-
| `mtd` | 1 | [SPI host 1](ot_spi_host.md) |
134-
| `mtd` | 2 | [Embedded Flash](ot_flash.md) |
135-
| `pflash` | 0 | [OTP](ot_otp.md) |
127+
| **Type** | **Num** | **Usage** |
128+
| -------- | ------- | -------------------------------------------------------------|
129+
| `mtd` | 0 | [SPI host 0](ot_spi_host.md), [SPI device](ot_spi_device.md) |
130+
| `mtd` | 1 | [SPI host 1](ot_spi_host.md) |
131+
| `mtd` | 2 | [Embedded Flash](ot_flash.md) |
132+
| `pflash` | 0 | [OTP](ot_otp.md) |
136133

137134
## Tools
138135

docs/opentitan/ot_spi_device.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
## Supported modes
44

5-
### FW/Generic mode
6-
7-
This mode is only partially supported, and is being deprecated in real HW, so no further work is
8-
expected for this mode.
9-
105
### Flash mode
116

12-
This mode is fully supported (to the extend of the understanding of the HW...).
7+
This mode is fully supported (to the extent of the understanding of the HW...).
138

149
### Passthrough mode
1510

16-
This mode is not yet supported.
11+
This mode is supported, with minor deficiencies: The two-stage read pipeline, and dummy cycle
12+
counts of 1 to 7 are not supported as SPI transfers are modelled with byte-granularity (see the
13+
[CharDev protocol](#spi-device-chardev-protocol)). For commands with 1 to 7 dummy cycles specified,
14+
the maximum 8 dummy cycles (1 dummy byte) will be used.
1715

1816
### TPM
1917

2018
This mode is partially supported, TPM commands handled by hw are not supported yet. The CharDev
2119
protocol doesn't support a distinct chip select for TPM, therefore it is sharing the same CS with
22-
the other modes. If CS is asserted and TPM is enabled, then it will have priority.
20+
the other modes. If CS is asserted and TPM is enabled, the TPM will have priority.
2321

2422
## Connection with a SPI Host
2523

@@ -61,7 +59,7 @@ Commands:
6159
IT is also possible to use [`spidevflash.py`](spidevflash.md) tool to upload a binary using the same
6260
protocol.
6361

64-
### SPI device CharDev protocol
62+
### SPI Device CharDev protocol
6563

6664
SPI clock is not emulated, but each byte exchanged over the communication channel represent 8-bit
6765
SPI data. Dual and Quad lines are not emulated, all communications happen over a regular byte

0 commit comments

Comments
 (0)