From owner-freebsd-arm@freebsd.org Sat Nov 10 12:15:28 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 386291132445 for ; Sat, 10 Nov 2018 12:15:28 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 647A8874A1 for ; Sat, 10 Nov 2018 12:15:27 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id 6400da76; Sat, 10 Nov 2018 13:15:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=0zFA5FfIQaWX1Gx9UNsC8CVkeFs=; b=qpzlfzyQzrSmsx06ZnT4rNtd8kzH 1/otinPPnDuMJGQHtPkwaubDoGiTyKM9InvchSme/RzHp52ETSshpt5+f4Nl+dNO 9hz0wre8lJn/2c26W70WCLJokWfB3chQ7rwOlpU7kvH5qSgjrCKNqq7KXXg2+Zxg mbc+skIQIWZlwvo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=KYAvh01+dok1HMrkD6yCjZ9uDk1+6BJ5nkDO69zd2EX/2FP3mVY/4bXW IYlaAxnK1CjKZSgGp7Kb4q/Jsa9j69FIKF9MRoZZzf+o+xSIFKxoibxqSv9QkT1k ErEZ0+yCK1XOYiW6L/EF31k+XVxwkTLQGCh8cs2HIj0dosR8dC4= Received: from knuckles.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id f0567022 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 10 Nov 2018 13:15:25 +0100 (CET) Date: Sat, 10 Nov 2018 13:15:24 +0100 From: Emmanuel Vadot To: =?ISO-8859-1?Q?S=F8ren?= Schmidt Cc: freebsd-arm@freebsd.org Subject: Re: Allwinner R40/V40 support anyone ? Message-Id: <20181110131524.77922fb635e7aedfbe163412@bidouilliste.com> In-Reply-To: <73C8549E-490E-4A49-9DAB-B6A538138D4F@deepcore.dk> References: <14FA23F3-03AA-4970-BA02-F57055C4FF64@deepcore.dk> <20181110121241.c016bfc2c0a324a5bb06fa9c@bidouilliste.com> <20181110124316.d92ea7293ad46f440e4fe605@bidouilliste.com> <73C8549E-490E-4A49-9DAB-B6A538138D4F@deepcore.dk> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 647A8874A1 X-Spamd-Result: default: False [-1.06 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com]; NEURAL_HAM_MEDIUM(-0.98)[-0.983,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:212.83.177.182/32]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[bidouilliste.com]; NEURAL_HAM_LONG(-0.99)[-0.995,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCPT_COUNT_TWO(0.00)[2]; MX_GOOD(-0.01)[cached: mx-backup.blih.net]; NEURAL_HAM_SHORT(-0.10)[-0.098,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; IP_SCORE(-0.08)[asn: 12876(-0.37), country: FR(-0.02)]; ASN(0.00)[asn:12876, ipnet:212.83.160.0/19, country:FR]; MID_RHS_MATCH_FROM(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:15:28 -0000 On Sat, 10 Nov 2018 13:03:59 +0100 S=F8ren Schmidt wrote: > On 10 Nov 2018, at 12.43, Emmanuel Vadot wrote: > >=20 > > On Sat, 10 Nov 2018 12:30:52 +0100 > > S=F8ren 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 ? >=20 > 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). https://svnweb.freebsd.org/base/head/sys/gnu/dts/arm/sun8i-r40.dtsi?revisio= n=3D337703&view=3Dmarkup#l116 The rule for DTS compat string (for Allwinner at least) is : "If it looks like one already existing use this compat string but add a new one just in case we find difference in the future" > >> However there are issues with the power chip (axp221) it does get foun= d 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. >=20 > Very, it almost looks like I cannot talk to it at all, reg values are wei= rd but can hold written values.. strange.. >=20 > >> USB finds the controller, but fails to attach the root hub with uhub_a= ttach: 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) >=20 > Already did and it is found alright: >=20 > awusbphy0: mem 0x1c13400-0x1c13413,0x1c14800-0x1c1480= 3,0x1c19800-0x1c19803,0x1c1c800-0x1c1c803 on simplebus0 >=20 > 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.. Ok > >> 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, no= t stock CAM). > >=20 > > Does it work with CAM ? >=20 > I would guess so, its a more or less stock AHCI device. >=20 > >> 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. >=20 > Hmm, If I get the other things working I might look into it.. >=20 > -- > S=F8ren Schmidt > sos@deepcore.dk / sos@freebsd.org > "So much code to hack, so little time" --=20 Emmanuel Vadot