mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Chan <towinchenmi@gmail.com>
To: fnkl.kernel@gmail.com, Sven Peter <sven@svenpeter.dev>,
	Janne Grunau <j@jannau.net>,
	Alyssa Rosenzweig <alyssa@rosenzweig.io>,
	Neal Gompa <neal@gompa.dev>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: spmi: Add generic SPMI NVMEM
Date: Wed, 16 Apr 2025 08:18:49 +0800	[thread overview]
Message-ID: <63957942-173e-4c28-932e-a8ba7c60ee83@gmail.com> (raw)
In-Reply-To: <20250415-spmi-nvmem-v1-1-22067be253cf@gmail.com>


Sasha Finkelstein via B4 Relay 於 2025/4/16 清晨5:52 寫道:
> From: Sasha Finkelstein <fnkl.kernel@gmail.com>
>
> Add bindings for exposing SPMI registers as NVMEM cells
>
> Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
> ---
>  .../devicetree/bindings/nvmem/spmi-nvmem.yaml      | 44 ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 45 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..0041babefc37ed4d82d7d6f68fc67d29eed53d9f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/spmi-nvmem.yaml
> @@ -0,0 +1,44 @@
> +# 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
> +
> +description: Exports a series of SPMI registers as NVMEM cells
> +
> +maintainers:
> +  - Sasha Finkelstein <fnkl.kernel@gmail.com>
> +
> +allOf:
> +  - $ref: nvmem.yaml#
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,maverick-pmu
> +          - apple,sera-pmu
> +          - apple,stowe-pmu
> +      - const: spmi-nvmem
Consider using pmic instead of pmu in the compatible names for consistency (see below).
Also, the PMIC definitely has more (mostly independent) functions than just non-volatile
memory, so I am not sure if it is really appropriate to model it as only a nvmem device.

> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/spmi/spmi.h>
> +
> +    pmu@f {
> +        compatible = "apple,maverick-pmu", "spmi-nvmem";
> +        reg = <0xf SPMI_USID>;
> +    };

As agreed on the series for SPMI support, this should be pmic@f, not pmu@f.
There should be an nvmem-layout subnode in the example too.


> +
> +...
> 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*
>
Nick Chan

  reply	other threads:[~2025-04-16  0:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-15 21:52 [PATCH 0/3] Generic SPMI NVMEM cell driver Sasha Finkelstein via B4 Relay
2025-04-15 21:52 ` [PATCH 1/3] dt-bindings: spmi: Add generic SPMI NVMEM Sasha Finkelstein via B4 Relay
2025-04-16  0:18   ` Nick Chan [this message]
2025-04-16  7:39     ` Sasha Finkelstein
2025-04-15 21:52 ` [PATCH 2/3] nvmem: Add spmi-nvmem driver Sasha Finkelstein via B4 Relay
2025-04-16  1:40   ` Neal Gompa
2025-04-16 18:09   ` Alyssa Rosenzweig
2025-04-17 13:34   ` Srinivas Kandagatla
2025-04-17 13:49     ` Alyssa Rosenzweig
2025-04-17 13:57       ` Srinivas Kandagatla
2025-04-17 13:59         ` Alyssa Rosenzweig
2025-04-17 14:27     ` Sasha Finkelstein
2025-04-17 14:30     ` Janne Grunau
2025-04-17 14:50       ` Srinivas Kandagatla
2025-04-15 21:52 ` [PATCH 3/3] arm64: dts: apple: Add PMU NVMEM Sasha Finkelstein via B4 Relay
2025-04-16  0:28   ` Nick Chan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63957942-173e-4c28-932e-a8ba7c60ee83@gmail.com \
    --to=towinchenmi@gmail.com \
    --cc=alyssa@rosenzweig.io \
    --cc=asahi@lists.linux.dev \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fnkl.kernel@gmail.com \
    --cc=j@jannau.net \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neal@gompa.dev \
    --cc=robh@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=sven@svenpeter.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®