From patchwork Fri Mar 15 01:05:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 10853957 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 0D2CA1669 for ; Fri, 15 Mar 2019 01:05:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF2782A785 for ; Fri, 15 Mar 2019 01:05:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D32E62A7F7; Fri, 15 Mar 2019 01:05:44 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 580712A785 for ; Fri, 15 Mar 2019 01:05:44 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=+pcJ7hzmyEARbYbS2ozosOAzYQMr2EC+xN+Dnn0BVOw=; b=NH3 j6mXKa5lPkpSTKHxvcPurssDyG9hCOsrNEZQx7rBePDTFO31Ahkp9WYj5H662vpvdRgN1SxAVizzF BrhXTri3qGjk+J5W4Yd7EoYd0ZxXwO+x7UNrggS68198Fzuz4anEq1KsW5yjWJ2tNJI71lz/+WVWG VvaHipLNIQc+rz/sAAeiAYgv2MIFKyegQF8+JT9Ui9iGvGOCGxo0I9xrlGBqDRXhE7GNvd6TMvb+p gpdwLyRGWuh6GkdpkeRnBLNAQH/EBRtA0sZM/wAfW4oIA9QvxSyBGkmgBJFoic4gL48+EVSQVy/j/ I511N2NJoSUOqBARq9p5cr0Nd1S+AFQ==; 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 1h4bI6-0001SR-OS; Fri, 15 Mar 2019 01:05:42 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4bI4-0001S1-Oi; Fri, 15 Mar 2019 01:05:41 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EB65FA78; Thu, 14 Mar 2019 18:05:37 -0700 (PDT) Received: from DESKTOP-VLO843J.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DA0163F575; Thu, 14 Mar 2019 18:05:36 -0700 (PDT) From: Robin Murphy To: heiko@sntech.de Subject: [PATCH] arm64: dts: rockchip: Add nanopi4 ethernet phy Date: Fri, 15 Mar 2019 01:05:30 +0000 Message-Id: <93a1654c1a905795d6cfff214379b68158ec4d3f.1552611930.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190314_180540_807632_3881DBBD X-CRM114-Status: GOOD ( 16.61 ) 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: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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 The nanopi4 boards have the INTB pin of the RTL8211E phy wired up, so we can make use of that and avoid having to poll for line status changes. Apparently RTL8211E only requires 30ms of post-reset delay, so we may as well save a little bit of time there as well. Signed-off-by: Robin Murphy --- .../boot/dts/rockchip/rk3399-nanopi4.dtsi | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi index d325e117287b..dd16c80d923e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi4.dtsi @@ -148,15 +148,28 @@ assigned-clocks = <&cru SCLK_RMII_SRC>; clock_in_out = "input"; pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; + pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>; + phy-handle = <&rtl8211e>; phy-mode = "rgmii"; phy-supply = <&vcc3v3_s3>; snps,reset-active-low; - snps,reset-delays-us = <0 10000 50000>; + snps,reset-delays-us = <0 10000 30000>; snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; tx_delay = <0x28>; rx_delay = <0x11>; status = "okay"; + + mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; + + rtl8211e: phy@1 { + reg = <1>; + interrupt-parent = <&gpio3>; + interrupts = ; + }; + }; }; &gpu { @@ -481,6 +494,16 @@ }; }; + phy { + phy_intb: phy-intb { + rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + phy_rstb: phy-rstb { + rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pmic { cpu_b_sleep: cpu-b-sleep { rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;