In order to support more than 1 port, proper locking got to be implemented in the sata_oxnas driver.
The vendor SDK uses a quite complex setup for that to allow both, direct access and hardware raid with two disks. As we are quite far from supporting hardware-raid features in vanilla kernels, the best for now would be to implement locking as seen in
https://raw.githubusercontent.com/hynnet/hiwifi-openwrt-HC5661-HC5761/master/target/linux/oxnas/files-3.3/drivers/ata/sata_ox820.c
and having device-tree nodes for each port/phy and add them to the controller, similar to how it's done in
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/kirkwood.dtsi
If I find the time, I'll give it a shot somewhen in the next days...
The vendor SDK uses a quite complex setup for that to allow both, direct access and hardware raid with two disks. As we are quite far from supporting hardware-raid features in vanilla kernels, the best for now would be to implement locking as seen in
https://raw.githubusercontent.com/hynnet/hiwifi-openwrt-HC5661-HC5761/master/target/linux/oxnas/files-3.3/drivers/ata/sata_ox820.c
and having device-tree nodes for each port/phy and add them to the controller, similar to how it's done in
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/kirkwood.dtsi
If I find the time, I'll give it a shot somewhen in the next days...