On Fri, Jul 07, 2023 at 08:42:33AM -0300, Anne Macedo wrote: > On Thu, Jul 06, 2023 at 11:51:54PM +0000, Anne Macedo wrote: > > On Wed, Jul 05, 2023 at 02:15:43PM -0300, Fabio Estevam wrote: > > > On Wed, Jul 5, 2023 at 1:31 PM Anne Macedo <retpola...@posteo.net> wrote: > > > > > > > I think I'm on the right path :) > > > > > > > > 1. Included SUNXI_SETUP_REGULATORS=0 to the bl31 make > > > > 2. Changed the phy mode on arch/arm/dts/sun50i-h6-orangepi-one-plus.dts > > > > From rgmii-id to rgmii > > > > > > This does not look like the correct fix. Please see this commit from > > > Linux: > > > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.4.1&id=544cc3f8573bf9a82e8f348741f2f68d2a8376fb > > > > > > > More info on [1][2][3] > > > > 3. Added this configs to configs/orangepi_one_plus_defconfig: > > > > CONFIG_SPL_SPI_SUNXI=y > > > > CONFIG_SUNXI_NO_PMIC=y > > >e> CONFIG_SUN8I_EMAC=y > > > > > > > > Result: > > > > > > > > U-Boot 2023.04-gfd4ed6b (Apr 03 2023 - 20:38:50 +0000) Allwinner > > > > Technology > > > > > > > > CPU: Allwinner H6 (SUN50I) > > > > Model: OrangePi One Plus > > > > DRAM: 1 GiB > > > > Core: 55 devices, 17 uclasses, devicetree: separate > > > > WDT: Not starting watchdog@7020400 > > > > MMC: mmc@4020000: 0 > > > > Loading Environment from FAT... Unable to read "uboot.env" from > > > > mmc0:1... > > > > In: serial@5000000 > > > > Out: serial@5000000 > > > > Err: serial@5000000 > > > > Net: eth0: ethernet@5020000 > > > > > > > > => dhcp > > > > sun8i_emac_eth_start: Timeout > > > > => mdio list > > > > ethernet@5020000: > > > > 1 - Generic PHY <--> ethernet@5020000 > > > > > > What about using the Realtek PHY driver instead of the Generic one? > > > > > > --- a/configs/orangepi_one_plus_defconfig > > > +++ b/configs/orangepi_one_plus_defconfig > > > @@ -8,3 +8,6 @@ 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_PHY_REALTEK=y > > > +CONFIG_RGMII=y > > > +CONFIG_MII=y > > > > > > Does this help? > > > > Sorry for the delay, life came in the way. > > > > u-boot config: > > CONFIG_PHY_REALTEK=y > > CONFIG_RGMII=y > > CONFIG_MII=y > > > > tfa config: > > SUNXI_SETUP_REGULATORS=0 > > > > result: > > => dhcp > > No ethernet found. > > > > u-boot config: > > CONFIG_SPL_SPI_SUNXI=y > > CONFIG_SUNXI_NO_PMIC=y > > CONFIG_SUN8I_EMAC=y > > CONFIG_PHY_REALTEK=y > > CONFIG_RGMII=y > > CONFIG_MII=y > > > > tfa config: > > SUNXI_SETUP_REGULATORS=0 > > > > result: > > Net: PHY reset timed out > > eth0: ethernet@5020000 > > => dhcp > > sun8i_emac_eth_start: Timeout > > => mdio list > > ethernet@5020000: > > 1 - Generic PHY <--> ethernet@5020000 > > > > It's interesting that it keeps using Generic PHY. > > > > Regards, > > Anne > > > > OH! I believe I discovered something I overlooked: > > On arch/arm/dts/sun50i-h6-orangepi-one-plus.dts: > > reg_gmac_3v3: gmac-3v3 { > compatible = "regulator-fixed"; > regulator-name = "vcc-gmac-3v3"; > regulator-min-microvolt = <3300000>; > regulator-max-microvolt = <3300000>; > startup-delay-us = <100000>; > enable-active-high; > gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */ > vin-supply = <®_aldo2>; > }; > > After I connected GPIO 3 to GPIO 6, the Ethernet LED turned on!
Okay, I completely misunderstood this... and I lost the combination that turned the LED on :( It seems that PD6 is not exposed on the GPIO header [1]. It is defined on the FBGA on the pin map session of the datasheet [2]. So, I don't believe I need to short the pins to get it working, but somehow it at least powered on the Ethernet port. I wish I remember the combination. [1] https://forum.armbian.com/uploads/monthly_2020_04/873961756_Opioneplusgpio.jpg.e28c37c0f66189dc68e86a428a5a8b95.jpg [2] https://linux-sunxi.org/images/5/5c/Allwinner_H6_V200_Datasheet_V1.1.pdf UPDATE: I did it! On u-boot shell: gpio set pd6 then dhcp command works :). However, it doesn't get an IP and with static IP pinging doesn't work. It seems to be able to send BOOTP broadcasts but it doesn't get an IP... Combination was: u-boot config: CONFIG_SPL_SPI_SUNXI=y CONFIG_SUN8I_EMAC=y tfa config: SUNXI_SETUP_REGULATORS=1 (or just unset this) > > I still see: > > => dhcp > sun8i_emac_eth_start: Timeout > > And > > Net: PHY reset timed out > eth0: ethernet@5020000 > > Regards, > Anne Regards, Anne