Banana Pi M1 SATA problems

Emmanuel Vadot manu at bidouilliste.com
Thu Jan 16 12:01:24 UTC 2020


On Thu, 16 Jan 2020 20:44:09 +1100
Peter Jeremy <peter at rulingia.com> wrote:

> On 2020-Jan-13 11:19:32 +0100, Emmanuel Vadot <manu at bidouilliste.com> wrote:
> >On Mon, 13 Jan 2020 20:57:40 +1100
> >Peter Jeremy <peter at rulingia.com> wrote:
> >
> >> On 2020-Jan-12 09:22:14 -0600, Kyle Evans <kevans at freebsd.org> wrote:
> >> >On Sun, Jan 12, 2020 at 2:03 AM Peter Jeremy <peter at rulingia.com> 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 = <&reg_ahci_5v>;
>         status = "okay";
>  };
>  
> @@ -252,6 +253,10 @@
>  
>  #include "axp209.dtsi"
>  
> +&reg_ahci_5v {
> +        status = "okay";
> +};
> +
>  &reg_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 <manu at bidouilliste.com> <manu at freebsd.org>


More information about the freebsd-arm mailing list