Banana Pi M1 SATA problems

Peter Jeremy peter at rulingia.com
Thu Jan 16 09:44:31 UTC 2020


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.

After I added following patch, the behaviour went returned to the
previous - ahci0 attaches but ahcich0 is disabled.

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.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20200116/7d3d8da2/attachment.sig>


More information about the freebsd-arm mailing list