Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3402813yba; Tue, 7 May 2019 00:09:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqytKqIKjfmq7DtRDcRu0jgSDMhqkaaLVflzblEWnAcnWMDVSFmgd6/gCYuwDfLO0F9tAesf X-Received: by 2002:a17:902:868b:: with SMTP id g11mr38096306plo.273.1557212988707; Tue, 07 May 2019 00:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557212988; cv=none; d=google.com; s=arc-20160816; b=DjFy69ZWNWHy58XGL3vylZxRTGz1ilxndYG692fcjm/ynf3zjU1bc4tYuY9QaxzuH4 Re22rt1yQfe6yuUnJFi3c+vhlUfsjeX5R/KaCF23YQc57vdyQvYiJqhPsHt8lPHFo4K5 ZBmg4LiTOWr4JEFWFAfysCQYiBDaDWXHO891OtI35GtwMyW1k6zjfuIU56sLVFGGNZTi QRZ55SLUFQeVGFHpC2raU7lTsOdgoLnziLsxojcC3P1wzTU1/azCYrY29k2fLs9k9SgU AbNCKfPVqH6ARI2Fa884VBdB8dQapicSlHX34aRdSuy2Tk9iQZnXrLnmoTJ7qiS4sL/e aNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date; bh=1OmvW3oLzNlB5xRWDxb45noObK9GQabLAZ0lXSrBE/s=; b=iET48lyJ6W7vT4Rz0Jad3urX5akEfTW++tSK8oyzwbdvUt8ErlhvFjPXLJJDr3PAU4 IRbVwEvCPe7OIKvz4pDeXP1hfpu6w/p1gVJZwTqxPYDCBQACMy2R9W7wsZMfL256lR9j vAluUH5ZVirMueOR389KqIAUcNxYmkQi0eiM12stY62LF1/lhhI6NLIn1Sej+HXpv1ks /3csAQSrJQlqX01vfyGABLGVdNThO5PC5NicQ/TiUmIzx2uj2Cppig2BulF+8HzWIZiR zXBFihn78PYDBbzQS9/BhFLuPP+2/pbzaxqBDJXogUqXt5GQZB1SzMqIc7JBGL4rpPZL HzFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si17953971pls.23.2019.05.07.00.09.32; Tue, 07 May 2019 00:09:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726999AbfEGHGt (ORCPT + 99 others); Tue, 7 May 2019 03:06:49 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:38203 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726297AbfEGHGt (ORCPT ); Tue, 7 May 2019 03:06:49 -0400 Received: from localhost (aaubervilliers-681-1-29-145.w90-88.abo.wanadoo.fr [90.88.149.145]) (Authenticated sender: maxime.ripard@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 1420C100012; Tue, 7 May 2019 07:06:41 +0000 (UTC) Date: Tue, 7 May 2019 09:06:41 +0200 From: Maxime Ripard To: Jagan Teki , Chen-Yu Tsai , Rob Herring , Mark Rutland , Michael Trimarchi , devicetree , linux-arm-kernel , linux-kernel , linux-amarula , linux-sunxi Subject: Re: [linux-sunxi] Re: [PATCH v2] arm64: allwinner: h6: orangepi-one-plus: Add Ethernet support Message-ID: <20190507070641.7whs4ckiqupaah35@flea> References: <20190503115928.27662-1-jagan@amarulasolutions.com> <20190503144651.ttqfha656dykqjzo@flea> <20190506133101.c3twwwydy5mez3db@core.my.home> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t252ai7obnvmcokm" Content-Disposition: inline In-Reply-To: <20190506133101.c3twwwydy5mez3db@core.my.home> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --t252ai7obnvmcokm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 06, 2019 at 03:31:01PM +0200, Ond=C5=99ej Jirman wrote: > > > > --- > > > > Changes for v2: > > > > - emac changes on top of https://patchwork.kernel.org/cover/1089952= 9/ > > > > series > > > > > > > > .../allwinner/sun50i-h6-orangepi-one-plus.dts | 8 ++++ > > > > .../dts/allwinner/sun50i-h6-orangepi.dtsi | 42 +++++++++++++++= ++++ > > > > 2 files changed, 50 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-p= lus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts > > > > index 12e17567ab56..9e8ed1053715 100644 > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts > > > > @@ -9,4 +9,12 @@ > > > > / { > > > > model =3D "OrangePi One Plus"; > > > > compatible =3D "xunlong,orangepi-one-plus", "allwinner,sun50i= -h6"; > > > > + > > > > + aliases { > > > > + ethernet0 =3D &emac; > > > > + }; > > > > +}; > > > > + > > > > +&emac { > > > > + status =3D "okay"; > > > > }; > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi = b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi > > > > index 62e27948a3fa..c48e24acaf8a 100644 > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi > > > > @@ -45,6 +45,48 @@ > > > > regulator-max-microvolt =3D <5000000>; > > > > regulator-always-on; > > > > }; > > > > + > > > > + /* > > > > + * The board uses 2.5V RGMII signalling. Power sequence to en= able > > > > + * the phy is to enable GMAC-2V5 and GMAC-3V (aldo2) power ra= ils > > > > + * at the same time and to wait 100ms. > > > > + */ > > > > + reg_gmac_2v5: gmac-2v5 { > > > > + compatible =3D "regulator-fixed"; > > > > + regulator-name =3D "gmac-2v5"; > > > > + regulator-min-microvolt =3D <2500000>; > > > > + regulator-max-microvolt =3D <2500000>; > > > > + startup-delay-us =3D <100000>; > > > > + enable-active-high; > > > > + gpio =3D <&pio 3 6 GPIO_ACTIVE_HIGH>; /* GMAC_EN: PD6= */ > > > > + > > > > + /* The real parent of gmac-2v5 is reg_vcc5v, but we n= eed to > > > > + * enable two regulators to power the phy. This is on= e way > > > > + * to achieve that. > > > > + */ > > > > + vin-supply =3D <®_aldo2>; /* VCC3V3-MAC: GMAC-3V */ > > > > + }; > > > > +}; > > > > + > > > > +&emac { > > > > + pinctrl-names =3D "default"; > > > > + pinctrl-0 =3D <&ext_rgmii_pins>; > > > > + phy-mode =3D "rgmii"; > > > > + phy-handle =3D <&ext_rgmii_phy>; > > > > + phy-supply =3D <®_gmac_2v5>; > > > > + allwinner,rx-delay-ps =3D <1500>; > > > > + allwinner,tx-delay-ps =3D <700>; > > > > +}; > > > > + > > > > +&mdio { > > > > + ext_rgmii_phy: ethernet-phy@1 { > > > > + compatible =3D "ethernet-phy-ieee802.3-c22"; > > > > + reg =3D <1>; > > > > + > > > > + reset-gpios =3D <&pio 3 14 GPIO_ACTIVE_LOW>; /* RGMII= -RESET: PD14 */ > > > > + reset-assert-us =3D <15000>; > > > > + reset-deassert-us =3D <40000>; > > > > + }; > > > > }; > > > > > > ... however, at no point in time you explain why you made that switch, > > > and while most of the definition of the EMAC nodes is in the DTSI, you > > > only enable it in one DTS. > > > > The dtsi is shared b/w 1+ and lite2 and 1+ has emac, so I enabled the > > status directly on dts and keeping the relevant nodes on dtsi just > > like SoC dtsi does. do I need to mention this in commit log? > > Lite 2 doesn't have reg_gmac_2v5 and it also doesn't have the external ph= y. > But with this patch, reg_gmac_2v5 will also show up in the Lite 2's final > DTB. > > Comapred to SoC dtsi, the SoC always has things that are in the dtsi, they > are just not enabled/used by the board, but they are present on the chip. > > So this comes down to what the meaning of board-level dtsi should be. I > doubt we want it to mean "a collection of stuff that may or may not be > present on the boards that depend on it". Agreed. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --t252ai7obnvmcokm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXNEugQAKCRDj7w1vZxhR xSqpAP9+c1gUKZN/ouCvKfloPe7AajE+A0yKbWtfWhHElWT14QEAzjJAuWb8Rv+a FfdAW6X7qq2yr9sNkluAa/DRkDrm+Q8= =30DV -----END PGP SIGNATURE----- --t252ai7obnvmcokm--