Allwinner R40/V40 support anyone ?

Søren Schmidt sos at deepcore.dk
Sat Nov 10 12:04:27 UTC 2018


On 10 Nov 2018, at 12.43, Emmanuel Vadot <manu at bidouilliste.com> wrote:
> 
> On Sat, 10 Nov 2018 12:30:52 +0100
> Søren Schmidt <sos at deepcore.dk> wrote:
> 
>> HI
>> 
>> Yeah its almost but not quite like the A20 :)
>> 
>> So far I?ve just added the r40 to the following drivers:
>> 
>> aw_ccu.c
>> clkng/ccu_a10.c
>> aw_gpio.c
>> aw_machdep.c
>> aw_mmc.c
> 
> Doesn't the A64 support in it is enough ?

Nopes, the R40 has its own “compat string” for most things “sun8i-r40-XXX” so it has to be added (or hacked in the DTS file).

>> However there are issues with the power chip (axp221) it does get found by the axp209 driver, but it immediately shuts down and holds NMI active so that needs work at least, bandaid for now is just disable its IRQ.
> 
> Ok weird.

Very, it almost looks like I cannot talk to it at all, reg values are weird but can hold written values.. strange..

>> USB finds the controller, but fails to attach the root hub with uhub_attach: getting USB 2.0 HUB descriptor failed,error=USB_ERR_SHORT_XFER
> 
> You will need to add support for the phy too. (aw_usbphy.c)

Already did and it is found alright:

awusbphy0: <Allwinner USB PHY> mem 0x1c13400-0x1c13413,0x1c14800-0x1c14803,0x1c19800-0x1c19803,0x1c1c800-0x1c1c803 on simplebus0

But it fails newer the less. Havn’t looked much into it, wanted the GMAC to work first so I can work on it remotely..

>> The GMAC has trouble finding its PHY.
>> Both could be due to proper power missing I guess.
>> It finds the SATA part and that works quite well (my own ATA stack, not stock CAM).
> 
> Does it work with CAM ?

I would guess so, its a more or less stock AHCI device.

>> Haven?t tried video/audio as that has no interest to me for now.
> 
> Video and Audio were always hackish on Allwinner, we will need to do
> something to fix that.

Hmm, If I get the other things working I might look into it..

--
Søren Schmidt
sos at deepcore.dk / sos at freebsd.org
"So much code to hack, so little time"




More information about the freebsd-arm mailing list