[otp_ctrl] Propagate PROVISION_WR_EN interface change

Signed-off-by: Michael Schaffner <msf@opentitan.org>
diff --git a/hw/ip/otp_ctrl/data/otp_ctrl.hjson.tpl b/hw/ip/otp_ctrl/data/otp_ctrl.hjson.tpl
index c0bb473..08c490c 100644
--- a/hw/ip/otp_ctrl/data/otp_ctrl.hjson.tpl
+++ b/hw/ip/otp_ctrl/data/otp_ctrl.hjson.tpl
@@ -235,7 +235,7 @@
     }
     { struct:  "lc_tx"
       type:    "uni"
-      name:    "lc_provision_en"
+      name:    "lc_provision_wr_en"
       act:     "rcv"
       default: "lc_ctrl_pkg::Off"
       package: "lc_ctrl_pkg"
diff --git a/hw/ip/otp_ctrl/doc/_index.md b/hw/ip/otp_ctrl/doc/_index.md
index cafcefa..76be6b3 100644
--- a/hw/ip/otp_ctrl/doc/_index.md
+++ b/hw/ip/otp_ctrl/doc/_index.md
@@ -320,7 +320,7 @@
 `lc_otp_token_i`           | `input`          | `lc_otp_token_req_t`        | Life cycle RAW unlock token hashing request.
 `lc_otp_token_o`           | `output`         | `lc_otp_token_rsp_t`        | Life cycle RAW unlock token hashing response.
 `lc_escalate_en_i`         | `input`          | `lc_ctrl_pkg::lc_tx_t`      | Life cycle escalation enable coming from life cycle controller. This signal moves all FSMs within OTP into the error state and triggers secret wiping mechanisms in the secret partitions.
-`lc_provision_en_i`        | `input`          | `lc_ctrl_pkg::lc_tx_t`      | Provision enable qualifier coming from life cycle controller. This signal enables read / write access to the RMA_TOKEN and CREATOR_ROOT_KEY_SHARE0 and CREATOR_ROOT_KEY_SHARE1.
+`lc_provision_wr_en_i`     | `input`          | `lc_ctrl_pkg::lc_tx_t`      | Provision enable qualifier coming from life cycle controller. This signal enables read / write access to the RMA_TOKEN and CREATOR_ROOT_KEY_SHARE0 and CREATOR_ROOT_KEY_SHARE1.
 `lc_dft_en_i`              | `input`          | `lc_ctrl_pkg::lc_tx_t`      | Test enable qualifier coming from from life cycle controller. This signals enables the TL-UL access port to the proprietary OTP IP.
 `otp_lc_data_o`            | `output`         | `otp_lc_data_t`             | life cycle state output holding the current life cycle state, the value of the transition counter and the tokens needed for life cycle transitions.
 `otp_keymgr_key_o`         | `output`         | `keymgr_key_t`              | Key output to the key manager holding CREATOR_ROOT_KEY_SHARE0 and CREATOR_ROOT_KEY_SHARE1.
@@ -364,7 +364,7 @@
 
 After initialization, the life cycle partition contents, as well as the tokens and personalization status is output to the life cycle controller via the `otp_lc_data_o` struct.
 The life cycle controller uses this information to determine the life cycle state, and steer the appropriate qualifier signals.
-Some of these qualifier signals (`lc_dft_en_i`, `lc_provision_en_i` and `lc_escalate_en_i`) are fed back to the OTP controller in order to ungate testing logic to the OTP macro; enable write access to the `SECRET2` partition; or to push the OTP controller into escalation state.
+Some of these qualifier signals (`lc_dft_en_i`, `lc_provision_wr_en_i` and `lc_escalate_en_i`) are fed back to the OTP controller in order to ungate testing logic to the OTP macro; enable write access to the `SECRET2` partition; or to push the OTP controller into escalation state.
 
 A possible sequence for the signals described is illustrated below.
 {{< wavejson >}}
@@ -378,7 +378,7 @@
   {name: 'otp_lc_data_o.id_state',          wave: '0.|.3.|...|...|...'},
   {name: 'otp_lc_data_o.rma_token',         wave: '0.|.3.|...|...|...'},
   {},
-  {name: 'lc_provision_en_i',               wave: '0.|...|...|.4.|...'},
+  {name: 'lc_provision_wr_en_i',            wave: '0.|...|...|.4.|...'},
   {name: 'lc_dft_en_i',                     wave: '0.|...|...|.4.|...'},
   {},
   {name: 'lc_escalate_en_i',                wave: '0.|...|...|...|.5.'},
diff --git a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env.sv b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env.sv
index 51f19ed..59863db 100644
--- a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env.sv
+++ b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env.sv
@@ -58,9 +58,9 @@
     end
 
     // config lc pins
-    if (!uvm_config_db#(lc_provision_en_vif)::get(this, "", "lc_provision_en_vif",
-                                                  cfg.lc_provision_en_vif)) begin
-      `uvm_fatal(get_full_name(), "failed to get lc_provision_en_vif from uvm_config_db")
+    if (!uvm_config_db#(lc_provision_wr_en_vif)::get(this, "", "lc_provision_wr_en_vif",
+                                                     cfg.lc_provision_wr_en_vif)) begin
+      `uvm_fatal(get_full_name(), "failed to get lc_provision_wr_en_vif from uvm_config_db")
     end
     if (!uvm_config_db#(lc_dft_en_vif)::get(this, "", "lc_dft_en_vif", cfg.lc_dft_en_vif)) begin
       `uvm_fatal(get_full_name(), "failed to get lc_dft_en_vif from uvm_config_db")
diff --git a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_cfg.sv b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_cfg.sv
index c234905..a7f5926 100644
--- a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_cfg.sv
+++ b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_cfg.sv
@@ -13,7 +13,7 @@
 
   // ext interfaces
   pwr_otp_vif              pwr_otp_vif;
-  lc_provision_en_vif      lc_provision_en_vif;
+  lc_provision_wr_en_vif   lc_provision_wr_en_vif;
   lc_dft_en_vif            lc_dft_en_vif;
   mem_bkdr_vif             mem_bkdr_vif;
   otp_ctrl_output_data_vif otp_ctrl_output_data_vif;
diff --git a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
index 9ba4db0..e040a52 100644
--- a/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
+++ b/hw/ip/otp_ctrl/dv/env/otp_ctrl_env_pkg.sv
@@ -95,7 +95,7 @@
   } otp_pwr_if_e;
 
   typedef virtual pins_if #(OtpPwrIfWidth) pwr_otp_vif;
-  typedef virtual pins_if #(4)             lc_provision_en_vif;
+  typedef virtual pins_if #(4)             lc_provision_wr_en_vif;
   typedef virtual pins_if #(4)             lc_dft_en_vif;
   typedef virtual mem_bkdr_if              mem_bkdr_vif;
   typedef virtual otp_ctrl_output_data_if  otp_ctrl_output_data_vif;
diff --git a/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_base_vseq.sv b/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_base_vseq.sv
index 484bab8..6978834 100644
--- a/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_base_vseq.sv
+++ b/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_base_vseq.sv
@@ -23,7 +23,7 @@
     cfg.backdoor_clear_mem = 0;
     // reset power init pin and lc pins
     cfg.pwr_otp_vif.drive_pin(OtpPwrInitReq, 0);
-    cfg.lc_provision_en_vif.drive(lc_ctrl_pkg::Off);
+    cfg.lc_provision_wr_en_vif.drive(lc_ctrl_pkg::Off);
     cfg.lc_dft_en_vif.drive(lc_ctrl_pkg::Off);
     if (do_otp_ctrl_init) otp_ctrl_init();
     if (do_otp_pwr_init) otp_pwr_init();
diff --git a/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_smoke_vseq.sv b/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_smoke_vseq.sv
index 6c602a2..484317a 100644
--- a/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_smoke_vseq.sv
+++ b/hw/ip/otp_ctrl/dv/env/seq_lib/otp_ctrl_smoke_vseq.sv
@@ -38,7 +38,7 @@
 
   virtual task dut_init(string reset_kind = "HARD");
     super.dut_init(reset_kind);
-    cfg.lc_provision_en_vif.drive(lc_ctrl_pkg::On);
+    cfg.lc_provision_wr_en_vif.drive(lc_ctrl_pkg::On);
     csr_wr(ral.intr_enable, en_intr);
   endtask
 
diff --git a/hw/ip/otp_ctrl/dv/tb.sv b/hw/ip/otp_ctrl/dv/tb.sv
index 5d950df..4a6a862 100644
--- a/hw/ip/otp_ctrl/dv/tb.sv
+++ b/hw/ip/otp_ctrl/dv/tb.sv
@@ -18,8 +18,7 @@
 
   wire clk, rst_n;
   wire devmode;
-  wire lc_ctrl_pkg::lc_tx_e lc_provision_en, lc_dft_en;
-
+  wire lc_ctrl_pkg::lc_tx_e lc_provision_wr_en, lc_dft_en;
   wire [OtpPwrIfWidth-1:0] pwr_otp;
   wire otp_ctrl_pkg::flash_otp_key_req_t flash_req;
   wire otp_ctrl_pkg::flash_otp_key_rsp_t flash_rsp;
@@ -50,7 +49,7 @@
 
   pins_if #(OtpPwrIfWidth) pwr_otp_if(pwr_otp);
   // TODO: use standard req/rsp agent
-  pins_if #(4) lc_provision_en_if(lc_provision_en);
+  pins_if #(4) lc_provision_wr_en_if(lc_provision_wr_en);
   pins_if #(4) lc_dft_en_if(lc_dft_en);
 
   tl_if tl_if(.clk(clk), .rst_n(rst_n));
@@ -87,7 +86,7 @@
     .lc_otp_token_i            ('0),
     .lc_otp_token_o            (otp_token),
     .lc_escalate_en_i          (lc_ctrl_pkg::Off),
-    .lc_provision_en_i         (lc_provision_en),
+    .lc_provision_wr_en_i      (lc_provision_wr_en),
     .lc_dft_en_i               (lc_dft_en),
     .otp_lc_data_o             (otp_ctrl_output_data_if.lc_data),
     // keymgr
@@ -150,8 +149,8 @@
     uvm_config_db#(intr_vif)::set(null, "*.env", "intr_vif", intr_if);
     uvm_config_db#(pwr_otp_vif)::set(null, "*.env", "pwr_otp_vif", pwr_otp_if);
     uvm_config_db#(devmode_vif)::set(null, "*.env", "devmode_vif", devmode_if);
-    uvm_config_db#(lc_provision_en_vif)::set(null, "*.env", "lc_provision_en_vif",
-                                             lc_provision_en_if);
+    uvm_config_db#(lc_provision_wr_en_vif)::set(null, "*.env", "lc_provision_wr_en_vif",
+                                                lc_provision_wr_en_if);
     uvm_config_db#(lc_dft_en_vif)::set(null, "*.env", "lc_dft_en_vif", lc_dft_en_if);
     uvm_config_db#(mem_bkdr_vif)::set(null, "*.env", "mem_bkdr_vif",
                                       `OTP_CTRL_MEM_HIER.mem_bkdr_if);
