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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D033EB64D9 for ; Tue, 11 Jul 2023 00:41:11 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 35102866FF; Tue, 11 Jul 2023 02:41:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=posteo.net header.i=@posteo.net header.b="V0QUArVl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C1E46867CB; Tue, 11 Jul 2023 02:41:08 +0200 (CEST) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 40786866FF for ; Tue, 11 Jul 2023 02:41:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=retpolanne@posteo.net Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D2010240101 for ; Tue, 11 Jul 2023 02:41:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1689036065; bh=+gkYb3ER2mm02J8VPJLvsy4JrKEbfIAFKfULqJx1MVE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=V0QUArVlDmPl8DGZZgmJcRqkcgKxc3cv2Qqh9xCzvQUxUxF9hk2/5ykl/5T+p96Fv urhxmtjQ0oIKh1aN7xWeT6+2X1qVl7FKx5JKKB3KboQgzqbzVSiEujkZ8XckAuJGpJ mN91tr2YvDRbYHD0FNTdc4FfzWBD8lhAjaOLoOCosmaeaemakILGEtDYqEan3lqAMT nskd0T+oDmG3pmWASo18EyYBg7icASpHKxrlSNVu59++g4VoG2xXC3Ai8Y8OTUvag0 pkhSso6HunpxKQU79Aurgqt0JMXpeUGuulVQAodmpo0sLX0TtEHN9wSpP27L1TuQYq T7yl4Qa9IaQWQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4R0MVm0fr7z6tm4; Tue, 11 Jul 2023 02:41:03 +0200 (CEST) From: Anne Macedo To: Jagan Teki Cc: u-boot@lists.denx.de, Anne Macedo Subject: [PATCH] sunxi: H6: Enable Ethernet on Orange Pi One Plus Date: Tue, 11 Jul 2023 00:39:58 +0000 Message-ID: <20230711003957.658805-2-retpolanne@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Enable Ethernet on Orange Pi One Plus by using the correct phy for Realtek RTL8211E instead of the Generic One. Also use CONFIG_MACPWR to turn on ethernet on startup. After this patch is applied, a few issues can be seen: - there's still a PHY reset timed out error that doesn't seem to cause any impacts to the overall connection - sometimes the emac driver times out after reset (yellow LED turns on and never blinks) For future patches: for now, CONFIG_MACPWR is the only way to enable Ethernet on boot. There's already code on the dts for using the 3v3-gmac regulator. However, it is not probed on boot, so it only starts after a "regulator status" command is issued. More details about the troubleshooting on [1]. [1] https://lore.kernel.org/u-boot/4wsvwgy56e2xfgtvioru2tf2ofkqprlts36qggivxogww6pn5j@4jk63zxhzhag/ Signed-off-by: Anne Macedo --- arch/arm/dts/sun50i-h6-orangepi-one-plus.dts | 2 +- configs/orangepi_one_plus_defconfig | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts b/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts index 29a081e72a..6427c58f8a 100644 --- a/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts +++ b/arch/arm/dts/sun50i-h6-orangepi-one-plus.dts @@ -37,7 +37,7 @@ &mdio { ext_rgmii_phy: ethernet-phy@1 { - compatible = "ethernet-phy-ieee802.3-c22"; + compatible = "ethernet-phy-id001c.c915", "ethernet-phy-ieee802.3-c22" ; reg = <1>; }; }; diff --git a/configs/orangepi_one_plus_defconfig b/configs/orangepi_one_plus_defconfig index aa5f540eb1..a1835492db 100644 --- a/configs/orangepi_one_plus_defconfig +++ b/configs/orangepi_one_plus_defconfig @@ -8,3 +8,7 @@ CONFIG_SUNXI_DRAM_H6_LPDDR3=y # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_USB_EHCI_HCD=y CONFIG_USB_OHCI_HCD=y +CONFIG_SUN8I_EMAC=y +CONFIG_PHY_REALTEK=y +CONFIG_PHY_ETHERNET_ID=y +CONFIG_MACPWR="PD6" -- 2.41.0