From patchwork Sun Feb 11 14:30:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 13552465 X-Patchwork-Delegate: geert@linux-m68k.org Received: from michel.telenet-ops.be (michel.telenet-ops.be [195.130.137.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B9722570 for ; Sun, 11 Feb 2024 14:31:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.137.88 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707661863; cv=none; b=C7Lmtv/yrWkj/TKuvTsNHDbYD2ujgm7LkPtoP4RPF0GhsVaWVWJVrsFOKeHW6vhXnojvnOmZMZBFtgnBLyLO1Bd4zUhyWSxtkXlA4yDCTK6quWkE3B1DAXOBJERPFq9VEKHysCw/aT96HHozXh4u03zNnqQhqrfnc7qIbY0sjms= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707661863; c=relaxed/simple; bh=XEEoRYisx7ifXpPEg8mrSb/ndQgT3QQwlgrN2E7Djjk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Gff1Ta/pNM+Uy60NFuc0zcDm9YXe+c8v3huLvwY4wE84h8OYQhTcdCYN7dvYAWy0rhRFwwpB5EgU5E0z2weWXpyNKNe+mhRgX32PVuDMnssyCyUlg7+V5yuU5oetnsEN9ot4yAMlewf22gjXqMUNSTN+uFnNTe18M+j8OuzSdwA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.137.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:5c16:aeff:e73f:ad67]) by michel.telenet-ops.be with bizsmtp id lqWz2B00A493aJM06qWzUW; Sun, 11 Feb 2024 15:31:00 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rZAr8-000Qhi-Hs; Sun, 11 Feb 2024 15:30:59 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rZArD-006Wul-H9; Sun, 11 Feb 2024 15:30:59 +0100 From: Geert Uytterhoeven To: linux-renesas-soc@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Thanh Quan , Geert Uytterhoeven Subject: [PATCH 2/2] arm64: dts: renesas: gray-hawk-single: Add Ethernet support Date: Sun, 11 Feb 2024 15:30:46 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Thanh Quan Describe the wiring of the first Ethernet AVB instance to the Micrel KSZ9031RNXVB PHY. Signed-off-by: Thanh Quan Signed-off-by: Geert Uytterhoeven --- Changes compared to the BSP: - Split in separate commits for SoC and board support, - Apply to r8a779h0-gray-hawk-single.dts. --- .../dts/renesas/r8a779h0-gray-hawk-single.dts | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts b/arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts index 1bee27b2284d2eee..625e7448bc9fc1ce 100644 --- a/arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts +++ b/arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts @@ -15,6 +15,7 @@ / { aliases { serial0 = &hscif0; + ethernet0 = &avb0; }; chosen { @@ -34,6 +35,24 @@ memory@480000000 { }; }; +&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>; }; @@ -90,6 +109,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", "hscif0_ctrl"; function = "hscif0";