linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx
@ 2020-03-23 14:31 Christian Herber
  2020-03-23 15:14 ` Andrew Lunn
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Herber @ 2020-03-23 14:31 UTC (permalink / raw)
  To: Rob Herring, Florian Fainelli
  Cc: Oleksij Rempel, Mark Rutland, devicetree, Andrew Lunn,
	Marek Vasut, netdev, linux-kernel, Pengutronix Kernel Team,
	David Jander, David S. Miller, Heiner Kallweit

>On Sun, Mar 22, 2020 at 3:09 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>> On 3/20/2020 4:05 PM, Rob Herring wrote:
>> >>>> Because the primary PHY0 can be autodetected by the bus scan.
>> >>>> But I have nothing against your suggestions. Please, some one should say the
>> >>>> last word here, how exactly it should be implemented?
>> >>
>> >> It's not for me to decide, I was hoping the Device Tree maintainers
>> >> could chime in, your current approach would certainly work although it
>> >> feels visually awkward.
>> >
>> > Something like this is what I'd do:
>> >
>> > ethernet-phy@4 {
>> >   compatible = "nxp,tja1102";
>> >   reg = <4 5>;
>> > };
>>
>> But the parent (MDIO bus controller) has #address-cells = 1 and
>> #size-cells = 0, so how can this be made to work without creating two
>> nodes or a first node encapsulating another one?
>
>That is the size of the address, not how many addresses there are. If
>the device has 2 addresses, then 2 address entries seems entirely
>appropriate.
>
>Rob

Yes, it is one device with two address. This is if you call the entire IC a device. If you look at it from a PHY perspective, it is two devices with 1 address.
If you just look at it as a single device, it gets difficult to add PHY specific properties in the future, e.g. master/slave selection.
In my opinion its important to have some kind of container for the entire IC, but likewise for the individual PHYs.

Christian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx
  2020-03-23 14:31 Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx Christian Herber
@ 2020-03-23 15:14 ` Andrew Lunn
  2020-03-30  7:02   ` Oleksij Rempel
  2020-04-02 11:42   ` Oleksij Rempel
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Lunn @ 2020-03-23 15:14 UTC (permalink / raw)
  To: Christian Herber
  Cc: Rob Herring, Florian Fainelli, Oleksij Rempel, Mark Rutland,
	devicetree, Marek Vasut, netdev, linux-kernel,
	Pengutronix Kernel Team, David Jander, David S. Miller,
	Heiner Kallweit

> Yes, it is one device with two address. This is if you call the entire IC a device. If you look at it from a PHY perspective, it is two devices with 1 address.
> If you just look at it as a single device, it gets difficult to add PHY specific properties in the future, e.g. master/slave selection.

> In my opinion its important to have some kind of container for the
> entire IC, but likewise for the individual PHYs.

Yes, we need some sort of representation of two devices.

Logically, the two PHYs are on the same MDIO bus, so you could have
two nodes on the main bus.

Or you consider the secondary PHY as being on an internal MDIO bus
which is transparently bridged to the main bus. This is what was
proposed in the last patchset.

Because this bridge is transparent, the rest of the PHY/MDIO framework
has no idea about it. So i prefer that we keep with two PHY nodes on
the main bus. But i still think we need the master PHY to register the
secondary PHY, due to the missing PHY ID, and the other constrains
like resets which the master PHY has to handle.

     Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx
  2020-03-23 15:14 ` Andrew Lunn
@ 2020-03-30  7:02   ` Oleksij Rempel
  2020-04-02 11:42   ` Oleksij Rempel
  1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2020-03-30  7:02 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Christian Herber, Rob Herring, Florian Fainelli, Mark Rutland,
	devicetree, Marek Vasut, netdev, linux-kernel,
	Pengutronix Kernel Team, David Jander, David S. Miller,
	Heiner Kallweit

Hi,

On Mon, Mar 23, 2020 at 04:14:23PM +0100, Andrew Lunn wrote:
> > Yes, it is one device with two address. This is if you call the entire IC a device. If you look at it from a PHY perspective, it is two devices with 1 address.
> > If you just look at it as a single device, it gets difficult to add PHY specific properties in the future, e.g. master/slave selection.
> 
> > In my opinion its important to have some kind of container for the
> > entire IC, but likewise for the individual PHYs.
> 
> Yes, we need some sort of representation of two devices.
> 
> Logically, the two PHYs are on the same MDIO bus, so you could have
> two nodes on the main bus.
> 
> Or you consider the secondary PHY as being on an internal MDIO bus
> which is transparently bridged to the main bus. This is what was
> proposed in the last patchset.
> 
> Because this bridge is transparent, the rest of the PHY/MDIO framework
> has no idea about it. So i prefer that we keep with two PHY nodes on
> the main bus. But i still think we need the master PHY to register the
> secondary PHY, due to the missing PHY ID, and the other constrains
> like resets which the master PHY has to handle.

this discussion is stalled.
What is the final decision? What is the proper and mainlinable way?

Regards,
Oleksij
--
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx
  2020-03-23 15:14 ` Andrew Lunn
  2020-03-30  7:02   ` Oleksij Rempel
@ 2020-04-02 11:42   ` Oleksij Rempel
  1 sibling, 0 replies; 4+ messages in thread
From: Oleksij Rempel @ 2020-04-02 11:42 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Christian Herber, Rob Herring, Florian Fainelli, Mark Rutland,
	devicetree, Marek Vasut, netdev, linux-kernel,
	Pengutronix Kernel Team, David Jander, David S. Miller,
	Heiner Kallweit

On Mon, Mar 23, 2020 at 04:14:23PM +0100, Andrew Lunn wrote:
> > Yes, it is one device with two address. This is if you call the entire IC a device. If you look at it from a PHY perspective, it is two devices with 1 address.
> > If you just look at it as a single device, it gets difficult to add PHY specific properties in the future, e.g. master/slave selection.
> 
> > In my opinion its important to have some kind of container for the
> > entire IC, but likewise for the individual PHYs.
> 
> Yes, we need some sort of representation of two devices.
> 
> Logically, the two PHYs are on the same MDIO bus, so you could have
> two nodes on the main bus.
> 
> Or you consider the secondary PHY as being on an internal MDIO bus
> which is transparently bridged to the main bus. This is what was
> proposed in the last patchset.
> 
> Because this bridge is transparent, the rest of the PHY/MDIO framework
> has no idea about it. So i prefer that we keep with two PHY nodes on
> the main bus. But i still think we need the master PHY to register the
> secondary PHY, due to the missing PHY ID, and the other constrains
> like resets which the master PHY has to handle.

Yes, this is the way how current patches are implemented.

Should dt-binding documentation and PHY changes go via David's tree
upstream?  If nobody has strong opinion against it, @David can you
please take them.

Regards,
Oleksij & Marc
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-02 11:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 14:31 Re: [PATCH v4 1/4] dt-bindings: net: phy: Add support for NXP TJA11xx Christian Herber
2020-03-23 15:14 ` Andrew Lunn
2020-03-30  7:02   ` Oleksij Rempel
2020-04-02 11:42   ` Oleksij Rempel

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).