From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFD5FC43381 for ; Mon, 11 Mar 2019 12:27:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A26B720657 for ; Mon, 11 Mar 2019 12:27:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Qoxu4sUc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A26B720657 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZT3zFIHZHV5iLBsKen9Jso6JpOAEuambDthceNI3g0c=; b=Qoxu4sUcKFAoVZ 9Kp+vUGjuejPwhisaL8Rex6rI9uSRQJzHI/qWZHri/yDyP+67nVPprW5gvARKaDmPPz5n19SZhowe P+h+D3zXHBREjxuPpKDEoqM9ZLLfEM6rA+D6yxRNj20y4wWcSlZdcyhb1BBDNWC6U7c14r8s3kAoL J1DdthYnnopRjznY5vENCoZt2m41wB6eDOZsJcc3Ulf9oWknxVOSwHAPs15iB/542LE5k53IQYwDa /YSy4PdlvkOw2NtYvV36ygmvqQ0n3npxlGclocoXVKe/veJKgBgrtx8v4g0gogeKy+kBgWkypWNnK fkIQha/4OFOfpzfZNw1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3K1X-0004Y6-FV; Mon, 11 Mar 2019 12:27:19 +0000 Received: from mail-ot1-f68.google.com ([209.85.210.68]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3K1U-0004Xl-9W for linux-arm-kernel@lists.infradead.org; Mon, 11 Mar 2019 12:27:17 +0000 Received: by mail-ot1-f68.google.com with SMTP id v20so3729349otk.7 for ; Mon, 11 Mar 2019 05:27:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MivUfwAF8id8U4PNcmDQ+n5SKWGtEZQQuDAkhjyNSU4=; b=bgCrXildSgw1ocJ1vlDYjWVSxR4S7rBERR74v83g9mhkbnzhNI0bjNgxsa8oUwH+QF K4Er71oiI8QURf4f0lkzGvNJE2fjDbH2StW74ohE9SZ322wlIjBS0m4ebv/Z4MkUMaK6 Yb64QKSbez0hbKYsxGpUFthJcYEATHsciITbhjPScMKtOwSQYIQ0USELNwXD4jTix216 hlwd31yl33fUZ4vLhJOoLKQ/yDqEToImH9fap2oVnaJZZ2ANS54pWLpIx6XfhlSkz2n+ JjQBsinSi1UTvQdOtsI7qTHXMDpdEo6x83vva5U4Scro7YVrkvDNN9YRtNgQ8BCx8Qwa llYw== X-Gm-Message-State: APjAAAXLTqYfl4r6SebcEX40jxeqMstLnSBo1QjY2PActNZmTbPRO80T mqan6+lCFtjFvIvqAjmtQe/Y9A5UNRXxX2YAvl0= X-Google-Smtp-Source: APXvYqwviYo5FaxZ68ViyFe0INvhdNNQf2ibgq5R6z9EwF+fU2Gp2TaNZ+g2MORWs+dMDUsZphcN3gPUaopiMHiQnW4= X-Received: by 2002:a9d:58c6:: with SMTP id s6mr20790606oth.122.1552307235001; Mon, 11 Mar 2019 05:27:15 -0700 (PDT) MIME-Version: 1.0 References: <958bb823-3dc8-607f-3c38-3d902acb85a8@gmail.com> <20190219172515.GC13075@lunn.ch> <9cb2f7a8-a8cf-ef80-d260-cc67c072b5c5@xilinx.com> <8bb813fb-102b-00c9-fb6f-a3e928965051@xilinx.com> <20190309161912.GD9000@lunn.ch> In-Reply-To: From: Harini Katakam Date: Mon, 11 Mar 2019 17:57:03 +0530 Message-ID: Subject: Re: [PATCH RESEND net] net: phy: xgmiitorgmii: Support generic PHY status read To: Andrew Lunn X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190311_052716_352910_7A130096 X-CRM114-Status: GOOD ( 19.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , netdev@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Paul Kocialkowski , Thomas Petazzoni , "David S . Miller" , linux-arm-kernel@lists.infradead.org, Heiner Kallweit Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Andrew, On Mon, Mar 11, 2019 at 11:34 AM Harini Katakam wrote: > > Hi Andrew, > On Sat, Mar 9, 2019 at 9:53 PM Andrew Lunn wrote: > > > > > Related to this, I have a query on how the DT node for gmii2rgmii should look. > > > One of the users of gmii2rgmii is Cadence macb driver. In Xilinx tree, we use > > > this piece of code to register this mdiobus: > > > + mdio_np = of_get_child_by_name(np, "mdio"); > > > + if (mdio_np) { > > > + of_node_put(mdio_np); > > > + err = of_mdiobus_register(bp->mii_bus, mdio_np); > > > + if (err) > > > + goto err_out_unregister_bus; > > > > > > And the DT node looks like this: > > > ethernet { > > > phy-mode = "gmii"; > > > phy-handle = <&extphy>; > > > > > > mdio { > > > extphy { > > > reg = ; > > > }; > > > gmii_to_rgmii{ > > > compatible = "xlnx,gmii-to-rgmii-1.0"; > > > phy-handle = <&extphy>; > > > reg = ; > > > }; > > > }; > > > }; > > > > Hi Harini > > > > You have this setup: > > > > MAC <==> GMII2RGMII <==> RGMII_PHY > > > > So you want the MAC phy-handle to point to the gmii_to_rgmii 'PHY'. > > > > Feel free to submit a patch extending > > Documentation/devicetree/bindings/net/xilinx_gmii2rgmii.txt to include > > a MAC node, etc. > > Thank you, will do the same. Thanks again for your input. So, I did some testing with this change. But the issue is that, if I point the phy-handle to gmi2rgmii, of_phy_connect will be called from the MAC and it will fail because gmii2rgmii is not a PHY driver and it does not have a standard PHY register set or ID. Which goes back to the discussion above whether this needs to changed in the IP. But right now, it is a bridge device on the MDIO bus and has no PHY functionality. Moreover, any MAC is capable of accessing the external PHY with no interference in the MDIO path (the gmii2rgmii bridge just acts like another device on a common bus). What Michal suggested below in uboot is that they register gmii2rgmii with a dummy PHY ID and then attach the external phy driver in its probe. I'm not sure if this will work in linux i.e. calling phy_connect_direct inside the gmii2rgmii probe. Regards, Harini _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel