Message ID | DS7PR19MB8883E4A90C8AFF66BCAE14F49DCB2@DS7PR19MB8883.namprd19.prod.outlook.com |
---|---|
State | Superseded |
Headers | show |
Series | Enable IPQ5018 PCI support | expand |
On 5.03.2025 2:41 PM, George Moussalem wrote: > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > From: Nitheesh Sekar <quic_nsekar@quicinc.com> > > Add phy and controller nodes for a 2-lane Gen2 and > a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and > one global interrupt. > > Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com> > Signed-off-by: Sricharan R <quic_srichara@quicinc.com> > Signed-off-by: George Moussalem <george.moussalem@outlook.com> > --- [...] > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > + <0 0 0 2 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > + <0 0 0 3 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ > + <0 0 0 4 &intc 0 145 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ Please all the comments in this patch, they're not very useful Konrad
On 3/8/25 19:08, Konrad Dybcio wrote: > On 5.03.2025 2:41 PM, George Moussalem wrote: >> From: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> >> From: Nitheesh Sekar <quic_nsekar@quicinc.com> >> >> Add phy and controller nodes for a 2-lane Gen2 and >> a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and >> one global interrupt. >> >> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com> >> Signed-off-by: Sricharan R <quic_srichara@quicinc.com> >> Signed-off-by: George Moussalem <george.moussalem@outlook.com> >> --- > > [...] > >> + #interrupt-cells = <1>; >> + interrupt-map-mask = <0 0 0 0x7>; >> + interrupt-map = <0 0 0 1 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ >> + <0 0 0 2 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ >> + <0 0 0 3 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ >> + <0 0 0 4 &intc 0 145 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ > > Please all the comments in this patch, they're not very useful Will remove in next version, thanks! > > Konrad Best regards, George
On Wed, Mar 05, 2025 at 05:41:30PM +0400, George Moussalem wrote: > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > From: Nitheesh Sekar <quic_nsekar@quicinc.com> > > Add phy and controller nodes for a 2-lane Gen2 and > a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and > one global interrupt. > > Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com> > Signed-off-by: Sricharan R <quic_srichara@quicinc.com> > Signed-off-by: George Moussalem <george.moussalem@outlook.com> > --- > arch/arm64/boot/dts/qcom/ipq5018.dtsi | 232 +++++++++++++++++++++++++- > 1 file changed, 230 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > index 8914f2ef0bc4..301a044bdf6d 100644 > --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi > +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > @@ -147,6 +147,234 @@ usbphy0: phy@5b000 { > status = "disabled"; > }; > > + pcie1: pcie@78000 { > + compatible = "qcom,pcie-ipq5018"; > + reg = <0x00078000 0x3000>, > + <0x80000000 0xf1d>, > + <0x80000f20 0xa8>, > + <0x80001000 0x1000>, > + <0x80100000 0x1000>; > + reg-names = "parf", > + "dbi", > + "elbi", > + "atu", > + "config"; > + device_type = "pci"; > + linux,pci-domain = <0>; > + bus-range = <0x00 0xff>; > + num-lanes = <1>; > + max-link-speed = <2>; Why do you want to limit link speed? > + #address-cells = <3>; > + #size-cells = <2>; > + > + phys = <&pcie1_phy>; > + phy-names ="pciephy"; > + > + ranges = <0x81000000 0 0x80200000 0x80200000 0 0x00100000>, /* I/O */ > + <0x82000000 0 0x80300000 0x80300000 0 0x10000000>; /* MEM */ These ranges are wrong. Please check with other DT files. Same comments to other instance as well. > + > + msi-map = <0x0 &v2m0 0x0 0xff8>; > + > + interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, > + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; > + interrupt-names = "msi0", > + "msi1", > + "msi2", > + "msi3", > + "msi4", > + "msi5", > + "msi6", > + "msi7", > + "global"; > + > + #interrupt-cells = <1>; > + interrupt-map-mask = <0 0 0 0x7>; > + interrupt-map = <0 0 0 1 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ > + <0 0 0 2 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ > + <0 0 0 3 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ > + <0 0 0 4 &intc 0 145 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ > + > + clocks = <&gcc GCC_SYS_NOC_PCIE1_AXI_CLK>, > + <&gcc GCC_PCIE1_AXI_M_CLK>, > + <&gcc GCC_PCIE1_AXI_S_CLK>, > + <&gcc GCC_PCIE1_AHB_CLK>, > + <&gcc GCC_PCIE1_AUX_CLK>, > + <&gcc GCC_PCIE1_AXI_S_BRIDGE_CLK>; > + clock-names = "iface", > + "axi_m", > + "axi_s", > + "ahb", > + "aux", > + "axi_bridge"; > + > + resets = <&gcc GCC_PCIE1_PIPE_ARES>, > + <&gcc GCC_PCIE1_SLEEP_ARES>, > + <&gcc GCC_PCIE1_CORE_STICKY_ARES>, > + <&gcc GCC_PCIE1_AXI_MASTER_ARES>, > + <&gcc GCC_PCIE1_AXI_SLAVE_ARES>, > + <&gcc GCC_PCIE1_AHB_ARES>, > + <&gcc GCC_PCIE1_AXI_MASTER_STICKY_ARES>, > + <&gcc GCC_PCIE1_AXI_SLAVE_STICKY_ARES>; > + reset-names = "pipe", > + "sleep", > + "sticky", > + "axi_m", > + "axi_s", > + "ahb", > + "axi_m_sticky", > + "axi_s_sticky"; > + > + status = "disabled"; > + > + pcie@0 { > + device_type = "pci"; > + reg = <0x0 0x0 0x0 0x0 0x0>; > + > + #address-cells = <3>; > + #size-cells = <2>; > + ranges; > + }; > + }; > + > + pcie1_phy: phy@7e000{ > + compatible = "qcom,ipq5018-uniphy-pcie-phy"; > + reg = <0x0007e000 0x800>; > + > + clocks = <&gcc GCC_PCIE1_PIPE_CLK>; > + > + resets = <&gcc GCC_PCIE1_PHY_BCR>, > + <&gcc GCC_PCIE1PHY_PHY_BCR>; > + > + #clock-cells = <0>; > + Please get rid of these newlines between -cells properties. - Mani
On 3/18/25 11:17, Manivannan Sadhasivam wrote: > On Wed, Mar 05, 2025 at 05:41:30PM +0400, George Moussalem wrote: >> From: Sricharan Ramabadhran <quic_srichara@quicinc.com> >> >> From: Nitheesh Sekar <quic_nsekar@quicinc.com> >> >> Add phy and controller nodes for a 2-lane Gen2 and >> a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and >> one global interrupt. >> >> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com> >> Signed-off-by: Sricharan R <quic_srichara@quicinc.com> >> Signed-off-by: George Moussalem <george.moussalem@outlook.com> >> --- >> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 232 +++++++++++++++++++++++++- >> 1 file changed, 230 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi >> index 8914f2ef0bc4..301a044bdf6d 100644 >> --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi >> +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi >> @@ -147,6 +147,234 @@ usbphy0: phy@5b000 { >> status = "disabled"; >> }; >> >> + pcie1: pcie@78000 { >> + compatible = "qcom,pcie-ipq5018"; >> + reg = <0x00078000 0x3000>, >> + <0x80000000 0xf1d>, >> + <0x80000f20 0xa8>, >> + <0x80001000 0x1000>, >> + <0x80100000 0x1000>; >> + reg-names = "parf", >> + "dbi", >> + "elbi", >> + "atu", >> + "config"; >> + device_type = "pci"; >> + linux,pci-domain = <0>; >> + bus-range = <0x00 0xff>; >> + num-lanes = <1>; >> + max-link-speed = <2>; > > Why do you want to limit link speed? This was originally sent my qcom. I've just tested with and without. Without limiting link speed, the phy doesn't come up: [ 0.112017] qcom-pcie a0000000.pcie: host bridge /soc@0/pcie@a0000000 ranges: [ 0.112116] qcom-pcie a0000000.pcie: IO 0x00a0200000..0x00a02fffff -> 0x00a0200000 [ 0.112161] qcom-pcie a0000000.pcie: MEM 0x00a0300000..0x00b02fffff -> 0x00a0300000 [ 0.238623] qcom-pcie a0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align 4K, limit 1024G ... [ 1.257290] qcom-pcie a0000000.pcie: Phy link never came up > >> + #address-cells = <3>; >> + #size-cells = <2>; >> + >> + phys = <&pcie1_phy>; >> + phy-names ="pciephy"; >> + >> + ranges = <0x81000000 0 0x80200000 0x80200000 0 0x00100000>, /* I/O */ >> + <0x82000000 0 0x80300000 0x80300000 0 0x10000000>; /* MEM */ > > These ranges are wrong. Please check with other DT files. > Thanks, have corrected them as part of next version: ranges = <0x01000000 0 0x80200000 0x80200000 0 0x00100000>, <0x02000000 0 0x80300000 0x80300000 0 0x10000000>; > Same comments to other instance as well. and: ranges = <0x01000000 0 0xa0200000 0xa0200000 0 0x00100000>, <0x02000000 0 0xa0300000 0xa0300000 0 0x10000000>; > >> + >> + msi-map = <0x0 &v2m0 0x0 0xff8>; >> + >> + interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, >> + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; >> + interrupt-names = "msi0", >> + "msi1", >> + "msi2", >> + "msi3", >> + "msi4", >> + "msi5", >> + "msi6", >> + "msi7", >> + "global"; >> + >> + #interrupt-cells = <1>; >> + interrupt-map-mask = <0 0 0 0x7>; >> + interrupt-map = <0 0 0 1 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ >> + <0 0 0 2 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ >> + <0 0 0 3 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ >> + <0 0 0 4 &intc 0 145 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ >> + >> + clocks = <&gcc GCC_SYS_NOC_PCIE1_AXI_CLK>, >> + <&gcc GCC_PCIE1_AXI_M_CLK>, >> + <&gcc GCC_PCIE1_AXI_S_CLK>, >> + <&gcc GCC_PCIE1_AHB_CLK>, >> + <&gcc GCC_PCIE1_AUX_CLK>, >> + <&gcc GCC_PCIE1_AXI_S_BRIDGE_CLK>; >> + clock-names = "iface", >> + "axi_m", >> + "axi_s", >> + "ahb", >> + "aux", >> + "axi_bridge"; >> + >> + resets = <&gcc GCC_PCIE1_PIPE_ARES>, >> + <&gcc GCC_PCIE1_SLEEP_ARES>, >> + <&gcc GCC_PCIE1_CORE_STICKY_ARES>, >> + <&gcc GCC_PCIE1_AXI_MASTER_ARES>, >> + <&gcc GCC_PCIE1_AXI_SLAVE_ARES>, >> + <&gcc GCC_PCIE1_AHB_ARES>, >> + <&gcc GCC_PCIE1_AXI_MASTER_STICKY_ARES>, >> + <&gcc GCC_PCIE1_AXI_SLAVE_STICKY_ARES>; >> + reset-names = "pipe", >> + "sleep", >> + "sticky", >> + "axi_m", >> + "axi_s", >> + "ahb", >> + "axi_m_sticky", >> + "axi_s_sticky"; >> + >> + status = "disabled"; >> + >> + pcie@0 { >> + device_type = "pci"; >> + reg = <0x0 0x0 0x0 0x0 0x0>; >> + >> + #address-cells = <3>; >> + #size-cells = <2>; >> + ranges; >> + }; >> + }; >> + >> + pcie1_phy: phy@7e000{ >> + compatible = "qcom,ipq5018-uniphy-pcie-phy"; >> + reg = <0x0007e000 0x800>; >> + >> + clocks = <&gcc GCC_PCIE1_PIPE_CLK>; >> + >> + resets = <&gcc GCC_PCIE1_PHY_BCR>, >> + <&gcc GCC_PCIE1PHY_PHY_BCR>; >> + >> + #clock-cells = <0>; >> + > > Please get rid of these newlines between -cells properties. > > - Mani >
On Tue, Mar 18, 2025 at 01:41:19PM +0400, George Moussalem wrote: > > > On 3/18/25 11:17, Manivannan Sadhasivam wrote: > > On Wed, Mar 05, 2025 at 05:41:30PM +0400, George Moussalem wrote: > > > From: Sricharan Ramabadhran <quic_srichara@quicinc.com> > > > > > > From: Nitheesh Sekar <quic_nsekar@quicinc.com> > > > > > > Add phy and controller nodes for a 2-lane Gen2 and > > > a 1-lane Gen2 PCIe bus. IPQ5018 has 8 MSI SPI interrupts and > > > one global interrupt. > > > > > > Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com> > > > Signed-off-by: Sricharan R <quic_srichara@quicinc.com> > > > Signed-off-by: George Moussalem <george.moussalem@outlook.com> > > > --- > > > arch/arm64/boot/dts/qcom/ipq5018.dtsi | 232 +++++++++++++++++++++++++- > > > 1 file changed, 230 insertions(+), 2 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > > > index 8914f2ef0bc4..301a044bdf6d 100644 > > > --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi > > > +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi > > > @@ -147,6 +147,234 @@ usbphy0: phy@5b000 { > > > status = "disabled"; > > > }; > > > + pcie1: pcie@78000 { > > > + compatible = "qcom,pcie-ipq5018"; > > > + reg = <0x00078000 0x3000>, > > > + <0x80000000 0xf1d>, > > > + <0x80000f20 0xa8>, > > > + <0x80001000 0x1000>, > > > + <0x80100000 0x1000>; > > > + reg-names = "parf", > > > + "dbi", > > > + "elbi", > > > + "atu", > > > + "config"; > > > + device_type = "pci"; > > > + linux,pci-domain = <0>; > > > + bus-range = <0x00 0xff>; > > > + num-lanes = <1>; > > > + max-link-speed = <2>; > > > > Why do you want to limit link speed? > > This was originally sent my qcom. I've just tested with and without. > Without limiting link speed, the phy doesn't come up: > > [ 0.112017] qcom-pcie a0000000.pcie: host bridge /soc@0/pcie@a0000000 > ranges: > [ 0.112116] qcom-pcie a0000000.pcie: IO 0x00a0200000..0x00a02fffff > -> 0x00a0200000 > [ 0.112161] qcom-pcie a0000000.pcie: MEM 0x00a0300000..0x00b02fffff > -> 0x00a0300000 > [ 0.238623] qcom-pcie a0000000.pcie: iATU: unroll T, 8 ob, 8 ib, align > 4K, limit 1024G > ... > [ 1.257290] qcom-pcie a0000000.pcie: Phy link never came up > Wow. This should never happen unless the PHY sequences are messed up. If there are stability issues with Gen 3, we should get runtime AER errors and the link should atleast come up (based on experience with similar issues on other platforms). Sricharan/Nitheesh, may I know what is the issue here? > > > > > + #address-cells = <3>; > > > + #size-cells = <2>; > > > + > > > + phys = <&pcie1_phy>; > > > + phy-names ="pciephy"; > > > + > > > + ranges = <0x81000000 0 0x80200000 0x80200000 0 0x00100000>, /* I/O */ > > > + <0x82000000 0 0x80300000 0x80300000 0 0x10000000>; /* MEM */ > > > > These ranges are wrong. Please check with other DT files. > > > > Thanks, have corrected them as part of next version: > > ranges = <0x01000000 0 0x80200000 0x80200000 0 0x00100000>, > <0x02000000 0 0x80300000 0x80300000 0 0x10000000>; > > > Same comments to other instance as well. > > and: > > ranges = <0x01000000 0 0xa0200000 0xa0200000 0 0x00100000>, > <0x02000000 0 0xa0300000 0xa0300000 0 0x10000000>; > LGTM. - Mani
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi index 8914f2ef0bc4..301a044bdf6d 100644 --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi @@ -147,6 +147,234 @@ usbphy0: phy@5b000 { status = "disabled"; }; + pcie1: pcie@78000 { + compatible = "qcom,pcie-ipq5018"; + reg = <0x00078000 0x3000>, + <0x80000000 0xf1d>, + <0x80000f20 0xa8>, + <0x80001000 0x1000>, + <0x80100000 0x1000>; + reg-names = "parf", + "dbi", + "elbi", + "atu", + "config"; + device_type = "pci"; + linux,pci-domain = <0>; + bus-range = <0x00 0xff>; + num-lanes = <1>; + max-link-speed = <2>; + #address-cells = <3>; + #size-cells = <2>; + + phys = <&pcie1_phy>; + phy-names ="pciephy"; + + ranges = <0x81000000 0 0x80200000 0x80200000 0 0x00100000>, /* I/O */ + <0x82000000 0 0x80300000 0x80300000 0 0x10000000>; /* MEM */ + + msi-map = <0x0 &v2m0 0x0 0xff8>; + + interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi0", + "msi1", + "msi2", + "msi3", + "msi4", + "msi5", + "msi6", + "msi7", + "global"; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &intc 0 142 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ + <0 0 0 2 &intc 0 143 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ + <0 0 0 3 &intc 0 144 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ + <0 0 0 4 &intc 0 145 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ + + clocks = <&gcc GCC_SYS_NOC_PCIE1_AXI_CLK>, + <&gcc GCC_PCIE1_AXI_M_CLK>, + <&gcc GCC_PCIE1_AXI_S_CLK>, + <&gcc GCC_PCIE1_AHB_CLK>, + <&gcc GCC_PCIE1_AUX_CLK>, + <&gcc GCC_PCIE1_AXI_S_BRIDGE_CLK>; + clock-names = "iface", + "axi_m", + "axi_s", + "ahb", + "aux", + "axi_bridge"; + + resets = <&gcc GCC_PCIE1_PIPE_ARES>, + <&gcc GCC_PCIE1_SLEEP_ARES>, + <&gcc GCC_PCIE1_CORE_STICKY_ARES>, + <&gcc GCC_PCIE1_AXI_MASTER_ARES>, + <&gcc GCC_PCIE1_AXI_SLAVE_ARES>, + <&gcc GCC_PCIE1_AHB_ARES>, + <&gcc GCC_PCIE1_AXI_MASTER_STICKY_ARES>, + <&gcc GCC_PCIE1_AXI_SLAVE_STICKY_ARES>; + reset-names = "pipe", + "sleep", + "sticky", + "axi_m", + "axi_s", + "ahb", + "axi_m_sticky", + "axi_s_sticky"; + + status = "disabled"; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + }; + + pcie1_phy: phy@7e000{ + compatible = "qcom,ipq5018-uniphy-pcie-phy"; + reg = <0x0007e000 0x800>; + + clocks = <&gcc GCC_PCIE1_PIPE_CLK>; + + resets = <&gcc GCC_PCIE1_PHY_BCR>, + <&gcc GCC_PCIE1PHY_PHY_BCR>; + + #clock-cells = <0>; + + #phy-cells = <0>; + + num-lanes = <1>; + + status = "disabled"; + }; + + pcie0: pcie@80000 { + compatible = "qcom,pcie-ipq5018"; + reg = <0x00080000 0x3000>, + <0xa0000000 0xf1d>, + <0xa0000f20 0xa8>, + <0xa0001000 0x1000>, + <0xa0100000 0x1000>; + reg-names = "parf", + "dbi", + "elbi", + "atu", + "config"; + device_type = "pci"; + linux,pci-domain = <1>; + bus-range = <0x00 0xff>; + num-lanes = <2>; + max-link-speed = <2>; + #address-cells = <3>; + #size-cells = <2>; + + phys = <&pcie0_phy>; + phy-names ="pciephy"; + + ranges = <0x81000000 0 0xa0200000 0xa0200000 0 0x00100000>, /* I/O */ + <0x82000000 0 0xa0300000 0xa0300000 0 0x10000000>; /* MEM */ + + msi-map = <0x0 &v2m0 0x0 0xff8>; + + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "msi0", + "msi1", + "msi2", + "msi3", + "msi4", + "msi5", + "msi6", + "msi7", + "global"; + + #interrupt-cells = <1>; + interrupt-map-mask = <0 0 0 0x7>; + interrupt-map = <0 0 0 1 &intc 0 75 IRQ_TYPE_LEVEL_HIGH>, /* int_a */ + <0 0 0 2 &intc 0 78 IRQ_TYPE_LEVEL_HIGH>, /* int_b */ + <0 0 0 3 &intc 0 79 IRQ_TYPE_LEVEL_HIGH>, /* int_c */ + <0 0 0 4 &intc 0 83 IRQ_TYPE_LEVEL_HIGH>; /* int_d */ + + clocks = <&gcc GCC_SYS_NOC_PCIE0_AXI_CLK>, + <&gcc GCC_PCIE0_AXI_M_CLK>, + <&gcc GCC_PCIE0_AXI_S_CLK>, + <&gcc GCC_PCIE0_AHB_CLK>, + <&gcc GCC_PCIE0_AUX_CLK>, + <&gcc GCC_PCIE0_AXI_S_BRIDGE_CLK>; + clock-names = "iface", + "axi_m", + "axi_s", + "ahb", + "aux", + "axi_bridge"; + + resets = <&gcc GCC_PCIE0_PIPE_ARES>, + <&gcc GCC_PCIE0_SLEEP_ARES>, + <&gcc GCC_PCIE0_CORE_STICKY_ARES>, + <&gcc GCC_PCIE0_AXI_MASTER_ARES>, + <&gcc GCC_PCIE0_AXI_SLAVE_ARES>, + <&gcc GCC_PCIE0_AHB_ARES>, + <&gcc GCC_PCIE0_AXI_MASTER_STICKY_ARES>, + <&gcc GCC_PCIE0_AXI_SLAVE_STICKY_ARES>; + reset-names = "pipe", + "sleep", + "sticky", + "axi_m", + "axi_s", + "ahb", + "axi_m_sticky", + "axi_s_sticky"; + + status = "disabled"; + + pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + }; + }; + + pcie0_phy: phy@86000{ + compatible = "qcom,ipq5018-uniphy-pcie-phy"; + reg = <0x00086000 0x800>; + + clocks = <&gcc GCC_PCIE0_PIPE_CLK>; + + resets = <&gcc GCC_PCIE0_PHY_BCR>, + <&gcc GCC_PCIE0PHY_PHY_BCR>; + + #clock-cells = <0>; + + #phy-cells = <0>; + + num-lanes = <2>; + + status = "disabled"; + }; + tlmm: pinctrl@1000000 { compatible = "qcom,ipq5018-tlmm"; reg = <0x01000000 0x300000>; @@ -170,8 +398,8 @@ gcc: clock-controller@1800000 { reg = <0x01800000 0x80000>; clocks = <&xo_board_clk>, <&sleep_clk>, - <0>, - <0>, + <&pcie0_phy>, + <&pcie1_phy>, <0>, <0>, <0>,