Re: [PATCH mvebu-dt 3/6] ARM: dts: turris-omnia: describe ethernet-phy interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 14 Nov 2020 18:16:39 +0100
Andrew Lunn <andrew@xxxxxxx> 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@xxxxxxxxxx> 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux