* [PATCH V2 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-27 6:27 ` Krzysztof Kozlowski
2024-08-27 4:57 ` [PATCH V2 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC Sricharan R
` (5 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Document the Qualcomm UNIPHY PCIe 28LP present in IPQ5018.
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
---
[v2] Fixed filename, title, fixed clock-name, reset-names
.../phy/qcom,ipq5018-uniphy-pcie.yaml | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,ipq5018-uniphy-pcie.yaml
diff --git a/Documentation/devicetree/bindings/phy/qcom,ipq5018-uniphy-pcie.yaml b/Documentation/devicetree/bindings/phy/qcom,ipq5018-uniphy-pcie.yaml
new file mode 100644
index 000000000000..c04dd179eb8b
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,ipq5018-uniphy-pcie.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,ipq5018-uniphy-pcie.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm UNIPHY PCIe 28LP PHY controller for genx1, genx2
+
+maintainers:
+ - Nitheesh Sekar <quic_nsekar@quicinc.com>
+ - Sricharan Ramabadhran <quic_srichara@quicinc.com>
+
+properties:
+ compatible:
+ enum:
+ - qcom,ipq5018-uniphy-pcie-gen2x1
+ - qcom,ipq5018-uniphy-pcie-gen2x2
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ items:
+ - const: pipe
+
+ resets:
+ maxItems: 2
+
+ reset-names:
+ items:
+ - const: phy
+ - const: common
+
+ "#phy-cells":
+ const: 0
+
+ "#clock-cells":
+ const: 0
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - resets
+ - reset-names
+ - "#phy-cells"
+ - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-ipq5018.h>
+ #include <dt-bindings/reset/qcom,gcc-ipq5018.h>
+
+ phy@86000 {
+ compatible = "qcom,ipq5018-uniphy-pcie-gen2x2";
+ reg = <0x86000 0x1000>;
+ clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
+ clock-names = "pipe";
+ resets = <&gcc GCC_PCIE0_PHY_BCR>,
+ <&gcc GCC_PCIE0PHY_PHY_BCR>;
+ reset-names = "phy", "common";
+ #phy-cells = <0>;
+ #clock-cells = <0>;
+ };
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy
2024-08-27 4:57 ` [PATCH V2 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Sricharan R
@ 2024-08-27 6:27 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-27 6:27 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko
On Tue, Aug 27, 2024 at 10:27:52AM +0530, Sricharan R wrote:
> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>
> Document the Qualcomm UNIPHY PCIe 28LP present in IPQ5018.
>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> ---
> [v2] Fixed filename, title, fixed clock-name, reset-names
OK, I see detailed changelog in commit, not in cover letter, so this
solves my previous comment.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V2 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
2024-08-27 4:57 ` [PATCH V2 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-30 8:35 ` Manivannan Sadhasivam
2024-08-27 4:57 ` [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver Sricharan R
` (4 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Add support for the PCIe controller on the Qualcomm
IPQ5108 SoC to the bindings.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
---
[v2] Added reviewed by tag
.../devicetree/bindings/pci/qcom,pcie.yaml | 35 +++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index f867746b1ae5..c12efa27b8d8 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -21,6 +21,7 @@ properties:
- qcom,pcie-apq8064
- qcom,pcie-apq8084
- qcom,pcie-ipq4019
+ - qcom,pcie-ipq5018
- qcom,pcie-ipq6018
- qcom,pcie-ipq8064
- qcom,pcie-ipq8064-v2
@@ -312,6 +313,39 @@ allOf:
- const: ahb # AHB reset
- const: phy_ahb # PHY AHB reset
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - qcom,pcie-ipq5018
+ then:
+ properties:
+ clocks:
+ minItems: 6
+ maxItems: 6
+ clock-names:
+ items:
+ - const: iface # PCIe to SysNOC BIU clock
+ - const: axi_m # AXI Master clock
+ - const: axi_s # AXI Slave clock
+ - const: ahb # AHB clock
+ - const: aux # Auxiliary clock
+ - const: axi_bridge # AXI bridge clock
+ resets:
+ minItems: 8
+ maxItems: 8
+ reset-names:
+ items:
+ - const: pipe # PIPE reset
+ - const: sleep # Sleep reset
+ - const: sticky # Core sticky reset
+ - const: axi_m # AXI master reset
+ - const: axi_s # AXI slave reset
+ - const: ahb # AHB reset
+ - const: axi_m_sticky # AXI master sticky reset
+ - const: axi_s_sticky # AXI slave sticky reset
+
- if:
properties:
compatible:
@@ -503,6 +537,7 @@ allOf:
enum:
- qcom,pcie-apq8064
- qcom,pcie-ipq4019
+ - qcom,pcie-ipq5018
- qcom,pcie-ipq8064
- qcom,pcie-ipq8064v2
- qcom,pcie-ipq8074
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC
2024-08-27 4:57 ` [PATCH V2 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC Sricharan R
@ 2024-08-30 8:35 ` Manivannan Sadhasivam
0 siblings, 0 replies; 18+ messages in thread
From: Manivannan Sadhasivam @ 2024-08-30 8:35 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, robh, krzk+dt, conor+dt, vkoul, kishon,
andersson, konradybcio, p.zabel, dmitry.baryshkov, quic_nsekar,
linux-arm-msm, linux-pci, devicetree, linux-kernel, linux-phy,
robimarko
On Tue, Aug 27, 2024 at 10:27:53AM +0530, Sricharan R wrote:
> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>
> Add support for the PCIe controller on the Qualcomm
> IPQ5108 SoC to the bindings.
>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
- Mani
> ---
> [v2] Added reviewed by tag
>
> .../devicetree/bindings/pci/qcom,pcie.yaml | 35 +++++++++++++++++++
> 1 file changed, 35 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index f867746b1ae5..c12efa27b8d8 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -21,6 +21,7 @@ properties:
> - qcom,pcie-apq8064
> - qcom,pcie-apq8084
> - qcom,pcie-ipq4019
> + - qcom,pcie-ipq5018
> - qcom,pcie-ipq6018
> - qcom,pcie-ipq8064
> - qcom,pcie-ipq8064-v2
> @@ -312,6 +313,39 @@ allOf:
> - const: ahb # AHB reset
> - const: phy_ahb # PHY AHB reset
>
> + - if:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,pcie-ipq5018
> + then:
> + properties:
> + clocks:
> + minItems: 6
> + maxItems: 6
> + clock-names:
> + items:
> + - const: iface # PCIe to SysNOC BIU clock
> + - const: axi_m # AXI Master clock
> + - const: axi_s # AXI Slave clock
> + - const: ahb # AHB clock
> + - const: aux # Auxiliary clock
> + - const: axi_bridge # AXI bridge clock
> + resets:
> + minItems: 8
> + maxItems: 8
> + reset-names:
> + items:
> + - const: pipe # PIPE reset
> + - const: sleep # Sleep reset
> + - const: sticky # Core sticky reset
> + - const: axi_m # AXI master reset
> + - const: axi_s # AXI slave reset
> + - const: ahb # AHB reset
> + - const: axi_m_sticky # AXI master sticky reset
> + - const: axi_s_sticky # AXI slave sticky reset
> +
> - if:
> properties:
> compatible:
> @@ -503,6 +537,7 @@ allOf:
> enum:
> - qcom,pcie-apq8064
> - qcom,pcie-ipq4019
> + - qcom,pcie-ipq5018
> - qcom,pcie-ipq8064
> - qcom,pcie-ipq8064v2
> - qcom,pcie-ipq8074
> --
> 2.34.1
>
--
மணிவண்ணன் சதாசிவம்
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
2024-08-27 4:57 ` [PATCH V2 1/6] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Sricharan R
2024-08-27 4:57 ` [PATCH V2 2/6] dt-bindings: PCI: qcom: Add IPQ5108 SoC Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-27 6:25 ` Krzysztof Kozlowski
2024-08-27 4:57 ` [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018 Sricharan R
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Add Qualcomm PCIe UNIPHY 28LP driver support present
in Qualcomm IPQ5018 SoC and the phy init sequence.
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
---
[v2] Added the single lane compatible
Added dev_err_probe, removed .owner, MODULE_ALIAS.
Used for() instead of while in qcom_uniphy_pcie_init
Used devm_platform_get_and_ioremap_resource
Dropped usage of clock-output-name
Fixed init order to enable clks first, then reset
drivers/phy/qualcomm/Kconfig | 12 +
drivers/phy/qualcomm/Makefile | 1 +
.../phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c | 341 ++++++++++++++++++
3 files changed, 354 insertions(+)
create mode 100644 drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
diff --git a/drivers/phy/qualcomm/Kconfig b/drivers/phy/qualcomm/Kconfig
index 846f8c99547f..8f043e8cb71c 100644
--- a/drivers/phy/qualcomm/Kconfig
+++ b/drivers/phy/qualcomm/Kconfig
@@ -154,6 +154,18 @@ config PHY_QCOM_M31_USB
management. This driver is required even for peripheral only or
host only mode configurations.
+config PHY_QCOM_UNIPHY_PCIE_28LP
+ bool "PCIE UNIPHY 28LP PHY driver"
+ depends on ARCH_QCOM
+ depends on HAS_IOMEM
+ depends on OF
+ select GENERIC_PHY
+ help
+ Enable this to support the PCIe UNIPHY 28LP phy transceiver that
+ is used with PCIe controllers on Qualcomm IPQ5018 chips. It
+ handles PHY initialization, clock management required after
+ resetting the hardware and power management.
+
config PHY_QCOM_USB_HS
tristate "Qualcomm USB HS PHY module"
depends on USB_ULPI_BUS
diff --git a/drivers/phy/qualcomm/Makefile b/drivers/phy/qualcomm/Makefile
index eb60e950ad53..42038bc30974 100644
--- a/drivers/phy/qualcomm/Makefile
+++ b/drivers/phy/qualcomm/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_PHY_QCOM_QMP_USB_LEGACY) += phy-qcom-qmp-usb-legacy.o
obj-$(CONFIG_PHY_QCOM_QUSB2) += phy-qcom-qusb2.o
obj-$(CONFIG_PHY_QCOM_SNPS_EUSB2) += phy-qcom-snps-eusb2.o
obj-$(CONFIG_PHY_QCOM_EUSB2_REPEATER) += phy-qcom-eusb2-repeater.o
+obj-$(CONFIG_PHY_QCOM_UNIPHY_PCIE_28LP) += phy-qcom-uniphy-pcie-28lp.o
obj-$(CONFIG_PHY_QCOM_USB_HS) += phy-qcom-usb-hs.o
obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o
obj-$(CONFIG_PHY_QCOM_USB_HS_28NM) += phy-qcom-usb-hs-28nm.o
diff --git a/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
new file mode 100644
index 000000000000..877e1f0f8927
--- /dev/null
+++ b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
@@ -0,0 +1,341 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2024, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/phy/phy.h>
+#include <linux/reset.h>
+#include <linux/of_device.h>
+#include <linux/delay.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
+
+#define CDR_CTRL_REG_1 0x80
+#define CDR_CTRL_REG_2 0x84
+#define CDR_CTRL_REG_3 0x88
+#define CDR_CTRL_REG_4 0x8C
+#define CDR_CTRL_REG_5 0x90
+#define CDR_CTRL_REG_6 0x94
+#define CDR_CTRL_REG_7 0x98
+#define SSCG_CTRL_REG_1 0x9c
+#define SSCG_CTRL_REG_2 0xa0
+#define SSCG_CTRL_REG_3 0xa4
+#define SSCG_CTRL_REG_4 0xa8
+#define SSCG_CTRL_REG_5 0xac
+#define SSCG_CTRL_REG_6 0xb0
+#define PCS_INTERNAL_CONTROL_2 0x2d8
+
+#define PHY_MODE_FIXED 0x1
+
+enum qcom_uniphy_pcie_type {
+ PHY_TYPE_PCIE = 1,
+ PHY_TYPE_PCIE_GEN2,
+ PHY_TYPE_PCIE_GEN3,
+};
+
+struct qcom_uniphy_regs {
+ unsigned int offset;
+ unsigned int val;
+};
+
+struct qcom_uniphy_pcie_data {
+ int lanes;
+ /* 2nd lane offset */
+ int lane_offset;
+ unsigned int phy_type;
+ const struct qcom_uniphy_regs *init_seq;
+ unsigned int init_seq_num;
+};
+
+struct qcom_uniphy_pcie {
+ struct phy phy;
+ struct device *dev;
+ const struct qcom_uniphy_pcie_data *data;
+ struct clk_bulk_data *clks;
+ int num_clks;
+ struct reset_control *resets;
+ void __iomem *base;
+};
+
+#define phy_to_dw_phy(x) container_of((x), struct qca_uni_pcie_phy, phy)
+
+static const struct qcom_uniphy_regs ipq5018_regs[] = {
+ {
+ .offset = SSCG_CTRL_REG_4,
+ .val = 0x1cb9,
+ },
+ {
+ .offset = SSCG_CTRL_REG_5,
+ .val = 0x023a,
+ },
+ {
+ .offset = SSCG_CTRL_REG_3,
+ .val = 0xd360,
+ },
+ {
+ .offset = SSCG_CTRL_REG_1,
+ .val = 0x1,
+ },
+ {
+ .offset = SSCG_CTRL_REG_2,
+ .val = 0xeb,
+ },
+ {
+ .offset = CDR_CTRL_REG_4,
+ .val = 0x3f9,
+ },
+ {
+ .offset = CDR_CTRL_REG_5,
+ .val = 0x1c9,
+ },
+ {
+ .offset = CDR_CTRL_REG_2,
+ .val = 0x419,
+ },
+ {
+ .offset = CDR_CTRL_REG_1,
+ .val = 0x200,
+ },
+ {
+ .offset = PCS_INTERNAL_CONTROL_2,
+ .val = 0xf101,
+ },
+};
+
+static const struct qcom_uniphy_pcie_data ipq5018_2x1_data = {
+ .lanes = 1,
+ .lane_offset = 0x800,
+ .phy_type = PHY_TYPE_PCIE_GEN2,
+ .init_seq = ipq5018_regs,
+ .init_seq_num = ARRAY_SIZE(ipq5018_regs),
+};
+
+static const struct qcom_uniphy_pcie_data ipq5018_2x2_data = {
+ .lanes = 2,
+ .lane_offset = 0x800,
+ .phy_type = PHY_TYPE_PCIE_GEN2,
+ .init_seq = ipq5018_regs,
+ .init_seq_num = ARRAY_SIZE(ipq5018_regs),
+};
+
+static void qcom_uniphy_pcie_init(struct qcom_uniphy_pcie *phy)
+{
+ const struct qcom_uniphy_pcie_data *data = phy->data;
+ const struct qcom_uniphy_regs *init_seq;
+ void __iomem *base = phy->base;
+ int lane = 0;
+ int i;
+
+ for (lane = 0; lane < data->lanes; lane++) {
+ init_seq = data->init_seq;
+
+ for (i = 0; i < data->init_seq_num; i++, init_seq++)
+ writel(init_seq->val, base + init_seq->offset);
+
+ base += data->lane_offset;
+ }
+}
+
+static int qcom_uniphy_pcie_power_off(struct phy *x)
+{
+ struct qcom_uniphy_pcie *phy = phy_get_drvdata(x);
+
+ reset_control_assert(phy->resets);
+
+ clk_bulk_disable_unprepare(phy->num_clks, phy->clks);
+
+ return 0;
+}
+
+static int qcom_uniphy_pcie_power_on(struct phy *x)
+{
+ int ret;
+ struct qcom_uniphy_pcie *phy = phy_get_drvdata(x);
+
+ ret = clk_bulk_prepare_enable(phy->num_clks, phy->clks);
+ if (ret) {
+ dev_err(phy->dev, "clk prepare and enable failed %d\n", ret);
+ return ret;
+ }
+
+ usleep_range(30, 50);
+
+ ret = reset_control_assert(phy->resets);
+ if (ret) {
+ dev_err(phy->dev, "reset assert failed (%d)\n", ret);
+ return ret;
+ }
+
+ /*
+ * Delay periods before and after reset deassert are working values
+ * from downstream Codeaurora kernel
+ */
+ usleep_range(100, 150);
+
+ ret = reset_control_deassert(phy->resets);
+ if (ret) {
+ dev_err(phy->dev, "reset deassert failed (%d)\n", ret);
+ return ret;
+ }
+
+ usleep_range(5000, 5100);
+
+ qcom_uniphy_pcie_init(phy);
+
+ return 0;
+}
+
+static inline int qcom_uniphy_pcie_get_resources(struct platform_device *pdev,
+ struct qcom_uniphy_pcie *phy)
+{
+ struct resource *res;
+
+ phy->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+ if (IS_ERR(phy->base)) {
+ dev_err(phy->dev, "cannot get phy registers\n");
+ return PTR_ERR(phy->base);
+ }
+
+ phy->num_clks = devm_clk_bulk_get_all(phy->dev, &phy->clks);
+ if (phy->num_clks < 0)
+ return phy->num_clks;
+
+ phy->resets = devm_reset_control_array_get_exclusive(phy->dev);
+ if (IS_ERR(phy->resets))
+ return PTR_ERR(phy->resets);
+
+ return 0;
+}
+
+/*
+ * Register a fixed rate pipe clock.
+ *
+ * The <s>_pipe_clksrc generated by PHY goes to the GCC that gate
+ * controls it. The <s>_pipe_clk coming out of the GCC is requested
+ * by the PHY driver for its operations.
+ * We register the <s>_pipe_clksrc here. The gcc driver takes care
+ * of assigning this <s>_pipe_clksrc as parent to <s>_pipe_clk.
+ * Below picture shows this relationship.
+ *
+ * +---------------+
+ * | PHY block |<<---------------------------------------+
+ * | | |
+ * | +-------+ | +-----+ |
+ * I/P---^-->| PLL |---^--->pipe_clksrc--->| GCC |--->pipe_clk---+
+ * clk | +-------+ | +-----+
+ * +---------------+
+ */
+static inline int phy_pipe_clk_register(struct qcom_uniphy_pcie *phy,
+ struct device_node *np)
+{
+ struct clk_init_data init = { };
+ struct clk_fixed_rate *fixed;
+ struct clk_hw *hw;
+ char name[64];
+ int ret;
+
+ snprintf(name, sizeof(name), "%s::pipe_clk", dev_name(phy->dev));
+
+ fixed = devm_kzalloc(phy->dev, sizeof(*fixed), GFP_KERNEL);
+ if (!fixed)
+ return -ENOMEM;
+
+ init.ops = &clk_fixed_rate_ops;
+ fixed->fixed_rate = 125000000;
+ fixed->hw.init = &init;
+ hw = &fixed->hw;
+
+ hw = devm_clk_hw_register_fixed_rate(phy->dev, name, NULL,
+ 0, 125000000);
+ if (IS_ERR(hw))
+ return PTR_ERR(hw);
+
+ ret = devm_of_clk_add_hw_provider(phy->dev, of_clk_hw_simple_get, hw);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
+static const struct of_device_id qcom_uniphy_pcie_id_table[] = {
+ {
+ .compatible = "qcom,ipq5018-uniphy-pcie-gen2x2",
+ .data = &ipq5018_2x2_data,
+ },
+ {
+ .compatible = "qcom,ipq5018-uniphy-pcie-gen2x1",
+ .data = &ipq5018_2x1_data,
+ },
+
+ { /* Sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, qcom_uniphy_pcie_id_table);
+
+static const struct phy_ops pcie_ops = {
+ .power_on = qcom_uniphy_pcie_power_on,
+ .power_off = qcom_uniphy_pcie_power_off,
+ .owner = THIS_MODULE,
+};
+
+static int qcom_uniphy_pcie_probe(struct platform_device *pdev)
+{
+ struct qcom_uniphy_pcie *phy;
+ int ret;
+ struct phy *generic_phy;
+ struct phy_provider *phy_provider;
+ struct device *dev = &pdev->dev;
+ struct device_node *np = of_node_get(dev->of_node);
+
+ phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
+ if (!phy)
+ return -ENOMEM;
+
+ platform_set_drvdata(pdev, phy);
+ phy->dev = &pdev->dev;
+
+ phy->data = of_device_get_match_data(dev);
+ if (!phy->data)
+ return -EINVAL;
+
+ ret = qcom_uniphy_pcie_get_resources(pdev, phy);
+ if (ret < 0)
+ dev_err_probe(&pdev->dev, ret, "Failed to get resources:\n");
+
+ ret = phy_pipe_clk_register(phy, np);
+ if (ret)
+ dev_err_probe(&pdev->dev, ret, "pipe clk register failed\n");
+
+ generic_phy = devm_phy_create(phy->dev, NULL, &pcie_ops);
+ if (IS_ERR(generic_phy))
+ dev_err_probe(&pdev->dev, PTR_ERR(generic_phy),
+ "phy create failed\n");
+
+ phy_set_drvdata(generic_phy, phy);
+ phy_provider = devm_of_phy_provider_register(phy->dev,
+ of_phy_simple_xlate);
+ if (IS_ERR(phy_provider))
+ dev_err_probe(&pdev->dev, PTR_ERR(phy_provider),
+ "phy register failed\n");
+
+ return 0;
+}
+
+static struct platform_driver qcom_uniphy_pcie_driver = {
+ .probe = qcom_uniphy_pcie_probe,
+ .driver = {
+ .name = "qcom-uniphy-pcie",
+ .of_match_table = qcom_uniphy_pcie_id_table,
+ },
+};
+
+module_platform_driver(qcom_uniphy_pcie_driver);
+
+MODULE_LICENSE("Dual BSD/GPL");
+MODULE_DESCRIPTION("PCIE QCOM UNIPHY driver");
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
2024-08-27 4:57 ` [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver Sricharan R
@ 2024-08-27 6:25 ` Krzysztof Kozlowski
2024-08-27 6:51 ` Sricharan Ramabadhran
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-27 6:25 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko
On Tue, Aug 27, 2024 at 10:27:54AM +0530, Sricharan R wrote:
> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>
> Add Qualcomm PCIe UNIPHY 28LP driver support present
> in Qualcomm IPQ5018 SoC and the phy init sequence.
>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
...
> +static int qcom_uniphy_pcie_probe(struct platform_device *pdev)
> +{
> + struct qcom_uniphy_pcie *phy;
> + int ret;
> + struct phy *generic_phy;
> + struct phy_provider *phy_provider;
> + struct device *dev = &pdev->dev;
> + struct device_node *np = of_node_get(dev->of_node);
> +
> + phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
> + if (!phy)
> + return -ENOMEM;
> +
> + platform_set_drvdata(pdev, phy);
> + phy->dev = &pdev->dev;
> +
> + phy->data = of_device_get_match_data(dev);
> + if (!phy->data)
> + return -EINVAL;
> +
> + ret = qcom_uniphy_pcie_get_resources(pdev, phy);
> + if (ret < 0)
> + dev_err_probe(&pdev->dev, ret, "Failed to get resources:\n");
What the hell happened here? Read my review one more time and then git
grep for usage of dev_err_probe.
NAK.
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver
2024-08-27 6:25 ` Krzysztof Kozlowski
@ 2024-08-27 6:51 ` Sricharan Ramabadhran
0 siblings, 0 replies; 18+ messages in thread
From: Sricharan Ramabadhran @ 2024-08-27 6:51 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko
On 8/27/2024 11:55 AM, Krzysztof Kozlowski wrote:
> On Tue, Aug 27, 2024 at 10:27:54AM +0530, Sricharan R wrote:
>> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>>
>> Add Qualcomm PCIe UNIPHY 28LP driver support present
>> in Qualcomm IPQ5018 SoC and the phy init sequence.
>>
>> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
>> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
>
> ...
>
>> +static int qcom_uniphy_pcie_probe(struct platform_device *pdev)
>> +{
>> + struct qcom_uniphy_pcie *phy;
>> + int ret;
>> + struct phy *generic_phy;
>> + struct phy_provider *phy_provider;
>> + struct device *dev = &pdev->dev;
>> + struct device_node *np = of_node_get(dev->of_node);
>> +
>> + phy = devm_kzalloc(&pdev->dev, sizeof(*phy), GFP_KERNEL);
>> + if (!phy)
>> + return -ENOMEM;
>> +
>> + platform_set_drvdata(pdev, phy);
>> + phy->dev = &pdev->dev;
>> +
>> + phy->data = of_device_get_match_data(dev);
>> + if (!phy->data)
>> + return -EINVAL;
>> +
>> + ret = qcom_uniphy_pcie_get_resources(pdev, phy);
>> + if (ret < 0)
>> + dev_err_probe(&pdev->dev, ret, "Failed to get resources:\n");
>
> What the hell happened here? Read my review one more time and then git
> grep for usage of dev_err_probe.
>
Ho ok, understood, missed it, will fix and resend.
Regards,
Sricharan
> NAK.
>
> Best regards,
> Krzysztof
>
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
` (2 preceding siblings ...)
2024-08-27 4:57 ` [PATCH V2 3/6] phy: qcom: Introduce PCIe UNIPHY 28LP driver Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-30 8:38 ` Manivannan Sadhasivam
2024-08-27 4:57 ` [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes Sricharan R
` (2 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
Introduce a new compatible and re-use 2_9_0 ops.
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan R <quic_srichara@quicinc.com>
---
[v2] Rebased on top of latest tip and only compatiable addition is required
drivers/pci/controller/dwc/pcie-qcom.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 6f953e32d990..e814d6cc062d 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1722,6 +1722,7 @@ static const struct of_device_id qcom_pcie_match[] = {
{ .compatible = "qcom,pcie-apq8064", .data = &cfg_2_1_0 },
{ .compatible = "qcom,pcie-apq8084", .data = &cfg_1_0_0 },
{ .compatible = "qcom,pcie-ipq4019", .data = &cfg_2_4_0 },
+ { .compatible = "qcom,pcie-ipq5018", .data = &cfg_2_9_0 },
{ .compatible = "qcom,pcie-ipq6018", .data = &cfg_2_9_0 },
{ .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 },
{ .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 },
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018
2024-08-27 4:57 ` [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018 Sricharan R
@ 2024-08-30 8:38 ` Manivannan Sadhasivam
2024-09-04 17:21 ` Sricharan Ramabadhran
0 siblings, 1 reply; 18+ messages in thread
From: Manivannan Sadhasivam @ 2024-08-30 8:38 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, robh, krzk+dt, conor+dt, vkoul, kishon,
andersson, konradybcio, p.zabel, dmitry.baryshkov, quic_nsekar,
linux-arm-msm, linux-pci, devicetree, linux-kernel, linux-phy,
robimarko
On Tue, Aug 27, 2024 at 10:27:55AM +0530, Sricharan R wrote:
> Introduce a new compatible and re-use 2_9_0 ops.
>
While adding a new SoC, please add more info about the controller. Like the
hardware revision (internal/synopsys), max number of lanes supported, max link
speed, is it a derivative etc...
- Mani
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan R <quic_srichara@quicinc.com>
> ---
> [v2] Rebased on top of latest tip and only compatiable addition is required
>
> drivers/pci/controller/dwc/pcie-qcom.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 6f953e32d990..e814d6cc062d 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1722,6 +1722,7 @@ static const struct of_device_id qcom_pcie_match[] = {
> { .compatible = "qcom,pcie-apq8064", .data = &cfg_2_1_0 },
> { .compatible = "qcom,pcie-apq8084", .data = &cfg_1_0_0 },
> { .compatible = "qcom,pcie-ipq4019", .data = &cfg_2_4_0 },
> + { .compatible = "qcom,pcie-ipq5018", .data = &cfg_2_9_0 },
> { .compatible = "qcom,pcie-ipq6018", .data = &cfg_2_9_0 },
> { .compatible = "qcom,pcie-ipq8064", .data = &cfg_2_1_0 },
> { .compatible = "qcom,pcie-ipq8064-v2", .data = &cfg_2_1_0 },
> --
> 2.34.1
>
--
மணிவண்ணன் சதாசிவம்
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018
2024-08-30 8:38 ` Manivannan Sadhasivam
@ 2024-09-04 17:21 ` Sricharan Ramabadhran
0 siblings, 0 replies; 18+ messages in thread
From: Sricharan Ramabadhran @ 2024-09-04 17:21 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: bhelgaas, lpieralisi, kw, robh, krzk+dt, conor+dt, vkoul, kishon,
andersson, konradybcio, p.zabel, dmitry.baryshkov, quic_nsekar,
linux-arm-msm, linux-pci, devicetree, linux-kernel, linux-phy,
robimarko
On 8/30/2024 2:08 PM, Manivannan Sadhasivam wrote:
> On Tue, Aug 27, 2024 at 10:27:55AM +0530, Sricharan R wrote:
>> Introduce a new compatible and re-use 2_9_0 ops.
>>
>
> While adding a new SoC, please add more info about the controller. Like the
> hardware revision (internal/synopsys), max number of lanes supported, max link
> speed, is it a derivative etc...
>
ok sure, will add.
Regards,
Sricharan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
` (3 preceding siblings ...)
2024-08-27 4:57 ` [PATCH V2 4/6] PCI: qcom: Add support for IPQ5018 Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-30 8:59 ` Manivannan Sadhasivam
2024-08-27 4:57 ` [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe Sricharan R
2024-08-27 6:24 ` [PATCH V2 0/6] Enable IPQ5018 PCI support Krzysztof Kozlowski
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Add phy and controller nodes for a 2-lane Gen2 and
1-lane Gen2 PCIe buses.
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan R <quic_srichara@quicinc.com>
---
[v2] Removed relocatable flags, removed assigned-clock-rates,
fixed rest of the cosmetic comments.
arch/arm64/boot/dts/qcom/ipq5018.dtsi | 168 +++++++++++++++++++++++++-
1 file changed, 166 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
index 7e6e2c121979..dd5d6b7ff094 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
@@ -9,6 +9,7 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/qcom,gcc-ipq5018.h>
#include <dt-bindings/reset/qcom,gcc-ipq5018.h>
+#include <dt-bindings/gpio/gpio.h>
/ {
interrupt-parent = <&intc>;
@@ -143,7 +144,33 @@ usbphy0: phy@5b000 {
resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
#phy-cells = <0>;
+ };
+
+ pcie_x1phy: phy@7e000{
+ compatible = "qcom,ipq5018-uniphy-pcie-gen2x1";
+ reg = <0x0007e000 0x800>;
+ #phy-cells = <0>;
+ #clock-cells = <0>;
+ clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
+ clock-names = "pipe";
+ assigned-clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
+ resets = <&gcc GCC_PCIE1_PHY_BCR>,
+ <&gcc GCC_PCIE1PHY_PHY_BCR>;
+ reset-names = "phy", "common";
+ status = "disabled";
+ };
+ pcie_x2phy: phy@86000{
+ compatible = "qcom,ipq5018-uniphy-pcie-gen2x2";
+ reg = <0x00086000 0x1000>;
+ #phy-cells = <0>;
+ #clock-cells = <0>;
+ clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
+ clock-names = "pipe";
+ assigned-clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
+ resets = <&gcc GCC_PCIE0_PHY_BCR>,
+ <&gcc GCC_PCIE0PHY_PHY_BCR>;
+ reset-names = "phy", "common";
status = "disabled";
};
@@ -170,8 +197,8 @@ gcc: clock-controller@1800000 {
reg = <0x01800000 0x80000>;
clocks = <&xo_board_clk>,
<&sleep_clk>,
- <0>,
- <0>,
+ <&pcie_x2phy>,
+ <&pcie_x1phy>,
<0>,
<0>,
<0>,
@@ -387,6 +414,143 @@ frame@b128000 {
status = "disabled";
};
};
+
+ pcie0: pci@80000000 {
+ compatible = "qcom,pcie-ipq5018";
+ reg = <0x80000000 0xf1d>,
+ <0x80000f20 0xa8>,
+ <0x80001000 0x1000>,
+ <0x00078000 0x3000>,
+ <0x80100000 0x1000>;
+ reg-names = "dbi", "elbi", "atu", "parf", "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 = <&pcie_x1phy>;
+ phy-names ="pciephy";
+
+ ranges = <0x01000000 0 0x80200000 0x80200000 0 0x00100000
+ 0x02000000 0 0x80300000 0x80300000 0 0x10000000>;
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc 0 0 142 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 143 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 144 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 145 IRQ_TYPE_LEVEL_HIGH>;
+
+ interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "global_irq";
+
+ 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";
+
+ msi-map = <0x0 &v2m0 0x0 0xff8>;
+ status = "disabled";
+ };
+
+ pcie1: pci@a0000000 {
+ compatible = "qcom,pcie-ipq5018";
+ reg = <0xa0000000 0xf1d>,
+ <0xa0000f20 0xa8>,
+ <0xa0001000 0x1000>,
+ <0x00080000 0x3000>,
+ <0xa0100000 0x1000>;
+ reg-names = "dbi", "elbi", "atu", "parf", "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 = <&pcie_x2phy>;
+ phy-names ="pciephy";
+
+ ranges = <0x01000000 0 0xa0200000 0xa0200000 0 0x00100000
+ 0x02000000 0 0xa0300000 0xa0300000 0 0x10000000>;
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc 0 0 75 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 78 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 79 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 83 IRQ_TYPE_LEVEL_HIGH>;
+
+ interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "global_irq";
+
+ 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";
+
+ msi-map = <0x0 &v2m0 0x0 0xff8>;
+ status = "disabled";
+ };
+
};
timer {
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes
2024-08-27 4:57 ` [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes Sricharan R
@ 2024-08-30 8:59 ` Manivannan Sadhasivam
2024-09-04 17:47 ` Sricharan Ramabadhran
0 siblings, 1 reply; 18+ messages in thread
From: Manivannan Sadhasivam @ 2024-08-30 8:59 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, robh, krzk+dt, conor+dt, vkoul, kishon,
andersson, konradybcio, p.zabel, dmitry.baryshkov, quic_nsekar,
linux-arm-msm, linux-pci, devicetree, linux-kernel, linux-phy,
robimarko
On Tue, Aug 27, 2024 at 10:27:56AM +0530, Sricharan R wrote:
> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>
> Add phy and controller nodes for a 2-lane Gen2 and
> 1-lane Gen2 PCIe buses.
>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan R <quic_srichara@quicinc.com>
> ---
> [v2] Removed relocatable flags, removed assigned-clock-rates,
> fixed rest of the cosmetic comments.
>
> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 168 +++++++++++++++++++++++++-
> 1 file changed, 166 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
> index 7e6e2c121979..dd5d6b7ff094 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
> @@ -9,6 +9,7 @@
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/clock/qcom,gcc-ipq5018.h>
> #include <dt-bindings/reset/qcom,gcc-ipq5018.h>
> +#include <dt-bindings/gpio/gpio.h>
>
> / {
> interrupt-parent = <&intc>;
> @@ -143,7 +144,33 @@ usbphy0: phy@5b000 {
> resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
>
> #phy-cells = <0>;
> + };
> +
> + pcie_x1phy: phy@7e000{
> + compatible = "qcom,ipq5018-uniphy-pcie-gen2x1";
> + reg = <0x0007e000 0x800>;
> + #phy-cells = <0>;
> + #clock-cells = <0>;
> + clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
> + clock-names = "pipe";
> + assigned-clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
> + resets = <&gcc GCC_PCIE1_PHY_BCR>,
> + <&gcc GCC_PCIE1PHY_PHY_BCR>;
> + reset-names = "phy", "common";
> + status = "disabled";
> + };
>
> + pcie_x2phy: phy@86000{
> + compatible = "qcom,ipq5018-uniphy-pcie-gen2x2";
> + reg = <0x00086000 0x1000>;
> + #phy-cells = <0>;
> + #clock-cells = <0>;
> + clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
> + clock-names = "pipe";
> + assigned-clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
> + resets = <&gcc GCC_PCIE0_PHY_BCR>,
> + <&gcc GCC_PCIE0PHY_PHY_BCR>;
> + reset-names = "phy", "common";
> status = "disabled";
> };
>
> @@ -170,8 +197,8 @@ gcc: clock-controller@1800000 {
> reg = <0x01800000 0x80000>;
> clocks = <&xo_board_clk>,
> <&sleep_clk>,
> - <0>,
> - <0>,
> + <&pcie_x2phy>,
> + <&pcie_x1phy>,
> <0>,
> <0>,
> <0>,
> @@ -387,6 +414,143 @@ frame@b128000 {
> status = "disabled";
> };
> };
> +
> + pcie0: pci@80000000 {
pcie@
> + compatible = "qcom,pcie-ipq5018";
> + reg = <0x80000000 0xf1d>,
> + <0x80000f20 0xa8>,
> + <0x80001000 0x1000>,
> + <0x00078000 0x3000>,
> + <0x80100000 0x1000>;
Are you sure that the config space is only 4K?
> + reg-names = "dbi", "elbi", "atu", "parf", "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 = <&pcie_x1phy>;
> + phy-names ="pciephy";
> +
> + ranges = <0x01000000 0 0x80200000 0x80200000 0 0x00100000
Please check the value of this field in other SoCs.
> + 0x02000000 0 0x80300000 0x80300000 0 0x10000000>;
> +
> + #interrupt-cells = <1>;
> + interrupt-map-mask = <0 0 0 0x7>;
> + interrupt-map = <0 0 0 1 &intc 0 0 142 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 2 &intc 0 0 143 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 3 &intc 0 0 144 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 4 &intc 0 0 145 IRQ_TYPE_LEVEL_HIGH>;
> +
> + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "global_irq";
I'm pretty sure that this SoC has SPI based MSI interrupts. So they should be
described even though ITS is supported.
> +
> + 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";
> +
> + msi-map = <0x0 &v2m0 0x0 0xff8>;
> + status = "disabled";
Please add the rootport node also as like other SoCs.
Above comments applies to below PCIe node.
- Mani
> + };
> +
> + pcie1: pci@a0000000 {
> + compatible = "qcom,pcie-ipq5018";
> + reg = <0xa0000000 0xf1d>,
> + <0xa0000f20 0xa8>,
> + <0xa0001000 0x1000>,
> + <0x00080000 0x3000>,
> + <0xa0100000 0x1000>;
> + reg-names = "dbi", "elbi", "atu", "parf", "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 = <&pcie_x2phy>;
> + phy-names ="pciephy";
> +
> + ranges = <0x01000000 0 0xa0200000 0xa0200000 0 0x00100000
> + 0x02000000 0 0xa0300000 0xa0300000 0 0x10000000>;
> +
> + #interrupt-cells = <1>;
> + interrupt-map-mask = <0 0 0 0x7>;
> + interrupt-map = <0 0 0 1 &intc 0 0 75 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 2 &intc 0 0 78 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 3 &intc 0 0 79 IRQ_TYPE_LEVEL_HIGH>,
> + <0 0 0 4 &intc 0 0 83 IRQ_TYPE_LEVEL_HIGH>;
> +
> + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "global_irq";
> +
> + 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";
> +
> + msi-map = <0x0 &v2m0 0x0 0xff8>;
> + status = "disabled";
> + };
> +
> };
>
> timer {
> --
> 2.34.1
>
--
மணிவண்ணன் சதாசிவம்
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes
2024-08-30 8:59 ` Manivannan Sadhasivam
@ 2024-09-04 17:47 ` Sricharan Ramabadhran
0 siblings, 0 replies; 18+ messages in thread
From: Sricharan Ramabadhran @ 2024-09-04 17:47 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: bhelgaas, lpieralisi, kw, robh, krzk+dt, conor+dt, vkoul, kishon,
andersson, konradybcio, p.zabel, dmitry.baryshkov, quic_nsekar,
linux-arm-msm, linux-pci, devicetree, linux-kernel, linux-phy,
robimarko
On 8/30/2024 2:29 PM, Manivannan Sadhasivam wrote:
> On Tue, Aug 27, 2024 at 10:27:56AM +0530, Sricharan R wrote:
>> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>>
>> Add phy and controller nodes for a 2-lane Gen2 and
>> 1-lane Gen2 PCIe buses.
>>
>> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
>> Signed-off-by: Sricharan R <quic_srichara@quicinc.com>
>> ---
>> [v2] Removed relocatable flags, removed assigned-clock-rates,
>> fixed rest of the cosmetic comments.
>>
>> arch/arm64/boot/dts/qcom/ipq5018.dtsi | 168 +++++++++++++++++++++++++-
>> 1 file changed, 166 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5018.dtsi b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
>> index 7e6e2c121979..dd5d6b7ff094 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5018.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/ipq5018.dtsi
>> @@ -9,6 +9,7 @@
>> #include <dt-bindings/interrupt-controller/arm-gic.h>
>> #include <dt-bindings/clock/qcom,gcc-ipq5018.h>
>> #include <dt-bindings/reset/qcom,gcc-ipq5018.h>
>> +#include <dt-bindings/gpio/gpio.h>
>>
>> / {
>> interrupt-parent = <&intc>;
>> @@ -143,7 +144,33 @@ usbphy0: phy@5b000 {
>> resets = <&gcc GCC_QUSB2_0_PHY_BCR>;
>>
>> #phy-cells = <0>;
>> + };
>> +
>> + pcie_x1phy: phy@7e000{
>> + compatible = "qcom,ipq5018-uniphy-pcie-gen2x1";
>> + reg = <0x0007e000 0x800>;
>> + #phy-cells = <0>;
>> + #clock-cells = <0>;
>> + clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
>> + clock-names = "pipe";
>> + assigned-clocks = <&gcc GCC_PCIE1_PIPE_CLK>;
>> + resets = <&gcc GCC_PCIE1_PHY_BCR>,
>> + <&gcc GCC_PCIE1PHY_PHY_BCR>;
>> + reset-names = "phy", "common";
>> + status = "disabled";
>> + };
>>
>> + pcie_x2phy: phy@86000{
>> + compatible = "qcom,ipq5018-uniphy-pcie-gen2x2";
>> + reg = <0x00086000 0x1000>;
>> + #phy-cells = <0>;
>> + #clock-cells = <0>;
>> + clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
>> + clock-names = "pipe";
>> + assigned-clocks = <&gcc GCC_PCIE0_PIPE_CLK>;
>> + resets = <&gcc GCC_PCIE0_PHY_BCR>,
>> + <&gcc GCC_PCIE0PHY_PHY_BCR>;
>> + reset-names = "phy", "common";
>> status = "disabled";
>> };
>>
>> @@ -170,8 +197,8 @@ gcc: clock-controller@1800000 {
>> reg = <0x01800000 0x80000>;
>> clocks = <&xo_board_clk>,
>> <&sleep_clk>,
>> - <0>,
>> - <0>,
>> + <&pcie_x2phy>,
>> + <&pcie_x1phy>,
>> <0>,
>> <0>,
>> <0>,
>> @@ -387,6 +414,143 @@ frame@b128000 {
>> status = "disabled";
>> };
>> };
>> +
>> + pcie0: pci@80000000 {
>
> pcie@
>
ok
>> + compatible = "qcom,pcie-ipq5018";
>> + reg = <0x80000000 0xf1d>,
>> + <0x80000f20 0xa8>,
>> + <0x80001000 0x1000>,
>> + <0x00078000 0x3000>,
>> + <0x80100000 0x1000>;
>
> Are you sure that the config space is only 4K?
>
ok, let me double check.
>> + reg-names = "dbi", "elbi", "atu", "parf", "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 = <&pcie_x1phy>;
>> + phy-names ="pciephy";
>> +
>> + ranges = <0x01000000 0 0x80200000 0x80200000 0 0x00100000
>
> Please check the value of this field in other SoCs.
ok, if its about the child address encoding for IO region, will fix.
>
>> + 0x02000000 0 0x80300000 0x80300000 0 0x10000000>;
>> +
>> + #interrupt-cells = <1>;
>> + interrupt-map-mask = <0 0 0 0x7>;
>> + interrupt-map = <0 0 0 1 &intc 0 0 142 IRQ_TYPE_LEVEL_HIGH>,
>> + <0 0 0 2 &intc 0 0 143 IRQ_TYPE_LEVEL_HIGH>,
>> + <0 0 0 3 &intc 0 0 144 IRQ_TYPE_LEVEL_HIGH>,
>> + <0 0 0 4 &intc 0 0 145 IRQ_TYPE_LEVEL_HIGH>;
>> +
>> + interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
>> + interrupt-names = "global_irq";
>
> I'm pretty sure that this SoC has SPI based MSI interrupts. So they should be
> described even though ITS is supported.
ok
>
>> +
>> + 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";
>> +
>> + msi-map = <0x0 &v2m0 0x0 0xff8>;
>> + status = "disabled";
>
> Please add the rootport node also as like other SoCs.
>
ok
> Above comments applies to below PCIe node.
>
ok
Regards,
Sricharan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
` (4 preceding siblings ...)
2024-08-27 4:57 ` [PATCH V2 5/6] arm64: dts: qcom: ipq5018: Add PCIe related nodes Sricharan R
@ 2024-08-27 4:57 ` Sricharan R
2024-08-29 9:10 ` Dmitry Baryshkov
2024-08-27 6:24 ` [PATCH V2 0/6] Enable IPQ5018 PCI support Krzysztof Kozlowski
6 siblings, 1 reply; 18+ messages in thread
From: Sricharan R @ 2024-08-27 4:57 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko, quic_srichara
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Enable the PCIe controller and PHY nodes for RDP 432-c2.
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
---
[v2] Moved status as last property
arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
index 8460b538eb6a..2b253da7f776 100644
--- a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
@@ -28,6 +28,15 @@ &blsp1_uart1 {
status = "okay";
};
+&pcie1 {
+ perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
+ status = "okay";
+};
+
+&pcie_x2phy {
+ status = "okay";
+};
+
&sdhc_1 {
pinctrl-0 = <&sdc_default_state>;
pinctrl-names = "default";
--
2.34.1
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 18+ messages in thread* Re: [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe
2024-08-27 4:57 ` [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe Sricharan R
@ 2024-08-29 9:10 ` Dmitry Baryshkov
2024-08-30 7:54 ` Sricharan Ramabadhran
0 siblings, 1 reply; 18+ messages in thread
From: Dmitry Baryshkov @ 2024-08-29 9:10 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
quic_nsekar, linux-arm-msm, linux-pci, devicetree, linux-kernel,
linux-phy, robimarko
On Tue, Aug 27, 2024 at 10:27:57AM GMT, Sricharan R wrote:
> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>
> Enable the PCIe controller and PHY nodes for RDP 432-c2.
>
> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
> ---
> [v2] Moved status as last property
>
> arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
> index 8460b538eb6a..2b253da7f776 100644
> --- a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
> +++ b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
> @@ -28,6 +28,15 @@ &blsp1_uart1 {
> status = "okay";
> };
>
> +&pcie1 {
> + perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
pinctrl? wake-gpios?
> + status = "okay";
> +};
> +
> +&pcie_x2phy {
> + status = "okay";
> +};
> +
> &sdhc_1 {
> pinctrl-0 = <&sdc_default_state>;
> pinctrl-names = "default";
> --
> 2.34.1
>
--
With best wishes
Dmitry
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe
2024-08-29 9:10 ` Dmitry Baryshkov
@ 2024-08-30 7:54 ` Sricharan Ramabadhran
0 siblings, 0 replies; 18+ messages in thread
From: Sricharan Ramabadhran @ 2024-08-30 7:54 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
quic_nsekar, linux-arm-msm, linux-pci, devicetree, linux-kernel,
linux-phy, robimarko
On 8/29/2024 2:40 PM, Dmitry Baryshkov wrote:
> On Tue, Aug 27, 2024 at 10:27:57AM GMT, Sricharan R wrote:
>> From: Nitheesh Sekar <quic_nsekar@quicinc.com>
>>
>> Enable the PCIe controller and PHY nodes for RDP 432-c2.
>>
>> Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
>> Signed-off-by: Sricharan Ramabadhran <quic_srichara@quicinc.com>
>> ---
>> [v2] Moved status as last property
>>
>> arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
>> index 8460b538eb6a..2b253da7f776 100644
>> --- a/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
>> +++ b/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dts
>> @@ -28,6 +28,15 @@ &blsp1_uart1 {
>> status = "okay";
>> };
>>
>> +&pcie1 {
>> + perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
>
> pinctrl? wake-gpios?
>
ok, will add to make it explicit.
Otherwise pinctrl was default muxed.
Regards,
Sricharan
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH V2 0/6] Enable IPQ5018 PCI support
2024-08-27 4:57 [PATCH V2 0/6] Enable IPQ5018 PCI support Sricharan R
` (5 preceding siblings ...)
2024-08-27 4:57 ` [PATCH V2 6/6] arm64: dts: qcom: ipq5018: Enable PCIe Sricharan R
@ 2024-08-27 6:24 ` Krzysztof Kozlowski
6 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2024-08-27 6:24 UTC (permalink / raw)
To: Sricharan R
Cc: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, linux-arm-msm, linux-pci,
devicetree, linux-kernel, linux-phy, robimarko
On Tue, Aug 27, 2024 at 10:27:51AM +0530, Sricharan R wrote:
> From: Sricharan Ramabadhran <quic_srichara@quicinc.com>
>
> This patch series adds the relevant phy and controller
> DT configurations for enabling PCI gen2 support
> on IPQ5018.
>
> v2:
> Fixed all review comments from Krzysztof, Robert Marko,
> Dmitry Baryshkov, Manivannan Sadhasivam, Konrad Dybcio.
That's not specific. What exactly did you do? You must list the
changes.
Best regards,
Krzysztof
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply [flat|nested] 18+ messages in thread