[{"id":1776212,"web_url":"http://patchwork.ozlabs.org/comment/1776212/","msgid":"<20170927101622.v7odmreccwh7ldg2@flea>","list_archive_url":null,"date":"2017-09-27T10:16:22","subject":"Re: [PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio\n\tswitch used by sun8i-h3-emac","submitter":{"id":12916,"url":"http://patchwork.ozlabs.org/api/people/12916/","name":"Maxime Ripard","email":"maxime.ripard@free-electrons.com"},"content":"On Wed, Sep 27, 2017 at 07:34:09AM +0000, Corentin Labbe wrote:\n> Since dwmac-sun8i could use either an integrated PHY or an external PHY\n> (which could be at same MDIO address), we need to represent this selection\n> by a MDIO switch.\n> \n> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>\n> ---\n>  arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++------\n>  1 file changed, 25 insertions(+), 6 deletions(-)\n> \n> diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> index 3b7d953429a6..a8e9b8f378ba 100644\n> --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> @@ -422,14 +422,33 @@\n>  \t\t\t#size-cells = <0>;\n>  \t\t\tstatus = \"disabled\";\n>  \n> -\t\t\tmdio: mdio {\n> +\t\t\tmdio0: mdio {\n>  \t\t\t\t#address-cells = <1>;\n>  \t\t\t\t#size-cells = <0>;\n> -\t\t\t\tint_mii_phy: ethernet-phy@1 {\n> -\t\t\t\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n> -\t\t\t\t\treg = <1>;\n> -\t\t\t\t\tclocks = <&ccu CLK_BUS_EPHY>;\n> -\t\t\t\t\tresets = <&ccu RST_BUS_EPHY>;\n> +\t\t\t\tcompatible = \"snps,dwmac-mdio\";\n> +\n> +\t\t\t\tmdio-mux {\n> +\t\t\t\t\tcompatible = \"mdio-mux\";\n> +\t\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t\t#size-cells = <0>;\n\nNewline\n\n> +\t\t\t\t\t/* Only one MDIO is usable at the time */\n> +\t\t\t\t\tinternal_mdio: mdio@1 {\n> +\t\t\t\t\t\treg = <1>;\n> +\t\t\t\t\t\t#address-cells = <1>;\n> +\t\t\t\t\t\t#size-cells = <0>;\n\nNewline\n\n> +\t\t\t\t\t\tint_mii_phy: ethernet-phy@1 {\n> +\t\t\t\t\t\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n> +\t\t\t\t\t\t\treg = <1>;\n> +\t\t\t\t\t\t\tclocks = <&ccu CLK_BUS_EPHY>;\n> +\t\t\t\t\t\t\tresets = <&ccu RST_BUS_EPHY>;\n> +\t\t\t\t\t\t\tphy-is-integrated;\n> +\t\t\t\t\t\t};\n> +\t\t\t\t\t};\n\nNewline\n\n> +\t\t\t\t\tmdio: mdio@2 {\n\nThis is quite confusing. Why not call the label external_mdio?\n\nThanks","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2DJN6Cbwz9tXC\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 20:16:52 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752531AbdI0KQf (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 27 Sep 2017 06:16:35 -0400","from mail.free-electrons.com ([62.4.15.54]:58132 \"EHLO\n\tmail.free-electrons.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752083AbdI0KQe (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Wed, 27 Sep 2017 06:16:34 -0400","by mail.free-electrons.com (Postfix, from userid 110)\n\tid 322C220801; Wed, 27 Sep 2017 12:16:32 +0200 (CEST)","from localhost (unknown [195.81.232.10])\n\tby mail.free-electrons.com (Postfix) with ESMTPSA id 0D0482068F;\n\tWed, 27 Sep 2017 12:16:22 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on\n\tmail.free-electrons.com","X-Spam-Level":"","X-Spam-Status":"No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT,\n\tURIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0","Date":"Wed, 27 Sep 2017 12:16:22 +0200","From":"Maxime Ripard <maxime.ripard@free-electrons.com>","To":"Corentin Labbe <clabbe.montjoie@gmail.com>","Cc":"robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org,\n\tlinux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, andrew@lunn.ch, f.fainelli@gmail.com,\n\tfrowand.list@gmail.com, netdev@vger.kernel.org,\n\tdevicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com","Subject":"Re: [PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio\n\tswitch used by sun8i-h3-emac","Message-ID":"<20170927101622.v7odmreccwh7ldg2@flea>","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-7-clabbe.montjoie@gmail.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha1;\n\tprotocol=\"application/pgp-signature\"; boundary=\"cn4zez4ijobb7pzg\"","Content-Disposition":"inline","In-Reply-To":"<20170927073414.17361-7-clabbe.montjoie@gmail.com>","User-Agent":"NeoMutt/20170914 (1.9.0)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1776371,"web_url":"http://patchwork.ozlabs.org/comment/1776371/","msgid":"<20170927134709.GA14370@Red>","list_archive_url":null,"date":"2017-09-27T13:47:09","subject":"Re: [PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio\n\tswitch used by sun8i-h3-emac","submitter":{"id":64152,"url":"http://patchwork.ozlabs.org/api/people/64152/","name":"Corentin Labbe","email":"clabbe.montjoie@gmail.com"},"content":"On Wed, Sep 27, 2017 at 12:16:22PM +0200, Maxime Ripard wrote:\n> On Wed, Sep 27, 2017 at 07:34:09AM +0000, Corentin Labbe wrote:\n> > Since dwmac-sun8i could use either an integrated PHY or an external PHY\n> > (which could be at same MDIO address), we need to represent this selection\n> > by a MDIO switch.\n> > \n> > Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>\n> > ---\n> >  arch/arm/boot/dts/sunxi-h3-h5.dtsi | 31 +++++++++++++++++++++++++------\n> >  1 file changed, 25 insertions(+), 6 deletions(-)\n> > \n> > diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> > index 3b7d953429a6..a8e9b8f378ba 100644\n> > --- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> > +++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi\n> > @@ -422,14 +422,33 @@\n> >  \t\t\t#size-cells = <0>;\n> >  \t\t\tstatus = \"disabled\";\n> >  \n> > -\t\t\tmdio: mdio {\n> > +\t\t\tmdio0: mdio {\n> >  \t\t\t\t#address-cells = <1>;\n> >  \t\t\t\t#size-cells = <0>;\n> > -\t\t\t\tint_mii_phy: ethernet-phy@1 {\n> > -\t\t\t\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n> > -\t\t\t\t\treg = <1>;\n> > -\t\t\t\t\tclocks = <&ccu CLK_BUS_EPHY>;\n> > -\t\t\t\t\tresets = <&ccu RST_BUS_EPHY>;\n> > +\t\t\t\tcompatible = \"snps,dwmac-mdio\";\n> > +\n> > +\t\t\t\tmdio-mux {\n> > +\t\t\t\t\tcompatible = \"mdio-mux\";\n> > +\t\t\t\t\t#address-cells = <1>;\n> > +\t\t\t\t\t#size-cells = <0>;\n> \n> Newline\n> \n> > +\t\t\t\t\t/* Only one MDIO is usable at the time */\n> > +\t\t\t\t\tinternal_mdio: mdio@1 {\n> > +\t\t\t\t\t\treg = <1>;\n> > +\t\t\t\t\t\t#address-cells = <1>;\n> > +\t\t\t\t\t\t#size-cells = <0>;\n> \n> Newline\n> \n> > +\t\t\t\t\t\tint_mii_phy: ethernet-phy@1 {\n> > +\t\t\t\t\t\t\tcompatible = \"ethernet-phy-ieee802.3-c22\";\n> > +\t\t\t\t\t\t\treg = <1>;\n> > +\t\t\t\t\t\t\tclocks = <&ccu CLK_BUS_EPHY>;\n> > +\t\t\t\t\t\t\tresets = <&ccu RST_BUS_EPHY>;\n> > +\t\t\t\t\t\t\tphy-is-integrated;\n> > +\t\t\t\t\t\t};\n> > +\t\t\t\t\t};\n> \n> Newline\n> \n> > +\t\t\t\t\tmdio: mdio@2 {\n> \n> This is quite confusing. Why not call the label external_mdio?\n> \n\nI will do it. (at origin I was not changing it for limiting changes on board with external PHY, but now all DT are reverted, it will be easy)\n\nRegards\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"VzNUWDo9\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2K0y4q0Tz9tXw\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 23:48:50 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753097AbdI0NrV (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 27 Sep 2017 09:47:21 -0400","from mail-wr0-f194.google.com ([209.85.128.194]:36479 \"EHLO\n\tmail-wr0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753072AbdI0NrS (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Wed, 27 Sep 2017 09:47:18 -0400","by mail-wr0-f194.google.com with SMTP id k10so1744444wrk.3;\n\tWed, 27 Sep 2017 06:47:18 -0700 (PDT)","from Red ([2a01:cb1d:16e:1300:2e56:dcff:fed2:c6d6])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb55sm8099879wrb.11.2017.09.27.06.47.16\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 27 Sep 2017 06:47:16 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=3DQ1rD4LElWexKKKueQSd/4ThPr00I+qZ3ENPlxGpKo=;\n\tb=VzNUWDo9PiTmoemJe7MVqz9/NuZckUXOaa32CltC5lGXvxm4IBBSQvgQiwwR9c0tjs\n\txmQmy+rT4Q1KJZJojt4qTeHsSt+JGWdj4fgoXxzYSiUQj99Nx/wtKGTXSMoC0p1xfRz6\n\tCPwOBl9k543tfq8xqwsXYXEa+QtLoZOP96IcbmcDmv9svDcFmr0buOGRPwRNh9a7/xmE\n\tQy6ENFy6d7uJjr14YPrq7kbfusfabY12JE4k2r96LLfduNcTvfaTrdu7E0OkJcqJoT7k\n\tMv2NFA3H24vIct6WM/d/v8PakE7pw9djbcpOp+v7lHcSYbTvIowqKbpSqiUm2rH8PiNc\n\tONLw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=3DQ1rD4LElWexKKKueQSd/4ThPr00I+qZ3ENPlxGpKo=;\n\tb=FmXcPCLEFd2sqzwW9iOPeqg5ENRJjFDyoW8869g0fxMB1N2Ii/CljOS2ADt89/jNLA\n\tsHXXuNkWYFotQtQU7wHWwV9B7vgUipv1biR1lUaVF8AzX321OOYKn+pRw4yoaNr9lnyS\n\t46Tl1GlbjIbB/4PHQmjtwnbXhYAWVRY6MT1M9Fi7kOyRQ/DsJJh2PWkN1txCw1mqPsTp\n\t8rSWtaveaSowgwyW3FSPe6Zwi83eedkMQn4WZyTH5Y6oi2IoaBhgLCJGHzikiqKq5/CO\n\tYRS9shyk4N+akDNRcU8pCk4C3g6mFed9Wnb9f/aVsNHYqmoOOd97qOSKKow9MDk5uAOS\n\t24aQ==","X-Gm-Message-State":"AHPjjUhrR9l6JV48JMHdKIgEvrfCkT3OP7BKtvqJwiFcS+6itm4w/TwA\n\tu62KnjGFLX6EvwYc+ue0Gkc=","X-Google-Smtp-Source":"AOwi7QA+0AiYZ4sMuwU7xA943iSguT1uccmPh1YTfNjb/U7O3ewKUCtc0wcYd3VciZL2SUNz697BCQ==","X-Received":"by 10.223.155.157 with SMTP id d29mr1186535wrc.24.1506520037365; \n\tWed, 27 Sep 2017 06:47:17 -0700 (PDT)","Date":"Wed, 27 Sep 2017 15:47:09 +0200","From":"Corentin Labbe <clabbe.montjoie@gmail.com>","To":"Maxime Ripard <maxime.ripard@free-electrons.com>","Cc":"robh+dt@kernel.org, mark.rutland@arm.com, wens@csie.org,\n\tlinux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, andrew@lunn.ch, f.fainelli@gmail.com,\n\tfrowand.list@gmail.com, netdev@vger.kernel.org,\n\tdevicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com","Subject":"Re: [PATCH v6 06/11] ARM: dts: sunxi: h3/h5: represent the mdio\n\tswitch used by sun8i-h3-emac","Message-ID":"<20170927134709.GA14370@Red>","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-7-clabbe.montjoie@gmail.com>\n\t<20170927101622.v7odmreccwh7ldg2@flea>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170927101622.v7odmreccwh7ldg2@flea>","User-Agent":"Mutt/1.7.2 (2016-11-26)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1776385,"web_url":"http://patchwork.ozlabs.org/comment/1776385/","msgid":"<20170927141213.GF13516@lunn.ch>","list_archive_url":null,"date":"2017-09-27T14:12:13","subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"On Wed, Sep 27, 2017 at 09:34:14AM +0200, Corentin Labbe wrote:\n> Each child node of an MDIO node is scanned as a PHY when calling\n> of_mdiobus_register() givint the following result:\n> [   18.175379] mdio_bus stmmac-0: /soc/ethernet@1c30000/mdio/mdio-mux has invalid PHY address\n> [   18.175408] mdio_bus stmmac-0: scan phy mdio-mux at address 0\n> [   18.175450] mdio_bus stmmac-0: scan phy mdio-mux at address 1\n> [...]\n> [   18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30\n> [   18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31\n> \n> Since mdio-mux nodes are not PHY, this patch a way to to not scan\n> them.\n\nHi Corentin\n\nI still don't like this, but ...\n\n> \n> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>\n> ---\n>  drivers/of/of_mdio.c | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n> \n> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c\n> index d94dd8b77abd..d90ddb0d90f2 100644\n> --- a/drivers/of/of_mdio.c\n> +++ b/drivers/of/of_mdio.c\n> @@ -190,6 +190,10 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)\n>  \tstruct device_node *child;\n>  \tbool scanphys = false;\n>  \tint addr, rc;\n> +\tstatic const struct of_device_id do_not_scan[] = {\n> +\t\t{ .compatible = \"mdio-mux\" },\n> +\t\t{}\n> +\t};\n\nPlease rename this to some less generic. What i don't want is other\ncompatible strings added here. We want to make the exception for\nmuxes, but nothing else. So something like compatible_muxes?\n\n       Andrew\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2KX80J9Hz9t3m\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 00:12:24 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753099AbdI0OMW (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 27 Sep 2017 10:12:22 -0400","from vps0.lunn.ch ([185.16.172.187]:58178 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1752406AbdI0OMV (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tWed, 27 Sep 2017 10:12:21 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1dxD4P-0002h0-Ld; Wed, 27 Sep 2017 16:12:13 +0200"],"Date":"Wed, 27 Sep 2017 16:12:13 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Corentin Labbe <clabbe.montjoie@gmail.com>","Cc":"robh+dt@kernel.org, mark.rutland@arm.com,\n\tmaxime.ripard@free-electrons.com, wens@csie.org,\n\tlinux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, f.fainelli@gmail.com,\n\tfrowand.list@gmail.com, netdev@vger.kernel.org,\n\tdevicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com","Subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","Message-ID":"<20170927141213.GF13516@lunn.ch>","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-12-clabbe.montjoie@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170927073414.17361-12-clabbe.montjoie@gmail.com>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1776757,"web_url":"http://patchwork.ozlabs.org/comment/1776757/","msgid":"<c8697b60-294f-7cc1-8425-aa5b837fcca0@gmail.com>","list_archive_url":null,"date":"2017-09-28T04:50:46","subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","submitter":{"id":2800,"url":"http://patchwork.ozlabs.org/api/people/2800/","name":"Florian Fainelli","email":"f.fainelli@gmail.com"},"content":"On 09/27/2017 07:12 AM, Andrew Lunn wrote:\n> On Wed, Sep 27, 2017 at 09:34:14AM +0200, Corentin Labbe wrote:\n>> Each child node of an MDIO node is scanned as a PHY when calling\n>> of_mdiobus_register() givint the following result:\n>> [   18.175379] mdio_bus stmmac-0: /soc/ethernet@1c30000/mdio/mdio-mux has invalid PHY address\n>> [   18.175408] mdio_bus stmmac-0: scan phy mdio-mux at address 0\n>> [   18.175450] mdio_bus stmmac-0: scan phy mdio-mux at address 1\n>> [...]\n>> [   18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30\n>> [   18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31\n>>\n>> Since mdio-mux nodes are not PHY, this patch a way to to not scan\n>> them.\n> \n> Hi Corentin\n> \n> I still don't like this, but ...\n\nMe neither, even more so as I don't understand the reasoning behind\nputting the mux as a child node of the MDIO bus controller in the first\nplace.\n\nAlso, you need to re-order patches such that this patch comes before the\nDTS changes.\n\n> \n>>\n>> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>\n>> ---\n>>  drivers/of/of_mdio.c | 10 ++++++++++\n>>  1 file changed, 10 insertions(+)\n>>\n>> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c\n>> index d94dd8b77abd..d90ddb0d90f2 100644\n>> --- a/drivers/of/of_mdio.c\n>> +++ b/drivers/of/of_mdio.c\n>> @@ -190,6 +190,10 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)\n>>  \tstruct device_node *child;\n>>  \tbool scanphys = false;\n>>  \tint addr, rc;\n>> +\tstatic const struct of_device_id do_not_scan[] = {\n>> +\t\t{ .compatible = \"mdio-mux\" },\n>> +\t\t{}\n>> +\t};\n> \n> Please rename this to some less generic. What i don't want is other\n> compatible strings added here. We want to make the exception for\n> muxes, but nothing else. So something like compatible_muxes?\n> \n>        Andrew\n>","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mXVolsHO\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y2j1p16qBz9t5C\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 28 Sep 2017 14:50:54 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752178AbdI1Euw (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 28 Sep 2017 00:50:52 -0400","from mail-oi0-f65.google.com ([209.85.218.65]:34935 \"EHLO\n\tmail-oi0-f65.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751746AbdI1Euv (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 28 Sep 2017 00:50:51 -0400","by mail-oi0-f65.google.com with SMTP id r20so412863oie.2;\n\tWed, 27 Sep 2017 21:50:51 -0700 (PDT)","from ?IPv6:2001:470:d:73f:356d:fcbf:65d5:3e98?\n\t([2001:470:d:73f:356d:fcbf:65d5:3e98])\n\tby smtp.gmail.com with ESMTPSA id\n\th124sm317723oib.34.2017.09.27.21.50.47\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 27 Sep 2017 21:50:49 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=/s1OQsH341N0B2sWiC2DAJ8B997KJqeklBs5s/S7lm8=;\n\tb=mXVolsHOGURnS2Q53Wzbkw0N5R/38UJdyKpNpdQ4zqst6EKtZdv6TlnVWfIaOIjrRQ\n\tSWU1MatMrqIlFDxBnD4N7P2sl+ly6fPwhKMmF40WOfBVaPxEnO1lSdAySRVdXvBAaSCC\n\tgbUMnwFhCPXz33JL2EZ5sQ3lpv2IHmLbaz/cdnsaIaYdo/CijDIfMPwA7fbIHNJGD4dA\n\tAF1DS3xnDStcTDJRO5Rl+x2j3A9UPoVgF4bdr4jo8ME9Ge9I7vTYQI4YhpVzh5s1WkRR\n\tTh//1fYQ2UjmMhaPJQtYhvPrmUFylx9CHawj1SXnP6aC4LqdSN58FknTuXeUWfm9DEtU\n\tBVxQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=/s1OQsH341N0B2sWiC2DAJ8B997KJqeklBs5s/S7lm8=;\n\tb=ECWeUZdQoDO+ygu6ivLfwjDUosu6ughnSe/TnrYlYl1GCHCzJDD2DlYE4ms4AgNUPa\n\tY4e6MXcIPLDnHvf2lj+7P84rEoscsSBFevBAZFUq2e7fCVULQdHVnqp5KfpvLneOmsiZ\n\tPhqUON5i+0Li0yJVAlNnDc+Ds9mhkutcidzKptRazTgt1WLEbGwkM5SK+91k/ntGYojT\n\tIKIaudsyS4J02GW+tR8V824BhFz28lFD9/pVd+/BD7owylvqT1ClyKAXzj2mj3s/fT32\n\tTtBGLQlgcQylqgshjbRjKPmKt1HNq+xmAAY4MaoNkuUsPbkgxTcJCfoqpS59TRGPurPM\n\tQBSw==","X-Gm-Message-State":"AMCzsaWuL8TcNwPXaFthm08FJ/PsbDiXdgHMDMqrUo2ON8yN6MnGJkjW\n\t5S1pnpZRUbL4YKfOTe74lpg=","X-Google-Smtp-Source":"AOwi7QByAUyb+AM1qJkqJJDzHAmOSvB6cnmXay7DcRbRjOm+BuiEwhuVu1W/slPhlDrzRPSa3Knk5g==","X-Received":"by 10.157.29.239 with SMTP id w44mr295451otw.479.1506574250481; \n\tWed, 27 Sep 2017 21:50:50 -0700 (PDT)","Subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","To":"Andrew Lunn <andrew@lunn.ch>, Corentin Labbe <clabbe.montjoie@gmail.com>","Cc":"robh+dt@kernel.org, mark.rutland@arm.com,\n\tmaxime.ripard@free-electrons.com, wens@csie.org,\n\tlinux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, frowand.list@gmail.com,\n\tnetdev@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-sunxi@googlegroups.com","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-12-clabbe.montjoie@gmail.com>\n\t<20170927141213.GF13516@lunn.ch>","From":"Florian Fainelli <f.fainelli@gmail.com>","Message-ID":"<c8697b60-294f-7cc1-8425-aa5b837fcca0@gmail.com>","Date":"Wed, 27 Sep 2017 21:50:46 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170927141213.GF13516@lunn.ch>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1781073,"web_url":"http://patchwork.ozlabs.org/comment/1781073/","msgid":"<20171005220927.7rabn3ftvow253xj@rob-hp-laptop>","list_archive_url":null,"date":"2017-10-05T22:09:27","subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Wed, Sep 27, 2017 at 09:50:46PM -0700, Florian Fainelli wrote:\n> \n> \n> On 09/27/2017 07:12 AM, Andrew Lunn wrote:\n> > On Wed, Sep 27, 2017 at 09:34:14AM +0200, Corentin Labbe wrote:\n> >> Each child node of an MDIO node is scanned as a PHY when calling\n> >> of_mdiobus_register() givint the following result:\n> >> [   18.175379] mdio_bus stmmac-0: /soc/ethernet@1c30000/mdio/mdio-mux has invalid PHY address\n> >> [   18.175408] mdio_bus stmmac-0: scan phy mdio-mux at address 0\n> >> [   18.175450] mdio_bus stmmac-0: scan phy mdio-mux at address 1\n> >> [...]\n> >> [   18.176420] mdio_bus stmmac-0: scan phy mdio-mux at address 30\n> >> [   18.176452] mdio_bus stmmac-0: scan phy mdio-mux at address 31\n> >>\n> >> Since mdio-mux nodes are not PHY, this patch a way to to not scan\n> >> them.\n> > \n> > Hi Corentin\n> > \n> > I still don't like this, but ...\n> \n> Me neither, even more so as I don't understand the reasoning behind\n> putting the mux as a child node of the MDIO bus controller in the first\n> place.\n\nIf no one agrees with me, then you shouldn't just accept my answers. I'm \nnot always right.\n\nLooking at this some more, why can't mdio-mux-mmio be used? Then there \nis nothing to review or discuss. If you want to extend that then make it \nclear this is just extending/inheriting already defined bindings.\n\nThat being said, if we were starting over I would probably do mux \ndesigns differently with DT hierarchy reflecting the mux hierarchy, but \nthat ship has sailed.\n\nRob\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y7Rkz44KVz9t5Y\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 09:09:31 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751415AbdJEWJa (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 5 Oct 2017 18:09:30 -0400","from mail-oi0-f48.google.com ([209.85.218.48]:47365 \"EHLO\n\tmail-oi0-f48.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751369AbdJEWJ3 (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 5 Oct 2017 18:09:29 -0400","by mail-oi0-f48.google.com with SMTP id p187so26952710oif.4;\n\tThu, 05 Oct 2017 15:09:28 -0700 (PDT)","from localhost (216-188-254-6.dyn.grandenetworks.net.\n\t[216.188.254.6]) by smtp.gmail.com with ESMTPSA id\n\th124sm33184oib.34.2017.10.05.15.09.27\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 05 Oct 2017 15:09:27 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=1RCN6xC8xFRao7A8uSNOdvC+lX7CucwQZP5OaoiOGIM=;\n\tb=WWFN4biWc+BHB6h1Ii1/UDAl0Z1NzFO8UzRpMXX0Ii+ohrtpO5Qgg/5zZGJ+QvumCb\n\tf+kPleUFxdiqlxq1ojg414lDT93mqXYd9F3/6S68cdoUnCM+z4rD7b2z8rKhXMq3Wyg7\n\teUCYidmGXYYADC3Dt7YOKkV9zvVE4CMk7TiNXvfiijo/XBIudY3kycyRg5VDt9VNIx/I\n\twfUUFwqgYHT9vtoSDbTSeyfgYITtZ2ssjkQdlhk5pnAz9LYnSKgrGUQmyVQWerSgd+DS\n\t1H2O1XcZi3gsU7GFWKjFil94Xs6A9fS64RODTq2+zIsYOTkG6sgKNcsLKHDvI/G3r92a\n\tI0pw==","X-Gm-Message-State":"AMCzsaV42Nd2LrN+m/JRb3uYanZ6km0KWA+ltJnUbLzTdK4CoxTPyokU\n\tkQiHeISlKQ0daI3/7bZamw==","X-Google-Smtp-Source":"AOwi7QDPUahKbsVHGeHRlwyw1j1WAAJqRFcgA0ij/YHvnGmGEJhVF0hCkigHa8le0iWUjpO5uNyVPw==","X-Received":"by 10.157.46.207 with SMTP id w73mr78092ota.227.1507241368458;\n\tThu, 05 Oct 2017 15:09:28 -0700 (PDT)","Date":"Thu, 5 Oct 2017 17:09:27 -0500","From":"Rob Herring <robh@kernel.org>","To":"Florian Fainelli <f.fainelli@gmail.com>","Cc":"Andrew Lunn <andrew@lunn.ch>, Corentin Labbe <clabbe.montjoie@gmail.com>,\n\tmark.rutland@arm.com, maxime.ripard@free-electrons.com,\n\twens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, frowand.list@gmail.com,\n\tnetdev@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-sunxi@googlegroups.com","Subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","Message-ID":"<20171005220927.7rabn3ftvow253xj@rob-hp-laptop>","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-12-clabbe.montjoie@gmail.com>\n\t<20170927141213.GF13516@lunn.ch>\n\t<c8697b60-294f-7cc1-8425-aa5b837fcca0@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<c8697b60-294f-7cc1-8425-aa5b837fcca0@gmail.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1781088,"web_url":"http://patchwork.ozlabs.org/comment/1781088/","msgid":"<20171005222159.GO13247@lunn.ch>","list_archive_url":null,"date":"2017-10-05T22:21:59","subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","submitter":{"id":13608,"url":"http://patchwork.ozlabs.org/api/people/13608/","name":"Andrew Lunn","email":"andrew@lunn.ch"},"content":"> Looking at this some more, why can't mdio-mux-mmio be used?\n\nHi Rob\n\nThat was my first thought. And then i dug into the details. The mux is\nmore than just a couple of bits in an address space. Clocks needs to\nbe enabled/disabled, and the MAC needs a reset, when the mux changes.\nSo the mux needs intimate knowledge of MAC.\n\n   Andrew\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y7S1m5nfLz9t63\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri,  6 Oct 2017 09:22:20 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751454AbdJEWWT (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 5 Oct 2017 18:22:19 -0400","from vps0.lunn.ch ([185.16.172.187]:42140 \"EHLO vps0.lunn.ch\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751395AbdJEWWS (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tThu, 5 Oct 2017 18:22:18 -0400","from andrew by vps0.lunn.ch with local (Exim 4.84_2)\n\t(envelope-from <andrew@lunn.ch>)\n\tid 1e0EWl-0004WR-Pf; Fri, 06 Oct 2017 00:21:59 +0200"],"Date":"Fri, 6 Oct 2017 00:21:59 +0200","From":"Andrew Lunn <andrew@lunn.ch>","To":"Rob Herring <robh@kernel.org>","Cc":"Florian Fainelli <f.fainelli@gmail.com>,\n\tCorentin Labbe <clabbe.montjoie@gmail.com>,\n\tmark.rutland@arm.com, maxime.ripard@free-electrons.com,\n\twens@csie.org, linux@armlinux.org.uk, catalin.marinas@arm.com,\n\twill.deacon@arm.com, peppe.cavallaro@st.com,\n\talexandre.torgue@st.com, frowand.list@gmail.com,\n\tnetdev@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-sunxi@googlegroups.com","Subject":"Re: [PATCH v6 11/11] of: mdio: Prevent of_mdiobus_register from\n\tscanning mdio-mux nodes","Message-ID":"<20171005222159.GO13247@lunn.ch>","References":"<20170927073414.17361-1-clabbe.montjoie@gmail.com>\n\t<20170927073414.17361-12-clabbe.montjoie@gmail.com>\n\t<20170927141213.GF13516@lunn.ch>\n\t<c8697b60-294f-7cc1-8425-aa5b837fcca0@gmail.com>\n\t<20171005220927.7rabn3ftvow253xj@rob-hp-laptop>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20171005220927.7rabn3ftvow253xj@rob-hp-laptop>","User-Agent":"Mutt/1.5.23 (2014-03-12)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]