09-09-2022, 12:34 PM
I managed to figure it out! The issue was with the starting address for 'mem-base' in the device tree. Setting the starting address to a valid range (0x0000_0000 in my case) enables the driver to be properly loaded and the controller is now present. Below is the device tree overlay I used in Armbian in case anyone else would like to attempt this.
Code:
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/pcie@f8000000";
__overlay__ {
status = "disabled";
};
};
fragment@1 {
target-path = "/";
__overlay__ {
pcie_ep0: pcie_ep@f8000000 {
compatible = "rockchip,rk3399-pcie-ep";
#address-cells = <0x03>;
#size-cells = <0x02>;
rockchip,max-outbound-regions = <0x10>;
max-functions = [08];
num-lanes = <0x04>;
reg = <0x00 0xfd000000 0x00 0x1000000 0x00 0x00000000 0x00 0x20000>;
reg-names = "apb-base\0mem-base";
pinctrl-names = "default";
pinctrl-0 = <0x17>;
phys = <0x15 0x00 0x15 0x01 0x15 0x02 0x15 0x03>;
phy-names = "pcie-phy-0\0pcie-phy-1\0pcie-phy-2\0pcie-phy-3";
resets = <0x08 0x82 0x08 0x83 0x08 0x84 0x08 0x85 0x08 0x86 0x08 0x81 0x08 0x80>;
reset-names = "core\0mgmt\0mgmt-sticky\0pipe\0pm\0pclk\0aclk";
clocks = <0x08 0xc5 0x08 0xc4 0x08 0x147 0x08 0xa0>;
clock-names = "aclk\0aclk-perf\0hclk\0pm";
status = "okay";
};
};
};
};