From: Aleksander Jan Bajkowski <olek2@wp.pl>
To: Andrew Lunn <andrew@lunn.ch>
Cc: hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: phy: marvell: add support for PHY LEDs polarity modes
Date: Thu, 24 Sep 2026 00:03:00 +0200 [thread overview]
Message-ID: <a174b2c7-3778-4f8c-be5a-2bd94bfe09ed@wp.pl> (raw)
In-Reply-To: <ac224909-5f7d-447e-a0f9-be0d1565a700@lunn.ch>
Hi Andrew,
On 23/09/2026 23:07, Andrew Lunn wrote:
> On Wed, Sep 23, 2026 at 10:45:24PM +0200, Aleksander Jan Bajkowski wrote:
>> Add the led_polarity_set callback for setting LED polarity. Implement
>> this callback for the 88E1318 and 88E1510 PHYs. This should also work on
>> other Marvell PHYs, but I don't have access to the TRM or the hardware.
>>
>> Tested on Adapteva Paralella board with Marvell 88E1318 PHY.
>>
>> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
>> ---
>> Changes in v2:
>> - add suppoer for PHY_LED_INACTIVE_HIGH_IMPEDANCE mode
>> ---
>> drivers/net/phy/marvell.c | 39 ++++++++++++++++++++++++++++++++++++++-
>> 1 file changed, 38 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
>> index f71cffa88406..d57fcabfec2b 100644
>> --- a/drivers/net/phy/marvell.c
>> +++ b/drivers/net/phy/marvell.c
>> @@ -149,6 +149,9 @@
>> #define MII_88E1318S_PHY_LED_FUNC_ON (0x9)
>> #define MII_88E1318S_PHY_LED_FUNC_HI_Z (0xa)
>> #define MII_88E1318S_PHY_LED_FUNC_BLINK (0xb)
>> +#define MII_88E1318S_PHY_LED_POL 0x11
>> +#define MII_88E1318S_PHY_LED_POL_ACT_HIGH(idx) BIT(2 * (idx))
>> +#define MII_88E1318S_PHY_LED_POL_HIGH_IMP(idx) BIT(2 * (idx) + 1)
>> #define MII_88E1318S_PHY_LED_TCR 0x12
>> #define MII_88E1318S_PHY_LED_TCR_FORCE_INT BIT(15)
>> #define MII_88E1318S_PHY_LED_TCR_INTn_ENABLE BIT(7)
>> @@ -304,6 +307,8 @@
>> #define NB_FIBER_STATS 1
>> #define NB_STAT_MAX 3
>>
>> +#define M88E1318S_MAX_LEDS 3
> Why the M88E1318S prefix?
The number of LEDs depends on the PHY variant:
88E1112 -> 4
88E1116R -> 3
88E1240 -> 4
88E1318S -> 3
88E1510 -> 3
88E1545 -> 4
88E1548P -> 4
All of these PHYs likely have the same polarity register layout.
>
> The naming is a bit odd in this file, but maybe NB_MAX_LEDS?
NB_MAX_LEDS might be confusing since the number of LEDs can
vary, but I don't have a preference and can change M88E1318S to
NB_MAX_LEDS.
>
> Andrew
next prev parent reply other threads:[~2026-09-23 22:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 20:45 Aleksander Jan Bajkowski
2026-09-23 21:07 ` Andrew Lunn
2026-09-23 22:03 ` Aleksander Jan Bajkowski [this message]
2026-09-23 22:54 ` Andrew Lunn
2026-09-24 18:43 ` Aleksander Jan Bajkowski
2026-09-24 19:20 ` Andrew Lunn
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=a174b2c7-3778-4f8c-be5a-2bd94bfe09ed@wp.pl \
--to=olek2@wp.pl \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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®