From patchwork Sun Jun 12 11:22:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 634183 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rSD6Q103Yz9sCj for ; Sun, 12 Jun 2016 21:22:54 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932429AbcFLLWg (ORCPT ); Sun, 12 Jun 2016 07:22:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33461 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752702AbcFLLWe (ORCPT ); Sun, 12 Jun 2016 07:22:34 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 546E8A7570; Sun, 12 Jun 2016 11:22:33 +0000 (UTC) Received: from shalem.localdomain (vpn1-7-18.ams2.redhat.com [10.36.7.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5CBMNQE004081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 12 Jun 2016 07:22:26 -0400 Subject: Re: [linux-sunxi] [PATCH 0/5] net-next: ethernet: add sun8i-emac driver To: clabbe.montjoie@gmail.com, robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, davem@davemloft.net References: <1464947790-22991-1-git-send-email-clabbe.montjoie@gmail.com> Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com From: Hans de Goede Message-ID: Date: Sun, 12 Jun 2016 13:22:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <1464947790-22991-1-git-send-email-clabbe.montjoie@gmail.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sun, 12 Jun 2016 11:22:34 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, On 03-06-16 11:56, LABBE Corentin wrote: > Hello > > This patch series add the driver for sun8i-emac which handle the Ethernet MAC > present on Allwinner H3/A83T/A64 SoCs. > > It supports 10/100/1000 Mbit/s speed with half/full duplex. > It can use an internal PHY (MII 10/100) or an external PHY > via RGMII/RMII. > > This patch series enable the driver only for the H3 SoC since A83T and A64 > doesn't have the necessary clocks present in mainline. > > This patch series enable the driver only for the OrangePiPC board since other > board with H3 use external PHY which need optional regulators that will be > supported later. > > The driver have been tested on the following boards: > - H3 Orange PI PC, Orange PI Plus, BananaPI-M2+ > - A64 Pine64 > - A83T BananaPI-M3 > > I would like to thanks Chen-Yu Tsai for his help on developing this driver. Awesome! Thanks for your work on this. I've tested this on a orangepi-one. You can add my: Tested-by: Hans de Goede For the next version of this series. Attached is a dts patch for adding support for the emac one that one (to be applied on top of this patch-set). I've a Orange PI Plus and a Orange PI 2 as well, both of which use an external phy, I would love to test on those as well, do you've a tree with adds the necessary regulator bits and an example of how this would like in dts somewhere ? One remark about: [PATCH 5/5] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC We always keep the nodes in board.dts files sorted alphebetically, so the emac node should be after the ehci node rather then at the end. Regards, Hans > > Regards > > LABBE Corentin (5): > ethernet: add sun8i-emac driver > MAINTAINERS: Add myself as maintainers of sun8i-emac > ARM: sun8i: dt: Add DT bindings documentation for Allwinner sun8i-emac > ARM: dts: sun8i-h3: add sun8i-emac ethernet driver > ARM: dts: sun8i: Enable sun8i-emac on the Orange PI PC > > .../bindings/net/allwinner,sun8i-emac.txt | 64 + > MAINTAINERS | 6 + > arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 11 + > arch/arm/boot/dts/sun8i-h3.dtsi | 14 + > drivers/net/ethernet/allwinner/Kconfig | 13 + > drivers/net/ethernet/allwinner/Makefile | 1 + > drivers/net/ethernet/allwinner/sun8i-emac.c | 1943 ++++++++++++++++++++ > 7 files changed, 2052 insertions(+) > create mode 100644 Documentation/devicetree/bindings/net/allwinner,sun8i-emac.txt > create mode 100644 drivers/net/ethernet/allwinner/sun8i-emac.c > From 25ea802c4c2962dc50c34bd02faa9a5f3acd2e34 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 12 Jun 2016 13:20:05 +0200 Subject: [PATCH v3] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One The sun8i-emac hardware is present on the Orange PI One. It uses the internal PHY. This patch create the needed emac and phy nodes. Signed-off-by: Hans de Goede --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts index 0adf932..8df5c74 100644 --- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts @@ -94,6 +94,17 @@ status = "okay"; }; +&emac { + phy = <&phy1>; + phy-mode = "mii"; + allwinner,use-internal-phy; + allwinner,leds-active-low; + status = "okay"; + phy1: ethernet-phy@1 { + reg = <1>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; -- 2.7.4