All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC
@ 2023-12-08 10:51 Krzysztof Kozlowski
  2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Manivannan Sadhasivam, Conor Dooley

The PCIe controller on SDX55 has five entries in its iommu-map, MSM8998
has one and SDM845 has sixteen, so allow wider number of items to fix
dtbs_check warnings like:

  qcom-sdx55-mtp.dtb: pcie@1c00000: iommu-map: [[0, 21, 512, 1], [256, 21, 513, 1],
    [512, 21, 514, 1], [768, 21, 515, 1], [1024, 21, 516, 1]] is too long

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Please take the patch via PCI tree.

Changes in v3:
1. None

Changes in v2:
1. Add Acs/Rb.
---
 Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 9dbc07dfd48f..5056da499f04 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -66,7 +66,8 @@ properties:
     maxItems: 8
 
   iommu-map:
-    maxItems: 2
+    minItems: 1
+    maxItems: 16
 
   # Common definitions for clocks, clock-names and reset.
   # Platform constraints are described later.
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x
  2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
@ 2023-12-08 10:51 ` Krzysztof Kozlowski
  2023-12-08 20:56   ` Rob Herring
  2023-12-09 17:38   ` Konrad Dybcio
  2023-12-08 10:51 ` [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150 Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

PCI node in Qualcomm SC8180x DTS has 8 clocks:

  sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed:
    ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Please take the patch via PCI tree.

Changes in v3:
1. Split from sm8150 change. Due to split/changes around sm8150, drop
   Mani's Rb tag.
2. Drop unneeded oneOf for clocks.

Changes in v2:
1. Add Acs/Rb.
2. Correct error message for sm8150.
---
 .../devicetree/bindings/pci/qcom,pcie.yaml    | 28 ++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 5056da499f04..5214bf7a9045 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -483,6 +483,33 @@ allOf:
           items:
             - const: pci # PCIe core reset
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - qcom,pcie-sc8180x
+    then:
+      properties:
+        clocks:
+          minItems: 8
+          maxItems: 8
+        clock-names:
+          items:
+            - const: pipe # PIPE clock
+            - const: aux # Auxiliary clock
+            - const: cfg # Configuration clock
+            - const: bus_master # Master AXI clock
+            - const: bus_slave # Slave AXI clock
+            - const: slave_q2a # Slave Q2A clock
+            - const: ref # REFERENCE clock
+            - const: tbu # PCIe TBU clock
+        resets:
+          maxItems: 1
+        reset-names:
+          items:
+            - const: pci # PCIe core reset
+
   - if:
       properties:
         compatible:
@@ -531,7 +558,6 @@ allOf:
         compatible:
           contains:
             enum:
-              - qcom,pcie-sc8180x
               - qcom,pcie-sm8150
               - qcom,pcie-sm8250
     then:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150
  2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
  2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
@ 2023-12-08 10:51 ` Krzysztof Kozlowski
  2023-12-08 11:09   ` Dmitry Baryshkov
  2023-12-08 20:57   ` Rob Herring
  2023-12-08 10:51 ` [PATCH v3 4/4] arm64: dts: qcom: sm8150: add necessary ref clock to PCIe Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski, Manivannan Sadhasivam

PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the
ref clock.

Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Please take the patch via PCI tree.

Changes in v3:
1. New patch: Split from sc8180x change.
2. Add refclk as explained here:
   https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
---
 .../devicetree/bindings/pci/qcom,pcie.yaml    | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 5214bf7a9045..a93ab3b54066 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -559,6 +559,32 @@ allOf:
           contains:
             enum:
               - qcom,pcie-sm8150
+    then:
+      properties:
+        clocks:
+          minItems: 8
+          maxItems: 8
+        clock-names:
+          items:
+            - const: pipe # PIPE clock
+            - const: aux # Auxiliary clock
+            - const: cfg # Configuration clock
+            - const: bus_master # Master AXI clock
+            - const: bus_slave # Slave AXI clock
+            - const: slave_q2a # Slave Q2A clock
+            - const: tbu # PCIe TBU clock
+            - const: ref # REFERENCE clock
+        resets:
+          maxItems: 1
+        reset-names:
+          items:
+            - const: pci # PCIe core reset
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
               - qcom,pcie-sm8250
     then:
       oneOf:
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3 4/4] arm64: dts: qcom: sm8150: add necessary ref clock to PCIe
  2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
  2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
  2023-12-08 10:51 ` [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150 Krzysztof Kozlowski
@ 2023-12-08 10:51 ` Krzysztof Kozlowski
  2023-12-15 23:55 ` [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Wilczyński
  2024-01-28  2:17 ` (subset) " Bjorn Andersson
  4 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 10:51 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The PCIe nodes should get the ref clock, according to information from
