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=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 B0AC2C433DB for ; Mon, 8 Mar 2021 13:40:21 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 243B26513A for ; Mon, 8 Mar 2021 13:40:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 243B26513A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z3yhR82dZTaWJGxYXJmp2HW/9NgpuUmlKbKmVuau48A=; b=rhygNHORr6IGBXW1oTB2fzOlk 9ubcKwn+QAlwEK/zariIz1NsnOx+SJx/+nyxprnsPoFtFBVfyjywxWsKaC4VMDm1J54PRae6ydyoj 6JpPvDQDtMZ8nK4VyNMZgLaMH8N7HjfaZMz0Oi6jbTaPCk/wHkxKdhtFmB2pi8T5fSKZU2GIpdCu7 BUEPHEh0XLSMGyHYkOqDuhZag7zxkrSngES4KjG8R5HgX6C/k8CkUQhwd4MEL8Tuh7stj9EgxJXWy 2QM6D3n9lcIvFtG5fkOIooQM4maydxAMX8iFegK6PnvBGEIjO4v0EDE8RPLtVH+yx6FEi9kxmnT68 FoOw1VDhw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lJG5R-00HVvQ-VN; Mon, 08 Mar 2021 13:38:18 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1234::107]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJG5L-00HVu1-Sr for linux-arm-kernel@lists.infradead.org; Mon, 08 Mar 2021 13:38:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=WBVCPi5PmoCTdGe9hSGYzB8eCvhvs5Ao6fKxix7rZQo=; b=kZU2YkVfRKRDESYAjYxXZZIvA0 XUtHK/EXnwPXdfuhtnHhBcAeLy4ImGwj0rk1EkV01PKJ10pQm6wQYc57mqv9WJXvHlz9yQl1YbUC+ v1TN0yBZUH8M9VKh9OfaVv0eG0I8FB8d6JdvB0eKXaCllJm6YxKya9dAx+j7ukik02d52TJXcbrwW q78kYLsEVNIzrr/ymtYz6myDwPWXIi4FMrVgdplfEVnNbAtLaBJAkNVAg3bjZZTgTM5eFtXo729Lk EeEo/Lpx4RbYpOFg+mX/+WSovclrX5xlaD3zteSLdrA/u+Oyo7O+aN4JZu+2H74XLzgP35fgaPter HPRJQ7HA==; Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by merlin.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lJG5H-000X9u-5d for linux-arm-kernel@lists.infradead.org; Mon, 08 Mar 2021 13:38:10 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id ACD1A5C0098; Mon, 8 Mar 2021 08:37:45 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 08 Mar 2021 08:37:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=WBVCPi5PmoCTdGe9hSGYzB8eCvh vs5Ao6fKxix7rZQo=; b=jn86cugEKatv/md99Q08cuqt/LdWc+VsCzybH/iKhLu sGNUmfQ0GuPwFodT0E63MWiF8dcvhyi2EJtneoOSmiVpNqOMwlci02aQt6i8AWus xKFXaDYSXzNo7TTuSAAXNHc/6Mj+D9IcocwUK2TFpAsNFqnOEy3SjtvZQ6SNzD7g egaJ13f9SwAqz0pkBwwtjB6lyy7yOYT8d9z/jpV9cshw8/D8xFqyZBiZB2GIc3jL t/zkYDWa69GXvLMtVF/9JrDRERVsy7SQrty6NuscJKq8gE7rVnC3R2vR32csDIzr gLPM6owinquafTKdegprcfu0McU3xXCYfUyivxDuw1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=WBVCPi 5PmoCTdGe9hSGYzB8eCvhvs5Ao6fKxix7rZQo=; b=q0ejFnep/TuyNEu+5WKp2L 2uLNWGI0Az7gqPSats3kzgPzZIKT7sDleK6lL2VTG4idb1wpEQwvfYT+7G3uipI8 jmlfhvYzIsn/6DuSpoiRf29OFfqLfUc/uiJwNp9wp3Wc7+gBO9D/PVNdGTZmwg4p pTHLLcOBSBgGx0PJosjhtOkS3nmM3eHXGSyXLAER7BpucqfU55/pnJFFMADvIIfG Y5eaHpeytmC/0qknd6CTLKxb/oZjwhAy9eDxxfMvOBJgpFXEKIL8w4XBg7ZxesBl ZvqqL6DTnNN2sp3g2Z8R/aew7ogkdEAhXZFyZvELDH9UPOUqsECsdTrbQGFHw5EQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudduvddggeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepudenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 3D25E1080066; Mon, 8 Mar 2021 08:37:45 -0500 (EST) Date: Mon, 8 Mar 2021 14:37:43 +0100 From: Maxime Ripard To: Evgeny Boger Cc: Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring Subject: Re: [PATCH 2/2] dts: r40: add second ethernet support Message-ID: <20210308133743.ms6wjwe5imp66c6i@gilmour> References: <20210307031353.12643-1-boger@wirenboard.com> <20210307031353.12643-4-boger@wirenboard.com> MIME-Version: 1.0 In-Reply-To: <20210307031353.12643-4-boger@wirenboard.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============6546605218781373610==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6546605218781373610== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ac2tlcqnmh2mazsi" Content-Disposition: inline --ac2tlcqnmh2mazsi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Mar 07, 2021 at 06:13:53AM +0300, Evgeny Boger wrote: > R40 (aka V40, A40i, T3) has two different Ethernet IP > called EMAC and GMAC. > EMAC only support 10/100 Mbit in MII mode, > while GMAC support both 10/100 (MII) and 10/100/1000 (RGMII). >=20 > In contrast to A10/A20 where GMAC and EMAC share the same pins > making EMAC somewhat pointless, on R40 EMAC can be routed to port H. > Both EMAC (on port H) and GMAC (on port A) > can be then enabled at the same time, allowing for two ethernet ports. >=20 > Signed-off-by: Evgeny Boger > --- > arch/arm/boot/dts/sun8i-r40.dtsi | 53 ++++++++++++++++++++++++++++++++ > 1 file changed, 53 insertions(+) >=20 > diff --git a/arch/arm/boot/dts/sun8i-r40.dtsi b/arch/arm/boot/dts/sun8i-r= 40.dtsi > index d5ad3b9efd12..c102c1510012 100644 > --- a/arch/arm/boot/dts/sun8i-r40.dtsi > +++ b/arch/arm/boot/dts/sun8i-r40.dtsi > @@ -217,6 +217,20 @@ > #size-cells =3D <1>; > ranges; > =20 > + sram_a: sram@0 { > + compatible =3D "mmio-sram"; > + reg =3D <0x00000000 0xc000>; > + #address-cells =3D <1>; > + #size-cells =3D <1>; > + ranges =3D <0 0x00000000 0xc000>; > + > + emac_sram: sram-section@8000 { > + compatible =3D "allwinner,sun4i-a10-sram-a3-a4"; > + reg =3D <0x8000 0x4000>; > + status =3D "okay"; > + }; > + }; > + > sram_c: sram@1d00000 { > compatible =3D "mmio-sram"; > reg =3D <0x01d00000 0xd0000>; > @@ -541,6 +555,24 @@ > drive-strength =3D <40>; > }; > =20 > + emac_ph_pins: emac-ph-pins { > + pins =3D "PH8", "PH9", "PH10", "PH11", > + "PH14", "PH15", "PH16", "PH17", > + "PH18","PH19", "PH20", "PH21", > + "PH22", "PH23", "PH24", "PH25", > + "PH26", "PH27"; > + function =3D "emac"; > + }; > + > + emac_pa_pins: emac-pa-pins { > + pins =3D "PA0", "PA1", "PA2", > + "PA3", "PA4", "PA5", "PA6", > + "PA7", "PA8", "PA9", "PA10", > + "PA11", "PA12", "PA13", "PA14", > + "PA15", "PA16"; > + function =3D "emac"; > + }; > + These nodes should be order alphabetically=20 > i2c0_pins: i2c0-pins { > pins =3D "PB0", "PB1"; > function =3D "i2c0"; > @@ -885,6 +917,27 @@ > }; > }; > =20 > + emac: ethernet@1c0b000 { > + syscon =3D <&ccu>; Why is the syscon needed? You weren't using it in the driver > + compatible =3D "allwinner,sun4i-a10-emac"; > + reg =3D <0x01c0b000 0x1000>; > + interrupts =3D ; > + clocks =3D <&ccu CLK_BUS_EMAC>; > + resets =3D <&ccu RST_BUS_EMAC>; > + allwinner,sram =3D <&emac_sram 1>; > + pinctrl-names =3D "default"; > + pinctrl-0 =3D <&emac_ph_pins>; If there's several options, we really can't enforce a default here, it should be in the board DTS. Maxime --ac2tlcqnmh2mazsi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYEYopwAKCRDj7w1vZxhR xaV3AQC2XbzI4nlth+M6nE02j/KBAzmHjbxTC/Z8lHhApU5eNQD/QTzUwsfA4kar muaoKkX7SG4ZyXNcgr9Psi5jMZXJHAg= =fu/I -----END PGP SIGNATURE----- --ac2tlcqnmh2mazsi-- --===============6546605218781373610== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6546605218781373610==--