From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Lunn Subject: Re: ID of (former "National") TI's PHY DP83848 Date: Mon, 30 Apr 2018 14:22:26 +0200 Message-ID: <20180430122226.GA10066@lunn.ch> References: <201804271351.05091.jbe@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, Florian Fainelli To: Juergen Borleis Return-path: Received: from vps0.lunn.ch ([185.16.172.187]:44894 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521AbeD3MW2 (ORCPT ); Mon, 30 Apr 2018 08:22:28 -0400 Content-Disposition: inline In-Reply-To: <201804271351.05091.jbe@pengutronix.de> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Apr 27, 2018 at 01:51:04PM +0200, Juergen Borleis wrote: > Hi, > > I have worked on a DP83848 variant without an interrupt line. While at it, I > read through all datasheets of existing variants of the DP83848 phy. > > Here is what I've found so far: > > +--------------+--------------+--------+-----+ > | Variant | Phy ID | Note | IRQ | > +--------------+--------------+--------+-----+ > | DP83848H | 0x20005c90 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848J | 0x20005c90 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848K | 0x20005c90 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848M | 0x20005c90 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848T | 0x20005c90 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848EP | 0x20005c90 | | YES | > +--------------+--------------+--------+-----+ > | DP83848HT | 0x20005c90 | | YES | > +--------------+--------------+--------+-----+ > | DP83848Q | 0x20005ca2 | MINI | NO | > +--------------+--------------+--------+-----+ > | DP83848V | 0x20005ca2 | | YES | > +--------------+--------------+--------+-----+ > | DP83848C | 0x20005ca2 | | YES | > +--------------+--------------+--------+-----+ > > "MINI" means a less pin count variant. > "IRQ"-"YES" means, the device has a interrupt line, > "IRQ"-"NO" means, the device has no interrupt line. > > How to deal with interrupts, if the device itself has no interrupt line (and > uses the same phy ID)? How to deal with the same Phy ID used for different > devices and different features? Hi Juergen Interrupts are always in two parts. One part is the PHY driver side, saying it supports interrupts, providing the functions to configure interrupts, check if an interrupt did happen, and acknowledge it. The second part is somehow specifying which specific interrupt is used, via device tree, or platform data. Only when both are supplied will PHYLIB try to use the interrupts. So it should be safe if they PHY driver always says it supports interrupts. The platform then must not provide an interrupt number when there is not one. As for other features, you probably need to take same approach. How does a mini differ? Less LEDs? Only RGMII, not GMII? Andrew