[top] Specify EDN connections to otp_ctrl
Signed-off-by: Michael Schaffner <msf@opentitan.org>
diff --git a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
index f327708..f9bef47 100644
--- a/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
+++ b/hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson
@@ -150,6 +150,7 @@
clocks:
{
clk_io_div4_timers: io_div4
+ clk_main_timers: main
}
}
{
@@ -1005,17 +1006,20 @@
clock_srcs:
{
clk_i: io_div4
+ clk_edn_i: main
}
clock_group: timers
reset_connections:
{
rst_ni: rstmgr_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]
+ rst_edn_ni: rstmgr_resets.rst_sys_n[rstmgr_pkg::Domain0Sel]
}
base_addr: 0x40130000
clock_reset_export: []
clock_connections:
{
clk_i: clkmgr_clocks.clk_io_div4_timers
+ clk_edn_i: clkmgr_clocks.clk_main_timers
}
domain: "0"
size: 0x4000
@@ -1188,12 +1192,11 @@
index: -1
}
{
- struct: otp_edn
+ struct: edn
type: req_rsp
- name: otp_edn
+ name: edn
act: req
- default: "'0"
- package: otp_ctrl_pkg
+ package: edn_pkg
inst_name: otp_ctrl
index: -1
}
@@ -8767,12 +8770,11 @@
index: -1
}
{
- struct: otp_edn
+ struct: edn
type: req_rsp
- name: otp_edn
+ name: edn
act: req
- default: "'0"
- package: otp_ctrl_pkg
+ package: edn_pkg
inst_name: otp_ctrl
index: -1
}
diff --git a/hw/top_earlgrey/data/top_earlgrey.hjson b/hw/top_earlgrey/data/top_earlgrey.hjson
index 4ae1846..526889b 100755
--- a/hw/top_earlgrey/data/top_earlgrey.hjson
+++ b/hw/top_earlgrey/data/top_earlgrey.hjson
@@ -249,9 +249,9 @@
},
{ name: "otp_ctrl",
type: "otp_ctrl",
- clock_srcs: {clk_i: "io_div4"},
+ clock_srcs: {clk_i: "io_div4", clk_edn_i: "main"},
clock_group: "timers",
- reset_connections: {rst_ni: "lc_io_div4"},
+ reset_connections: {rst_ni: "lc_io_div4", rst_edn_ni: "sys"},
base_addr: "0x40130000",
},
{ name: "lc_ctrl",
@@ -606,7 +606,7 @@
'rv_core_ibex.crashdump' : ['rstmgr.cpu_dump'],
'csrng.entropy_src_hw_if' : ['entropy_src.entropy_src_hw_if'],
// TODO see #4447
- //'edn0.edn' : ['keymgr.edn'],
+ //'edn0.edn' : ['keymgr.edn', 'otp_ctrl.edn'],
// KeyMgr Sideload & KDF function
'otp_ctrl.otp_keymgr_key': ['keymgr.otp_key'],
diff --git a/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv b/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv
index 4b4e085..e5d5414 100644
--- a/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv
+++ b/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr.sv
@@ -260,6 +260,7 @@
assign clocks_o.clk_io_div4_secure = clk_io_div4_root;
assign clocks_o.clk_main_secure = clk_main_root;
assign clocks_o.clk_io_div4_timers = clk_io_div4_root;
+ assign clocks_o.clk_main_timers = clk_main_root;
assign clocks_o.clk_proc_main = clk_main_root;
////////////////////////////////////////////////////
diff --git a/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv b/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv
index eaf0059..8ef2e61 100644
--- a/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv
+++ b/hw/top_earlgrey/ip/clkmgr/rtl/autogen/clkmgr_pkg.sv
@@ -36,6 +36,7 @@
logic clk_io_div4_secure;
logic clk_main_secure;
logic clk_io_div4_timers;
+ logic clk_main_timers;
logic clk_proc_main;
logic clk_io_div4_peri;
logic clk_usb_peri;
diff --git a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
index 66a9fc6..18b7d27 100644
--- a/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
+++ b/hw/top_earlgrey/rtl/autogen/top_earlgrey.sv
@@ -864,8 +864,8 @@
// Inter-module signals
.otp_ast_pwr_seq_o(otp_ctrl_otp_ast_pwr_seq_o),
.otp_ast_pwr_seq_h_i(otp_ctrl_otp_ast_pwr_seq_h_i),
- .otp_edn_o(),
- .otp_edn_i('0),
+ .edn_o(),
+ .edn_i(edn_pkg::EDN_RSP_DEFAULT),
.pwr_otp_i(pwrmgr_pwr_otp_req),
.pwr_otp_o(pwrmgr_pwr_otp_rsp),
.lc_otp_program_i(lc_ctrl_lc_otp_program_req),
@@ -889,7 +889,9 @@
.tl_i(otp_ctrl_tl_req),
.tl_o(otp_ctrl_tl_rsp),
.clk_i (clkmgr_clocks.clk_io_div4_timers),
- .rst_ni (rstmgr_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel])
+ .clk_edn_i (clkmgr_clocks.clk_main_timers),
+ .rst_ni (rstmgr_resets.rst_lc_io_div4_n[rstmgr_pkg::Domain0Sel]),
+ .rst_edn_ni (rstmgr_resets.rst_sys_n[rstmgr_pkg::Domain0Sel])
);
lc_ctrl #(