From: Peng Fan <peng.fan-3arQi8VN3Tc@xxxxxxxxxxxxxxxx>...
i.MX9 OCOTP supports a specific peripheral or function being fused
which means disabled, so
- Introduce ocotp_access_gates to be container of efuse gate info
- Iterate all nodes to check accessing permission. If not
allowed to be accessed, detach the node
+struct access_gate {
+ u32 word;
+ u32 mask;
+};
+
+struct ocotp_access_gates {
+ u32 num_words;
+ u32 words[OCOTP_MAX_NUM_GATE_WORDS];
+ u32 num_gates;
+ struct access_gate *gates;
+};
+
struct imx_ocotp_priv {
struct device *dev;
void __iomem *base;
+
+ return imx_ele_ocotp_access_control(priv);
}
+struct access_gate imx93_access_gate[] = {
+ [IMX93_OCOTP_NPU_GATE] = { .word = 19, .mask = BIT(13) },
+ [IMX93_OCOTP_A550_GATE] = { .word = 19, .mask = BIT(14) },
+ [IMX93_OCOTP_A551_GATE] = { .word = 19, .mask = BIT(15) },
@@ -183,7 +308,53 @@ static const struct ocotp_devtype_data imx93_ocotp_data = {
},
};
+struct access_gate imx95_access_gate[] = {
+ [IMX95_OCOTP_CANFD1_GATE] = { .word = 17, .mask = BIT(20) },
+ [IMX95_OCOTP_CANFD2_GATE] = { .word = 17, .mask = BIT(21) },
+ [IMX95_OCOTP_CANFD3_GATE] = { .word = 17, .mask = BIT(22) },