imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
@ 2025-08-16 10:46 Dan Carpenter
  2025-08-16 10:47 ` [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
  2025-08-18 18:24 ` [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Rob Herring (Arm)
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2025-08-16 10:46 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, linaro-s32

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.

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  |  57 ++++++
 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              | 171 ++++++++++++++++++
 6 files changed, 254 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] 4+ messages in thread

* [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver
  2025-08-16 10:46 [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
@ 2025-08-16 10:47 ` Dan Carpenter
  2025-08-17  5:53   ` Krzysztof Kozlowski
  2025-08-18 18:24 ` [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Rob Herring (Arm)
  1 sibling, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2025-08-16 10: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, Srinivas Kandagatla

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>
---
 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 09d2fbbe1d8c..e58ea0d3b083 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -612,5 +612,12 @@ gic: interrupt-controller@50800000 {
 			interrupt-controller;
 			#interrupt-cells = <3>;
 		};
+
+		ocotp: ocotp@400a4000 {
+			compatible = "nxp,s32g2-ocotp";
+			reg = <0x400a4000 0x400>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
 	};
 };
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index 39effbe8217c..184a29dea184 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -681,6 +681,13 @@ gic: interrupt-controller@50800000 {
 			      <0x50420000 0x2000>;
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
+
+		ocotp: ocotp@400a4000 {
+			compatible = "nxp,s32g3-ocotp", "nxp,s32g2-ocotp";
+			reg = <0x400a4000 0x400>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+		};
 	};
 
 	timer {
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver
  2025-08-16 10:47 ` [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
@ 2025-08-17  5:53   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2025-08-17  5:53 UTC (permalink / raw)
  To: Dan Carpenter, 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, Srinivas Kandagatla

On 16/08/2025 12:47, Dan Carpenter wrote:
> 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>
> ---
>  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 09d2fbbe1d8c..e58ea0d3b083 100644
> --- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
> +++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
> @@ -612,5 +612,12 @@ gic: interrupt-controller@50800000 {
>  			interrupt-controller;
>  			#interrupt-cells = <3>;
>  		};
> +
> +		ocotp: ocotp@400a4000 {

Nodename: efuse@ or nvmem@

> +			compatible = "nxp,s32g2-ocotp";
> +			reg = <0x400a4000 0x400>;
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +		};
>  	};
>  };
> diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
> index 39effbe8217c..184a29dea184 100644
> --- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
> +++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
> @@ -681,6 +681,13 @@ gic: interrupt-controller@50800000 {
>  			      <0x50420000 0x2000>;
>  			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
>  		};
> +
> +		ocotp: ocotp@400a4000 {

Same here


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP
  2025-08-16 10:46 [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
  2025-08-16 10:47 ` [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
@ 2025-08-18 18:24 ` Rob Herring (Arm)
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring (Arm) @ 2025-08-18 18:24 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Conor Dooley, Krzysztof Kozlowski, linux-arm-kernel, Sascha Hauer,
	Shawn Guo, Ciprian Costea, Ghennadi Procopciuc,
	NXP S32 Linux Team, devicetree, Fabio Estevam,
	Pengutronix Kernel Team, imx, linux-kernel, linaro-s32,
	Matthias Brugger, Chester Lin, Srinivas Kandagatla


On Sat, 16 Aug 2025 13:46:57 +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.
> 
> 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  |  57 ++++++
>  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              | 171 ++++++++++++++++++
>  6 files changed, 254 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
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: attempting to guess base-commit...
 Base: remotes/korg/master-95-g90d970cade8e (exact match)

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/freescale/' for cover.1755341000.git.dan.carpenter@linaro.org:

arch/arm64/boot/dts/freescale/s32g274a-evb.dtb: ocotp@400a4000 (nxp,s32g2-ocotp): compatible: 'oneOf' conditional failed, one must be fixed:
	['nxp,s32g2-ocotp'] is too short
	'nxp,s32g2-ocotp' is not one of ['nxp,s32g3-ocotp', 'nxp,s32r45-ocotp']
	from schema $id: http://devicetree.org/schemas/nvmem/nxp,s32g-ocotp-nvmem.yaml#
arch/arm64/boot/dts/freescale/s32g274a-evb.dtb: ocotp@400a4000 (nxp,s32g2-ocotp): Unevaluated properties are not allowed ('compatible' was unexpected)
	from schema $id: http://devicetree.org/schemas/nvmem/nxp,s32g-ocotp-nvmem.yaml#
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dtb: ocotp@400a4000 (nxp,s32g2-ocotp): compatible: 'oneOf' conditional failed, one must be fixed:
	['nxp,s32g2-ocotp'] is too short
	'nxp,s32g2-ocotp' is not one of ['nxp,s32g3-ocotp', 'nxp,s32r45-ocotp']
	from schema $id: http://devicetree.org/schemas/nvmem/nxp,s32g-ocotp-nvmem.yaml#
arch/arm64/boot/dts/freescale/s32g274a-rdb2.dtb: ocotp@400a4000 (nxp,s32g2-ocotp): Unevaluated properties are not allowed ('compatible' was unexpected)
	from schema $id: http://devicetree.org/schemas/nvmem/nxp,s32g-ocotp-nvmem.yaml#






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-18 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-16 10:46 [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Dan Carpenter
2025-08-16 10:47 ` [PATCH 3/3] arm64: dts: s32g: Add device tree information for the OCOTP driver Dan Carpenter
2025-08-17  5:53   ` Krzysztof Kozlowski
2025-08-18 18:24 ` [PATCH 0/3] nvmem: s32g-ocotp: Add driver for S32G OCOTP Rob Herring (Arm)

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).