From patchwork Fri Sep 9 09:54:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12971565 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0638EECAAD3 for ; Fri, 9 Sep 2022 11:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S0ik6RdjjG6jEJKESvm4sNPlVq1bQhbPXQfvvCEeHCk=; b=BSmdv0D8qggjXO PHMkpVrxuDU/cUnX+dkfXC2gX0jCfE60hhTTpEDYcOWhEl7fb0q6r+Azib6WEXsDp4yLyOvk+TV7d TQQPYVU7dPdYB6j95RlhpTl6ZWVv7MkHlwjpXnJ+ICE58SI5ULmLreipCUyF7b0cc9AUGzfBvv1di vrmR8GGTyGYzRPI1ld4NA0+7gJ4x+EafVg8Sgc4GEmA6f9WroC8Y4kMMMMgLwNTthDP32+I/rBode SlzHZUMOtKcoxZV8CUPAnXJNNDnaBoU5Ng/bzp3gjqQejb7jCFsTIJWHwwPpO6X+vuR5k42yYhP51 25Gphl915iunNHPLOd8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWboq-00FaZg-6E; Fri, 09 Sep 2022 11:05:08 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWbkz-00FXjq-Ku for linux-arm-kernel@bombadil.infradead.org; Fri, 09 Sep 2022 11:01:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=UjW45GhfXLmQuhdgMZxz4d9nA7bH5sXFnyz40rFAumk=; b=BXdv52fw6sqTznKOZ+i9YnhtD1 NhranzA39+yhzZUPJSZGB2ocVvIPlF3W/LMwKjM3GLXRG+s1G/STy/E4fEL9VehY+Hmf6tDqjje+F 6mAI0t6IIhYUo1BKNSu/n672JImccNb+/AsvtKjkDskZILeGSfX0QAnh2W/jxPzErZq+9+JlGKQBa K4g2ji+wGJkQqihK7HgqEsh2YOgf3fw7LLyFzm+QuTc4v7xm0LLvpf7ay44QundrOUn95oD8nyM0I m6XjyUMeSyFIkw0nexDaD8TEUbcU11pe/kxQR4CmOzpe0LcuKIAO3YrrGCZwNE7P+OFnFdQTCiq6H pTxgcvgQ==; Received: from weierstrass.telenet-ops.be ([2a02:1800:110:4::f00:11]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWaiL-00AyyO-8I for linux-arm-kernel@lists.infradead.org; Fri, 09 Sep 2022 09:54:24 +0000 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4MPBCh4Gpqz4xFtG for ; Fri, 9 Sep 2022 11:54:08 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed50:91db:705e:cfbc:a001]) by michel.telenet-ops.be with bizsmtp id Hlu62800H0sKggw06lu6LF; Fri, 09 Sep 2022 11:54:06 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1oWai5-004bsi-Ox; Fri, 09 Sep 2022 11:54:05 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1oWai4-004i68-Kk; Fri, 09 Sep 2022 11:54:04 +0200 From: Geert Uytterhoeven To: Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH 14/14] arm64: dts: renesas: white-hawk-cpu: Add Ethernet support Date: Fri, 9 Sep 2022 11:54:01 +0200 Message-Id: <50a31bc8267ab4c90bff27ef3aca1169f8ebc7ae.1662715538.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220909_105421_448097_CAC4F924 X-CRM114-Status: GOOD ( 11.08 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Describe the wiring of the first Ethernet AVB instance to the Micrel KSZ9031RNXVB PHY. Based on a larger patch in the BSP by Takeshi Kihara. Signed-off-by: Geert Uytterhoeven --- Changes compared to the BSP: - Move to CPU board. --- .../dts/renesas/r8a779g0-white-hawk-cpu.dtsi | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi index e382b2d5c8d49fd3..77f0130a2f856ddb 100644 --- a/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a779g0-white-hawk-cpu.dtsi @@ -16,6 +16,7 @@ / { compatible = "renesas,white-hawk-cpu", "renesas,r8a779g0"; aliases { + ethernet0 = &avb0; serial0 = &hscif0; }; @@ -96,6 +97,24 @@ memory@600000000 { }; }; +&avb0 { + pinctrl-0 = <&avb0_pins>; + pinctrl-names = "default"; + phy-handle = <&phy0>; + tx-internal-delay-ps = <2000>; + status = "okay"; + + phy0: ethernet-phy@0 { + compatible = "ethernet-phy-id0022.1622", + "ethernet-phy-ieee802.3-c22"; + rxc-skew-ps = <1500>; + reg = <0>; + interrupt-parent = <&gpio7>; + interrupts = <5 IRQ_TYPE_LEVEL_LOW>; + reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>; + }; +}; + &extal_clk { clock-frequency = <16666666>; }; @@ -127,6 +146,24 @@ &pfc { pinctrl-0 = <&scif_clk_pins>; pinctrl-names = "default"; + avb0_pins: avb0 { + mux { + groups = "avb0_link", "avb0_mdio", "avb0_rgmii", + "avb0_txcrefclk"; + function = "avb0"; + }; + + pins_mdio { + groups = "avb0_mdio"; + drive-strength = <21>; + }; + + pins_mii { + groups = "avb0_rgmii"; + drive-strength = <21>; + }; + + }; hscif0_pins: hscif0 { groups = "hscif0_data"; function = "hscif0";