From: Andrew Lunn <andrew@lunn.ch>
To: Michael Walle <michael@walle.cc>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Rob Herring <robh@kernel.org>, Xu Liang <lxu@maxlinear.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v1 3/4] dt-bindings: net: phy: add MaxLinear GPY2xx bindings
Date: Tue, 20 Dec 2022 14:21:29 +0100 [thread overview]
Message-ID: <Y6G22e06gQ2+kM+G@lunn.ch> (raw)
In-Reply-To: <796a528b23aded95c1a647317c277b1f@walle.cc>
> (2) Krzysztof pointed out that there is still the issue raised by
> Rob, that the schemas haven't any compatible and cannot be
> validated. I think that applies to all the network PHY bindings
> in the tree right now. I don't know how to fix them.
i've been offline for a while, i sabotaged my own mail server...
You can always add an unneeded compatible, using the PHY devices ID:
- pattern: "^ethernet-phy-id[a-f0-9]{4}\\.[a-f0-9]{4}$"
description:
If the PHY reports an incorrect ID (or none at all) then the
compatible list may contain an entry with the correct PHY ID
in the above form.
The first group of digits is the 16 bit Phy Identifier 1
register, this is the chip vendor OUI bits 3:18. The
second group of digits is the Phy Identifier 2 register,
this is the chip vendor OUI bits 19:24, followed by 10
bits of a vendor specific ID.
It would be fine to do this in the example in the binding, but i would
add a comment something like:
"Compatible generally only needed to make DT lint tools work. Mostly
not needed for real DT descriptions"
Examples often get cut/paste without thinking, and we don't really
want the compatible used unless it is really needed.
This is however a bigger problem than just PHYs. It applies to any
device which can be enumerated on a bus, e.g. USB, PCI. So maybe this
limitation of the DT linting tools should be fixed once at a higher
level?
> (3) The main problem with the broken interrupt handling of the PHY
> is that it will disturb other devices on that interrupt line.
> IOW if the interrupt line is shared the PHY should fall back
> to polling mode. I haven't found anything in the interrupt
> subsys to query if a line is shared and I guess it's also
> conceptually impossible to do such a thing, because there
> might be any driver probed at a later time which also uses
> that line.
> Rob had the idea to walk the device tree and determine if
> a particular interrupt is used by other devices, too. If
> feasable, this sounds like a good enough heuristic for our
> problem. Although there might be some edge cases, like
> DT overlays loaded at linux runtime (?!).
My humble opinion is that it is not worth the complexity for just one
PHY which should work in polling mode without problems. I think the
boolean property you propose is KISS and does what is needed.
Andrew
next prev parent reply other threads:[~2022-12-20 13:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 15:12 [PATCH net-next v1 0/4] net: phy: mxl-gpy: broken interrupt fixes Michael Walle
2022-12-02 15:12 ` [PATCH net-next v1 1/4] net: phy: mxl-gpy: add MDINT workaround Michael Walle
2022-12-02 18:23 ` Andrew Lunn
2022-12-02 22:53 ` Michael Walle
2022-12-02 15:12 ` [PATCH net-next v1 2/4] dt-bindings: vendor-prefixes: add MaxLinear Michael Walle
2022-12-02 15:28 ` Krzysztof Kozlowski
2022-12-02 15:12 ` [PATCH net-next v1 3/4] dt-bindings: net: phy: add MaxLinear GPY2xx bindings Michael Walle
2022-12-02 18:31 ` Andrew Lunn
2022-12-02 22:50 ` Michael Walle
2022-12-05 21:29 ` Rob Herring
2022-12-05 21:53 ` Michael Walle
2022-12-06 8:29 ` Michael Walle
2022-12-06 8:38 ` Krzysztof Kozlowski
2022-12-06 9:44 ` Michael Walle
2022-12-16 9:03 ` Michael Walle
2022-12-20 13:21 ` Andrew Lunn [this message]
2022-12-28 15:00 ` Michael Walle
2022-12-02 15:12 ` [PATCH net-next v1 4/4] net: phy: mxl-gpy: disable interrupts on GPY215 by default Michael Walle
2022-12-02 18:42 ` Andrew Lunn
2022-12-02 23:09 ` Michael Walle
2022-12-03 20:36 ` Andrew Lunn
2022-12-16 9:46 ` Michael Walle
2022-12-20 13:33 ` Andrew Lunn
2022-12-20 21:39 ` Michael Walle
2022-12-03 20:41 ` [PATCH net-next v1 0/4] net: phy: mxl-gpy: broken interrupt fixes 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=Y6G22e06gQ2+kM+G@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lxu@maxlinear.com \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.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).