Skip to content

Commit

Permalink
[ot] hw/riscv: ot_earlgrey: add KMAC device
Browse files Browse the repository at this point in the history
Signed-off-by: Loïc Lefort <[email protected]>
  • Loading branch information
loiclefort committed Aug 18, 2023
1 parent d7fcb49 commit ba04832
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions hw/riscv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ config OT_EARLGREY
select OT_FLASH
select OT_HMAC
select OT_IBEX_WRAPPER
select OT_KMAC
select OT_LIFECYCLE
select OT_OTBN
select OT_OTP
Expand Down
16 changes: 13 additions & 3 deletions hw/riscv/ot_earlgrey.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "hw/opentitan/ot_flash.h"
#include "hw/opentitan/ot_hmac.h"
#include "hw/opentitan/ot_ibex_wrapper.h"
#include "hw/opentitan/ot_kmac.h"
#include "hw/opentitan/ot_lifecycle.h"
#include "hw/opentitan/ot_otbn.h"
#include "hw/opentitan/ot_otp.h"
Expand Down Expand Up @@ -556,12 +557,21 @@ static const IbexDeviceDef ot_earlgrey_soc_devices[] = {
),
},
[OT_EARLGREY_SOC_DEV_KMAC] = {
.type = TYPE_UNIMPLEMENTED_DEVICE,
.name = "ot-kmac",
.cfg = &ibex_unimp_configure,
.type = TYPE_OT_KMAC,
.memmap = MEMMAPENTRIES(
{ 0x41120000u, 0x1000u }
),
.gpio = IBEXGPIOCONNDEFS(
OT_EARLGREY_SOC_GPIO_SYSBUS_IRQ(0, PLIC, 168),
OT_EARLGREY_SOC_GPIO_SYSBUS_IRQ(1, PLIC, 169),
OT_EARLGREY_SOC_GPIO_SYSBUS_IRQ(2, PLIC, 170)
),
.link = IBEXDEVICELINKDEFS(
OT_EARLGREY_SOC_DEVLINK("edn", EDN0)
),
.prop = IBEXDEVICEPROPDEFS(
IBEX_DEV_INT_PROP("edn-ep", 3u)
),
},
[OT_EARLGREY_SOC_DEV_OTBN] = {
.type = TYPE_OT_OTBN,
Expand Down

0 comments on commit ba04832

Please sign in to comment.