device_type = "pci";
starfive,stg-syscon = <&stg_syscon 0xc0 0xc4 0x130>;
bus-range = <0x0 0xff>;
- ranges = <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>;
+ ranges = <0x82000000 0x0 0x30000000 0x0 0x30000000 0x0 0x08000000>,
+ <0xc3000000 0x9 0x00000000 0x9 0x00000000 0x0 0x40000000>;
msi-parent = <&plic>;
interrupts = <56>;
interrupt-controller;
device_type = "pci";
starfive,stg-syscon = <&stg_syscon 0x270 0x274 0x2e0>;
bus-range = <0x0 0xff>;
- ranges = <0x82000000 0x0 0x38000000 0x0 0x38000000 0x0 0x08000000>;
+ ranges = <0x82000000 0x0 0x38000000 0x0 0x38000000 0x0 0x08000000>,
+ <0xc3000000 0x9 0x80000000 0x9 0x80000000 0x0 0x40000000>;
msi-parent = <&plic>;
interrupts = <57>;
interrupt-controller;
#define ISTATUS_MSI 0x194
#define CFG_SPACE 0x1000
#define GEN_SETTINGS 0x80
+#define PCIE_WINROM 0xFC
#define PMSG_SUPPORT_RX 0x3F0
#define PCI_MISC 0xB4
#define PLDA_EP_ENABLE 0
#define PLDA_RP_ENABLE 1
+#define PREF_MEM_WIN_64_SUPPORT BIT(3)
#define PMSG_LTR_SUPPORT BIT(2)
#define PDLA_LINK_SPEED_GEN2 BIT(12)
#define PLDA_FUNCTION_DIS BIT(15)
value &= ~PMSG_LTR_SUPPORT;
writel(value, pcie->reg_base + PMSG_SUPPORT_RX);
+ /* Prefetchable memory window 64-bit addressing support */
+ value = readl(pcie->reg_base + PCIE_WINROM);
+ value |= PREF_MEM_WIN_64_SUPPORT;
+ writel(value, pcie->reg_base + PCIE_WINROM);
+
/* As the two host bridges in JH7110 soc have the same default
* address translation table, this cause the second root port can't
* access it's host bridge config space correctly.