* [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
@ 2025-09-02 9:47 Dan Carpenter
2025-09-02 9:47 ` [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dan Carpenter @ 2025-09-02 9:47 UTC (permalink / raw)
To: Chester Lin
Cc: Ciprian Costea, Conor Dooley, devicetree, Fabio Estevam,
Ghennadi Procopciuc, imx, Krzysztof Kozlowski, linux-arm-kernel,
linux-kernel, Matthias Brugger, NXP S32 Linux Team,
Pengutronix Kernel Team, Rob Herring, Sascha Hauer, Shawn Guo,
Srinivas Kandagatla
This driver provides a way to access the On Chip One-Time Programmable
Controller (OCOTP) on the s32g chipset. There are three versions of this
chip but they're compatible.
v3: Mostly small cleanups. Re-order device tree entries. Remove unused
label. Use dev_err_probe().
v2: Major cleanups to device tree. Fix sign-offs. Re-write driver using
keepouts.
Ciprian Costea (2):
dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file
nvmem: s32g-ocotp: Add driver for S32G OCOTP
Dan Carpenter (1):
arm64: dts: s32g: Add device tree information for the OCOTP driver
.../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 45 ++++++++
arch/arm64/boot/dts/freescale/s32g2.dtsi | 7 ++
arch/arm64/boot/dts/freescale/s32g3.dtsi | 7 ++
drivers/nvmem/Kconfig | 10 ++
drivers/nvmem/Makefile | 2 +
drivers/nvmem/s32g-ocotp-nvmem.c | 100 ++++++++++++++++++
6 files changed, 171 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
create mode 100644 drivers/nvmem/s32g-ocotp-nvmem.c
--
2.47.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file
2025-09-02 9:47 [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
@ 2025-09-02 9:47 ` Dan Carpenter
2025-09-03 16:36 ` Rob Herring (Arm)
2025-09-02 9:47 ` [PATCH v3 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
2025-09-04 7:29 ` (subset) [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Srinivas Kandagatla
2 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2025-09-02 9:47 UTC (permalink / raw)
To: Srinivas Kandagatla
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Ciprian Costea,
devicetree, linux-kernel, NXP S32 Linux Team, linaro-s32
From: Ciprian Costea <ciprianmarian.costea@nxp.com>
Add bindings to expose the On Chip One-Time Programmable Controller
(OCOTP) for the NXP s32g chipset. There are three versions of this
chip but they're compatible so we can fall back to the nxp,s32g2-ocotp
compatible.
Signed-off-by: Ciprian Costea <ciprianmarian.costea@nxp.com>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v3: Remove unnecessary |
Move $ref to end
Alphabetize the compatibles
Delete the unused ocotp: label
v2: dt_binding_check DT_SCHEMA_FILES=nxp,s32g-ocotp-nvmem.yaml is clean
make CHECK_DTBS=y freescale/*.dtb is clean. Particularly the
freescale/s32g274a-evb.dtb file which Rob mentioned.
remove bogus include file
remove redundant "reg" description
remove #address-cells and #size-cells since they are already in
nvmem.yaml
Fix email From header
---
.../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
diff --git a/Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
new file mode 100644
index 000000000000..8d46e7d28da6
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/nxp,s32g-ocotp-nvmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP S32G OCOTP NVMEM driver
+
+maintainers:
+ - Ciprian Costea <ciprianmarian.costea@nxp.com>
+
+description:
+ The drivers provides an interface to access One Time
+ Programmable memory pages, such as TMU fuse values.
+
+properties:
+ compatible:
+ oneOf:
+ - enum:
+ - nxp,s32g2-ocotp
+ - items:
+ - enum:
+ - nxp,s32g3-ocotp
+ - nxp,s32r45-ocotp
+ - const: nxp,s32g2-ocotp
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+allOf:
+ - $ref: nvmem.yaml#
+
+examples:
+ - |
+ nvmem@400a4000 {
+ compatible = "nxp,s32g2-ocotp";
+ reg = <0x400a4000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver
2025-09-02 9:47 [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
2025-09-02 9:47 ` [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Dan Carpenter
@ 2025-09-02 9:47 ` Dan Carpenter
2025-09-04 7:29 ` (subset) [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Srinivas Kandagatla
2 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2025-09-02 9:47 UTC (permalink / raw)
To: Chester Lin
Cc: Matthias Brugger, Ghennadi Procopciuc, NXP S32 Linux Team,
Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
imx, devicetree, linux-kernel, linaro-s32
Add the device tree information for the S32G On Chip One-Time
Programmable Controller (OCOTP) chip.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v3: Add the device tree entry in the correct location based on
the 0x400a4000 address.
v2: change "ocotp: ocotp@400a4000 {" to "ocotp: nvmem@400a4000 {"
---
arch/arm64/boot/dts/freescale/s32g2.dtsi | 7 +++++++
arch/arm64/boot/dts/freescale/s32g3.dtsi | 7 +++++++
2 files changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi
index 6a7cc7b33754..d6a9f61394d3 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -355,6 +355,13 @@ serdes_presence: serdes-presence@100 {
};
};
+ ocotp: nvmem@400a4000 {
+ compatible = "nxp,s32g2-ocotp";
+ reg = <0x400a4000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
edma0: dma-controller@40144000 {
compatible = "nxp,s32g2-edma";
reg = <0x40144000 0x24000>,
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index 61ee08f0cfdc..f0e2a2907431 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -408,6 +408,13 @@ serdes_presence: serdes-presence@100 {
};
};
+ ocotp: nvmem@400a4000 {
+ compatible = "nxp,s32g3-ocotp", "nxp,s32g2-ocotp";
+ reg = <0x400a4000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ };
+
edma0: dma-controller@40144000 {
compatible = "nxp,s32g3-edma", "nxp,s32g2-edma";
reg = <0x40144000 0x24000>,
--
2.47.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file
2025-09-02 9:47 ` [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Dan Carpenter
@ 2025-09-03 16:36 ` Rob Herring (Arm)
0 siblings, 0 replies; 5+ messages in thread
From: Rob Herring (Arm) @ 2025-09-03 16:36 UTC (permalink / raw)
To: Dan Carpenter
Cc: devicetree, Conor Dooley, NXP S32 Linux Team, Krzysztof Kozlowski,
Ciprian Costea, linux-kernel, linaro-s32, Srinivas Kandagatla
On Tue, 02 Sep 2025 12:47:45 +0300, Dan Carpenter wrote:
> From: Ciprian Costea <ciprianmarian.costea@nxp.com>
>
> Add bindings to expose the On Chip One-Time Programmable Controller
> (OCOTP) for the NXP s32g chipset. There are three versions of this
> chip but they're compatible so we can fall back to the nxp,s32g2-ocotp
> compatible.
>
> Signed-off-by: Ciprian Costea <ciprianmarian.costea@nxp.com>
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> v3: Remove unnecessary |
> Move $ref to end
> Alphabetize the compatibles
> Delete the unused ocotp: label
>
> v2: dt_binding_check DT_SCHEMA_FILES=nxp,s32g-ocotp-nvmem.yaml is clean
> make CHECK_DTBS=y freescale/*.dtb is clean. Particularly the
> freescale/s32g274a-evb.dtb file which Rob mentioned.
> remove bogus include file
> remove redundant "reg" description
> remove #address-cells and #size-cells since they are already in
> nvmem.yaml
> Fix email From header
> ---
> .../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 45 +++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: (subset) [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
2025-09-02 9:47 [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
2025-09-02 9:47 ` [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Dan Carpenter
2025-09-02 9:47 ` [PATCH v3 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
@ 2025-09-04 7:29 ` Srinivas Kandagatla
2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2025-09-04 7:29 UTC (permalink / raw)
To: Chester Lin, Dan Carpenter
Cc: Ciprian Costea, Conor Dooley, devicetree, Fabio Estevam,
Ghennadi Procopciuc, imx, Krzysztof Kozlowski, linux-arm-kernel,
linux-kernel, Matthias Brugger, NXP S32 Linux Team,
Pengutronix Kernel Team, Rob Herring, Sascha Hauer, Shawn Guo
On Tue, 02 Sep 2025 12:47:40 +0300, Dan Carpenter wrote:
> This driver provides a way to access the On Chip One-Time Programmable
> Controller (OCOTP) on the s32g chipset. There are three versions of this
> chip but they're compatible.
>
> v3: Mostly small cleanups. Re-order device tree entries. Remove unused
> label. Use dev_err_probe().
>
> [...]
Applied, thanks!
[1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file
commit: a3430382174a78a4a6b981feca44bcaa405e0f2c
[2/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
commit: f7605ba1859724d44a7be4994335b31666110c84
Best regards,
--
Srinivas Kandagatla <srini@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-04 7:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-02 9:47 [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
2025-09-02 9:47 ` [PATCH v3 1/3] dt-bindings: nvmem: Add the nxp,s32g-ocotp yaml file Dan Carpenter
2025-09-03 16:36 ` Rob Herring (Arm)
2025-09-02 9:47 ` [PATCH v3 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
2025-09-04 7:29 ` (subset) [PATCH v3 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).