Enabling SATA via SATA_DWC on Meraki MX60W / APM82181
chunkeey at gmail.com
Mon Feb 22 15:16:24 EST 2021
On Sun, Feb 21, 2021 at 8:56 PM Martin Kennedy <hurricos at gmail.com> wrote:
> I would like to get the HDD port on the MX60 / MX60W working.
This is odd... didn't know there is a HDD port on the MX60/MX60W....
> Knowing that the APM82181 muxes PCIe and SATA, I tried replacing the
> PCIe WLAN module with an mSATA one, and disabling PCIe in the MX60
> device tree, but enabling SATA0/1:
> I have soldered a SATA power+data header onto an MX60W's pads; I have
> bridged solder on four points where 1nF 0102 SMD capacitor should have
> been placed to avoid DC bias. Still, despite a WG Green 3.5" drive,
> Sandisk U100 8GB 2.5" drive and Toshiba 250GB 2.5" HDD all certainly
> powering on on boot, none of these were recognized; instead, I only
> got a 'SATA link down' once the port had been probed and IRQs set up.
This is a very odd request. I could see this as a "challenge" just to
see what it takes
and if it's possible... Maybe make a forum thread too?
Since you went for 2,5" and 3,5" drivers, you could get cheapish
(~10-20 € on ebay)
ready-made minipcie<->sata adaptors available with Marvell brand chips that have
2/4 SATA-Ports (whatever fits). With those you should be able to just
fire up OpenWrt
and load kmod-ata-ahci to get access to the connected SATA drivers
with much less
(And the Marvell chips should support SATA-3 + NCQ. The DesignWare
the APM82181 can only do SATA-2 and the driver does not have support for NCQ).
Come to think about it, I have one of those minipcie<->sata thingies
at home, I could try
this with a WNDAP620 and a WD HDD. (I don't have any of those mini
sata ssd, so I
can't try that).
> Does DesignWare SATA on the APM82181 require U-boot's involvement to
> initialize? Or am I missing something from the OpenWrt side?
Yes, there's some special sauce in Uboot. You could look at the Netgear's
WNDR4700 UBoot (uses both pcie + sata) and the MyBook Live DUO. Both
Uboots sources are part of their respective GPL drops. The MX60(W) also
has its uboot available on github... And I think (I don't know 100%) there was
some commented code about setting up SATA.
> Would attempting to boot Debian instead be a good idea?
If you are looking for Debian on APM82181, I've made a
"build-your-own-debian" for the MyBook Live (DUO).
You cloud swap out the MyBookLive.dts with that of the MX60(W) and change
the uImage packaging a bit to get a kernel that you can put in the NAND to boot
off. But yea, you could have a good shot at running Debian SID on the MX60.
Cheers and Have fun with your SATA-on-MX60 Project,
More information about the openwrt-devel