mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Jonas Gorski <jonas.gorski@gmail.com>,
	Florian Fainelli <florian.fainelli@broadcom.com>
Cc: "Andrew Lunn" <andrew@lunn.ch>,
	"Vladimir Oltean" <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Vivien Didelot" <vivien.didelot@gmail.com>,
	"Álvaro Fernández Rojas" <noltari@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 5/5] net: dsa: b53: do not touch DLL_IQQD on bcm53115
Date: Thu, 5 Jun 2025 11:06:55 +0200	[thread overview]
Message-ID: <ead87a84-5a44-4c21-91bb-9086ba1fbcc3@redhat.com> (raw)
In-Reply-To: <CAOiHx=n6Mc+nM2QOa8okQbFcj9UHgfMbKKcNXG6D-VJjELHrsw@mail.gmail.com>

On 6/3/25 8:15 AM, Jonas Gorski wrote:
> On Mon, Jun 2, 2025 at 11:40 PM Florian Fainelli
> <florian.fainelli@broadcom.com> wrote:
>> On 6/2/25 12:39, Jonas Gorski wrote:
>>> According to OpenMDK, bit 2 of the RGMII register has a different
>>> meaning for BCM53115 [1]:
>>>
>>> "DLL_IQQD         1: In the IDDQ mode, power is down0: Normal function
>>>                    mode"
>>>
>>> Configuring RGMII delay works without setting this bit, so let's keep it
>>> at the default. For other chips, we always set it, so not clearing it
>>> is not an issue.
>>>
>>> One would assume BCM53118 works the same, but OpenMDK is not quite sure
>>> what this bit actually means [2]:
>>>
>>> "BYPASS_IMP_2NS_DEL #1: In the IDDQ mode, power is down#0: Normal
>>>                      function mode1: Bypass dll65_2ns_del IP0: Use
>>>                      dll65_2ns_del IP"
>>>
>>> So lets keep setting it for now.
>>>
>>> [1] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53115/bcm53115_a0_defs.h#L19871
>>> [2] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53118/bcm53118_a0_defs.h#L14392
>>>
>>> Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
>>> Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
>>> ---
>>> v1 -> v2:
>>> * new patch
>>>
>>>   drivers/net/dsa/b53/b53_common.c | 8 +++++---
>>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
>>> index be4493b769f4..862bdccb7439 100644
>>> --- a/drivers/net/dsa/b53/b53_common.c
>>> +++ b/drivers/net/dsa/b53/b53_common.c
>>> @@ -1354,8 +1354,7 @@ static void b53_adjust_531x5_rgmii(struct dsa_switch *ds, int port,
>>>        * tx_clk aligned timing (restoring to reset defaults)
>>>        */
>>>       b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl);
>>> -     rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC |
>>> -                     RGMII_CTRL_TIMING_SEL);
>>> +     rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
>>
>> Are not we missing a:
>>
>> if (dev->chip_id != BCM53115_DEVICE_ID)
>>         rgmii_ctrl &= ~RGMII_CTRL_TIMING_SEL;
>>
>> here to be strictly identical before/after?
> 
> We could add it for symmetry, but it would be purely decorational. We
> unconditionally set this bit again later, so clearing it before has no
> actual effect, which is why I didn't add it.

Makes sense, and the code in this patch is IMHO more readable.

/P


  reply	other threads:[~2025-06-05  9:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 19:39 [PATCH net v2 0/5] net: dsa: b53: fix RGMII ports Jonas Gorski
2025-06-02 19:39 ` [PATCH net v2 1/5] net: dsa: b53: do not enable EEE on bcm63xx Jonas Gorski
2025-06-02 19:39 ` [PATCH net v2 2/5] net: dsa: b53: do not enable RGMII delay " Jonas Gorski
2025-06-02 21:38   ` Florian Fainelli
2025-06-02 19:39 ` [PATCH net v2 3/5] net: dsa: b53: do not configure bcm63xx's IMP port interface Jonas Gorski
2025-06-02 21:38   ` Florian Fainelli
2025-06-02 19:39 ` [PATCH net v2 4/5] net: dsa: b53: allow RGMII for bcm63xx RGMII ports Jonas Gorski
2025-06-02 19:39 ` [PATCH net v2 5/5] net: dsa: b53: do not touch DLL_IQQD on bcm53115 Jonas Gorski
2025-06-02 21:40   ` Florian Fainelli
2025-06-03  6:15     ` Jonas Gorski
2025-06-05  9:06       ` Paolo Abeni [this message]
2025-06-05 18:01         ` Florian Fainelli
2025-06-05  9:20 ` [PATCH net v2 0/5] net: dsa: b53: fix RGMII ports patchwork-bot+netdevbpf

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=ead87a84-5a44-4c21-91bb-9086ba1fbcc3@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=jonas.gorski@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=noltari@gmail.com \
    --cc=olteanv@gmail.com \
    --cc=vivien.didelot@gmail.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

all inboxes | Powered by JetHome®