diff --git a/hw/ip/otp_ctrl/rtl/otp_ctrl.sv b/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
index ee73824..61e4538 100644
--- a/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
+++ b/hw/ip/otp_ctrl/rtl/otp_ctrl.sv
@@ -49,7 +49,7 @@
   output lc_otp_token_rsp_t                          lc_otp_token_o,
   // Lifecycle broadcast inputs
   input  lc_ctrl_pkg::lc_tx_t                        lc_escalate_en_i,
-  input  lc_ctrl_pkg::lc_tx_t                        lc_provision_en_i,
+  input  lc_ctrl_pkg::lc_tx_t                        lc_provision_wr_en_i,
   input  lc_ctrl_pkg::lc_tx_t                        lc_dft_en_i,
   // OTP broadcast outputs
   output otp_lc_data_t                               otp_lc_data_o,
@@ -100,7 +100,7 @@
   // Life Cycle Signal Synchronization //
   ///////////////////////////////////////
 
-  lc_ctrl_pkg::lc_tx_t lc_escalate_en, lc_provision_en;
+  lc_ctrl_pkg::lc_tx_t lc_escalate_en, lc_provision_wr_en;
   lc_ctrl_pkg::lc_tx_t [1:0] lc_dft_en;
 
   prim_lc_sync #(
@@ -114,11 +114,11 @@
 
   prim_lc_sync #(
     .NumCopies(1)
-  ) u_prim_lc_sync_provision_en (
+  ) u_prim_lc_sync_provision_wr_en (
     .clk_i,
     .rst_ni,
-    .lc_en_i(lc_provision_en_i),
-    .lc_en_o(lc_provision_en)
+    .lc_en_i(lc_provision_wr_en_i),
+    .lc_en_o(lc_provision_wr_en)
   );
 
   prim_lc_sync #(
@@ -259,7 +259,7 @@
     if (!reg2hw.creator_sw_cfg_read_lock) part_access_csrs[CreatorSwCfgIdx].read_lock = Locked;
     if (!reg2hw.owner_sw_cfg_read_lock) part_access_csrs[OwnerSwCfgIdx].read_lock = Locked;
     // The SECRET2 partition can only be accessed (write&read) when provisioning is enabled.
-    if (lc_provision_en != lc_ctrl_pkg::On) part_access_csrs[Secret2Idx] = {2{Locked}};
+    if (lc_provision_wr_en != lc_ctrl_pkg::On) part_access_csrs[Secret2Idx] = {2{Locked}};
   end
 
   //////////////////////