From patchwork Tue Aug 7 07:18:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10558281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 886ED1057 for ; Tue, 7 Aug 2018 07:19:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CE9929A7B for ; Tue, 7 Aug 2018 07:19:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6014E29A91; Tue, 7 Aug 2018 07:19:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1068F29A7B for ; Tue, 7 Aug 2018 07:19:07 +0000 (UTC) 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:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pQj1hpZPsYeE3ZMM/12KsxrFxtw7ES9pCB48k+2s4OI=; b=nqoh8YJVFvtAqT 12TcBTfgXv5pPT+AT491OLKJDJvQy4AS4F1DRTNOhlDETcaOpI5aWf8xQLALtWbQA8q2s7PQx1hPu JJ5wht1MMpB/7jdLcoeum25SJK/INVIuTeRKQ4ltiG4wcysmc3GRBxhI9Nxg6ky1z1fVYL+xTAxRt u7EBUiKu6V+PcvwNM5ILGtqzxwVAhpFW4SA6ZaMKz+bCerWkYAbm6YbX8V8iBPOx0fQZ7vj199H9b wgFINZAccRIyxzc2N3bBtmPMt3dbwN5zGlILteEtxCzGJzut/Q4TNzCS9W/98UV9pHZAgjKDRKbxx vkDm/uDv/9Pv+YVRaOfw==; 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 1fmwGl-0002Uq-RK; Tue, 07 Aug 2018 07:19:03 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fmwGj-0002Sr-4R for linux-arm-kernel@lists.infradead.org; Tue, 07 Aug 2018 07:19:02 +0000 Received: by mail-pf1-x442.google.com with SMTP id i26-v6so8099320pfo.12 for ; Tue, 07 Aug 2018 00:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KCelP08FJqkgeSCITgTHqdYXaWN9OL4Rj1Xk8c/H9+k=; b=Jyaw/UPsctcjLjFyX8sHCy5REoKuKRVh+/S5q8HFgjxbZeDoNweTRl9o+MTvuRAHz2 UHHwnSGC9J7IjFn4xQ+osaH4KtKbyIia2iou318MFDEFj1+zmVDTmyZzHur7+RZ8+RM7 SsYJXXSOgZV0NOrNAdRMuQaRshHCdqv+PTPZg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KCelP08FJqkgeSCITgTHqdYXaWN9OL4Rj1Xk8c/H9+k=; b=Vf+CuNQ/vk7OET5Zbex43gxJclqDiZJAxThoenacB70hVXFupruCrdbKINp2bN6op6 OTaEuAxXCQxcnvvuuP9853nR6j3uajS79Rs1HsfSxl+VGItuA1mCxpsFrV6LbfDbEnWZ 4r+G7xz0gMUMAlrMVgSFUP7V3reWffENrMG8AZHmWc6yl2YwsVLjojSggOK+oDhS9E5o pU+66IEc2bapWOw2H25gB1t6pXGPFDUsZQu1rpw5sgIPT/OzUnDz95hxiFx+Euo5X/Ep F+Jl3u8LDYRrfTKSc8siV32FOV9154Z0fFAFlUcb/RPra+0NEEe3s6uXWaV7qWRmI3+0 x83A== X-Gm-Message-State: AOUpUlEZh3vkB6lHOH1w0wwJAu5czoxN9rbivEF8vRR4CbzQ3Psu0XSx HOT8VP1RIBFt8QtTd+k5so3Wcg== X-Google-Smtp-Source: AA+uWPxmpsL5CX1Qwro/pV0JR3NS0/tCkVKMHRYz1pc0E8yJD9lPZKEqdSfpJwzuvO8ouIWDmD7fyA== X-Received: by 2002:a63:ed07:: with SMTP id d7-v6mr1399424pgi.429.1533626329899; Tue, 07 Aug 2018 00:18:49 -0700 (PDT) Received: from localhost.localdomain ([183.82.226.112]) by smtp.gmail.com with ESMTPSA id f75-v6sm2519754pfk.85.2018.08.07.00.18.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Aug 2018 00:18:49 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng Subject: [PATCH] arm64: allwinner: h6: orangepi-one-plus: Add Ethernet support Date: Tue, 7 Aug 2018 12:48:39 +0530 Message-Id: <20180807071839.25305-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180807_001901_180389_55E9AAA1 X-CRM114-Status: GOOD ( 11.93 ) 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: devicetree@vger.kernel.org, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add Ethernet support for orangepi-one-plus board, - Ethernet port connected via RTL8211E PHY - GMAC_EN is connected via PD6 - GMAC-3V supplied from ALDO2 regulator Signed-off-by: Jagan Teki --- .../allwinner/sun50i-h6-orangepi-one-plus.dts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts index 0612c19cd994..eca5b7ea0d6d 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 @@ -21,6 +21,35 @@ chosen { stdout-path = "serial0:115200n8"; }; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + regulator-name = "vcc-gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ + vin-supply = <®_aldo2>; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&ext_rgmii_pins>; + phy-mode = "rgmii"; + phy-handle = <&ext_rgmii_phy>; + phy-supply = <®_gmac_3v3>; + allwinner,rx-delay-ps = <200>; + allwinner,tx-delay-ps = <200>; + status = "okay"; +}; + +&mdio { + ext_rgmii_phy: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; }; &mmc0 {