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>
---
.../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 57 +++++++++++++++++++
1 file changed, 57 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..19f3bb6b7eb0
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml
@@ -0,0 +1,57 @@
+# 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.
+
+allOf:
+ - $ref: nvmem.yaml#
+
+properties:
+ compatible:
+ oneOf:
+ - items:
+ - enum:
+ - nxp,s32g3-ocotp
+ - nxp,s32r45-ocotp
+ - const: nxp,s32g2-ocotp
+
+ reg:
+ description:
+ Address and Size of the fuse bank to be read.
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - '#address-cells'
+ - '#size-cells'
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/nvmem/s32g-ocotp-nvmem.h>
+
+ ocotp: ocotp@400a4000 {
+ compatible = "nxp,s32g2-ocotp";
+ reg = <0x400a4000 0x400>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ status = "okay";
+ };
--
2.47.2
On Sat, Aug 16, 2025 at 01:47:03PM +0300, Ciprian Costea wrote: > 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> Also, completely messed From field. I wonder how did you create it... If you wanted to take ownership, then it is: git commit --amend --reset-author --signoff Best regards, Krzysztof
On 16/08/2025 12:47, Ciprian Costea wrote: > 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> > --- > .../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 57 +++++++++++++++++++ > 1 file changed, 57 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..19f3bb6b7eb0 > --- /dev/null > +++ b/Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml > @@ -0,0 +1,57 @@ > +# 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. > + > +allOf: > + - $ref: nvmem.yaml# > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - nxp,s32g3-ocotp > + - nxp,s32r45-ocotp > + - const: nxp,s32g2-ocotp > + > + reg: > + description: > + Address and Size of the fuse bank to be read. Drop description, redundant. > + maxItems: 1 > + > + '#address-cells': > + const: 1 > + > + '#size-cells': > + const: 1 Drop these cells, already in nvmem.yaml. > + > +required: > + - compatible > + - reg > + - '#address-cells' > + - '#size-cells' > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include <dt-bindings/nvmem/s32g-ocotp-nvmem.h> There is no such file. > + > + ocotp: ocotp@400a4000 { > + compatible = "nxp,s32g2-ocotp"; > + reg = <0x400a4000 0x400>; > + #address-cells = <1>; > + #size-cells = <1>; > + status = "okay"; Please drop status > + }; Best regards, Krzysztof
On Sat, 16 Aug 2025 13:47:03 +0300, Ciprian Costea wrote: > 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> > --- > .../bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml | 57 +++++++++++++++++++ > 1 file changed, 57 insertions(+) > create mode 100644 Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.yaml > My bot found errors running 'make dt_binding_check' on your patch: yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.example.dts:18:18: fatal error: dt-bindings/nvmem/s32g-ocotp-nvmem.h: No such file or directory 18 | #include <dt-bindings/nvmem/s32g-ocotp-nvmem.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [scripts/Makefile.dtbs:132: Documentation/devicetree/bindings/nvmem/nxp,s32g-ocotp-nvmem.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1524: dt_binding_check] Error 2 make: *** [Makefile:248: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/7d0e025ed3fdc9e545f1d0b84f6a1cbb9dfb4e91.1755341000.git.dan.carpenter@linaro.org The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
© 2016 - 2025 Red Hat, Inc.