How To Change PCIe To SATA on RK3568 Development Board?

The hardware platform of this article is Forlinx embedded RK3568 development board. It explains how to multiplex PCIe of RK3568 as SATA function. The ideas and methods in this article are for reference only. Although other ARM development boards have different processors, idea and method are similar.

RK3568 Development Board

The method of modifying PCIe to SATA function

1. Hardware

Adapter board FIT-PCIE-SATA V1.0 (pcie2.0 socket to sata2 port)

RK3568 SBC Adapter board FIT-PCIE-SATA V1.0

2. Software

1) Modify device tree

OK3568-linux-source/kernel/arch/arm64/boot/dts/rockchip/OK3568-C-common.dtsi

Note: red font is the field that needs to be modified/or manually added

Disable pcie2.0 function, add SATA function description &pcie2x1 {

reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; vpcie3v3-supply = <&vcc3v3_sys>;

status = "disabled";

};

&sata2 {

status = "okay";

assigned-clock-rates =;

};

2) Modify default configuration file

/OK3568-linux-source/kernel/arch/arm64/configs/OK3568-C-linux_defconfig

Add following content:

CONFIG_ATA=y CONFIG_SATA_AHCI=y

CONFIG_SATA_AHCI_PLATFORM=y CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y

3) Execute ./build.sh kernel in /OK3568-linux-source directory

flashing /OK3568-linux-source/kernel/boot.img separately

3. Test

write:

RK3568 SBC Test write

Read:

RK3568 SBC Test Read