All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wang, Dongsheng" <dongsheng.wang@hxt-semitech.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "timur@kernel.org" <timur@kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"Zheng, Joey" <yu.zheng@hxt-semitech.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus
Date: Mon, 17 Sep 2018 16:47:00 +0000	[thread overview]
Message-ID: <b01bb33b30164088a9cae59a825acdc9@HXTBJIDCEMVIW02.hxtcorp.net> (raw)
In-Reply-To: 20180917145028.GC5458@lunn.ch

On 9/17/2018 10:50 PM, Andrew Lunn wrote:
> On Mon, Sep 17, 2018 at 04:53:29PM +0800, Wang Dongsheng wrote:
>> This property copy from "ibm,emac.txt" to describe a shared MIDO bus.
>> Since emac include MDIO, so If the motherboard has more than one PHY
>> connected to an MDIO bus, this property will point to the MAC device
>> that has the MDIO bus.
>>
>> Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com>
>> ---
>> V2: s/Since QDF2400 emac/Since emac/
>> ---
>>  Documentation/devicetree/bindings/net/qcom-emac.txt | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/net/qcom-emac.txt b/Documentation/devicetree/bindings/net/qcom-emac.txt
>> index 346e6c7f47b7..50db71771358 100644
>> --- a/Documentation/devicetree/bindings/net/qcom-emac.txt
>> +++ b/Documentation/devicetree/bindings/net/qcom-emac.txt
>> @@ -24,6 +24,9 @@ Internal PHY node:
>>  The external phy child node:
>>  - reg : The phy address
>>  
>> +Optional properties:
>> +- mdio-device : Shared MIDO bus.
> Hi Dongsheng
>
> I don't see why you need this property. The ethernet interface has a
> phy-handle which points to a PHY. That is all you need to find the PHY.
phy-handle is description PHY address. This property is describing an
MDIO controller.
Each QCOM emac include an MDIO controller, normally each emac only
connect one
PHY device, but when all of the PHY devices mdio lines connect one MDIO
controller
that is included in EMAC, we need to share this MDIO controller for
others EMAC.

Normally:

                                (MDIO)
MAC0 ---------------------------------------PHY0
     |                                                               |
     |                          (DATA)                         |
     ---------------------------------------------


                                (MDIO)
MAC1 ---------------------------------------PHY1
     |                                                               |
     |                          (DATA)                         |
     ---------------------------------------------



Shared MDIO bus: "mdio-device" = &MAC0, MAC1 will get MAC0's MDIO bus
and also get the corresponding PHY device.

                                (DATA)
MAC0 ---------------------------------------PHY0
     |                                                               |
     |                          (MDIO)                         |
     --------------------------------------------
                                                                     |
MAC1                                                        PHY0
     |                                                               |
     |                          (DATA)                         |
     --------------------------------------------

Cheers,
Dongsheng


