public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Josua Mayer <josua@solid-run.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@bootlin.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] arm64: dts: add description for solidrun cn9130 som and clearfog boards
Date: Fri, 22 Mar 2024 15:38:30 +0000	[thread overview]
Message-ID: <748753a6-9fde-4d4f-8fee-5b93dbb532f0@solid-run.com> (raw)
In-Reply-To: <4fff2165-c3cc-41d8-b541-6e69ce4d98ac@lunn.ch>

Am 22.03.24 um 14:11 schrieb Andrew Lunn:
>>> Sorry, but no. List the LEDs in the PHY node, and they can then be
>>> controlled via /sys/class/leds.
>> May I ask more precisely the motivation?
>> Does this replace the phy's builtin automatic led control?
>>> arch/arm/boot/dts/marvell/armada-370-rd.dts is an example.
>> I will investigate it.
>>
>> My main motivation for tweaking the led controls was to make them all consistent across the two boards:
>> - LEDs under control of PHYs on cpu mdio bus
>> - LEDs under control of ethernet switch on mdio bus
>> - LEDs under control of ethernet phy on external mdio bus behind ethernet switch
>>
>> It looks as if the marvell phy driver supports led subnodes,
>> The switch driver does not.
> https://lwn.net/Articles/965775/
Great!
>
> There has been quite a bit of interest in mv88e6xxx driver support, so
> i expect support for other families outside of 6352 will be added
> after it has been merged, and it is not difficult code to write.
>
>> Finally one phy can only be written to but not read,
>> the cpu can never know its link state.
> O.K. That one cannot use the LED infrastructure in a meaningful way.
>
>> So I prefer (for the Clearfog Pro) board to explicitly use the phys
>> autonomous management of LEDs.
>> Is that still possible if I added led subnodes?
> You can combine both. The horrible marvell,reg-init will be applied
> first. The generic LED code will then take over controlling the LEDs.
I (currently) can't put in the led node e.g.
linux,default-trigger = "link100|link1000|tx|rx";
Right?
>
> For the discrete PHYs, the generic LED code can make use of the
> hardware offload support to read back the hardware configuration and
> configure itself to match. The switch code is missing hardware offload
> at the moment. So it cannot read back the current
> configuration. However, it is simple code to add, and the discrete
> code is a good example to follow.
>
> marvell,reg-init is not going to go away, because of backwards
> compatibility with old DT blobs. But in general, i expect all vendor
> proprietary methods of configuring LEDs to be deprecated and replaced
> with the vendor neutral /sys/class/leds.
Sounds good.

  reply	other threads:[~2024-03-22 15:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21 21:47 [PATCH 0/2] arm64: dts: add description for solidrun cn9130 som and clearfog boards Josua Mayer
2024-03-21 21:47 ` [PATCH 1/2] dt-bindings: arm64: marvell: add solidrun cn9130 " Josua Mayer
2024-03-22  2:16   ` Rob Herring
2024-03-22 10:08   ` Josua Mayer
2024-03-25 19:34     ` Krzysztof Kozlowski
2024-03-25 20:12       ` Josua Mayer
2024-03-26  6:41         ` Krzysztof Kozlowski
2024-03-26 19:26           ` Josua Mayer
2024-03-27 10:19             ` Krzysztof Kozlowski
2024-03-27 10:55               ` Josua Mayer
2024-03-28  9:14                 ` Krzysztof Kozlowski
2024-03-28  9:33                   ` Josua Mayer
2024-03-28  9:41                     ` Krzysztof Kozlowski
2024-03-28  9:46                       ` Josua Mayer
2024-03-28 16:22   ` Josua Mayer
2024-03-21 21:47 ` [PATCH 2/2] arm64: dts: add description for solidrun cn9130 som and " Josua Mayer
2024-03-21 21:59   ` Andrew Lunn
2024-03-22  9:54     ` Josua Mayer
2024-03-22 13:11       ` Andrew Lunn
2024-03-22 15:38         ` Josua Mayer [this message]
2024-03-22 15:49           ` Andrew Lunn
2024-03-22 15:58             ` Josua Mayer
2024-03-22 18:14           ` Josua Mayer
2024-03-22 18:27             ` 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=748753a6-9fde-4d4f-8fee-5b93dbb532f0@solid-run.com \
    --to=josua@solid-run.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=yazan.shhady@solid-run.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