From: "Marek Behún" <kabel@kernel.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: arm@kernel.org, "Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Jason Cooper" <jason@lakedaemon.net>,
"Rob Herring" <robh+dt@kernel.org>,
devicetree@vger.kernel.org,
"Gregory CLEMENT" <gregory.clement@bootlin.com>
Subject: Re: [PATCH mvebu-dt v2 5/6] ARM: dts: turris-omnia: add LED controller node
Date: Sun, 15 Nov 2020 00:23:51 +0100 [thread overview]
Message-ID: <20201115002351.7a752599@kernel.org> (raw)
In-Reply-To: <75e7fb40-be64-3d1a-c3ac-c705f9f6a4b1@suse.de>
On Sat, 14 Nov 2020 22:58:45 +0100
Andreas Färber <afaerber@suse.de> wrote:
Hi Andreas,
> > /* STM32F0 command interface at address 0x2a */
> > /* leds device (in STM32F0) at address 0x2b */
>
> Update and move this comment now that the node documents the address?
Sounds reasonable.
> > + * in most cases users have wifi cards in
> > + * these slots
>
> Doesn't U-Boot detect mSATA and switches SerDes configuration? You could
> then have it set LED_FUNCTION_DISK in case of mSATA detected.
Yes, but this also needs to be changed by u-boot. And current version
of MCU firmware on Omnia doesn't connect the mSATA/PCI3 LED when in HW
controlled mode, so the LED has to be blinked in software anyway, for
now.
Another problem is that user can put non wireless/disk PCIe device into
this slot. What should the LED function be then? ...
> I recently didn't find any DT binding for the netdev LED trigger, but
> you could set trigger-sources to associate the LEDS with PCIe nodes even
> if unused. Same for the LAN LEDs and switch port nodes, if you give them
> labels.
I am also working with Pavel in LED subsystem. Trigger-sources does not
work currently - you can put it in device tree, but the drivers ignore
it. I am currently also working on transparent HW offloading of LED
triggers: if you set netdev trigger for lan1 LED, the system will
just enable HW controlled mode on Omnia, instead of blinking this LED
in software.
So please wait till this is done.
BTW, another issue is the devicename and function part of LED:
The `linux,default-trigger` property is deprecated in favor of
`function`.
So somehow the system should enable netdev trigger on the LED is
trigger-source points to a network device and function is compatible
with netdev trigger. What should this functions be? We have:
LED_FUNCTION_ACTIVITY
LED_FUNCTION_RX
LED_FUNCTION_TX
LED_FUNCTION_WAN
LED_FUNCTION_LAN
Jacek thinks that
LED_FUNCTION_ACTIVITY should be used for system activity trigger
LED_FUNCTION_RX/TX on uart
LED_FUNCTION_LAN on a network device
But I and Pavel think that if the LED_FUNCTION_ACTIVITY is used, the
trigger should be selected depending on trigger-source:
- if it points to a network device, "netdev"
- if it points to a block device, a potential "blkdev" trigger which
does not exist now
- ...
Also RX/TX should be IMO used this way: for the netdev trigger you can
use whether it should blink only on rx, only on tx, or on both.
Please look at:
https://www.spinics.net/lists/linux-leds/msg16632.html
>
> > + * - there are 2 LEDs dedicated for user: A and
> > + * B. Again there is no such function defined.
> > + * For now we use LED_FUNCTION_DEBUG
>
> I'd suggest the more neutral LED_FUNCTION_INDICATOR.
Hmm, that sounds reasonable.
Thanks.
Marek
next prev parent reply other threads:[~2020-11-14 23:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 18:32 [PATCH mvebu-dt v2 0/6] Turris Omnia device-tree changes Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 1/6] ARM: dts: turris-omnia: enable HW buffer management Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 2/6] ARM: dts: turris-omnia: add comphy handle to eth2 Marek Behún
2020-11-14 21:25 ` Andreas Färber
2020-11-14 18:32 ` [PATCH mvebu-dt v2 3/6] ARM: dts: turris-omnia: describe switch interrupt Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 4/6] ARM: dts: turris-omnia: add SFP node Marek Behún
2020-11-14 21:36 ` Andreas Färber
2020-11-14 21:42 ` Russell King - ARM Linux admin
2020-11-14 21:46 ` Andreas Färber
2020-11-14 22:55 ` Marek Behún
2020-11-15 11:28 ` Russell King - ARM Linux admin
2020-11-14 22:57 ` Marek Behún
2020-11-14 23:16 ` Andreas Färber
2020-11-15 0:32 ` Marek Behún
2020-11-15 0:38 ` Marek Behún
2020-11-14 23:27 ` Andreas Färber
2020-11-15 0:11 ` Marek Behún
2020-11-14 18:32 ` [PATCH mvebu-dt v2 5/6] ARM: dts: turris-omnia: add LED controller node Marek Behún
2020-11-14 21:58 ` Andreas Färber
2020-11-14 23:23 ` Marek Behún [this message]
2020-11-14 18:32 ` [PATCH mvebu-dt v2 6/6] ARM: dts: turris-omnia: update ethernet-phy node and handle name Marek Behún
2020-11-14 22:04 ` Andreas Färber
2020-11-14 23:30 ` Marek Behún
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=20201115002351.7a752599@kernel.org \
--to=kabel@kernel.org \
--cc=afaerber@suse.de \
--cc=arm@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregory.clement@bootlin.com \
--cc=jason@lakedaemon.net \
--cc=robh+dt@kernel.org \
--cc=uwe@kleine-koenig.org \
/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;
as well as URLs for NNTP newsgroup(s).