* [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95
@ 2024-02-28 8:13 Peng Fan (OSS)
2024-02-28 8:13 ` [PATCH 2/2] nvmem: imx-ocotp-ele: " Peng Fan (OSS)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2024-02-28 8:13 UTC (permalink / raw)
To: srinivas.kandagatla, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, s.hauer, kernel, festevam, imx, devicetree,
linux-arm-kernel, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Add i.MX95 ocotp compatible string
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
index be1314454bec..e16f16c14505 100644
--- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
@@ -12,7 +12,7 @@ maintainers:
description: |
This binding represents the on-chip eFuse OTP controller found on
i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL,
- i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP and i.MX93 SoCs.
+ i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP and i.MX93/5 SoCs.
allOf:
- $ref: nvmem.yaml#
@@ -34,6 +34,7 @@ properties:
- fsl,imx8mq-ocotp
- fsl,imx8mm-ocotp
- fsl,imx93-ocotp
+ - fsl,imx95-ocotp
- const: syscon
- items:
- enum:
--
2.37.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] nvmem: imx-ocotp-ele: support i.MX95
2024-02-28 8:13 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95 Peng Fan (OSS)
@ 2024-02-28 8:13 ` Peng Fan (OSS)
2024-02-29 14:49 ` [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: " Krzysztof Kozlowski
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peng Fan (OSS) @ 2024-02-28 8:13 UTC (permalink / raw)
To: srinivas.kandagatla, robh+dt, krzysztof.kozlowski+dt
Cc: shawnguo, s.hauer, kernel, festevam, imx, devicetree,
linux-arm-kernel, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
i.MX95 OCOTP has same accessing method, so add an entry for i.MX95, but
some fuse has ECC feature, so only read out the lower 16bits for ECC fuses.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/nvmem/imx-ocotp-ele.c | 32 +++++++++++++++++++++++++++++---
1 file changed, 29 insertions(+), 3 deletions(-)
diff --git a/drivers/nvmem/imx-ocotp-ele.c b/drivers/nvmem/imx-ocotp-ele.c
index cf920542f939..4f22310920a2 100644
--- a/drivers/nvmem/imx-ocotp-ele.c
+++ b/drivers/nvmem/imx-ocotp-ele.c
@@ -14,8 +14,9 @@
#include <linux/slab.h>
enum fuse_type {
- FUSE_FSB = 1,
- FUSE_ELE = 2,
+ FUSE_FSB = BIT(0),
+ FUSE_ELE = BIT(1),
+ FUSE_ECC = BIT(2),
FUSE_INVALID = -1
};
@@ -93,7 +94,10 @@ static int imx_ocotp_reg_read(void *context, unsigned int offset, void *val, siz
continue;
}
- *buf++ = readl_relaxed(reg + (i << 2));
+ if (type | FUSE_ECC)
+ *buf++ = readl_relaxed(reg + (i << 2)) & GENMASK(15, 0);
+ else
+ *buf++ = readl_relaxed(reg + (i << 2));
}
memcpy(val, (u8 *)p, bytes);
@@ -155,8 +159,30 @@ static const struct ocotp_devtype_data imx93_ocotp_data = {
},
};
+static const struct ocotp_devtype_data imx95_ocotp_data = {
+ .reg_off = 0x8000,
+ .reg_read = imx_ocotp_reg_read,
+ .size = 2048,
+ .num_entry = 12,
+ .entry = {
+ { 0, 1, FUSE_FSB | FUSE_ECC },
+ { 7, 1, FUSE_FSB | FUSE_ECC },
+ { 9, 3, FUSE_FSB | FUSE_ECC },
+ { 12, 24, FUSE_FSB },
+ { 36, 2, FUSE_FSB | FUSE_ECC },
+ { 38, 14, FUSE_FSB },
+ { 63, 1, FUSE_ELE },
+ { 128, 16, FUSE_ELE },
+ { 188, 1, FUSE_ELE },
+ { 317, 2, FUSE_FSB | FUSE_ECC },
+ { 320, 7, FUSE_FSB },
+ { 328, 184, FUSE_FSB }
+ },
+};
+
static const struct of_device_id imx_ele_ocotp_dt_ids[] = {
{ .compatible = "fsl,imx93-ocotp", .data = &imx93_ocotp_data, },
+ { .compatible = "fsl,imx95-ocotp", .data = &imx95_ocotp_data, },
{},
};
MODULE_DEVICE_TABLE(of, imx_ele_ocotp_dt_ids);
--
2.37.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95
2024-02-28 8:13 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95 Peng Fan (OSS)
2024-02-28 8:13 ` [PATCH 2/2] nvmem: imx-ocotp-ele: " Peng Fan (OSS)
@ 2024-02-29 14:49 ` Krzysztof Kozlowski
2024-08-05 18:54 ` Frank Li
2024-08-07 9:49 ` Srinivas Kandagatla
3 siblings, 0 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-29 14:49 UTC (permalink / raw)
To: Peng Fan (OSS), srinivas.kandagatla, robh+dt,
krzysztof.kozlowski+dt
Cc: shawnguo, s.hauer, kernel, festevam, imx, devicetree,
linux-arm-kernel, linux-kernel, Peng Fan
On 28/02/2024 09:13, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add i.MX95 ocotp compatible string
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95
2024-02-28 8:13 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95 Peng Fan (OSS)
2024-02-28 8:13 ` [PATCH 2/2] nvmem: imx-ocotp-ele: " Peng Fan (OSS)
2024-02-29 14:49 ` [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: " Krzysztof Kozlowski
@ 2024-08-05 18:54 ` Frank Li
2024-08-07 9:49 ` Srinivas Kandagatla
3 siblings, 0 replies; 5+ messages in thread
From: Frank Li @ 2024-08-05 18:54 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: srinivas.kandagatla, robh+dt, krzysztof.kozlowski+dt, shawnguo,
s.hauer, kernel, festevam, imx, devicetree, linux-arm-kernel,
linux-kernel, Peng Fan
On Wed, Feb 28, 2024 at 04:13:54PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Add i.MX95 ocotp compatible string
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
ping? Krzysztof already acked this patch. Who will take care this one?
https://lore.kernel.org/imx/38c0a765-e29a-4142-8f0b-7e8f2ea89fdc@linaro.org/
Frank Li
> Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
> index be1314454bec..e16f16c14505 100644
> --- a/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
> +++ b/Documentation/devicetree/bindings/nvmem/imx-ocotp.yaml
> @@ -12,7 +12,7 @@ maintainers:
> description: |
> This binding represents the on-chip eFuse OTP controller found on
> i.MX6Q/D, i.MX6DL/S, i.MX6SL, i.MX6SX, i.MX6UL, i.MX6ULL/ULZ, i.MX6SLL,
> - i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP and i.MX93 SoCs.
> + i.MX7D/S, i.MX7ULP, i.MX8MQ, i.MX8MM, i.MX8MN i.MX8MP and i.MX93/5 SoCs.
>
> allOf:
> - $ref: nvmem.yaml#
> @@ -34,6 +34,7 @@ properties:
> - fsl,imx8mq-ocotp
> - fsl,imx8mm-ocotp
> - fsl,imx93-ocotp
> + - fsl,imx95-ocotp
> - const: syscon
> - items:
> - enum:
> --
> 2.37.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95
2024-02-28 8:13 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95 Peng Fan (OSS)
` (2 preceding siblings ...)
2024-08-05 18:54 ` Frank Li
@ 2024-08-07 9:49 ` Srinivas Kandagatla
3 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2024-08-07 9:49 UTC (permalink / raw)
To: robh+dt, krzysztof.kozlowski+dt, Peng Fan (OSS)
Cc: shawnguo, s.hauer, kernel, festevam, imx, devicetree,
linux-arm-kernel, linux-kernel, Peng Fan
On Wed, 28 Feb 2024 16:13:54 +0800, Peng Fan (OSS) wrote:
> Add i.MX95 ocotp compatible string
>
>
Applied, thanks!
[1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95
commit: 62e39987d3d5f27e2c074398805d101d7b9abaf4
[2/2] nvmem: imx-ocotp-ele: support i.MX95
commit: 04d372dd5562ed8aed4cdbb1004fe33a3bc4fa24
Best regards,
--
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-07 9:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 8:13 [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: support i.MX95 Peng Fan (OSS)
2024-02-28 8:13 ` [PATCH 2/2] nvmem: imx-ocotp-ele: " Peng Fan (OSS)
2024-02-29 14:49 ` [PATCH 1/2] dt-bindings: nvmem: imx-ocotp: " Krzysztof Kozlowski
2024-08-05 18:54 ` Frank Li
2024-08-07 9:49 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox