Skip to content

Commit 23d5023

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 e8dca14 commit 23d5023

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

hw/riscv/ot_darjeeling.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,9 @@ static const IbexDeviceDef ot_dj_soc_devices[] = {
13251325
.memmap = MEMMAPENTRIES(
13261326
{ .base = 0x30310000u }
13271327
),
1328+
.link = IBEXDEVICELINKDEFS(
1329+
OT_DJ_SOC_DEVLINK("spihost", SPI_HOST0)
1330+
),
13281331
.gpio = IBEXGPIOCONNDEFS(
13291332
OT_DJ_SOC_GPIO_SYSBUS_IRQ(0, PLIC, 42),
13301333
OT_DJ_SOC_GPIO_SYSBUS_IRQ(1, PLIC, 43),
@@ -1334,7 +1337,11 @@ static const IbexDeviceDef ot_dj_soc_devices[] = {
13341337
OT_DJ_SOC_GPIO_SYSBUS_IRQ(5, PLIC, 47),
13351338
OT_DJ_SOC_GPIO_SYSBUS_IRQ(6, PLIC, 48),
13361339
OT_DJ_SOC_GPIO_SYSBUS_IRQ(7, PLIC, 49),
1337-
OT_DJ_SOC_GPIO_ALERT(0, 2)
1340+
OT_DJ_SOC_GPIO_ALERT(0, 2),
1341+
OT_DJ_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_EN, 0, SPI_HOST0,
1342+
OT_SPI_HOST_PASSTHROUGH_EN, 0),
1343+
OT_DJ_SOC_SIGNAL(OT_SPI_DEVICE_PASSTHROUGH_CS, 0, SPI_HOST0,
1344+
OT_SPI_HOST_PASSTHROUGH_CS, 0)
13381345
),
13391346
},
13401347
[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)