Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Inochi Amaoto" <inochiama@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/3] nvmem: Add Sophgo SG2044 eFuse driver
Date: Tue, 24 Nov 2026 07:42:26 +0000	[thread overview]
Message-ID: <sashiko-outbox-230660@kernel.org> (raw)
In-Reply-To: <20261124072924.556678-3-inochiama@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] nvmem: sophgo-efuse: unnecessary add_legacy_fixed_of_cells in
  probe
- [Low] nvmem: sophgo-efuse: commit message misdescribes indirect
  register read
--

commit 35eaad0514f43d8079e979919f4e2f5fc25d9f4a
Author: Inochi Amaoto <inochiama@gmail.com>

nvmem: Add Sophgo SG2044 eFuse driver

This commit adds an NVMEM provider driver for the eFuse controller on
Sophgo SG2044 SoCs.

> As for SG2044, HW automatically loads the eFuse content
> into shadow registers which are organized as 32bit values
> exposed as MMIO.

[Severity: Low]
Does the commit message match how the driver accesses the hardware?
Instead of reading a bank of MMIO shadow registers directly,
sg2044_efuses_read_strip() writes the word address to SG2044_EFUSE_ADR,
triggers a read command in SG2044_EFUSE_MD, polls for completion, and
reads the result from SG2044_EFUSE_RD_DATA.

> diff --git a/drivers/nvmem/sophgo-efuse.c b/drivers/nvmem/sophgo-efuse.c
> new file mode 100644
> index 0000000000000..d42f18f368285
> --- /dev/null
> +++ b/drivers/nvmem/sophgo-efuse.c

[ ... ]

> +static int sophgo_efuses_probe(struct platform_device *pdev)
> +{
> +	struct device *dev = &pdev->dev;
> +	struct sophgo_efuses *efuse;
> +	struct nvmem_config config = {
> +		.dev = &pdev->dev,
> +		.add_legacy_fixed_of_cells = true,
> +		.read_only = true,

[Severity: Low]
Should a new driver set add_legacy_fixed_of_cells = true?  That option
was introduced in 2cc3b37f5b6d ("nvmem: add explicit config option to
read old syntax fixed OF cells") for legacy bindings that reference
nvmem-deprecated-cells.yaml#, whereas the sophgo,sg2044-efuse.yaml
binding only allows nvmem-layout cells via nvmem.yaml#.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261124072924.556678-1-inochiama@gmail.com?part=2

  reply	other threads:[~2026-11-24  7:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  7:29 [PATCH v2 0/3] Add SG2044 eFUSE driver Inochi Amaoto
2026-11-24  7:29 ` [PATCH v2 1/3] dt-bindings: nvmem: Add SG2044 eFuse controller Inochi Amaoto
2026-11-24  7:29 ` [PATCH v2 2/3] nvmem: Add Sophgo SG2044 eFuse driver Inochi Amaoto
2026-11-24  7:42   ` sashiko-bot [this message]
2026-11-24  7:29 ` [PATCH v2 3/3] riscv: dts: sophgo: sg2044: Add eFUSE device Inochi Amaoto

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=sashiko-outbox-230660@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=inochiama@gmail.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.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