netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: sean.wang@mediatek.com
Cc: john@phrozen.org, davem@davemloft.net, nbd@openwrt.org,
	netdev@vger.kernel.org, linux-mediatek@lists.infradead.org,
	keyhaede@gmail.com, objelf@gmail.com
Subject: Re: [PATCH net-next 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0
Date: Tue, 20 Sep 2016 21:37:58 +0200	[thread overview]
Message-ID: <20160920193758.GA29522@lunn.ch> (raw)
In-Reply-To: <1474358360-29901-4-git-send-email-sean.wang@mediatek.com>

On Tue, Sep 20, 2016 at 03:59:20PM +0800, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Add the dts property for the capability if TRGMII supported on GAMC0
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>  Documentation/devicetree/bindings/net/mediatek-net.txt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/net/mediatek-net.txt b/Documentation/devicetree/bindings/net/mediatek-net.txt
> index 6103e55..32f79d8 100644
> --- a/Documentation/devicetree/bindings/net/mediatek-net.txt
> +++ b/Documentation/devicetree/bindings/net/mediatek-net.txt
> @@ -31,7 +31,10 @@ Optional properties:
>  Required properties:
>  - compatible: Should be "mediatek,eth-mac"
>  - reg: The number of the MAC
> -- phy-handle: see ethernet.txt file in the same directory.
> +- phy-handle: see ethernet.txt file in the same directory and
> +	the additional phy-mode "tgrmii" is provided in order to connect
> +	with the internal switch MT7530 which is only applicable when reg
> +	is equal to 0.

Humm. How is the switch connected? Is it on the MDIO bus?

If it is on the mdio bus, the binding is going to look something like:

eth: ethernet@1b100000 {
        compatible = "mediatek,mt7623-eth";
        reg = <0 0x1b100000 0 0x20000>;
        clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
                 <&ethsys CLK_ETHSYS_ESW>,
                 <&ethsys CLK_ETHSYS_GP2>,
                 <&ethsys CLK_ETHSYS_GP1>;
        clock-names = "ethif", "esw", "gp2", "gp1";
        interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_LOW
                      GIC_SPI 199 IRQ_TYPE_LEVEL_LOW
                      GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
        power-domains = <&scpsys MT2701_POWER_DOMAIN_ETH>;
        resets = <&ethsys MT2701_ETHSYS_ETH_RST>;
        reset-names = "eth";
        mediatek,ethsys = <&ethsys>;
        mediatek,pctl = <&syscfg_pctl_a>;
        #address-cells = <1>;
        #size-cells = <0>;

        gmac1: mac@0 {
                compatible = "mediatek,eth-mac";
                reg = <0>;
        };

        gmac2: mac@1 {
                compatible = "mediatek,eth-mac";
                reg = <1>;
        };

        mdio-bus {
               reg = <1>;
               #address-cells = <1>;
               #size-cells = <0>;

               switch0: switch0@0 {
                       compatible = "marvell,mv88e6085";
                       #address-cells = <1>;
                       #size-cells = <0>;
                       reg = <0>;
                       dsa,member = <0 0>;

                       ports {
                               #address-cells = <1>;
                               #size-cells = <0>;
                               port@0 {
                                       reg = <0>;
                                       label = "lan0";
...
...

In this case the switch is an MDIO device, not an PHY. It will not
have an phy-mode. It cannot have a phy mode, it is not a PHY.

Or am i missing something here?

Thanks
	Andrew

  reply	other threads:[~2016-09-20 19:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20  7:59 [PATCH net-next 0/3] add support for RGMII on GMAC0 through TRGMII hardware module sean.wang
     [not found] ` <1474358360-29901-1-git-send-email-sean.wang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-09-20  7:59   ` [PATCH net-next 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII sean.wang-NuS5LvNUpcJWk0Htik3J/w
2016-09-20 21:23     ` Florian Fainelli
     [not found]       ` <064d43fb-2942-efd2-6dc7-09f47a256691-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-21  7:33         ` Sean Wang
2016-09-21 16:59           ` Florian Fainelli
2016-09-20  7:59 ` [PATCH net-next 2/3] net: ethernet: mediatek: add support for GMAC0 connecting with external PHY through TRGMII sean.wang
2016-09-21  4:50   ` David Miller
2016-09-20  7:59 ` [PATCH net-next 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 sean.wang
2016-09-20 19:37   ` Andrew Lunn [this message]
2016-09-21  6:16   ` Sean Wang
2016-09-21 14:17     ` Andrew Lunn
2016-09-21 15:37       ` Sean Wang

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=20160920193758.GA29522@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=john@phrozen.org \
    --cc=keyhaede@gmail.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    --cc=objelf@gmail.com \
    --cc=sean.wang@mediatek.com \
    /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).