All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Josua Mayer <josua@solid-run.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Michael Hennerich <michael.hennerich@analog.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Alexandru Tachici <alexandru.tachici@analog.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Jon Nettleton <jon@solid-run.com>,
	Yazan Shhady <yazan.shhady@solid-run.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: adin: add property for link-status pin polarity
Date: Mon, 29 Apr 2024 09:54:29 +0000	[thread overview]
Message-ID: <b6f5ff0f-65e1-4b46-8f18-edf24ab3cea5@solid-run.com> (raw)
In-Reply-To: <ac8fba1b-93ef-4120-a03b-f91772ecb5df@lunn.ch>

Am 21.04.24 um 19:54 schrieb Andrew Lunn:
>> I merely don't like the idea that this makes no sense for the other
>> possible pin functions.
>> Once somebody uses this pin for different use-case, they will need
>> to solve it again.
> There are not too many different uses of this pin. The data sheet
> indicates you can connect it to the MAC to indicate link. You might
> also be able to use it with an external PTP stamper, using the start
> of frame indication.
>
> I don't know of any bindings for such use case, but something will be
> needed to describe how the pin is connected to the other device. And
> at that point, the active low property could be used.
>
>>>> This kind of configuration is much more like pinctrl than led.
>>>  
>>> So what is the pinctrl way of describing this? You should not be
>>> inventing something new if there is an existing mechanism to describe
>>> it. We want consistency, not 42 different ways of doing one thing.
>> I am mostly familiar with the
>> #define PIN_FUNCTION magic-numbers
>> pins = <PIN_FUNCTION more-magic-numbers>;
>>
>> But on Marvell platforms there is:
>> marvell,pins =  "mpp1";
>> marvell,function = "gpio";
>>
>> I also found more generic???:
>> Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
>> Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml
>> which have output-high/output-low, function, pin.
> So that is probably your alternative if you want to not use the LED
> binding.
I will consider using pincfg/-mux
>
>> Interestingly LED_0 supports some non-led functions, too:
>> - collision detection
>> - carrier sense
>> - tx/rx start
>> - tx error
>> so polarity is also relevant to non-led usage of LED_0 pin.
> Collision detection is an LED usage, you just don't see it very often
> since half duplex is pretty unusual this century. Carrier sense is
> also similar age, from when Ethernet was CSMA/CD.
>
> Since they are not really used any more we don't have them in the LED
> framework, but i think we could implement them if somebody actually
> wanted them. My intention was to keep the LED framework KISS, since
> vendors tend to implement all sorts of odd LED blink reasons. But if
> nobody wants them, nobody has a good end user use case for them, why
> support them?
I see. So in fact most functions I wanted to enable muxing are LED functions,
leaving only some specifically for pinmux.

I believe pinmux is more correct, but there is overlap with led function.

I will  try to find some time for
1. describing both signals as LEDs, taking care of active-low
2. look into using pinmux (lower priority).
I think this would be more interesting to bigger phys with more muxable signals,
adin1300 is rather small.

Thank you for all the comments!


  reply	other threads:[~2024-04-29  9:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-20 11:22 [PATCH net-next v2 0/2] net: phy: adin: add support for setting led-, link-status-pin polarity Josua Mayer
2024-04-20 11:23 ` [PATCH net-next v2 1/2] dt-bindings: net: adin: add property for link-status pin polarity Josua Mayer
2024-04-20 16:10   ` Andrew Lunn
2024-04-20 16:56     ` Josua Mayer
2024-04-20 17:09       ` Andrew Lunn
2024-04-21  9:07         ` Josua Mayer
2024-04-21 17:54           ` Andrew Lunn
2024-04-29  9:54             ` Josua Mayer [this message]
2024-04-20 11:23 ` [PATCH net-next v2 2/2] net: phy: adin: add support for setting link-status-pin polarity Josua Mayer

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=b6f5ff0f-65e1-4b46-8f18-edf24ab3cea5@solid-run.com \
    --to=josua@solid-run.com \
    --cc=alexandru.tachici@analog.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jon@solid-run.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=michael.hennerich@analog.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.