[PATCH v2 1/3] dt-bindings: spmi: Add generic SPMI NVMEM
Rob Herring
robh at kernel.org
Tue Apr 22 06:36:19 PDT 2025
On Thu, Apr 17, 2025 at 10:14:49PM +0200, Sasha Finkelstein wrote:
> Add bindings for exposing SPMI registers as NVMEM cells
>
> Signed-off-by: Sasha Finkelstein <fnkl.kernel at gmail.com>
> ---
> .../devicetree/bindings/nvmem/spmi-nvmem.yaml | 54 ++++++++++++++++++++++
> MAINTAINERS | 1 +
> 2 files changed, 55 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/nvmem/spmi-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/spmi-nvmem.yaml
> new file mode 100644
> index 0000000000000000000000000000000000000000..d16b27128f97b5d38fb6ddb5109c70cda5e2ee15
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/spmi-nvmem.yaml
> @@ -0,0 +1,54 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/spmi-nvmem.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Generic SPMI NVMEM
What makes this generic?
A generic driver is great, but "generic" or "simple" bindings are
generally a mistake.
> +
> +description: Exports a series of SPMI registers as NVMEM cells
> +
> +maintainers:
> + - Sasha Finkelstein <fnkl.kernel at gmail.com>
> +
> +allOf:
> + - $ref: nvmem.yaml#
> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - apple,maverick-pmic
> + - apple,sera-pmic
> + - apple,stowe-pmic
> + - const: spmi-nvmem
What happens when there's some other feature of the PMIC exposed that's
not nvmem?
> +
> + reg:
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/spmi/spmi.h>
> +
> + pmic at f {
> + compatible = "apple,maverick-pmic", "spmi-nvmem";
> + reg = <0xf SPMI_USID>;
> +
> + nvmem-layout {
> + compatible = "fixed-layout";
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + boot_stage: boot-stage at 6001 {
> + reg = <0x6001 0x1>;
> + };
> + };
> + };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 96b82704950184bd71623ff41fc4df31e4c7fe87..e7b2d0df81b387ba5398957131971588dc7b89dc 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2277,6 +2277,7 @@ F: Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
> F: Documentation/devicetree/bindings/net/bluetooth/brcm,bcm4377-bluetooth.yaml
> F: Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
> F: Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
> +F: Documentation/devicetree/bindings/nvmem/spmi-nvmem.yaml
> F: Documentation/devicetree/bindings/pci/apple,pcie.yaml
> F: Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> F: Documentation/devicetree/bindings/power/apple*
>
> --
> 2.49.0
>
More information about the linux-arm-kernel
mailing list