Add a binding for the NVMEM layout that exposes the factory-programmed EUI-48 identifier from the Microchip/SST vendor-specific SFDP parameter table (e.g. SST26VF064BEUI) as a "mac-address" NVMEM cell, and reference it from nvmem-layout.yaml. Signed-off-by: Manikandan Muralidharan --- .../layouts/microchip,sst26vf-sfdp-eui.yaml | 60 +++++++++++++++++++ .../bindings/nvmem/layouts/nvmem-layout.yaml | 1 + 2 files changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfdp-eui.yaml diff --git a/Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfdp-eui.yaml b/Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfdp-eui.yaml new file mode 100644 index 000000000000..37357efb7840 --- /dev/null +++ b/Documentation/devicetree/bindings/nvmem/layouts/microchip,sst26vf-sfdp-eui.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/nvmem/layouts/microchip,sst26vf-sfdp-eui.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVMEM layout of the Microchip/SST SFDP EUI-48 identifier + +maintainers: + - Manikandan Muralidharan + +description: + Some Microchip/SST serial flashes (for example the SST26VF064BEUI) are + factory programmed with a globally unique EUI-48 identifier stored in a + vendor-specific SFDP parameter table and permanently write-protected. This + layout locates that table and exposes the EUI-48 as an NVMEM cell so that, + for example, a network driver can use it as a MAC address. The location of + the data is discovered at runtime from the SFDP; no offset is encoded in the + device tree. + +select: false + +properties: + compatible: + const: microchip,sst26vf-sfdp-eui + + mac-address: + type: object + description: + The factory-programmed EUI-48 identifier, usable as a MAC address. + additionalProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + sfdp { + compatible = "jedec,sfdp"; + + nvmem-layout { + compatible = "microchip,sst26vf-sfdp-eui"; + + mac-address { + }; + }; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml index 382507060651..e63b93083821 100644 --- a/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml +++ b/Documentation/devicetree/bindings/nvmem/layouts/nvmem-layout.yaml @@ -20,6 +20,7 @@ description: | oneOf: - $ref: fixed-layout.yaml - $ref: kontron,sl28-vpd.yaml + - $ref: microchip,sst26vf-sfdp-eui.yaml - $ref: onie,tlv-layout.yaml - $ref: u-boot,env.yaml -- 2.43.0