Skip to content

Commit

Permalink
[SiVal, spi_host] Move tpm test fpga from cw310 to cw340
Browse files Browse the repository at this point in the history
The TPM test requires some new connections on the swizzle board to wire a
new spi host on the stm32 to the OT spi_dev. This commit move the tpm test
to the cw340 platform because it's easier to mod the c340 in CI.

Signed-off-by: Douglas Reis <[email protected]>
  • Loading branch information
engdoreis committed Dec 5, 2024
1 parent 0e1ad74 commit 62eb033
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sw/device/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3575,8 +3575,13 @@ opentitan_test(
name = "spi_device_tpm_tx_rx_test",
srcs = ["spi_device_tpm_tx_rx_test.c"],
exec_env = dicts.add(
EARLGREY_TEST_ENVS,
EARLGREY_SILICON_OWNER_ROM_EXT_ENVS,
{
"//hw/top_earlgrey:sim_dv": None,
"//hw/top_earlgrey:sim_verilator": None,
"//hw/top_earlgrey:fpga_cw340_sival": None,
"//hw/top_earlgrey:fpga_cw340_sival_rom_ext": None,
},
),
fpga = fpga_params(
# This test requires the spi full duplex on the hyperdebug board.
Expand Down
76 changes: 76 additions & 0 deletions sw/host/opentitanlib/src/app/config/hyperdebug_cw340.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,82 @@
"mode": "OpenDrain",
"pull_mode": "PullUp",
"alias_of": "CN10_29"
},
{
"name": "SPI_DEV_SCK",
"mode": "Alternate",
"alias_of": "CN10_24"
},
{
"name": "SPI_DEV_D0",
"mode": "Alternate",
"alias_of": "CN10_23"
},
{
"name": "SPI_DEV_D1",
"mode": "Alternate",
"alias_of": "CN10_10"
},
{
"name": "SPI_DEV_SCK",
"mode": "Alternate",
"alias_of": "CN10_24"
},
{
"name": "SPI_TPM_SCK",
"mode": "Input",
"alias_of": "CN7_15"
},
{
"name": "SPI_TPM_MOSI",
"mode": "Input",
"alias_of": "CN7_14"
},
{
"name": "SPI_TPM_MISO",
"mode": "Input",
"alias_of": "CN7_12"
},
{
"name": "SPI_TPM_CSB",
"mode": "Alternate",
"pull_mode": "PullUp",
"alias_of": "IOA7"
}
],
"strappings": [
{
"name": "SPI_TPM",
"pins": [
{
"name": "SPI_DEV_SCK",
"mode": "Input"
},
{
"name": "SPI_DEV_D0",
"mode": "Input"
},
{
"name": "SPI_DEV_D1",
"mode": "Input"
},
{
"name": "SPI_TPM_SCK",
"mode": "Alternate"
},
{
"name": "SPI_TPM_MOSI",
"mode": "Alternate"
},
{
"name": "SPI_TPM_MISO",
"mode": "Alternate"
},
{
"name": "SPI_TPM_CSB",
"mode": "PushPull"
}
]
}
],
"spi": [
Expand Down

0 comments on commit 62eb033

Please sign in to comment.