* [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible
@ 2023-03-20 14:46 Abel Vesa
2023-03-20 14:46 ` [RESEND PATCH v9 2/2] PCI: qcom: Add SM8550 PCIe support Abel Vesa
2023-03-21 19:54 ` [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Abel Vesa @ 2023-03-20 14:46 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Krzysztof Kozlowski, Manivannan Sadhasivam, Philipp Zabel,
Linux Kernel Mailing List
Cc: linux-arm-msm, linux-pci, devicetree, Krzysztof Kozlowski,
Johan Hovold
Add the SM8550 platform to the binding.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
This patch is a resend of the following:
https://lore.kernel.org/all/20230208180020.2761766-10-abel.vesa@linaro.org/
No changes since then.
.../devicetree/bindings/pci/qcom,pcie.yaml | 40 +++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index fb32c43dd12d..be7b4b805291 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -38,6 +38,7 @@ properties:
- qcom,pcie-sm8350
- qcom,pcie-sm8450-pcie0
- qcom,pcie-sm8450-pcie1
+ - qcom,pcie-sm8550
- items:
- const: qcom,pcie-msm8998
- const: qcom,pcie-msm8996
@@ -58,6 +59,12 @@ properties:
minItems: 1
maxItems: 8
+ iommus:
+ maxItems: 1
+
+ iommu-map:
+ maxItems: 2
+
# Common definitions for clocks, clock-names and reset.
# Platform constraints are described later.
clocks:
@@ -205,6 +212,7 @@ allOf:
- qcom,pcie-sm8350
- qcom,pcie-sm8450-pcie0
- qcom,pcie-sm8450-pcie1
+ - qcom,pcie-sm8550
then:
properties:
reg:
@@ -639,6 +647,37 @@ allOf:
items:
- const: pci # PCIe core reset
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pcie-sm8550
+ then:
+ properties:
+ clocks:
+ minItems: 7
+ maxItems: 8
+ clock-names:
+ minItems: 7
+ items:
+ - 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: ddrss_sf_tbu # PCIe SF TBU clock
+ - const: noc_aggr # Aggre NoC PCIe AXI clock
+ - const: cnoc_sf_axi # Config NoC PCIe1 AXI clock
+ resets:
+ minItems: 1
+ maxItems: 2
+ reset-names:
+ minItems: 1
+ items:
+ - const: pci # PCIe core reset
+ - const: link_down # PCIe link down reset
+
- if:
properties:
compatible:
@@ -724,6 +763,7 @@ allOf:
- qcom,pcie-sm8350
- qcom,pcie-sm8450-pcie0
- qcom,pcie-sm8450-pcie1
+ - qcom,pcie-sm8550
then:
oneOf:
- properties:
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RESEND PATCH v9 2/2] PCI: qcom: Add SM8550 PCIe support
2023-03-20 14:46 [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Abel Vesa
@ 2023-03-20 14:46 ` Abel Vesa
2023-03-21 19:54 ` [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2023-03-20 14:46 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński, Rob Herring,
Krzysztof Kozlowski, Manivannan Sadhasivam, Philipp Zabel,
Linux Kernel Mailing List
Cc: linux-arm-msm, linux-pci, devicetree, Johan Hovold
Add compatible for both PCIe found on SM8550.
Also add the noc_aggr and cnoc_sf_axi clocks needed by the SM8550.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
---
This patch is a resend of the following:
https://lore.kernel.org/all/20230208180020.2761766-11-abel.vesa@linaro.org/
No changes since then.
drivers/pci/controller/dwc/pcie-qcom.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index a232b04af048..6a70c9c6f98d 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -182,10 +182,10 @@ struct qcom_pcie_resources_2_3_3 {
/* 6 clocks typically, 7 for sm8250 */
struct qcom_pcie_resources_2_7_0 {
- struct clk_bulk_data clks[12];
+ struct clk_bulk_data clks[14];
int num_clks;
struct regulator_bulk_data supplies[2];
- struct reset_control *pci_reset;
+ struct reset_control *rst;
};
struct qcom_pcie_resources_2_9_0 {
@@ -1177,9 +1177,9 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
unsigned int idx;
int ret;
- res->pci_reset = devm_reset_control_get_exclusive(dev, "pci");
- if (IS_ERR(res->pci_reset))
- return PTR_ERR(res->pci_reset);
+ res->rst = devm_reset_control_array_get_exclusive(dev);
+ if (IS_ERR(res->rst))
+ return PTR_ERR(res->rst);
res->supplies[0].supply = "vdda";
res->supplies[1].supply = "vddpe-3v3";
@@ -1205,9 +1205,11 @@ static int qcom_pcie_get_resources_2_7_0(struct qcom_pcie *pcie)
res->clks[idx++].id = "ddrss_sf_tbu";
res->clks[idx++].id = "aggre0";
res->clks[idx++].id = "aggre1";
+ res->clks[idx++].id = "noc_aggr";
res->clks[idx++].id = "noc_aggr_4";
res->clks[idx++].id = "noc_aggr_south_sf";
res->clks[idx++].id = "cnoc_qx";
+ res->clks[idx++].id = "cnoc_sf_axi";
num_opt_clks = idx - num_clks;
res->num_clks = idx;
@@ -1237,17 +1239,17 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie)
if (ret < 0)
goto err_disable_regulators;
- ret = reset_control_assert(res->pci_reset);
- if (ret < 0) {
- dev_err(dev, "cannot assert pci reset\n");
+ ret = reset_control_assert(res->rst);
+ if (ret) {
+ dev_err(dev, "reset assert failed (%d)\n", ret);
goto err_disable_clocks;
}
usleep_range(1000, 1500);
- ret = reset_control_deassert(res->pci_reset);
- if (ret < 0) {
- dev_err(dev, "cannot deassert pci reset\n");
+ ret = reset_control_deassert(res->rst);
+ if (ret) {
+ dev_err(dev, "reset deassert failed (%d)\n", ret);
goto err_disable_clocks;
}
@@ -1841,6 +1843,7 @@ static const struct of_device_id qcom_pcie_match[] = {
{ .compatible = "qcom,pcie-sm8350", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sm8450-pcie0", .data = &cfg_1_9_0 },
{ .compatible = "qcom,pcie-sm8450-pcie1", .data = &cfg_1_9_0 },
+ { .compatible = "qcom,pcie-sm8550", .data = &cfg_1_9_0 },
{ }
};
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible
2023-03-20 14:46 [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Abel Vesa
2023-03-20 14:46 ` [RESEND PATCH v9 2/2] PCI: qcom: Add SM8550 PCIe support Abel Vesa
@ 2023-03-21 19:54 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2023-03-21 19:54 UTC (permalink / raw)
To: Abel Vesa
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński, Krzysztof Kozlowski,
Manivannan Sadhasivam, Philipp Zabel, Linux Kernel Mailing List,
linux-arm-msm, linux-pci, devicetree, Krzysztof Kozlowski,
Johan Hovold
On Mon, Mar 20, 2023 at 04:46:57PM +0200, Abel Vesa wrote:
> Add the SM8550 platform to the binding.
>
> Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>
> This patch is a resend of the following:
> https://lore.kernel.org/all/20230208180020.2761766-10-abel.vesa@linaro.org/
>
> No changes since then.
>
> .../devicetree/bindings/pci/qcom,pcie.yaml | 40 +++++++++++++++++++
> 1 file changed, 40 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index fb32c43dd12d..be7b4b805291 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -38,6 +38,7 @@ properties:
> - qcom,pcie-sm8350
> - qcom,pcie-sm8450-pcie0
> - qcom,pcie-sm8450-pcie1
> + - qcom,pcie-sm8550
> - items:
> - const: qcom,pcie-msm8998
> - const: qcom,pcie-msm8996
> @@ -58,6 +59,12 @@ properties:
> minItems: 1
> maxItems: 8
>
> + iommus:
> + maxItems: 1
> +
> + iommu-map:
> + maxItems: 2
I think this will conflict with a series from Mani. 'iommus' use is also
wrong here.
> +
> # Common definitions for clocks, clock-names and reset.
> # Platform constraints are described later.
> clocks:
> @@ -205,6 +212,7 @@ allOf:
> - qcom,pcie-sm8350
> - qcom,pcie-sm8450-pcie0
> - qcom,pcie-sm8450-pcie1
> + - qcom,pcie-sm8550
> then:
> properties:
> reg:
> @@ -639,6 +647,37 @@ allOf:
> items:
> - const: pci # PCIe core reset
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,pcie-sm8550
> + then:
> + properties:
> + clocks:
> + minItems: 7
> + maxItems: 8
> + clock-names:
> + minItems: 7
> + items:
> + - 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: ddrss_sf_tbu # PCIe SF TBU clock
> + - const: noc_aggr # Aggre NoC PCIe AXI clock
> + - const: cnoc_sf_axi # Config NoC PCIe1 AXI clock
> + resets:
> + minItems: 1
> + maxItems: 2
> + reset-names:
> + minItems: 1
> + items:
> + - const: pci # PCIe core reset
> + - const: link_down # PCIe link down reset
> +
> - if:
> properties:
> compatible:
> @@ -724,6 +763,7 @@ allOf:
> - qcom,pcie-sm8350
> - qcom,pcie-sm8450-pcie0
> - qcom,pcie-sm8450-pcie1
> + - qcom,pcie-sm8550
> then:
> oneOf:
> - properties:
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-21 19:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-20 14:46 [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Abel Vesa
2023-03-20 14:46 ` [RESEND PATCH v9 2/2] PCI: qcom: Add SM8550 PCIe support Abel Vesa
2023-03-21 19:54 ` [RESEND PATCH v9 1/2] dt-bindings: PCI: qcom: Add SM8550 compatible Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).