Skip to content

Commit 1c5e915

Browse files
committed
[ot] hw/riscv: ot_earlgrey,ot_darjeeling: connect SPI Device to Host IRQs
Signed-off-by: Alice Ziuziakowska <[email protected]>
1 parent 4e8a317 commit 1c5e915

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

hw/riscv/ot_darjeeling.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* QEMU RISC-V Board Compatible with OpenTitan Darjeeling platform
33
*
44
* Copyright (c) 2023-2025 Rivos, Inc.
5+
* Copyright (c) 2025 lowRISC contributors.
56
*
67
* Author(s):
78
* Emmanuel Blot <[email protected]>
@@ -1325,6 +1326,9 @@ static const IbexDeviceDef ot_dj_soc_devices[] = {
13251326
.memmap = MEMMAPENTRIES(
13261327
{ .base = 0x30310000u }
13271328
),
1329+
.link = IBEXDEVICELINKDEFS(
1330+
OT_DJ_SOC_DEVLINK("spihost", SPI_HOST0)
1331+
),
13281332
.gpio = IBEXGPIOCONNDEFS(
13291333
OT_DJ_SOC_GPIO_SYSBUS_IRQ(0, PLIC, 42),
13301334
OT_DJ_SOC_GPIO_SYSBUS_IRQ(1, PLIC, 43),
@@ -1334,7 +1338,11 @@ static const IbexDeviceDef ot_dj_soc_devices[] = {
13341338
OT_DJ_SOC_GPIO_SYSBUS_IRQ(5, PLIC, 47),
13351339
OT_DJ_SOC_GPIO_SYSBUS_IRQ(6, PLIC, 48),
13361340
OT_DJ_SOC_GPIO_SYSBUS_IRQ(7, PLIC, 49),
1337-
OT_DJ_SOC_GPIO_ALERT(0, 2)
1341+
OT_DJ_SOC_GPIO_ALERT(0, 2),
1342+
OT_DJ_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_EN, 0, SPI_HOST0,
1343+
OT_SPI_HOST_PASSTHROUGH_EN, 0),
1344+
OT_DJ_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_CS, 0, SPI_HOST0,
1345+
OT_SPI_HOST_PASSTHROUGH_CS, 0)
13381346
),
13391347
},
13401348
[OT_DJ_SOC_DEV_PWRMGR] = {

hw/riscv/ot_earlgrey.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ static const IbexDeviceDef ot_eg_soc_devices[] = {
553553
.memmap = MEMMAPENTRIES(
554554
{ .base = 0x40050000u }
555555
),
556+
.link = IBEXDEVICELINKDEFS(
557+
OT_EG_SOC_DEVLINK("spihost", SPI_HOST0)
558+
),
556559
.gpio = IBEXGPIOCONNDEFS(
557560
OT_EG_SOC_GPIO_SYSBUS_IRQ(0, PLIC, 69),
558561
OT_EG_SOC_GPIO_SYSBUS_IRQ(1, PLIC, 70),
@@ -562,7 +565,11 @@ static const IbexDeviceDef ot_eg_soc_devices[] = {
562565
OT_EG_SOC_GPIO_SYSBUS_IRQ(5, PLIC, 74),
563566
OT_EG_SOC_GPIO_SYSBUS_IRQ(6, PLIC, 75),
564567
OT_EG_SOC_GPIO_SYSBUS_IRQ(7, PLIC, 76),
565-
OT_EG_SOC_GPIO_ALERT(0, 5)
568+
OT_EG_SOC_GPIO_ALERT(0, 5),
569+
OT_EG_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_EN, 0, SPI_HOST0,
570+
OT_SPI_HOST_PASSTHROUGH_EN, 0),
571+
OT_EG_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_CS, 0, SPI_HOST0,
572+
OT_SPI_HOST_PASSTHROUGH_CS, 0)
566573
),
567574
},
568575
[OT_EG_SOC_DEV_I2C0] = {

0 commit comments

Comments
 (0)