>         emac0: ethernet@feb20000 {
>                 compatible = "qcom,fsm9900-emac";
>                 reg = <0xfeb20000 0x10000>,
>                       <0xfeb36000 0x1000>;
>                 interrupts = <76>;
>
>                 clocks = <&gcc 0>, <&gcc 1>, <&gcc 3>, <&gcc 4>, <&gcc 5>,
>                         <&gcc 6>, <&gcc 7>;
>                 clock-names = "axi_clk", "cfg_ahb_clk", "high_speed_clk",
>                         "mdio_clk", "tx_clk", "rx_clk", "sys_clk";
>
>                 internal-phy = <&emac_sgmii>;
>
>                 phy-handle = <&phy0>;
>
>                 #address-cells = <1>;
>                 #size-cells = <0>;
>
>                 phy0: ethernet-phy@0 {
>                         reg = <0>;
>                 };
>
>                 phy1: ethernet-phy@1 {
>                         reg = <1>;
>                 };
>
>                 pinctrl-names = "default";
>                 pinctrl-0 = <&mdio_pins_a>;
>         };
>
>         emac1: ethernet@38900000 {
>                 compatible = "qcom,fsm9900-emac";
> 		...
> 		...
>
>                 phy-handle = <&phy1>;
> 	};
>
> 	Andrew
>

  reply	other threads:[~2018-09-17 22:15 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17  8:53 [PATCH v2 0/4] net: qcom/emac: add shared mdio bus support Wang Dongsheng
2018-09-17  8:53 ` Wang Dongsheng
2018-09-17  8:53 ` [PATCH v2 1/4] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-09-17  8:53 ` [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus Wang Dongsheng
2018-09-17  8:53   ` Wang Dongsheng
2018-09-17 14:50   ` Andrew Lunn
2018-09-17 16:47     ` Wang, Dongsheng [this message]
2018-09-17 16:54       ` Florian Fainelli
2018-09-18  8:47         ` Wang, Dongsheng
2018-09-18 12:35           ` Andrew Lunn
2018-09-19  9:19             ` Wang, Dongsheng
2018-09-19 12:25               ` Andrew Lunn
2018-09-19 14:05                 ` Timur Tabi
2018-09-19 15:20                   ` Andrew Lunn
2018-09-20 13:42                     ` Timur Tabi
2018-10-25 10:08                       ` [PATCH v3 0/2] net: qcom/emac: add shared mdio bus support Wang Dongsheng
2018-10-25 10:08                         ` [PATCH v3 1/2] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-10-25 10:09                         ` [PATCH v3 2/2] net: qcom/emac: add phy-handle support for ACPI Wang Dongsheng
2018-10-25 19:24                           ` Andrew Lunn
2018-10-26  2:18                             ` Wang, Dongsheng
2018-10-26  2:37                               ` Timur Tabi
2018-10-26  3:04                                 ` Wang, Dongsheng
2018-10-26 13:13                                   ` Andrew Lunn
2018-10-29  2:39                                     ` Wang, Dongsheng
2018-10-29 12:40                                       ` Andrew Lunn
2018-10-30  5:15                                         ` Wang, Dongsheng
2018-11-08  7:21                                         ` [RFC PATCH 0/3] acpi: Add acpi mdio support code Wang Dongsheng
2018-11-08  7:21                                           ` Wang Dongsheng
2018-11-08  7:22                                           ` [RFC PATCH 1/3] " Wang Dongsheng
2018-11-08  7:22                                             ` Wang Dongsheng
2018-11-08  7:45                                             ` Rafael J. Wysocki
2018-11-08  7:55                                               ` Wang, Dongsheng
2018-11-08  8:01                                                 ` Rafael J. Wysocki
2018-11-12 17:25                                             ` Andrew Lunn
2018-11-08  7:22                                           ` [RFC PATCH 2/3] net: qcom/emac: split phy_config to mdio bus create and get phy device Wang Dongsheng
2018-11-08  7:22                                             ` Wang Dongsheng
2018-11-08  7:22                                           ` [RFC PATCH 3/3] net: qcom/emac: add phy-handle support for ACPI Wang Dongsheng
2018-11-08  7:22                                             ` Wang Dongsheng
2018-11-08 23:23                                           ` [RFC PATCH 0/3] acpi: Add acpi mdio support code Andrew Lunn
2018-11-09  0:37                                             ` Timur Tabi
2018-11-10  9:10                                             ` Wang, Dongsheng
2018-11-12 17:20                                               ` Andrew Lunn
2018-11-13  7:36                                                 ` Wang, Dongsheng
2018-11-12  2:52                                             ` Wang, Dongsheng
2018-09-20  1:33                   ` [PATCH v2 2/4] dt-bindings: net: qcom: Add binding for shared mdio bus Wang, Dongsheng

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=b01bb33b30164088a9cae59a825acdc9@HXTBJIDCEMVIW02.hxtcorp.net \
    --to=dongsheng.wang@hxt-semitech.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=timur@kernel.org \
    --cc=yu.zheng@hxt-semitech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.