Qualcomm.

Link: https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Patch should go via Qcom tree, if the bindings get accepted.

Changes in v3:
1. New patch
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index 5edc557ba04a..22ee3cd5549d 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -1858,14 +1858,16 @@ pcie0: pci@1c00000 {
 				 <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
 				 <&gcc GCC_PCIE_0_SLV_AXI_CLK>,
 				 <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>,
-				 <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>;
+				 <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "pipe",
 				      "aux",
 				      "cfg",
 				      "bus_master",
 				      "bus_slave",
 				      "slave_q2a",
-				      "tbu";
+				      "tbu",
+				      "ref";
 
 			iommu-map = <0x0   &apps_smmu 0x1d80 0x1>,
 				    <0x100 &apps_smmu 0x1d81 0x1>;
@@ -1949,14 +1951,16 @@ pcie1: pci@1c08000 {
 				 <&gcc GCC_PCIE_1_MSTR_AXI_CLK>,
 				 <&gcc GCC_PCIE_1_SLV_AXI_CLK>,
 				 <&gcc GCC_PCIE_1_SLV_Q2A_AXI_CLK>,
-				 <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>;
+				 <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>,
+				 <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "pipe",
 				      "aux",
 				      "cfg",
 				      "bus_master",
 				      "bus_slave",
 				      "slave_q2a",
-				      "tbu";
+				      "tbu",
+				      "ref";
 
 			assigned-clocks = <&gcc GCC_PCIE_1_AUX_CLK>;
 			assigned-clock-rates = <19200000>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150
  2023-12-08 10:51 ` [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150 Krzysztof Kozlowski
@ 2023-12-08 11:09   ` Dmitry Baryshkov
  2023-12-08 12:17     ` Krzysztof Kozlowski
  2023-12-08 20:57   ` Rob Herring
  1 sibling, 1 reply; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-12-08 11:09 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel,
	Manivannan Sadhasivam

On Fri, 8 Dec 2023 at 12:52, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the
> ref clock.
>
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> ---
>
> Please take the patch via PCI tree.
>
> Changes in v3:
> 1. New patch: Split from sc8180x change.
> 2. Add refclk as explained here:
>    https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
> ---
>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index 5214bf7a9045..a93ab3b54066 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -559,6 +559,32 @@ allOf:
>            contains:
>              enum:
>                - qcom,pcie-sm8150
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 8
> +          maxItems: 8
> +        clock-names:
> +          items:
> +            - const: pipe # PIPE clock
> +            - const: aux # Auxiliary clock
> +            - const: cfg # Configuration clock
> +            - const: bus_master # Master AXI clock
> +            - const: bus_slave # Slave AXI clock
> +            - const: slave_q2a # Slave Q2A clock
> +            - const: tbu # PCIe TBU clock
> +            - const: ref # REFERENCE clock

Can we change the order of the tbu and ref clocks and fold this into
the sc810x case?

> +        resets:
> +          maxItems: 1
> +        reset-names:
> +          items:
> +            - const: pci # PCIe core reset
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
>                - qcom,pcie-sm8250
>      then:
>        oneOf:
> --
> 2.34.1
>
>


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150
  2023-12-08 11:09   ` Dmitry Baryshkov
@ 2023-12-08 12:17     ` Krzysztof Kozlowski
  2023-12-08 12:36       ` Dmitry Baryshkov
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-08 12:17 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel,
	Manivannan Sadhasivam

On 08/12/2023 12:09, Dmitry Baryshkov wrote:
> On Fri, 8 Dec 2023 at 12:52, Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>>
>> PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the
>> ref clock.
>>
>> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
>>
>> Please take the patch via PCI tree.
>>
>> Changes in v3:
>> 1. New patch: Split from sc8180x change.
>> 2. Add refclk as explained here:
>>    https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
>> ---
>>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 26 +++++++++++++++++++
>>  1 file changed, 26 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
>> index 5214bf7a9045..a93ab3b54066 100644
>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
>> @@ -559,6 +559,32 @@ allOf:
>>            contains:
>>              enum:
>>                - qcom,pcie-sm8150
>> +    then:
>> +      properties:
>> +        clocks:
>> +          minItems: 8
>> +          maxItems: 8
>> +        clock-names:
>> +          items:
>> +            - const: pipe # PIPE clock
>> +            - const: aux # Auxiliary clock
>> +            - const: cfg # Configuration clock
>> +            - const: bus_master # Master AXI clock
>> +            - const: bus_slave # Slave AXI clock
>> +            - const: slave_q2a # Slave Q2A clock
>> +            - const: tbu # PCIe TBU clock
>> +            - const: ref # REFERENCE clock
> 
> Can we change the order of the tbu and ref clocks and fold this into
> the sc810x case?

I prefer not, because this is an ABI-concern and we are supposed to keep
things stable.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150
  2023-12-08 12:17     ` Krzysztof Kozlowski
@ 2023-12-08 12:36       ` Dmitry Baryshkov
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Baryshkov @ 2023-12-08 12:36 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel,
	Manivannan Sadhasivam

On Fri, 8 Dec 2023 at 14:18, Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> On 08/12/2023 12:09, Dmitry Baryshkov wrote:
> > On Fri, 8 Dec 2023 at 12:52, Krzysztof Kozlowski
> > <krzysztof.kozlowski@linaro.org> wrote:
> >>
> >> PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the
> >> ref clock.
> >>
> >> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> >>
> >> ---
> >>
> >> Please take the patch via PCI tree.
> >>
> >> Changes in v3:
> >> 1. New patch: Split from sc8180x change.
> >> 2. Add refclk as explained here:
> >>    https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
> >> ---
> >>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 26 +++++++++++++++++++
> >>  1 file changed, 26 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> >> index 5214bf7a9045..a93ab3b54066 100644
> >> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> >> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> >> @@ -559,6 +559,32 @@ allOf:
> >>            contains:
> >>              enum:
> >>                - qcom,pcie-sm8150
> >> +    then:
> >> +      properties:
> >> +        clocks:
> >> +          minItems: 8
> >> +          maxItems: 8
> >> +        clock-names:
> >> +          items:
> >> +            - const: pipe # PIPE clock
> >> +            - const: aux # Auxiliary clock
> >> +            - const: cfg # Configuration clock
> >> +            - const: bus_master # Master AXI clock
> >> +            - const: bus_slave # Slave AXI clock
> >> +            - const: slave_q2a # Slave Q2A clock
> >> +            - const: tbu # PCIe TBU clock
> >> +            - const: ref # REFERENCE clock
> >
> > Can we change the order of the tbu and ref clocks and fold this into
> > the sc810x case?
>
> I prefer not, because this is an ABI-concern and we are supposed to keep
> things stable.

Ack, fair enough.

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x
  2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
@ 2023-12-08 20:56   ` Rob Herring
  2023-12-09 17:38   ` Konrad Dybcio
  1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2023-12-08 20:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Conor Dooley, Konrad Dybcio, Bjorn Helgaas, devicetree,
	Manivannan Sadhasivam, Andy Gross, linux-pci,
	Krzysztof Kozlowski, linux-kernel, linux-arm-msm,
	Bjorn Andersson, Krzysztof Wilczyński, Lorenzo Pieralisi


On Fri, 08 Dec 2023 11:51:53 +0100, Krzysztof Kozlowski wrote:
> PCI node in Qualcomm SC8180x DTS has 8 clocks:
> 
>   sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed:
>     ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Please take the patch via PCI tree.
> 
> Changes in v3:
> 1. Split from sm8150 change. Due to split/changes around sm8150, drop
>    Mani's Rb tag.
> 2. Drop unneeded oneOf for clocks.
> 
> Changes in v2:
> 1. Add Acs/Rb.
> 2. Correct error message for sm8150.
> ---
>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 28 ++++++++++++++++++-
>  1 file changed, 27 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150
  2023-12-08 10:51 ` [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150 Krzysztof Kozlowski
  2023-12-08 11:09   ` Dmitry Baryshkov
@ 2023-12-08 20:57   ` Rob Herring
  1 sibling, 0 replies; 14+ messages in thread
From: Rob Herring @ 2023-12-08 20:57 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-kernel, Conor Dooley, Lorenzo Pieralisi, Konrad Dybcio,
	devicetree, Manivannan Sadhasivam, Andy Gross,
	Krzysztof Kozlowski, linux-pci, linux-arm-msm,
	Manivannan Sadhasivam, Krzysztof Wilczyński,
	Bjorn Andersson, Bjorn Helgaas


On Fri, 08 Dec 2023 11:51:54 +0100, Krzysztof Kozlowski wrote:
> PCI node in Qualcomm SM8150 should have exactly 8 clocks, including the
> ref clock.
> 
> Suggested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Please take the patch via PCI tree.
> 
> Changes in v3:
> 1. New patch: Split from sc8180x change.
> 2. Add refclk as explained here:
>    https://lore.kernel.org/all/20231121065440.GB3315@thinkpad/
> ---
>  .../devicetree/bindings/pci/qcom,pcie.yaml    | 26 +++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x
  2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
  2023-12-08 20:56   ` Rob Herring
@ 2023-12-09 17:38   ` Konrad Dybcio
  2023-12-11 10:04     ` Krzysztof Kozlowski
  1 sibling, 1 reply; 14+ messages in thread
From: Konrad Dybcio @ 2023-12-09 17:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel

On 8.12.2023 11:51, Krzysztof Kozlowski wrote:
> PCI node in Qualcomm SC8180x DTS has 8 clocks:
> 
>   sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed:
>     ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
[...]

> +          items:
> +            - const: pipe # PIPE clock
> +            - const: aux # Auxiliary clock
> +            - const: cfg # Configuration clock
> +            - const: bus_master # Master AXI clock
> +            - const: bus_slave # Slave AXI clock
> +            - const: slave_q2a # Slave Q2A clock
> +            - const: ref # REFERENCE clock
> +            - const: tbu # PCIe TBU clock
Are we sure this one is actually necessary? Or is it just for the
SMMU debug peripheral? [1] Would be nice to test if it works
normally (unused clk shutdown / forced shutdown of this one might
be necessary in case it's on from XBL) and during a PCIe-related
SMMU fault.

Konrad

[1] https://lore.kernel.org/linux-arm-msm/20231118042730.2799-1-quic_c_gdjako@quicinc.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x
  2023-12-09 17:38   ` Konrad Dybcio
@ 2023-12-11 10:04     ` Krzysztof Kozlowski
  2023-12-14 18:19       ` Konrad Dybcio
  0 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-11 10:04 UTC (permalink / raw)
  To: Konrad Dybcio, Andy Gross, Bjorn Andersson, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel

On 09/12/2023 18:38, Konrad Dybcio wrote:
> On 8.12.2023 11:51, Krzysztof Kozlowski wrote:
>> PCI node in Qualcomm SC8180x DTS has 8 clocks:
>>
>>   sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed:
>>     ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>
>> ---
> [...]
> 
>> +          items:
>> +            - const: pipe # PIPE clock
>> +            - const: aux # Auxiliary clock
>> +            - const: cfg # Configuration clock
>> +            - const: bus_master # Master AXI clock
>> +            - const: bus_slave # Slave AXI clock
>> +            - const: slave_q2a # Slave Q2A clock
>> +            - const: ref # REFERENCE clock
>> +            - const: tbu # PCIe TBU clock
> Are we sure this one is actually necessary? Or is it just for the
> SMMU debug peripheral? [1] Would be nice to test if it works
> normally (unused clk shutdown / forced shutdown of this one might
> be necessary in case it's on from XBL) and during a PCIe-related
> SMMU fault.

I did not validate whether the list is actually correct with datasheets,
but aligned it to DTS. I don't have the hardware to test.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x
  2023-12-11 10:04     ` Krzysztof Kozlowski
@ 2023-12-14 18:19       ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-12-14 18:19 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Andy Gross, Bjorn Andersson, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Manivannan Sadhasivam,
	linux-arm-msm, linux-pci, devicetree, linux-kernel



On 12/11/23 11:04, Krzysztof Kozlowski wrote:
> On 09/12/2023 18:38, Konrad Dybcio wrote:
>> On 8.12.2023 11:51, Krzysztof Kozlowski wrote:
>>> PCI node in Qualcomm SC8180x DTS has 8 clocks:
>>>
>>>    sc8180x-primus.dtb: pci@1c00000: 'oneOf' conditional failed, one must be fixed:
>>>      ['pipe', 'aux', 'cfg', 'bus_master', 'bus_slave', 'slave_q2a', 'ref', 'tbu'] is too short
>>>
>>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>
>>> ---
>> [...]
>>
>>> +          items:
>>> +            - const: pipe # PIPE clock
>>> +            - const: aux # Auxiliary clock
>>> +            - const: cfg # Configuration clock
>>> +            - const: bus_master # Master AXI clock
>>> +            - const: bus_slave # Slave AXI clock
>>> +            - const: slave_q2a # Slave Q2A clock
>>> +            - const: ref # REFERENCE clock
>>> +            - const: tbu # PCIe TBU clock
>> Are we sure this one is actually necessary? Or is it just for the
>> SMMU debug peripheral? [1] Would be nice to test if it works
>> normally (unused clk shutdown / forced shutdown of this one might
>> be necessary in case it's on from XBL) and during a PCIe-related
>> SMMU fault.
> 
> I did not validate whether the list is actually correct with datasheets,
> but aligned it to DTS. I don't have the hardware to test.
While I can't test suspend yet, the PCIe itself works fine
without these clocks. Mani, can we get rid of it?

Konrad

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC
  2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2023-12-08 10:51 ` [PATCH v3 4/4] arm64: dts: qcom: sm8150: add necessary ref clock to PCIe Krzysztof Kozlowski
@ 2023-12-15 23:55 ` Krzysztof Wilczyński
  2024-01-28  2:17 ` (subset) " Bjorn Andersson
  4 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Wilczyński @ 2023-12-15 23:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
	Lorenzo Pieralisi, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, linux-arm-msm, linux-pci,
	devicetree, linux-kernel, Manivannan Sadhasivam, Conor Dooley

Hello,

Applied to dt-bindings, thank you!

[01/04] dt-bindings: PCI: qcom: Adjust iommu-map for different SoC
        https://git.kernel.org/pci/pci/c/4791c44c0a98
[02/04] dt-bindings: PCI: qcom: Correct clocks for SC8180x
        https://git.kernel.org/pci/pci/c/f2ab5a2455d9
[03/04] dt-bindings: PCI: qcom: Correct clocks for SM8150
        https://git.kernel.org/pci/pci/c/a711253d5f70

The above will go through the PCI tree.

	Krzysztof

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: (subset) [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC
  2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2023-12-15 23:55 ` [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Wilczyński
@ 2024-01-28  2:17 ` Bjorn Andersson
  4 siblings, 0 replies; 14+ messages in thread
From: Bjorn Andersson @ 2024-01-28  2:17 UTC (permalink / raw)
  To: Andy Gross, Konrad Dybcio, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Manivannan Sadhasivam, linux-arm-msm, linux-pci,
	devicetree, linux-kernel, Krzysztof Kozlowski
  Cc: Manivannan Sadhasivam, Conor Dooley


On Fri, 08 Dec 2023 11:51:52 +0100, Krzysztof Kozlowski wrote:
> The PCIe controller on SDX55 has five entries in its iommu-map, MSM8998
> has one and SDM845 has sixteen, so allow wider number of items to fix
> dtbs_check warnings like:
> 
>   qcom-sdx55-mtp.dtb: pcie@1c00000: iommu-map: [[0, 21, 512, 1], [256, 21, 513, 1],
>     [512, 21, 514, 1], [768, 21, 515, 1], [1024, 21, 516, 1]] is too long
> 
> [...]

Applied, thanks!

[4/4] arm64: dts: qcom: sm8150: add necessary ref clock to PCIe
      commit: 6de995bc46344d5a6f0c80fee526bfb5d11c3d88

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2024-01-28  2:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-08 10:51 [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Kozlowski
2023-12-08 10:51 ` [PATCH v3 2/4] dt-bindings: PCI: qcom: correct clocks for SC8180x Krzysztof Kozlowski
2023-12-08 20:56   ` Rob Herring
2023-12-09 17:38   ` Konrad Dybcio
2023-12-11 10:04     ` Krzysztof Kozlowski
2023-12-14 18:19       ` Konrad Dybcio
2023-12-08 10:51 ` [PATCH v3 3/4] dt-bindings: PCI: qcom: correct clocks for SM8150 Krzysztof Kozlowski
2023-12-08 11:09   ` Dmitry Baryshkov
2023-12-08 12:17     ` Krzysztof Kozlowski
2023-12-08 12:36       ` Dmitry Baryshkov
2023-12-08 20:57   ` Rob Herring
2023-12-08 10:51 ` [PATCH v3 4/4] arm64: dts: qcom: sm8150: add necessary ref clock to PCIe Krzysztof Kozlowski
2023-12-15 23:55 ` [PATCH v3 1/4] dt-bindings: PCI: qcom: adjust iommu-map for different SoC Krzysztof Wilczyński
2024-01-28  2:17 ` (subset) " Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.