Files
linux/Documentation/devicetree/bindings/nvmem/layouts/fixed-layout.yaml
Sven Peter d44870ff2a dt-bindings: nvmem: fixed-layout: Allow optional bit positions
NVMEM nodes can optionally include the bits property to specify the bit
position of the cell within a byte.
Extend patternProperties to allow adding the bit offset to the node
address to be able to distinguish nodes with the same address but
different bit positions, e.g.

   trim@54,4 {
        reg = <0x54 1>;
        bits = <4 2>;
    };
    trim@54,0 {
        reg = <0x54 1>;
        bits = <0 4>;
    };

Before the conversion to NVMEM layouts in commit bd912c991d
("dt-bindings: nvmem: layouts: add fixed-layout") this extension was
originally added with commit 4b2545dd19 ("dt-bindings: nvmem: Extend
patternProperties to optionally indicate bit position") to the now
deprecated layout.

Signed-off-by: Sven Peter <sven@kernel.org>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://lore.kernel.org/r/20250712181905.6738-3-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-16 14:30:04 +02:00

63 lines
1.3 KiB
YAML

# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/nvmem/layouts/fixed-layout.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NVMEM layout for fixed NVMEM cells
description:
Many NVMEM devices have hardcoded cells layout (offset and size of defined
NVMEM content doesn't change).
This binding allows defining such NVMEM layout with its cells. It can be used
on top of any NVMEM device.
maintainers:
- Rafał Miłecki <rafal@milecki.pl>
properties:
compatible:
const: fixed-layout
"#address-cells":
const: 1
"#size-cells":
const: 1
patternProperties:
"@[a-f0-9]+(,[0-7])?$":
type: object
$ref: fixed-cell.yaml
unevaluatedProperties: false
required:
- compatible
additionalProperties: false
examples:
- |
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
mac@100 {
compatible = "mac-base";
reg = <0x100 0x6>;
#nvmem-cell-cells = <1>;
};
mac@110 {
compatible = "mac-base";
reg = <0x110 0x11>;
#nvmem-cell-cells = <1>;
};
calibration@4000 {
reg = <0x4000 0x100>;
};
};