From owner-freebsd-arm@freebsd.org Thu Jan 16 12:01:24 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 7104F234EB6 for ; Thu, 16 Jan 2020 12:01:24 +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 47z2pq19Thz3Pxj; Thu, 16 Jan 2020 12:01:22 +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 e385f0b5; Thu, 16 Jan 2020 13:01:20 +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=K/EMUvx5BMP6EKaS68eDoJYOq2Q=; b=S6yO6gourGruWEC/uuV//L+UZh7W qVRvsC73/0+Rc99qCtnc3z0vlegjOdN9k1p7awLxN8kUPWs607jtdgYgb//UFpzm DY9nMFydwBNlDeiijEc6cKLE7T4/DGyHJKAhpaY5D5u/ILq7IcQkx0XcycWbhSX7 7X+YwXvhDXMi6Zw= 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=o6f1OTBf79PA2vVFwXDjC0l+WPdMImTulnEfL6zeU7n4e+BwzKg3glYk RvtA2YZJU/nH1vP74itwEG3olgY9FXlXHQIwX8D26E2VXVlYzAuCBW9liS/t9MFV UKDwZBo+qoePLtSiXuiVkO0fZYwrwcaR1bMyC/aw+wZrVxY6Tf4= Received: from skull.home.blih.net (lfbn-idf2-1-1164-130.w90-92.abo.wanadoo.fr [90.92.223.130]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 667b33e8 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Thu, 16 Jan 2020 13:01:18 +0100 (CET) Date: Thu, 16 Jan 2020 13:01:15 +0100 From: Emmanuel Vadot To: Peter Jeremy Cc: Kyle Evans , "freebsd-arm@freebsd.org" Subject: Re: Banana Pi M1 SATA problems Message-Id: <20200116130115.253fe5902a5b2c1c4f5bc359@bidouilliste.com> In-Reply-To: <20200116094409.GJ25924@server.rulingia.com> References: <20200112080247.GF25924@server.rulingia.com> <20200113095740.GG25924@server.rulingia.com> <20200113111932.9e8e648733d530b70011456f@bidouilliste.com> <20200116094409.GJ25924@server.rulingia.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 47z2pq19Thz3Pxj X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mail header.b=S6yO6gou; dmarc=none; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.177.182 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [0.26 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mail]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; 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.92)[-0.916,0]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_MEDIUM(0.70)[0.702,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(0.37)[ip: (-0.72), ipnet: 212.83.160.0/19(2.34), asn: 12876(0.23), country: FR(0.00)]; 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-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: Thu, 16 Jan 2020 12:01:24 -0000 On Thu, 16 Jan 2020 20:44:09 +1100 Peter Jeremy wrote: > On 2020-Jan-13 11:19:32 +0100, Emmanuel Vadot wrote: > >On Mon, 13 Jan 2020 20:57:40 +1100 > >Peter Jeremy wrote: > > > >> On 2020-Jan-12 09:22:14 -0600, Kyle Evans wrote: > >> >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy wrote: > >> >> I'm trying to get my (new) Banana Pi M1 to talk to a SATA drive. > >> >> Unfortunately, something is disabling the SATA port. > >> > > >> >Try updating past r356600; earlier than that and probably 12.1-RELEASE > >> >we were shutting down the regulator. hw.regulator.disable_unused=0 > >> >should also work around it. > > Actually, r356600 increases the breakage. It attaches the regulator > defined by "target-supply" to the ahci device, however there is no > target-supply field on the ahci device in sun7i-a20-bananapi.dts and > the ahci_5v regulator is disabled so achi0 no longer probes. Indeed, the target-supply regulator is optional, I'll commit a patch this afternoon that fixes this. > After I added following patch, the behaviour went returned to the > previous - ahci0 attaches but ahcich0 is disabled. Looks correct to me, anyway you can submit that upstream ? Also note that you should use sun7i-a20-bananapi-m1-plus.dts > Index: gnu/dts/arm/sun7i-a20-bananapi.dts > =================================================================== > --- gnu/dts/arm/sun7i-a20-bananapi.dts (revision 356657) > +++ gnu/dts/arm/sun7i-a20-bananapi.dts (working copy) > @@ -95,6 +95,7 @@ > }; > > &ahci { > + target-supply = <®_ahci_5v>; > status = "okay"; > }; > > @@ -252,6 +253,10 @@ > > #include "axp209.dtsi" > > +®_ahci_5v { > + status = "okay"; > +}; > + > ®_dcdc2 { > regulator-always-on; > regulator-min-microvolt = <1000000>; > > >> I need hw.regulator.disable_unused="0" because the BPi powers itself > >> off completely without it. I am building a new world+kernel at r356657 > >> but that will take a while because it has triggered a clang rebuild. > > This problem should be fixed with r356609. > > This part does work, thanks. Good to know that is also fixes problems for you. > -- > Peter Jeremy -- Emmanuel Vadot