schemas: add NVMEM cell with #nvmem-cell-cells
PATCH 1/1 schemas: add NVMEM cell with #nvmem-cell-cells
From: Rafał Miłecki <[email protected]>
Some NVMEM cells may provide more than 1 value. An example can be base MAC address that is used for calculating multiple MACs (for few different devices). For specifying value to read phandle needs to be used with an argument.
---
This bit is required for moving forward with the [PATCH v2 00/20] nvmem: core: introduce NVMEM layouts
https://lore.kernel.org/linux-arm-kernel/[email protected]/
As pointed out by Rob #nvmem-cell-cells should be added to the dt-schema and not a Linux binding:
Re: [PATCH v2 15/20] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout
https://lore.kernel.org/linux-arm-kernel/[email protected]/
sl28 is one example that needs #nvmem-cell-cells
u-boot,env is another one
Please let me know if I got this binding right at all.
--- dtschema/schemas/nvmem/nvmem-cell.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dtschema/schemas/nvmem/nvmem-cell.yaml
dtschema/schemas/nvmem/nvmem-cell.yaml new file +23 -0
@@ -0,0 +1,23 @@ +# SPDX-License-Identifier: BSD-2-Clause +$id: "http://devicetree.org/schemas/nvmem/nvmem-cell.yaml#" +$schema: "http://devicetree.org/meta-schemas/base.yaml#" + +title: NVMEM Cell Common Properties +description: "Schema for NVMEM cell devicetree bindings" +maintainers: + - Rafał Miłecki <[email protected]> + - Srinivas Kandagatla <[email protected]> + +# always select the core schema +select: true + +properties: + "#nvmem-cell-cells": + $ref: "/schemas/types.yaml#/definitions/uint32" + description: > + Some NVMEM cells may consist of raw data that requires some extra + processing. They may provide more than 1 value. + + Passing extra argument(s) allows selecting data to access. + +additionalProperties: true
Signature · 1 line
2.34.1
Am 2022-11-21 11:58, schrieb Rafał Miłecki:
Quoted 20 lines
From: Rafał Miłecki <[email protected]>
Some NVMEM cells may provide more than 1 value. An example can be base MAC address that is used for calculating multiple MACs (for few different devices). For specifying value to read phandle needs to be used with an argument.
Cc Srinivas Kandagatla" <[email protected]>Cc Michael Walle <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>---
This bit is required for moving forward with the [PATCH v2 00/20] nvmem: core: introduce NVMEM layouts
https://lore.kernel.org/linux-arm-kernel/[email protected]/As pointed out by Rob #nvmem-cell-cells should be added to the dt-schema and not a Linux binding:
Re: [PATCH v2 15/20] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout
https://lore.kernel.org/linux-arm-kernel/[email protected]/
Quoted 4 lines
sl28 is one example that needs #nvmem-cell-cells
u-boot,env is another onePlease let me know if I got this binding right at all.
There is also a pull request:
https://github.com/devicetree-org/dt-schema/pull/89
I'm not sure about the correct way to submit patches to dtschema.
-michael
Quoted 35 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Some NVMEM cells may provide more than 1 value. An example can be base MAC address that is used for calculating multiple MACs (for few different devices). For specifying value to read phandle needs to be used with an argument.
Cc Srinivas Kandagatla" <[email protected]>Cc Michael Walle <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>---
This bit is required for moving forward with the [PATCH v2 00/20] nvmem: core: introduce NVMEM layouts
https://lore.kernel.org/linux-arm-kernel/[email protected]/As pointed out by Rob #nvmem-cell-cells should be added to the dt-schema and not a Linux binding:
Re: [PATCH v2 15/20] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout
https://lore.kernel.org/linux-arm-kernel/[email protected]/sl28 is one example that needs #nvmem-cell-cells
u-boot,env is another onePlease let me know if I got this binding right at all.
--- dtschema/schemas/nvmem/nvmem-cell.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 dtschema/schemas/nvmem/nvmem-cell.yamldtschema/schemas/nvmem/nvmem-cell.yaml new file +0
-0
dtschema/schemas/nvmem/nvmem-cell.yaml line 3
Quoted 3 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +3
-0@@ -0,0 +1,23 @@ +# SPDX-License-Identifier: BSD-2-Clause +$id: "http://devicetree.org/schemas/nvmem/nvmem-cell.yaml#" +$schema: "http://devicetree.org/meta-schemas/base.yaml#"
Drop quotes from both.
dtschema/schemas/nvmem/nvmem-cell.yaml line 6
Quoted 3 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +3
-0+ +title: NVMEM Cell Common Properties +description: "Schema for NVMEM cell devicetree bindings"
Drop quotes.
dtschema/schemas/nvmem/nvmem-cell.yaml line 16
Quoted 10 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +10
-0+maintainers: + - Rafał Miłecki <[email protected]> + - Srinivas Kandagatla <[email protected]> + +# always select the core schema +select: true + +properties: + "#nvmem-cell-cells": + $ref: "/schemas/types.yaml#/definitions/uint32"
Drop quotes.
Rest looks fine to me, except a bit funny cell-cell name, but that's just life. :)
dtschema/schemas/nvmem/nvmem-cell.yaml line 23
Quoted 7 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +7
-0+ description: > + Some NVMEM cells may consist of raw data that requires some extra + processing. They may provide more than 1 value. + + Passing extra argument(s) allows selecting data to access. + +additionalProperties: true
Best regards,
Krzysztof
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 61 lines · Krzysztof Kozlowski
Quoted 35 lines · Rafał Miłecki
From: Rafał Miłecki <[email protected]>
Some NVMEM cells may provide more than 1 value. An example can be base MAC address that is used for calculating multiple MACs (for few different devices). For specifying value to read phandle needs to be used with an argument.
Cc Srinivas Kandagatla" <[email protected]>Cc Michael Walle <[email protected]>Signed-off-by Rafał Miłecki <[email protected]>---
This bit is required for moving forward with the [PATCH v2 00/20] nvmem: core: introduce NVMEM layouts
https://lore.kernel.org/linux-arm-kernel/[email protected]/As pointed out by Rob #nvmem-cell-cells should be added to the dt-schema and not a Linux binding:
Re: [PATCH v2 15/20] dt-bindings: nvmem: add YAML schema for the sl28 vpd layout
https://lore.kernel.org/linux-arm-kernel/[email protected]/sl28 is one example that needs #nvmem-cell-cells
u-boot,env is another onePlease let me know if I got this binding right at all.
--- dtschema/schemas/nvmem/nvmem-cell.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)create mode 100644
dtschema/schemas/nvmem/nvmem-cell.yamldtschema/schemas/nvmem/nvmem-cell.yaml new file +0
-0dtschema/schemas/nvmem/nvmem-cell.yaml line 3
Quoted 3 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +3
-0@@ -0,0 +1,23 @@ +# SPDX-License-Identifier: BSD-2-Clause +$id: "http://devicetree.org/schemas/nvmem/nvmem-cell.yaml#" +$schema: "http://devicetree.org/meta-schemas/base.yaml#"Drop quotes from both.
dtschema/schemas/nvmem/nvmem-cell.yaml line 6
Quoted 3 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +3
-0+ +title: NVMEM Cell Common Properties +description: "Schema for NVMEM cell devicetree bindings"Drop quotes.
dtschema/schemas/nvmem/nvmem-cell.yaml line 16
Quoted 10 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +10
-0+maintainers: + - Rafał Miłecki <[email protected]> + - Srinivas Kandagatla <[email protected]> + +# always select the core schema +select: true + +properties: + "#nvmem-cell-cells": + $ref: "/schemas/types.yaml#/definitions/uint32"Drop quotes.
Quoted 2 lines
Rest looks fine to me, except a bit funny cell-cell name, but that's just life. :)
Bothers me a bit too, I was even thinking about renaming NVMEM cells to NVMEM entries but I'm not sure if it's not too late for that.
We already have "nvmem-cells" and "nvmem-cell-names" properties so adding "entries" not would be probably confusing.
Quoted 7 lines
dtschema/schemas/nvmem/nvmem-cell.yaml line 23
Quoted 7 lines
dtschema/schemas/nvmem/nvmem-cell.yaml new file +7
-0+ description: > + Some NVMEM cells may consist of raw data that requires some extra + processing. They may provide more than 1 value. + + Passing extra argument(s) allows selecting data to access. + +additionalProperties: true
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/