From owner-freebsd-arm@freebsd.org Sun Jan 19 19:37:52 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53B60222BEA for ; Sun, 19 Jan 2020 19:37:52 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4814p50n06z4br0 for ; Sun, 19 Jan 2020 19:37:48 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00JJbWHZ067523 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 20 Jan 2020 06:37:37 +1100 (AEDT) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 00JJbQTQ098216 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 20 Jan 2020 06:37:26 +1100 (AEDT) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 00JJbQmY098215; Mon, 20 Jan 2020 06:37:26 +1100 (AEDT) (envelope-from peter) Date: Mon, 20 Jan 2020 06:37:26 +1100 From: Peter Jeremy To: Emmanuel Vadot Cc: freebsd-arm@freebsd.org Subject: Re: SATA on BananaPi M1 Message-ID: <20200119193726.GA97848@server.rulingia.com> References: <20200117104142.GM25924@server.rulingia.com> <20200118174144.ad45c9296f7bab8f70f35131@bidouilliste.com> <20200118231701.GA65624@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <20200118231701.GA65624@server.rulingia.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp User-Agent: Mutt/1.12.2 (2019-09-21) X-Rspamd-Queue-Id: 4814p50n06z4br0 X-Spamd-Bar: ------- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-7.69 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; DMARC_NA(0.00)[rulingia.com]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[]; IP_SCORE(-3.29)[ip: (-9.74), ipnet: 2001:19f0:5800::/38(-4.87), asn: 20473(-1.79), country: US(-0.05)] 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: Sun, 19 Jan 2020 19:37:52 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jan-19 10:17:01 +1100, Peter Jeremy wrote: >On 2020-Jan-18 17:41:44 +0100, Emmanuel Vadot wrot= e: >> I've just test SATA on my A20-Olinuxino and it works if I first tell >>u-boot to detect drives ("scsi scan"). I have the same behavior as you >>if I don't. >.. >> Could you test if you have the same behavior ? > >Yes. If I run "scsi scan" then both u-boot and FreeBSD correctly see >the disk. Thanks for that suggestion. This suggests that >ahci_a10_phy_reset() is missing some magic bits but it also suggests >where to look for them. I had a look at the u-boot-2019.10 sources (this isn't the same as the "U-Boot 2019.07 (Nov 01 2019 - 01:59:08 +0000) Allwinner Technology" I have on my BPi but I hoped they'd be close enough). The PHY reset/ init code is functionally the same as FreeBSD apart from a few DELAY() values. I tried extending the FreeBSD delays to be the same as those in the U-Boot sources and FreeBSD still failed to see my disk. On the positive side, once a "scsi scan" has seen a disk, I can power cycle the disk and the FreeBSD detach/attach code will correctly recognize that the disk has gone away or returned. --=20 Peter Jeremy --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKSBAEBCgB9FiEE7rKYbDBnHnTmXCJ+FqWXoOSiCzQFAl4kr/FfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEVF QjI5ODZDMzA2NzFFNzRFNjVDMjI3RTE2QTU5N0EwRTRBMjBCMzQACgkQFqWXoOSi CzTJkQ/2NRRRMZESsZX8ERuNwy24spvZaf7Z8NuZ2yvzfI27AfJXPn62qxVK3a8J mzskW8OQQwEaINlJnxAOvswk7voVTQxo1Q05ctGOZdotggw4w2WkegZpllPv1K29 l/42mPh487ypMCxIJ4dlUVw3+wQeKz407NIYQc7Ct1SqFOfEm+88kFCm7LODqL21 bY3J+f6vfbWQNDQm94SE3EBqv3Jg2A/UWyZ+SgulxDQMJTcU+qi57UVcBkXmwi4s CYeQ6I0+Dw8d1GiSdQm1QpmP1GurnLbKO82I/wPmkNq8SUdUyz37mUmVfYEXxPZ4 DkeIRxCsiwFXBmiEe0ObeNNuRaBWvtFVaQ2dFsUQThGcuA3PQB+8DPsIXIMWELz+ qCahUMuu0NeXCJ5vzokFg3qur5YIZR855/xu3jUzU6puDWuS8HCiSZasjYQ4LG84 vx18elflBY2hy7MgoParYogshWdzKVooxB+ld1qzcSbbdD1nFt4CLCHWZ0UfmrRH L8OOsEa9/drkNvJbKTlyrdBgHU6OiWGb7uWcy0/4ftF3UpzF+EbjjQr30KRUMqOq Vhkyo08Th9u18Wimd7RKljVSK44wrNjDY6nhYsSvhzDTdiuPq2sFcL5iwcyBZKvx jO3XJ5DSX4a6sHSrZ0al+BzZfTF4yTFUbWhjBjsl3LlUf6iB1w== =6cRf -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+--