From owner-freebsd-arm@freebsd.org Sat Nov 10 12:04:26 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2F351131F57 for ; Sat, 10 Nov 2018 12:04:26 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from deepcore.dk (sos.hosted.netic.dk [77.243.53.222]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "sos.hosted.netic.dk", Issuer "sos.hosted.netic.dk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EE76F86D32 for ; Sat, 10 Nov 2018 12:04:25 +0000 (UTC) (envelope-from sos@deepcore.dk) Received: from mac.deepcore.dk (deepcore.dk [85.27.186.9]) by deepcore.dk (8.15.2/8.15.2) with ESMTPS id wAAC1MHf006423 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 10 Nov 2018 13:01:40 +0100 (CET) (envelope-from sos@deepcore.dk) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Allwinner R40/V40 support anyone ? From: =?utf-8?Q?S=C3=B8ren_Schmidt?= In-Reply-To: <20181110124316.d92ea7293ad46f440e4fe605@bidouilliste.com> Date: Sat, 10 Nov 2018 13:03:59 +0100 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <73C8549E-490E-4A49-9DAB-B6A538138D4F@deepcore.dk> References: <14FA23F3-03AA-4970-BA02-F57055C4FF64@deepcore.dk> <20181110121241.c016bfc2c0a324a5bb06fa9c@bidouilliste.com> <20181110124316.d92ea7293ad46f440e4fe605@bidouilliste.com> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: EE76F86D32 X-Spamd-Result: default: False [-0.54 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.85)[-0.847,0]; MX_INVALID(0.50)[cached]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[deepcore.dk]; NEURAL_HAM_LONG(-0.93)[-0.926,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.46)[-0.463,0]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:42697, ipnet:77.243.48.0/20, country:DK]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2018 12:04:27 -0000 On 10 Nov 2018, at 12.43, Emmanuel Vadot wrote: >=20 > On Sat, 10 Nov 2018 12:30:52 +0100 > S=C3=B8ren Schmidt wrote: >=20 >> HI >>=20 >> Yeah its almost but not quite like the A20 :) >>=20 >> So far I?ve just added the r40 to the following drivers: >>=20 >> aw_ccu.c >> clkng/ccu_a10.c >> aw_gpio.c >> aw_machdep.c >> aw_mmc.c >=20 > Doesn't the A64 support in it is enough ? Nopes, the R40 has its own =E2=80=9Ccompat string=E2=80=9D for most = things =E2=80=9Csun8i-r40-XXX=E2=80=9D 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. >=20 > 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=3DUSB_ERR_SHORT_XFER >=20 > You will need to add support for the phy too. (aw_usbphy.c) Already did and it is found alright: awusbphy0: mem = 0x1c13400-0x1c13413,0x1c14800-0x1c14803,0x1c19800-0x1c19803,0x1c1c800-0x1c= 1c803 on simplebus0 But it fails newer the less. Havn=E2=80=99t 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). >=20 > 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. >=20 > 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=C3=B8ren Schmidt sos@deepcore.dk / sos@freebsd.org "So much code to hack, so little time"