public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Anne Macedo <retpolanne@posteo.net>
To: Jagan Teki <jagan@amarulasolutions.com>
Cc: u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH] sunxi: H6: Enable Ethernet on Orange Pi One Plus
Date: Tue, 11 Jul 2023 19:40:21 +0000	[thread overview]
Message-ID: <30debca8b31ed4d2cbd64850d48b81ac@posteo.net> (raw)
In-Reply-To: <20230711003957.658805-2-retpolanne@posteo.net>

On 11.07.2023 02:39, Anne Macedo wrote:
> 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 <retpolanne@posteo.net>
> ---
>  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"

Adding linux-sunxi to the thread (I unfortunately forgot this list)

  reply	other threads:[~2023-07-11 19:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  0:39 [PATCH] sunxi: H6: Enable Ethernet on Orange Pi One Plus Anne Macedo
2023-07-11 19:40 ` Anne Macedo [this message]
2023-07-16  0:35   ` Andre Przywara
2023-07-16  6:14     ` Corentin Labbe
2023-07-18 15:34       ` Anne Macedo
2023-07-18 15:28     ` Anne Macedo
2023-07-13  8:52 ` Jagan Teki
2023-07-13 10:54   ` Anne Macedo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30debca8b31ed4d2cbd64850d48b81ac@posteo.net \
    --to=retpolanne@posteo.net \
    --cc=jagan@amarulasolutions.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox