Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kyle Hendry" <khendry@reliablecontrols.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	wsa+renesas@sang-engineering.com
Subject: Re: [PATCH net-next 2/3] net: pcs: rzn1-miic: Add resets to rzn1 info structure
Date: Sat, 28 Nov 2026 18:15:34 +0000	[thread overview]
Message-ID: <sashiko-outbox-238949@kernel.org> (raw)
In-Reply-To: <20261127-miic-reset-consumer-v1-2-3cab78b94e23@reliablecontrols.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] net: pcs: rzn1-miic: miic_reset_control_init() fails on
  existing RZ/N1 DTBs
--

commit 3902b143c1e8eed13da6131cc0c93499f17b4052
Author: Kyle Hendry <khendry@reliablecontrols.com>

net: pcs: rzn1-miic: Add resets to rzn1 info structure

This commit populates the rst_ts and rst_miic reset IDs in
rzn1_miic_of_data so the driver acquires and deasserts the resets for
RZ/N1 MIIC.

> diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
> index 682a73cf5a87d..3c4eca8960bd9 100644
> --- a/drivers/net/pcs/pcs-rzn1-miic.c
> +++ b/drivers/net/pcs/pcs-rzn1-miic.c
> @@ -128,6 +128,11 @@ static const char * const index_to_string[] = {
>  	"CONV5",
>  };
>  
> +static const char * const rzn1_reset_ids[] = {
> +	"rst_ts",
> +	"rst_miic",
> +};
> +
>  static struct modctrl_match rzt2h_modctrl_match_table[] = {
>  	{0x0, {ETHSS_GMAC0_PORT, ETHSS_ETHSW_PORT0, ETHSS_ETHSW_PORT1,
>  	       ETHSS_ETHSW_PORT2, ETHSS_GMAC1_PORT}},
> @@ -855,6 +860,8 @@ static struct miic_of_data rzn1_miic_of_data = {
>  	.miic_port_start = 1,
>  	.miic_port_last = 5,
>  	.sw_mode_mask = GENMASK(4, 0),
> +	.reset_ids = rzn1_reset_ids,
> +	.reset_count = ARRAY_SIZE(rzn1_reset_ids),
>  	.init_unlock_lock_regs = true,
>  	.miic_write = miic_reg_writel_unlocked,
>  	.type = MIIC_TYPE_RZN1,

[Severity: High]
Does setting reset_count in rzn1_miic_of_data cause miic_probe() to fail
with -ENOENT on existing RZ/N1 device trees that do not have resets and
reset-names properties?

miic_reset_control_init() uses non-optional
devm_reset_control_bulk_get_exclusive():

drivers/net/pcs/pcs-rzn1-miic.c:miic_reset_control_init() {
	...
	ret = devm_reset_control_bulk_get_exclusive(dev, of_data->reset_count,
						    miic->rsts);
	if (ret)
		return dev_err_probe(dev, ret,
				     "failed to get bulk reset lines\n");
	...
}

Existing RZ/N1 DTBs (and arch/arm/boot/dts/renesas/r9a06g032.dtsi prior to
commit "ARM: dts: renesas: r9a06g032: Add resets to mii converter" later
in this series) omit these properties on the eth-miic node, so
miic_probe() fails before calling platform_set_drvdata() and leaves
consumers such as dwmac-rzn1 and rzn1_a5psw stuck on -EPROBE_DEFER.

Acquiring the resets as optional (e.g. via
devm_reset_control_bulk_get_optional_exclusive()) would preserve backward
compatibility with existing RZ/N1 device trees.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261127-miic-reset-consumer-v1-0-3cab78b94e23@reliablecontrols.com?part=2

  parent reply	other threads:[~2026-11-28 18:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 18:14 [PATCH net-next 0/3] net: pcs: rzn1-miic: Deassert resets on RZ/N1 Kyle Hendry via B4 Relay
2026-11-27 18:14 ` [PATCH net-next 1/3] dt-bindings: net: pcs: renesas,rzn1-miic: Document rzn1 resets Kyle Hendry via B4 Relay
2026-11-28 18:15   ` sashiko-bot
2026-11-27 18:14 ` [PATCH net-next 2/3] net: pcs: rzn1-miic: Add resets to rzn1 info structure Kyle Hendry via B4 Relay
2026-11-27 18:28   ` Clement Leger
2026-11-28 18:15   ` sashiko-bot [this message]
2026-11-27 18:14 ` [PATCH net-next 3/3] ARM: dts: renesas: r9a06g032: Add resets to mii converter Kyle Hendry via B4 Relay

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-238949@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=khendry@reliablecontrols.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=wsa+renesas@sang-engineering.com \
    /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