[bug report] sunxi: H6: no ethernet on Orange Pi One Plus

Anne Macedo retpolanne at posteo.net
Sun Jul 9 01:02:25 CEST 2023


On Fri, Jul 07, 2023 at 02:20:48PM +0000, Anne Macedo wrote:
> On Fri, Jul 07, 2023 at 10:54:00AM -0300, Fabio Estevam wrote:
> > On Fri, Jul 7, 2023 at 10:46 AM Anne Macedo <retpolanne at posteo.net> wrote:
> > 
> > > On u-boot shell:
> > >
> > > gpio set pd6
> > 
> > Good point. You should pass the following options:
> > 
> > CONFIG_DM_REGULATOR=y
> > CONFIG_DM_REGULATOR_FIXED=y
> > 

One thing I realized is that on the defconfig and on Yocto, SPL is
expected, so if I disable CONFIG_SPL, things break. I'm thinking about
using it because CONFIG_DM_REGULATOR didn't seem to work?

I also decided to use CONFIG_SPL_DM_REGULATOR, but it doesn't compile
:(

These are the configs I added

# This one I believe is needed for EMAC
CONFIG_SPL_SPI_SUNXI=y
# This one is needed by the DM and SPL_DM configs
CONFIG_DM=y
# These two seem to allow me to build with SPL
CONFIG_SPL_BUILD=y
CONFIG_SPL_POWER=y
# This one breaks the build
CONFIG_SPL_DM=y
# Keeping these two commented until I fix SPL_DM
#CONFIG_SPL_DM_REGULATOR=y
#CONFIG_SPL_DM_REGULATOR_FIXED=y

I also had to patch drivers/mmc/sunxi_mmc.c to add an if macro on the
only gpio_request_by_name it has, inspired by [1]. Will send a patch
once I figure out why SPL is breaking. 

Maybe it has to do with SPL memory? These are the errors I see when I
enable CONFIG_SPL_DM:

aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'
aarch64-poky-linux-ld.bfd: u-boot-spl section `.rodata' will not fit in
region `.sram'

aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'
aarch64-poky-linux-ld.bfd: u-boot-spl section `.rodata' will not fit in
region `.sram'
aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'
aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'

aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'
aarch64-poky-linux-ld.bfd: address 0x28e60 of u-boot-spl section `.text'
is not within region `.sram'
aarch64-poky-linux-ld.bfd: region `.sram' overflowed by 8864 bytes

aarch64-poky-linux-ld.bfd: region `.sram' overflowed by 8864 bytes

I don't see them without CONFIG_SPL_DM.

This person [2] mentions in another similar issue that SPL is very tight
in memory btw.

[1]
https://patchwork.ozlabs.org/project/uboot/patch/20190117170601.20676-2-fparent@baylibre.com/
[2] https://lists.denx.de/pipermail/u-boot/2020-May/412530.html
> > so that the GPIO3_6 turns on by default and then you would not need to
> > run the "gpio set pd6" command.
> 
> That didn't work. I still had to enable with "gpio set pd6". 
> Also, when it gets to the kernel, ethernet shuts down. I also don't see
> the device in my router, so I believe even though eth0 is up, something
> may not be working yet. 
> 
> > 
> > > then dhcp command works :). However, it doesn't get an IP and with
> > > static IP pinging doesn't work.


More information about the U-Boot mailing list