Hi,

On 14/03/18 14:51, Martin Lucina wrote:
> On Tuesday, 13.03.2018 at 17:52, Andre Przywara wrote:
>> For now I would take the one from the kernel, if you care about
>> Ethernet. However I will soon resend a DT update series which would
>> allow you to use $fdtcontroladdr.
> 
> I've now done a full cross debootstrap on the host to work around the
> kernel BUG, adding the kernel modules from 4.16-rc5 manually to the rootfs.
> Interestingly, U-boot or the kernel don't seem to see the ethernet device
> at all. Also, the ATF is complaining about setting up the PMIC which may be
> related?
> 
>     U-Boot SPL 2018.03 (Mar 13 2018 - 16:40:00 +0100)
>     DRAM: 1024 MiB
>     Trying to boot from MMC1
>     NOTICE:  BL3-1: Running on A64/H64 (1689) in SRAM A2 (@0x44000)
>     NOTICE:  Configuring SPC Controller
>     NOTICE:  BL3-1: v1.0(debug):ae787242
>     NOTICE:  BL3-1: Built : 17:30:05, Mar 12 2018
>     NOTICE:  DT: sun50i-a64-olinuxino
>     NOTICE:  Configuring AXP PMIC
>     NOTICE:  PMIC: Output power control 2 is an unexpected 0x40
>     ERROR:   PMIC: setup failed: -3

Yeah, I think I need to remove the molly guards in ATF when setting up
the PMIC. The code checks whether the PMIC registers it touches contain
certain values, to make sure it is in a sensible state.
Now with Linux driving the PMIC itself and new boards using more rails,
a reboot (which does not reset the PMIC!) lets ATF find the PMIC in some
"unknown" state. Power-cycling fixes this, as you observed.

Can you please file an issue in my ATF github, so that I don't forget to
fix it [1]?

>     NOTICE:  SCPI: dummy stub handler, implementation level: 000000
>     INFO:    BL3-1: Initializing runtime services
>     INFO:    BL3-1: Preparing for EL3 exit to normal world
>     INFO:    BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9
> 
> (...)
> 
>     U-Boot 2018.03 (Mar 13 2018 - 16:40:00 +0100) Allwinner Technology
> 
>     CPU:   Allwinner A64 (SUN50I)
>     Model: Olimex A64-Olinuxino
>     DRAM:  1 GiB
>     MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
>     Loading Environment from FAT... Unable to use mmc 1:0... Failed (-5)
>     Loading Environment from MMC... *** Warning - bad CRC, using default
>     environment
> 
>     Failed (-5)
>     Warning: HDMI PHY init timeout!
>     Warning: HDMI PHY init timeout!

This ....

>     In:    serial
>     Out:   serial
>     Err:   serial
>     Net:   No ethernet found.

and this are results of the PMIC not being setup properly.

>     starting USB...
>     No controllers found
>     Hit any key to stop autoboot:  0
> 
> If I try to manually "modprobe dwmac-sun8i" once booted then the module
> loads but nothing appears in the kernel log and I get no network interface,
> so presumably it can't see the device.

That should be independent, though.

> 
> This is with the DTB from 4.16-rc5.

Are you sure that the .dtb is actually correct for the board? Maybe
there is some additional or different power supply for the PHY?

Cheers,
Andre.

[1] https://github.com/apritzel/arm-trusted-firmware/issues

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to