arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY
Subsystems (6)
PATCH 1/9 arm64: dts: qcom: ipq8074: fix Gen2 PCIe QMP PHY
Serdes register space sizes are incorrect, update them to match the actual sizes from downstream QCA 5.4 kernel.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +2 -2
@@ -277,9 +277,9 @@ pcie_qmp1: phy@8e000 { status = "disabled"; pcie_phy1: phy@8e200 { - reg = <0x8e200 0x16c>, + reg = <0x8e200 0x130>, <0x8e400 0x200>, - <0x8e800 0x4f4>; + <0x8e800 0x1f8>; #phy-cells = <0>; #clock-cells = <0>; clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
Signature · 1 line
2.38.1
PATCH 2/9 arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s
v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +8 -7
@@ -232,9 +232,9 @@ qusb_phy_0: phy@79000 { status = "disabled"; }; - pcie_qmp0: phy@86000 { - compatible = "qcom,ipq8074-qmp-pcie-phy"; - reg = <0x00086000 0x1c4>; + pcie_qmp0: phy@84000 { + compatible = "qcom,ipq8074-qmp-gen3-pcie-phy"; + reg = <0x00084000 0x1bc>; #address-cells = <1>; #size-cells = <1>; ranges;
@@ -248,10 +248,11 @@ pcie_qmp0: phy@86000 { "common"; status = "disabled"; - pcie_phy0: phy@86200 { - reg = <0x86200 0x16c>, - <0x86400 0x200>, - <0x86800 0x4f4>; + pcie_phy0: phy@84200 { + reg = <0x84200 0x16c>, + <0x84400 0x200>, + <0x84800 0x1f0>, + <0x84c00 0xf4>; #phy-cells = <0>; #clock-cells = <0>; clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
Signature · 1 line
2.38.1
Bjorn Andersson
maintainerRe: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 4 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s
Quoted 9 lines
v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
Regards,
Bjorn
Quoted 42 lines
Fixes 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes")Signed-off-by Robert Marko <[email protected]>--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)arch/arm64/boot/dts/qcom/ipq8074.dtsi +8
-7@@ -232,9 +232,9 @@ qusb_phy_0: phy@79000 { status = "disabled"; }; - pcie_qmp0: phy@86000 { - compatible = "qcom,ipq8074-qmp-pcie-phy"; - reg = <0x00086000 0x1c4>; + pcie_qmp0: phy@84000 { + compatible = "qcom,ipq8074-qmp-gen3-pcie-phy"; + reg = <0x00084000 0x1bc>; #address-cells = <1>; #size-cells = <1>; ranges;@@ -248,10 +248,11 @@ pcie_qmp0: phy@86000 { "common"; status = "disabled"; - pcie_phy0: phy@86200 { - reg = <0x86200 0x16c>, - <0x86400 0x200>, - <0x86800 0x4f4>; + pcie_phy0: phy@84200 { + reg = <0x84200 0x16c>, + <0x84400 0x200>, + <0x84800 0x1f0>, + <0x84c00 0xf4>; #phy-cells = <0>; #clock-cells = <0>; clocks = <&gcc GCC_PCIE0_PIPE_CLK>;Signature · 1 line
2.38.1
Re: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 9 lines · Bjorn Andersson
Quoted 7 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-sv2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Quoted 8 lines
Quoted 6 lines
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
Hi Bjorn,
Yes, the node is for a completely different PHY generation, basically PCIe on IPQ8074
is completely broken, hence this patch series.
Quoted 4 lines
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
I have not seen that so far, any examples?
Regards,
Robert
Quoted 46 lines
Regards,
BjornQuoted 42 lines
Fixes 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes")Signed-off-by Robert Marko <[email protected]>--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)arch/arm64/boot/dts/qcom/ipq8074.dtsi +8
-8@@ -232,9 +232,9 @@ qusb_phy_0: phy@79000 { status = "disabled"; }; - pcie_qmp0: phy@86000 { - compatible = "qcom,ipq8074-qmp-pcie-phy"; - reg = <0x00086000 0x1c4>; + pcie_qmp0: phy@84000 { + compatible = "qcom,ipq8074-qmp-gen3-pcie-phy"; + reg = <0x00084000 0x1bc>; #address-cells = <1>; #size-cells = <1>; ranges;@@ -248,10 +248,11 @@ pcie_qmp0: phy@86000 { "common"; status = "disabled"; - pcie_phy0: phy@86200 { - reg = <0x86200 0x16c>, - <0x86400 0x200>, - <0x86800 0x4f4>; + pcie_phy0: phy@84200 { + reg = <0x84200 0x16c>, + <0x84400 0x200>, + <0x84800 0x1f0>, + <0x84c00 0xf4>; #phy-cells = <0>; #clock-cells = <0>; clocks = <&gcc GCC_PCIE0_PIPE_CLK>; --2.38.1
Bjorn Andersson
maintainerRe: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 25 lines · Robert Marko
Quoted 9 lines · Bjorn Andersson
Quoted 7 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-sv2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Quoted 8 lines
Quoted 6 lines
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
Hi Bjorn,
Yes, the node is for a completely different PHY generation, basically PCIe on IPQ8074
is completely broken, hence this patch series.Quoted 1 line
Quoted 6 lines
Quoted 3 lines
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
I have not seen that so far, any examples?
See Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yaml in v6.2-rc1.
The idea is to, at least, use this for all new platforms introduced.
And if the current definition doesn't actually work I suggest that we replace it with the new one.
Regards,
Bjorn
Re: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 34 lines · Bjorn Andersson
Quoted 25 lines · Robert Marko
Quoted 9 lines · Bjorn Andersson
Quoted 7 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-sv2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Quoted 8 lines
Quoted 6 lines
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
Hi Bjorn,
Yes, the node is for a completely different PHY generation, basically PCIe on IPQ8074
is completely broken, hence this patch series.Quoted 1 line
Quoted 6 lines
Quoted 3 lines
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
I have not seen that so far, any examples?
Quoted 8 lines
See
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yamlin v6.2-rc1.The idea is to, at least, use this for all new platforms introduced.
And if the current definition doesn't actually work I suggest that we replace it with the new one.
I understand the intention, but these bindings dont match the QMP generation found in IPQ8074 at all, and Gen3 has already been documented in bindings.
This would require updating the driver to carry the offsets and rework of bindings to
not require power domains, etc for IPQ8074 as I have not found any code downstream
to indicate it has GSDC-s for PCIe though I dont have any docs at all for the SoC.
Regards,
Robert
Quoted 3 lines
Regards,
Bjorn
Bjorn Andersson
maintainerRe: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 47 lines · Robert Marko
Quoted 34 lines · Bjorn Andersson
Quoted 25 lines · Robert Marko
Quoted 9 lines · Bjorn Andersson
Quoted 7 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-sv2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Quoted 8 lines
Quoted 6 lines
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
Hi Bjorn,
Yes, the node is for a completely different PHY generation, basically PCIe on IPQ8074
is completely broken, hence this patch series.Quoted 1 line
Quoted 6 lines
Quoted 3 lines
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
I have not seen that so far, any examples?
Quoted 8 lines
See
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yamlin v6.2-rc1.The idea is to, at least, use this for all new platforms introduced.
And if the current definition doesn't actually work I suggest that we replace it with the new one.
I understand the intention, but these bindings dont match the QMP generation found in IPQ8074 at all, and Gen3 has already been documented in bindings.
Quoted 7 lines
This would require updating the driver to carry the offsets and rework of bindings to
not require power domains, etc for IPQ8074 as I have not found any code downstream
to indicate it has GSDC-s for PCIe though I dont have any docs at all for the SoC.
I was only thinking of the structural difference, not the power-domains etc. But yes you're right that it means updating the driver and the binding.
The end result would be much nicer though...
Regards,
Bjorn
Re: [PATCH 2/9] arm64: dts: qcom: ipq8074: fix Gen3 PCIe QMP PHY
Quoted 57 lines · Bjorn Andersson
Quoted 47 lines · Robert Marko
Quoted 34 lines · Bjorn Andersson
Quoted 25 lines · Robert Marko
Quoted 9 lines · Bjorn Andersson
Quoted 7 lines · Robert Marko
IPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-sv2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Quoted 8 lines
Quoted 6 lines
Now that we have Gen3 QMP PHY support, we can start fixing the PCIe support by fixing the Gen3 QMP PHY node first.
Change the compatible to the Gen3 QMP PHY, correct the register space start and size, add the missing misc PCS register space.
Does this imply that the current node doesn't actually work?
Hi Bjorn,
Yes, the node is for a completely different PHY generation, basically PCIe on IPQ8074
is completely broken, hence this patch series.Quoted 1 line
Quoted 6 lines
Quoted 3 lines
If that's the case, could we perhaps adopt Johan Hovolds' new binding and drop the subnode in favor of just a flat reg covering the whole QMP region?
I have not seen that so far, any examples?
Quoted 8 lines
See
Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-pcie-phy.yamlin v6.2-rc1.The idea is to, at least, use this for all new platforms introduced.
And if the current definition doesn't actually work I suggest that we replace it with the new one.
I understand the intention, but these bindings dont match the QMP generation found in IPQ8074 at all, and Gen3 has already been documented in bindings.
Quoted 7 lines
This would require updating the driver to carry the offsets and rework of bindings to
not require power domains, etc for IPQ8074 as I have not found any code downstream
to indicate it has GSDC-s for PCIe though I dont have any docs at all for the SoC.
Quoted 5 lines
I was only thinking of the structural difference, not the power-domains etc. But yes you're right that it means updating the driver and the binding.
The end result would be much nicer though...
I agree that it would be nicer, though it's asking for many changes, especially bindings since it's already described there.
The current patchset has been thoroughly tested for months at this point.
How would you like to proceed here, as I would really like to get PCI working upstream?
Regards,
Robert
Quoted 3 lines
Regards,
Bjorn
PATCH 3/9 arm64: dts: qcom: ipq8074: correct Gen2 PCIe ranges
In reply to Robert MarkoCurrent ranges property set in Gen2 PCIe node is incorrect, replace it with the downstream 5.4 QCA kernel value.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +3 -3
@@ -808,9 +808,9 @@ pcie1: pci@10000000 { phy-names = "pciephy"; ranges = <0x81000000 0 0x10200000 0x10200000 - 0 0x100000 /* downstream I/O */ - 0x82000000 0 0x10300000 0x10300000 - 0 0xd00000>; /* non-prefetchable memory */ + 0 0x10000>, /* downstream I/O */ + <0x82000000 0 0x10220000 0x10220000 + 0 0xfde0000>; /* non-prefetchable memory */ interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "msi";
Signature · 1 line
2.38.1
PATCH 4/9 arm64: dts: qcom: ipq8074: set Gen2 PCIe pcie max-link-speed
In reply to Robert MarkoAdd the generic 'max-link-speed' property to describe the Gen2 PCIe link generation limit.
This allows the generic DWC code to configure the link speed correctly.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +1 -0
@@ -801,6 +801,7 @@ pcie1: pci@10000000 { linux,pci-domain = <1>; bus-range = <0x00 0xff>; num-lanes = <1>; + max-link-speed = <2>; #address-cells = <3>; #size-cells = <2>;
Signature · 1 line
2.38.1
PATCH 5/9 dt-bindings: PCI: qcom: alphabetically sort compatibles
In reply to Robert MarkoSort the compatibles list alphabetically for maintenance.
--- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/pci/qcom,pcie.yaml +4 -4
@@ -17,13 +17,14 @@ description: | properties: compatible: enum: - - qcom,pcie-ipq8064 - - qcom,pcie-ipq8064-v2 - qcom,pcie-apq8064 - qcom,pcie-apq8084 - - qcom,pcie-msm8996 - qcom,pcie-ipq4019 + - qcom,pcie-ipq6018 + - qcom,pcie-ipq8064 + - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-msm8996 - qcom,pcie-qcs404 - qcom,pcie-sa8540p - qcom,pcie-sc7280
@@ -34,7 +35,6 @@ properties: - qcom,pcie-sm8250 - qcom,pcie-sm8450-pcie0 - qcom,pcie-sm8450-pcie1 - - qcom,pcie-ipq6018 reg: minItems: 4
Signature · 1 line
2.38.1
Re: [PATCH 5/9] dt-bindings: PCI: qcom: alphabetically sort compatibles
Quoted 5 lines · Robert Marko
Sort the compatibles list alphabetically for maintenance.
Signed-off-by Robert Marko <[email protected]>--- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 8 ++++----
Best regards,
Krzysztof
Re: [PATCH 5/9] dt-bindings: PCI: qcom: alphabetically sort compatibles
In reply to Robert MarkoQuoted 3 lines · Robert Marko
Sort the compatibles list alphabetically for maintenance.
Signed-off-by Robert Marko <[email protected]>
Thanks,
Mani
Quoted 37 lines
--- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)Documentation/devicetree/bindings/pci/qcom,pcie.yaml +4
-4@@ -17,13 +17,14 @@ description: | properties: compatible: enum: - - qcom,pcie-ipq8064 - - qcom,pcie-ipq8064-v2 - qcom,pcie-apq8064 - qcom,pcie-apq8084 - - qcom,pcie-msm8996 - qcom,pcie-ipq4019 + - qcom,pcie-ipq6018 + - qcom,pcie-ipq8064 + - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-msm8996 - qcom,pcie-qcs404 - qcom,pcie-sa8540p - qcom,pcie-sc7280@@ -34,7 +35,6 @@ properties: - qcom,pcie-sm8250 - qcom,pcie-sm8450-pcie0 - qcom,pcie-sm8450-pcie1 - - qcom,pcie-ipq6018 reg: minItems: 4Signature · 1 line
2.38.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 6/9 dt-bindings: PCI: qcom: document IPQ8074 Gen3 port
In reply to Robert MarkoIPQ8074 has one Gen2 and one Gen3 PCIe port, with Gen2 already supported. Document Gen3 port which uses the same controller as IPQ6018.
--- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/pci/qcom,pcie.yaml +5 -0
@@ -24,6 +24,7 @@ properties: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-msm8996 - qcom,pcie-qcs404 - qcom,pcie-sa8540p
@@ -151,6 +152,7 @@ allOf: contains: enum: - qcom,pcie-ipq6018 + - qcom,pcie-ipq8074-gen3 then: properties: reg:
@@ -371,6 +373,7 @@ allOf: contains: enum: - qcom,pcie-ipq6018 + - qcom,pcie-ipq8074-gen3 then: properties: clocks:
@@ -662,6 +665,7 @@ allOf: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-qcs404 then: required:
@@ -744,6 +748,7 @@ allOf: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-qcs404 - qcom,pcie-sa8540p then:
Signature · 1 line
2.38.1
Re: [PATCH 6/9] dt-bindings: PCI: qcom: document IPQ8074 Gen3 port
Quoted 5 lines · Robert Marko
IPQ8074 has one Gen2 and one Gen3 PCIe port, with Gen2 already supported. Document Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>---
Best regards,
Krzysztof
Re: [PATCH 6/9] dt-bindings: PCI: qcom: document IPQ8074 Gen3 port
In reply to Robert MarkoQuoted 4 lines · Robert Marko
IPQ8074 has one Gen2 and one Gen3 PCIe port, with Gen2 already supported. Document Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>
Thanks,
Mani
Quoted 51 lines
--- Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/pci/qcom,pcie.yaml +5
-0@@ -24,6 +24,7 @@ properties: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-msm8996 - qcom,pcie-qcs404 - qcom,pcie-sa8540p@@ -151,6 +152,7 @@ allOf: contains: enum: - qcom,pcie-ipq6018 + - qcom,pcie-ipq8074-gen3 then: properties: reg:@@ -371,6 +373,7 @@ allOf: contains: enum: - qcom,pcie-ipq6018 + - qcom,pcie-ipq8074-gen3 then: properties: clocks:@@ -662,6 +665,7 @@ allOf: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-qcs404 then: required:@@ -744,6 +748,7 @@ allOf: - qcom,pcie-ipq8064 - qcom,pcie-ipq8064-v2 - qcom,pcie-ipq8074 + - qcom,pcie-ipq8074-gen3 - qcom,pcie-qcs404 - qcom,pcie-sa8540p then:Signature · 1 line
2.38.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 7/9 PCI: qcom: add support for IPQ8074 Gen3 port
In reply to Robert MarkoIPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018.
--- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-qcom.c +1 -0
@@ -1817,6 +1817,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, + { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 },
Signature · 1 line
2.38.1
Re: [PATCH 7/9] PCI: qcom: add support for IPQ8074 Gen3 port
Hi Robert,
If you post a v2 for any reason, capitalize the subject line to match previous history:
PCI: qcom: Rename host-init error label
PCI: qcom: Drop unused post_deinit callback
PCI: qcom: Sort device-id table
PCI: qcom: Clean up IP configurations
...
Quoted 23 lines · Robert Marko
IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>--- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-qcom.c +1
-0@@ -1817,6 +1817,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, + { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 },Signature · 1 line
2.38.1
Lorenzo Pieralisi
maintainerRe: [PATCH 7/9] PCI: qcom: add support for IPQ8074 Gen3 port
Quoted 10 lines · Bjorn Helgaas
Hi Robert,
If you post a v2 for any reason, capitalize the subject line to match previous history:
PCI: qcom: Rename host-init error label
PCI: qcom: Drop unusedpost_deinitcallback
PCI: qcom: Sort device-id table
PCI: qcom: Clean up IP configurations
...
If he could do that while rebasing on top of my current pci/qcom branch that would be ideal, I tried to cherry-pick patches 5,6,7 but 5 does not apply.
Thanks,
Lorenzo
Quoted 25 lines · Robert Marko
Quoted 23 lines
IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>--- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-qcom.c +1
-0@@ -1817,6 +1817,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, + { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 },Signature · 1 line
2.38.1
Re: [PATCH 7/9] PCI: qcom: add support for IPQ8074 Gen3 port
Quoted 13 lines · Lorenzo Pieralisi
Quoted 10 lines · Bjorn Helgaas
Hi Robert,
If you post a v2 for any reason, capitalize the subject line to match previous history:
PCI: qcom: Rename host-init error label
PCI: qcom: Drop unusedpost_deinitcallback
PCI: qcom: Sort device-id table
PCI: qcom: Clean up IP configurations
...
Quoted 3 lines
If he could do that while rebasing on top of my current pci/qcom branch that would be ideal, I tried to cherry-pick patches 5,6,7 but 5 does not apply.
Sure, I will send v2 with that now as after cherry-picking the SM8350 commits from pci/qcom they all still apply, will fixup the subject capitalization.
Regards,
Robert
Quoted 29 lines
Thanks,
LorenzoQuoted 25 lines · Robert Marko
Quoted 23 lines
IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>--- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-qcom.c +1
-1@@ -1817,6 +1817,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, + { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 }, --2.38.1
Re: [PATCH 7/9] PCI: qcom: add support for IPQ8074 Gen3 port
In reply to Robert MarkoQuoted 4 lines · Robert Marko
IPQ8074 has one Gen2 and one Gen3 port, with Gen2 port already supported. Add compatible for Gen3 port which uses the same controller as IPQ6018.
Signed-off-by Robert Marko <[email protected]>
Thanks,
Mani
Quoted 19 lines
--- drivers/pci/controller/dwc/pcie-qcom.c | 1 + 1 file changed, 1 insertion(+)drivers/pci/controller/dwc/pcie-qcom.c +1
-0@@ -1817,6 +1817,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 }, { .compatible = "qcom,pcie-ipq8074", .data = &cfg_2_3_3 }, + { .compatible = "qcom,pcie-ipq8074-gen3", .data = &cfg_2_9_0 }, { .compatible = "qcom,pcie-msm8996", .data = &cfg_2_3_2 }, { .compatible = "qcom,pcie-qcs404", .data = &cfg_2_4_0 }, { .compatible = "qcom,pcie-sa8540p", .data = &cfg_1_9_0 },Signature · 1 line
2.38.1
Signature · 1 line
மணிவண்ணன் சதாசிவம்
PATCH 8/9 arm64: dts: qcom: ipq8074: fix Gen3 PCIe node
In reply to Robert MarkoIPQ8074 comes in 2 silicon versions:
* v1 with 2x Gen2 PCIe ports and QMP PHY-s
* v2 with 1x Gen3 and 1x Gen2 PCIe ports and QMP PHY-s
v2 is the final and production version that is actually supported by the kernel, however it looks like PCIe related nodes were added for the v1 SoC.
Finish the PCIe fixup by using the correct compatible, adding missing ATU register space, declaring max-link-speed, use correct ranges, add missing clocks and resets.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 30 +++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +17 -13
@@ -854,16 +854,18 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */ }; pcie0: pci@20000000 { - compatible = "qcom,pcie-ipq8074"; + compatible = "qcom,pcie-ipq8074-gen3"; reg = <0x20000000 0xf1d>, <0x20000f20 0xa8>, - <0x00080000 0x2000>, + <0x20001000 0x1000>, + <0x00080000 0x4000>, <0x20100000 0x1000>; - reg-names = "dbi", "elbi", "parf", "config"; + reg-names = "dbi", "elbi", "atu", "parf", "config"; device_type = "pci"; linux,pci-domain = <0>; bus-range = <0x00 0xff>; num-lanes = <1>; + max-link-speed = <3>; #address-cells = <3>; #size-cells = <2>;
@@ -871,9 +873,9 @@ pcie0: pci@20000000 { phy-names = "pciephy"; ranges = <0x81000000 0 0x20200000 0x20200000 - 0 0x100000 /* downstream I/O */ - 0x82000000 0 0x20300000 0x20300000 - 0 0xd00000>; /* non-prefetchable memory */ + 0 0x10000>, /* downstream I/O */ + <0x82000000 0 0x20220000 0x20220000 + 0 0xfde0000>; /* non-prefetchable memory */ interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "msi";
@@ -891,28 +893,30 @@ IRQ_TYPE_LEVEL_HIGH>, /* int_c */ 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>, + <&gcc GCC_PCIE0_RCHNG_CLK>; clock-names = "iface", "axi_m", "axi_s", - "ahb", - "aux"; + "axi_bridge", + "rchng"; + 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_MASTER_STICKY_ARES>, + <&gcc GCC_PCIE0_AXI_SLAVE_STICKY_ARES>; reset-names = "pipe", "sleep", "sticky", "axi_m", "axi_s", "ahb", - "axi_m_sticky"; + "axi_m_sticky", + "axi_s_sticky"; status = "disabled"; }; };
Signature · 1 line
2.38.1
PATCH 9/9 arm64: dts: qcom: ipq8074: correct PCIe QMP PHY output clock names
In reply to Robert MarkoCurrent PCIe QMP PHY output name were changed in ("arm64: dts: qcom: Fix IPQ8074 PCIe PHY nodes") however it did not account for the fact that GCC driver is relying on the old names to match them as they are being used as the parent for the gcc_pcie0_pipe_clk and gcc_pcie1_pipe_clk.
This broke parenting as GCC could not find the parent clock, so fix it by changing to the names that driver is expecting.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +2 -2
@@ -257,7 +257,7 @@ pcie_phy0: phy@84200 { #clock-cells = <0>; clocks = <&gcc GCC_PCIE0_PIPE_CLK>; clock-names = "pipe0"; - clock-output-names = "pcie_0_pipe_clk"; + clock-output-names = "pcie20_phy0_pipe_clk"; }; };
@@ -285,7 +285,7 @@ pcie_phy1: phy@8e200 { #clock-cells = <0>; clocks = <&gcc GCC_PCIE1_PIPE_CLK>; clock-names = "pipe0"; - clock-output-names = "pcie_1_pipe_clk"; + clock-output-names = "pcie20_phy1_pipe_clk"; }; };
Signature · 1 line
2.38.1