Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-12-04 Thread Andrew Lunn
> So why not: > > switch@0 { > compatible = "acme,switch"; > #address-cells = <1>; > #size-cells = <0>; > > ports { > > port@0 { > reg = <0>; > phy@0 { > reg = <0>; >

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-12-02 Thread Linus Walleij
On Thu, Nov 30, 2017 at 12:26 AM, Florian Fainelli wrote: > On 11/29/2017 03:19 PM, Linus Walleij wrote: >> Or are there in pracice things such that reg is different >> on the port and the PHY connected to it? Then it makes >> much sense to put an MDIO bus inside the switch

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Andrew Lunn
> While Andrew's suggestion to use of_mdiobus_register() even for the > built-in DSA created slave_mii_bus makes sense, I would rather recommend > you instantiate your own bus (ala mv88e6xxx), such that your DT will > likely look like: Hi Florian I could still look like this, if the built in

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Florian Fainelli
On 11/29/2017 03:19 PM, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 10:56 PM, Andrew Lunn wrote: > >> I think the problem might be, you are using the DSA provided MDIO bus. >> The Marvell switches has a similar setup in terms of interrupts. The >> PHY interrupts appear within

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Linus Walleij
On Wed, Nov 29, 2017 at 10:56 PM, Andrew Lunn wrote: > I think the problem might be, you are using the DSA provided MDIO bus. > The Marvell switches has a similar setup in terms of interrupts. The > PHY interrupts appear within the switch. So i implemented an interrupt >

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Andrew Lunn
Hi Linus > Just that the PHYs are on the MDIO bus inside the switch, of > course. I think the problem might be, you are using the DSA provided MDIO bus. The Marvell switches has a similar setup in terms of interrupts. The PHY interrupts appear within the switch. So i implemented an interrupt

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Florian Fainelli
On 11/29/2017 01:28 PM, Linus Walleij wrote: > On Wed, Nov 29, 2017 at 4:56 PM, Andrew Lunn wrote: >>> I have the phy-handle in the ethernet controller. This RTL8366RB >>> thing is just one big PHY as far as I know. >> >> We don't model switches as PHYs. They are their own device

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Linus Walleij
On Wed, Nov 29, 2017 at 4:56 PM, Andrew Lunn wrote: >> I have the phy-handle in the ethernet controller. This RTL8366RB >> thing is just one big PHY as far as I know. > > We don't model switches as PHYs. They are their own device type. And > the internal or external PHYs are just

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Andrew Lunn
> I have the phy-handle in the ethernet controller. This RTL8366RB > thing is just one big PHY as far as I know. Hi Linus We don't model switches as PHYs. They are their own device type. And the internal or external PHYs are just normal PHYs in the linux model. Meaning their interrupt

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-29 Thread Linus Walleij
On Mon, Nov 6, 2017 at 12:48 AM, Andrew Lunn wrote: >> This interrupt construction is similar to how we handle >> interrupt controllers inside PCI bridges etc. > > Hi Linus > > Your interrupt handling is going in the right direction, but needs > further work. The PHY interrupt is

Re: [PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-05 Thread Andrew Lunn
> This interrupt construction is similar to how we handle > interrupt controllers inside PCI bridges etc. Hi Linus Your interrupt handling is going in the right direction, but needs further work. The PHY interrupt is a phy property, so should be in the PHY node in device tree. The Marvell

[PATCH 3/4] RFC: net: dsa: Add bindings for Realtek SMI DSAs

2017-11-05 Thread Linus Walleij
The Realtek SMI family is a set of DSA chips that provide switching in routers. This binding just follows the pattern set by other switches but with the introduction of an embedded irqchip to demux and handle the interrupts fired by the single line from the chip. This interrupt construction is