From: "Marek Behún" <kabel@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Gregory CLEMENT" <gregory.clement@bootlin.com>,
arm@kernel.org, "Uwe Kleine-König" <uwe@kleine-koenig.org>,
"Jason Cooper" <jason@lakedaemon.net>,
"Andreas Färber" <afaerber@suse.de>,
"Rob Herring" <robh+dt@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH mvebu-dt 3/6] ARM: dts: turris-omnia: describe ethernet-phy interrupt
Date: Sat, 14 Nov 2020 18:42:21 +0100 [thread overview]
Message-ID: <20201114184221.1f74de86@kernel.org> (raw)
In-Reply-To: <20201114171639.GO1456319@lunn.ch>
On Sat, 14 Nov 2020 18:16:39 +0100
Andrew Lunn <andrew@lunn.ch> wrote:
> On Sat, Nov 14, 2020 at 05:49:28PM +0100, Marek Behún wrote:
> > On Sat, 14 Nov 2020 17:04:06 +0100
> > Marek Behún <kabel@kernel.org> wrote:
> >
> > > + interrupt-parent = <&pcawan>;
> > > + interrupt = <7 IRQ_TYPE_LEVEL_LOW>;
> >
> > Also we need to use IRQ_TYPE_EDGE_FALLING. The gpio-pca953x driver does
> > not support IRQ_TYPE_LEVEL_LOW...
>
> Please check the datasheet for the PHY. I expect you will find it is
> level triggering, not edge. So you can miss interrupts, and have the
> wrong state.
>
> I've also had bad experiences with pca953x and interrupt storms. I
> hope you are using one with the extended registers including the
> interrupt mask.
>
> Andrew
Andrew, the PHY is a 88E1514, which triggers on level. We can set
either active-low or active-high, but not edge. Default is active-low.
The expander is a PCA9538 (in schematics called PCA9538PWR). The driver
does not support level interrupts:
if (!(type & IRQ_TYPE_EDGE_BOTH)) {
dev_err(&chip->client->dev, "irq %d: unsupported type %d\n",
d->irq, type);
return -EINVAL;
}
It seems that for PCA9538 the interrupts are read from input. Some of
the chips supported by this driver can latch interrupt status into
special register, but this chip does not...
On interrupt the driver looks at the input register, compares it with
cached state and looks which bits changed. So theoretically level
support could be implemented in this driver, but currently it is not.
Do you think we should just poll for interrupts with the PHY?
Marek
next prev parent reply other threads:[~2020-11-14 17:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-14 16:04 [PATCH mvebu-dt 0/6] Turris Omnia device-tree changes Marek Behún
2020-11-14 16:04 ` [PATCH mvebu-dt 1/6] ARM: dts: turris-omnia: enable HW buffer management Marek Behún
2020-11-14 16:04 ` [PATCH mvebu-dt 2/6] ARM: dts: turris-omnia: add comphy handle to eth2 Marek Behún
2020-11-14 16:26 ` Andrew Lunn
2020-11-14 16:04 ` [PATCH mvebu-dt 3/6] ARM: dts: turris-omnia: describe ethernet-phy interrupt Marek Behún
2020-11-14 16:34 ` Andrew Lunn
2020-11-14 16:52 ` Marek Behún
2020-11-14 16:40 ` Marek Behún
2020-11-14 16:49 ` Marek Behún
2020-11-14 17:16 ` Andrew Lunn
2020-11-14 17:42 ` Marek Behún [this message]
2020-11-14 17:47 ` Marek Behun
2020-11-14 20:16 ` Andrew Lunn
2020-11-14 20:39 ` Marek Behun
2020-11-14 21:20 ` Andreas Färber
2020-11-14 23:32 ` Marek Behún
2020-11-14 16:04 ` [PATCH mvebu-dt 4/6] ARM: dts: turris-omnia: add SFP node Marek Behún
2020-11-14 16:36 ` Andrew Lunn
2020-11-14 16:04 ` [PATCH mvebu-dt 5/6] ARM: dts: turris-omnia: add LED controller node Marek Behún
2020-11-14 16:04 ` [PATCH mvebu-dt 6/6] ARM: dts: turris-omnia: update ethernet-phy node and handle name Marek Behún
2020-11-14 16:37 ` 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=20201114184221.1f74de86@kernel.org \
--to=kabel@kernel.org \
--cc=afaerber@suse.de \
--cc=andrew@lunn.ch \
--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).