Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1629197ybv; Thu, 6 Feb 2020 07:12:38 -0800 (PST) X-Google-Smtp-Source: APXvYqyIptLdh5FxjXx6GkHAxYBkpGWd8SRC57JM+eLplQJRpqn+LgGPNXFqqKkjdBmbIy0S/hxb X-Received: by 2002:a9d:6181:: with SMTP id g1mr31906692otk.104.1581001957935; Thu, 06 Feb 2020 07:12:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581001957; cv=none; d=google.com; s=arc-20160816; b=vYrcLnZHSFp8crxQwXBiIwBwNe0EbYrCaCrXD+oCU7bxMUuaIafmludsVUmqvrKXDN h6uiGcbyTw9P7b/+CrzsRuepPJp9yYD3t3ST9OtuZ6jlDWVQPU3uGRDV/P/NqIlUuydh ukcH7X6MIO+0U9yeqD95pnvzI0aMpRisxK4L9sMaIvbKQYSGAsdQiezzbW1S1/3YQsgi Lacv/YZ7v6rcymqlR68EmTIJBPSKHyrA6udFUKtikAs78bncpkx5x/Z8yJeXQtAa/es2 ok6h4W3Y3GDw2tn0vC7eHfdXyFaiWsypQbm3J4dMhkwi3+cLIiOSah4GeNiunYuZd85D +nPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from; bh=02Y9YiO9v1UTYkCeCWcxzL9H6eq2ymVRReYgBCZVr1Y=; b=QATpMT0YypDT0hOr1Ydak/Mefjl5JkFjds2z5bl7/DquAkZp7i76ViTquSCT/l2V// bqSks+nunj46Hbr6fK9aYhOWsUZ7rKV8FPIL/C46RbxAcUh5FWCyZINPrhGtGERXsrZa eB3MFK4EfXr1DVIVbAeCRFQVUwbKpo4cZPWXktV1dZOk2+nZprT3RKlMaGTIC4UlEh55 HmQwVRlqdL5lnQBfGySKfZuBLK8l3nPK34C94GRzHjUVGZYLGT3w0OmQ2z90a4xbVyHy NjR8QyyK69b35rmvnVrdVFMd/2AzWT4U/sxRNpRVDKAQxda4WqdWKBh2FfPQsYl1jDMS SHvg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si2052702otd.292.2020.02.06.07.12.24; Thu, 06 Feb 2020 07:12:37 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gentoo.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727747AbgBFPKh (ORCPT + 99 others); Thu, 6 Feb 2020 10:10:37 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:55950 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727723AbgBFPKg (ORCPT ); Thu, 6 Feb 2020 10:10:36 -0500 Received: from alexis.zapto.org (85-171-52-99.rev.numericable.fr [85.171.52.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aballier) by smtp.gentoo.org (Postfix) with ESMTPSA id F291C34E821; Thu, 6 Feb 2020 15:10:33 +0000 (UTC) From: Alexis Ballier Cc: Alexis Ballier , devicetree@vger.kernel.org, Heiko Stuebner , Robin Murphy , linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] arm64: dts: rockchip: rk3399-orangepi: Add ethernet phy. Date: Thu, 6 Feb 2020 16:10:24 +0100 Message-Id: <20200206151025.3813-1-aballier@gentoo.org> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Enables INTB. The wiring is the same as the nanopi4, so this is heavily based on: - [1a4e6203f0c] arm64: dts: rockchip: Add nanopi4 ethernet phy - [bc43cee88aa] arm64: dts: rockchip: Update nanopi4 phy reset properties by Robin Murphy. Signed-off-by: Alexis Ballier Cc: devicetree@vger.kernel.org Cc: Heiko Stuebner Cc: Robin Murphy Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- .../boot/dts/rockchip/rk3399-orangepi.dts | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts index 9c659f3115c8..1767015e684c 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-orangepi.dts @@ -202,14 +202,27 @@ &gmac { clock_in_out = "input"; phy-supply = <&vcc3v3_s3>; phy-mode = "rgmii"; + phy-handle = <&rtl8211e>; pinctrl-names = "default"; - pinctrl-0 = <&rgmii_pins>; - snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; - snps,reset-active-low; - snps,reset-delays-us = <0 10000 50000>; + pinctrl-0 = <&rgmii_pins>, <&phy_intb>, <&phy_rstb>; 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 = ; + reset-assert-us = <10000>; + reset-deassert-us = <30000>; + reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; + }; + }; }; &gpu { @@ -537,6 +550,16 @@ pwr_btn: pwr-btn { }; }; + 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 { pmic_int_l: pmic-int-l { rockchip,pins = -- 2.25.0