* [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332
@ 2025-01-28 6:27 Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Varadarajan Narayanan
` (6 more replies)
0 siblings, 7 replies; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Patch series adds support for enabling the PCIe controller and
UNIPHY found on Qualcomm IPQ5332 platform. PCIe0 is Gen3 X1 and
PCIe1 is Gen3 X2 are added.
This series combines [1] and [2]. [1] introduces IPQ5018 PCIe
support and [2] depends on [1] to introduce IPQ5332 PCIe support.
Since the community was interested in [2] (please see [3]), tried
to revive IPQ5332's PCIe support with v2 of this patch series.
v2 of this series pulled in the phy driver from [1] tried to
address comments/feedback given in both [1] and [2].
1. Enable IPQ5018 PCI support (Nitheesh Sekar) - https://lore.kernel.org/all/20231003120846.28626-1-quic_nsekar@quicinc.com/
2. Add PCIe support for Qualcomm IPQ5332 (Praveenkumar I) - https://lore.kernel.org/linux-arm-msm/20231214062847.2215542-1-quic_ipkumar@quicinc.com/
3. Community interest - https://lore.kernel.org/linux-arm-msm/20240310132915.GE3390@thinkpad/
v9: Dont have fallback for num-lanes in driver and return error
Remove superfluous ipq5332 constraint as the fallback is present
v8: Add reviewed by
Remove duplication in bindings due to ipq5424 code getting merged
v7: phy bindings:
* Include data type definition to 'num-lanes'
controller bindings:
* Split the ipq9574 and ipq5332 changes into separate patches
dtsi:
* Add root port definitions
v6: phy bindings:
* Fix num-lanes definition
phy driver:
* Fix num-lanes handling in probe to use generally followed pattern
controller bindings:
* Give more info in commit log
dtsi:
* Add assigned-clocks & assigned-clock-rates to controller nodes
* Add num-lanes to pcie0_phy
v5: phy bindings:
* Drop '3x1' & '3x2' from compatible string
* Use 'num-lanes' to differentiate instead of '3x1' or '3x2'
in compatible string
* Describe clocks and resets instead of just maxItems
phy driver:
* Get num-lanes from DTS
* Drop compatible specific init data as there is only one
compatible string
controller bindings:
* Re-arrange 5332 and 9574 compatibles to handle fallback usage in dts
dtsi:
* Add 'num-lanes' to "pcie1_phy: phy@4b1000"
* Make ipq5332 as main and ipq9574 as fallback compatible
* Sort controller nodes per address
misc:
Add R-B tag from Konrad to dts and dtsi patches
v4: * phy bindings - Create ipq5332 compatible instead of reusing ipq9574 for bindings
* phy bindings - Remove reset-names as the resets are handled with bulk APIs
* phy bindings - Fix order in the 'required' section
* phy bindings - Remove clock-output-names
* dtsi - Add missing reset for pcie1_phy
* dtsi - Convert 'reg-names' to a vertical list
* dts - Fix nodes sort order
* dts - Use property-n followed by property-names
v3: * Update the cover letter with the sources of the patches
* Rename the dt-bindings yaml file similar to other phys
* Drop ipq5332 specific pcie controllor bindings and reuse
ipq9574 pcie controller bindings for ipq5332
* Please see patches for specific changes
* Set GPL license for phy-qcom-uniphy-pcie-28lp.c
v2: Address review comments from V1
Drop the 'required clocks' change that would break ABI (in dt-binding, dts, gcc-ipq5332.c)
Include phy driver from the dependent series
v1: https://lore.kernel.org/linux-arm-msm/20231214062847.2215542-1-quic_ipkumar@quicinc.com/
Nitheesh Sekar (2):
dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy
phy: qcom: Introduce PCIe UNIPHY 28LP driver
Praveenkumar I (2):
arm64: dts: qcom: ipq5332: Add PCIe related nodes
arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers
Varadarajan Narayanan (3):
dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574
arm64: dts: qcom: ipq9574: Reorder reg and reg-names
dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller
.../devicetree/bindings/pci/qcom,pcie.yaml | 10 +-
.../phy/qcom,ipq5332-uniphy-pcie-phy.yaml | 76 +++++
arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts | 76 +++++
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 268 +++++++++++++++-
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 52 ++--
drivers/phy/qualcomm/Kconfig | 12 +
drivers/phy/qualcomm/Makefile | 1 +
.../phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c | 287 ++++++++++++++++++
8 files changed, 759 insertions(+), 23 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-pcie-phy.yaml
create mode 100644 drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
base-commit: 5ffa57f6eecefababb8cbe327222ef171943b183
--
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 v9 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver Varadarajan Narayanan
` (5 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Cc: Krzysztof Kozlowski
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Document the Qualcomm UNIPHY PCIe 28LP present in IPQ5332.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v8: Add 'Reviewed-by: Krzysztof Kozlowski'
v7: * Add data type definition to 'num-lanes'
v6: * Fix num-lanes definition
* Make it mandatory
v5: * Drop '3x1' & '3x2' from compatible string
* Use 'num-lanes' to differentiate instead of '3x1' or '3x2'
in compatible string
* Describe clocks and resets instead of just maxItems
v4: Remove reset-names as the resets are not used individually
Remove clock-output-names as its usage is removed from driver
Fix order in the 'required' section
v3: Fix compatible string to be similar to other phys and rename file accordingly
Fix clocks minItems -> maxItems
Change one of the maintainer from Sricharan to Varadarajan
v2: Rename the file to match the compatible
Drop 'driver' from title
Dropped 'clock-names'
Fixed 'reset-names'
---
.../phy/qcom,ipq5332-uniphy-pcie-phy.yaml | 76 +++++++++++++++++++
1 file changed, 76 insertions(+)
create mode 100644 Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-pcie-phy.yaml
diff --git a/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-pcie-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-pcie-phy.yaml
new file mode 100644
index 000000000000..e39168d55d23
--- /dev/null
+++ b/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-pcie-phy.yaml
@@ -0,0 +1,76 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/qcom,ipq5332-uniphy-pcie-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm UNIPHY PCIe 28LP PHY
+
+maintainers:
+ - Nitheesh Sekar <quic_nsekar@quicinc.com>
+ - Varadarajan Narayanan <quic_varada@quicinc.com>
+
+description:
+ PCIe and USB combo PHY found in Qualcomm IPQ5332 SoC
+
+properties:
+ compatible:
+ enum:
+ - qcom,ipq5332-uniphy-pcie-phy
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: pcie pipe clock
+ - description: pcie ahb clock
+
+ resets:
+ items:
+ - description: phy reset
+ - description: ahb reset
+ - description: cfg reset
+
+ "#phy-cells":
+ const: 0
+
+ "#clock-cells":
+ const: 0
+
+ num-lanes:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [1, 2]
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - resets
+ - "#phy-cells"
+ - "#clock-cells"
+ - num-lanes
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,ipq5332-gcc.h>
+
+ pcie0_phy: phy@4b0000 {
+ compatible = "qcom,ipq5332-uniphy-pcie-phy";
+ reg = <0x004b0000 0x800>;
+
+ clocks = <&gcc GCC_PCIE3X1_0_PIPE_CLK>,
+ <&gcc GCC_PCIE3X1_PHY_AHB_CLK>;
+
+ resets = <&gcc GCC_PCIE3X1_0_PHY_BCR>,
+ <&gcc GCC_PCIE3X1_PHY_AHB_CLK_ARES>,
+ <&gcc GCC_PCIE3X1_0_PHY_PHY_BCR>;
+
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
+ num-lanes = <1>;
+ };
--
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
* [PATCH v9 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574 Varadarajan Narayanan
` (4 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
From: Nitheesh Sekar <quic_nsekar@quicinc.com>
Add Qualcomm PCIe UNIPHY 28LP driver support present
in Qualcomm IPQ5332 SoC and the phy init sequence.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Nitheesh Sekar <quic_nsekar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v9: Align with dt-bindings and make num-lanes mandatory. Return error if not
present
Add new line before return in one of the functions
v6: Use generally followed pattern for getting num-lanes from DT
v5: * Use 'num-lanes' to differentiate instead of '3x1' or '3x2'
in compatible string
* Drop compatible specific init data as there is only one
compatible string
* Fix header file order
v4: Fix uppercase hex digit
Use phy->id for pipe clock source
v3: Added 'Reviewed-by: Dmitry Baryshkov' and made following updates
s/unsigned int/u32/g
Fix 'lane_offset' comments
Fix #define tab -> space
Fix mixed case hex numbers
Fix licensing & owner
Change for-loop pointer to use [] instead of ->
Use 'less than max' instead of 'not equal to max' in termination condition
Smatch and Coccinelle passed
v2: Drop IPQ5018 related code and data
Use uniform prefix for struct names
Place "}, {", on the same line
In qcom_uniphy_pcie_init(), use for-loop instead of while
Swap reset and clock disable order in qcom_uniphy_pcie_power_off
Add reset assert to qcom_uniphy_pcie_power_on's error path
Use macros for usleep duration
Inlined qcom_uniphy_pcie_get_resources & use devm_platform_get_and_ioremap_resource
Drop 'clock-output-names' from phy_pipe_clk_register
---
drivers/phy/qualcomm/Kconfig | 12 +
drivers/phy/qualcomm/Makefile | 1 +
.../phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c | 287 ++++++++++++++++++
3 files changed, 300 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..a6b71fda1b9c 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 IPQ5332 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..311f98181177
--- /dev/null
+++ b/drivers/phy/qualcomm/phy-qcom-uniphy-pcie-28lp.c
@@ -0,0 +1,287 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2025, The Linux Foundation. All rights reserved.
+ */
+
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+#include <linux/delay.h>
+#include <linux/err.h>
+#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/module.h>
+#include <linux/of_device.h>
+#include <linux/of.h>
+#include <linux/phy/phy.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/reset.h>
+
+#define RST_ASSERT_DELAY_MIN_US 100
+#define RST_ASSERT_DELAY_MAX_US 150
+#define PIPE_CLK_DELAY_MIN_US 5000
+#define PIPE_CLK_DELAY_MAX_US 5100
+#define CLK_EN_DELAY_MIN_US 30
+#define CLK_EN_DELAY_MAX_US 50
+#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_CFG_PLLCFG 0x220
+#define PHY_CFG_EIOS_DTCT_REG 0x3e4
+#define PHY_CFG_GEN3_ALIGN_HOLDOFF_TIME 0x3e8
+
+#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_pcie_regs {
+ u32 offset;
+ u32 val;
+};
+
+struct qcom_uniphy_pcie_data {
+ int lane_offset; /* offset between the lane register bases */
+ u32 phy_type;
+ const struct qcom_uniphy_pcie_regs *init_seq;
+ u32 init_seq_num;
+ u32 pipe_clk_rate;
+};
+
+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;
+ int lanes;
+};
+
+#define phy_to_dw_phy(x) container_of((x), struct qca_uni_pcie_phy, phy)
+
+static const struct qcom_uniphy_pcie_regs ipq5332_regs[] = {
+ {
+ .offset = PHY_CFG_PLLCFG,
+ .val = 0x30,
+ }, {
+ .offset = PHY_CFG_EIOS_DTCT_REG,
+ .val = 0x53ef,
+ }, {
+ .offset = PHY_CFG_GEN3_ALIGN_HOLDOFF_TIME,
+ .val = 0xcf,
+ },
+};
+
+static const struct qcom_uniphy_pcie_data ipq5332_data = {
+ .lane_offset = 0x800,
+ .phy_type = PHY_TYPE_PCIE_GEN3,
+ .init_seq = ipq5332_regs,
+ .init_seq_num = ARRAY_SIZE(ipq5332_regs),
+ .pipe_clk_rate = 250000000,
+};
+
+static void qcom_uniphy_pcie_init(struct qcom_uniphy_pcie *phy)
+{
+ const struct qcom_uniphy_pcie_data *data = phy->data;
+ const struct qcom_uniphy_pcie_regs *init_seq;
+ void __iomem *base = phy->base;
+ int lane, i;
+
+ for (lane = 0; lane < phy->lanes; lane++) {
+ init_seq = data->init_seq;
+
+ for (i = 0; i < data->init_seq_num; i++)
+ writel(init_seq[i].val, base + init_seq[i].offset);
+
+ base += data->lane_offset;
+ }
+}
+
+static int qcom_uniphy_pcie_power_off(struct phy *x)
+{
+ struct qcom_uniphy_pcie *phy = phy_get_drvdata(x);
+
+ clk_bulk_disable_unprepare(phy->num_clks, phy->clks);
+
+ return reset_control_assert(phy->resets);
+}
+
+static int qcom_uniphy_pcie_power_on(struct phy *x)
+{
+ struct qcom_uniphy_pcie *phy = phy_get_drvdata(x);
+ int ret;
+
+ ret = reset_control_assert(phy->resets);
+ if (ret) {
+ dev_err(phy->dev, "reset assert failed (%d)\n", ret);
+ return ret;
+ }
+
+ usleep_range(RST_ASSERT_DELAY_MIN_US, RST_ASSERT_DELAY_MAX_US);
+
+ ret = reset_control_deassert(phy->resets);
+ if (ret) {
+ dev_err(phy->dev, "reset deassert failed (%d)\n", ret);
+ return ret;
+ }
+
+ usleep_range(PIPE_CLK_DELAY_MIN_US, PIPE_CLK_DELAY_MAX_US);
+
+ 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(CLK_EN_DELAY_MIN_US, CLK_EN_DELAY_MAX_US);
+
+ 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))
+ 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, int id)
+{
+ const struct qcom_uniphy_pcie_data *data = phy->data;
+ struct clk_hw *hw;
+ char name[64];
+
+ snprintf(name, sizeof(name), "phy%d_pipe_clk_src", id);
+ hw = devm_clk_hw_register_fixed_rate(phy->dev, name, NULL, 0,
+ data->pipe_clk_rate);
+ if (IS_ERR(hw))
+ return dev_err_probe(phy->dev, PTR_ERR(hw),
+ "Unable to register %s\n", name);
+
+ return devm_of_clk_add_hw_provider(phy->dev, of_clk_hw_simple_get, hw);
+}
+
+static const struct of_device_id qcom_uniphy_pcie_id_table[] = {
+ {
+ .compatible = "qcom,ipq5332-uniphy-pcie-phy",
+ .data = &ipq5332_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 phy_provider *phy_provider;
+ struct device *dev = &pdev->dev;
+ struct qcom_uniphy_pcie *phy;
+ struct phy *generic_phy;
+ int ret;
+
+ 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 = of_property_read_u32(dev_of_node(dev), "num-lanes", &phy->lanes);
+ if (ret)
+ return dev_err_probe(dev, ret, "Couldn't read num-lanes\n");
+
+ ret = qcom_uniphy_pcie_get_resources(pdev, phy);
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, ret,
+ "failed to get resources: %d\n", ret);
+
+ generic_phy = devm_phy_create(phy->dev, NULL, &pcie_ops);
+ if (IS_ERR(generic_phy))
+ return PTR_ERR(generic_phy);
+
+ phy_set_drvdata(generic_phy, phy);
+
+ ret = phy_pipe_clk_register(phy, generic_phy->id);
+ if (ret)
+ dev_err(&pdev->dev, "failed to register phy pipe clk\n");
+
+ phy_provider = devm_of_phy_provider_register(phy->dev,
+ of_phy_simple_xlate);
+ if (IS_ERR(phy_provider))
+ return PTR_ERR(phy_provider);
+
+ 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_DESCRIPTION("PCIE QCOM UNIPHY driver");
+MODULE_LICENSE("GPL");
--
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
* [PATCH v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-02-03 16:44 ` Bjorn Helgaas
2025-01-28 6:27 ` [PATCH v9 4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names Varadarajan Narayanan
` (3 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Cc: Krzysztof Kozlowski
All DT entries except "reg" is similar between ipq5332 and
ipq9574. ipq9574 has 5 registers while ipq5332 has 6. MHI is the
additional (i.e. sixth entry). Since this matches with the
sdx55's "reg" definition which allows for 5 or 6 registers,
combine ipq9574 with sdx55.
This change is to prepare ipq9574 to be used as ipq5332's
fallback compatible.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v8: Add 'Reviewed-by: Krzysztof Kozlowski'
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 7235d6554cfb..4b4927178abc 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -169,7 +169,6 @@ allOf:
enum:
- qcom,pcie-ipq6018
- qcom,pcie-ipq8074-gen3
- - qcom,pcie-ipq9574
then:
properties:
reg:
@@ -210,6 +209,7 @@ allOf:
compatible:
contains:
enum:
+ - qcom,pcie-ipq9574
- qcom,pcie-sdx55
then:
properties:
--
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
* [PATCH v9 4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
` (2 preceding siblings ...)
2025-01-28 6:27 ` [PATCH v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574 Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller Varadarajan Narayanan
` (2 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
The 'reg' & 'reg-names' constraints used in the bindings and dtsi
are different resulting in dt_bindings_check errors. Re-order
them to address following errors.
arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: pcie@20000000: reg-names:0: 'parf' was expected
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 52 +++++++++++++++++----------
1 file changed, 34 insertions(+), 18 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 942290028972..d27c55c7f6e4 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -876,12 +876,16 @@ frame@b128000 {
pcie1: pcie@10000000 {
compatible = "qcom,pcie-ipq9574";
- reg = <0x10000000 0xf1d>,
- <0x10000f20 0xa8>,
- <0x10001000 0x1000>,
- <0x000f8000 0x4000>,
- <0x10100000 0x1000>;
- reg-names = "dbi", "elbi", "atu", "parf", "config";
+ reg = <0x000f8000 0x4000>,
+ <0x10000000 0xf1d>,
+ <0x10000f20 0xa8>,
+ <0x10001000 0x1000>,
+ <0x10100000 0x1000>;
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config";
device_type = "pci";
linux,pci-domain = <1>;
bus-range = <0x00 0xff>;
@@ -956,12 +960,16 @@ pcie1: pcie@10000000 {
pcie3: pcie@18000000 {
compatible = "qcom,pcie-ipq9574";
- reg = <0x18000000 0xf1d>,
- <0x18000f20 0xa8>,
- <0x18001000 0x1000>,
- <0x000f0000 0x4000>,
- <0x18100000 0x1000>;
- reg-names = "dbi", "elbi", "atu", "parf", "config";
+ reg = <0x000f0000 0x4000>,
+ <0x18000000 0xf1d>,
+ <0x18000f20 0xa8>,
+ <0x18001000 0x1000>,
+ <0x18100000 0x1000>;
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config";
device_type = "pci";
linux,pci-domain = <3>;
bus-range = <0x00 0xff>;
@@ -1036,12 +1044,16 @@ pcie3: pcie@18000000 {
pcie2: pcie@20000000 {
compatible = "qcom,pcie-ipq9574";
- reg = <0x20000000 0xf1d>,
+ reg = <0x00088000 0x4000>,
+ <0x20000000 0xf1d>,
<0x20000f20 0xa8>,
<0x20001000 0x1000>,
- <0x00088000 0x4000>,
<0x20100000 0x1000>;
- reg-names = "dbi", "elbi", "atu", "parf", "config";
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config";
device_type = "pci";
linux,pci-domain = <2>;
bus-range = <0x00 0xff>;
@@ -1116,12 +1128,16 @@ pcie2: pcie@20000000 {
pcie0: pci@28000000 {
compatible = "qcom,pcie-ipq9574";
- reg = <0x28000000 0xf1d>,
+ reg = <0x00080000 0x4000>,
+ <0x28000000 0xf1d>,
<0x28000f20 0xa8>,
<0x28001000 0x1000>,
- <0x00080000 0x4000>,
<0x28100000 0x1000>;
- reg-names = "dbi", "elbi", "atu", "parf", "config";
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config";
device_type = "pci";
linux,pci-domain = <0>;
bus-range = <0x00 0xff>;
--
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
* [PATCH v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
` (3 preceding siblings ...)
2025-01-28 6:27 ` [PATCH v9 4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-01-28 7:27 ` Krzysztof Kozlowski
2025-01-28 6:27 ` [PATCH v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 7/7] arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers Varadarajan Narayanan
6 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Document the PCIe controller on IPQ5332 platform. IPQ5332 will
use IPQ9574 as the fall back compatible.
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v9: Remove superfluous ipq5332 constraint since the fallback is present
v8: Use ipq9574 as fallback compatible for ipq5332 along with ipq5424
v7: Moved ipq9574 related changes to a separate patch
Add 'global' interrupt
v6: Commit message update only. Add info regarding the moving of
ipq9574 from 5 "reg" definition to 5 or 6 reg definition.
v5: Re-arrange 5332 and 9574 compatibles to handle fallback usage in dts
v4: * v3 reused ipq9574 bindings for ipq5332. Instead add one for ipq5332
* DTS uses ipq9574 compatible as fallback. Hence move ipq9574 to be able
to use the 'reg' section for both ipq5332 and ipq9574. Else, dtbs_check
and dt_binding_check flag errors.
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 4b4927178abc..f7ea865f56bc 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -33,6 +33,7 @@ properties:
- qcom,pcie-sdx55
- items:
- enum:
+ - qcom,pcie-ipq5332
- qcom,pcie-ipq5424
- const: qcom,pcie-ipq9574
- items:
@@ -49,11 +50,11 @@ properties:
interrupts:
minItems: 1
- maxItems: 8
+ maxItems: 9
interrupt-names:
minItems: 1
- maxItems: 8
+ maxItems: 9
iommu-map:
minItems: 1
@@ -443,6 +444,7 @@ allOf:
interrupts:
minItems: 8
interrupt-names:
+ minItems: 8
items:
- const: msi0
- const: msi1
@@ -452,6 +454,7 @@ allOf:
- const: msi5
- const: msi6
- const: msi7
+ - const: global
- if:
properties:
@@ -559,6 +562,7 @@ allOf:
enum:
- qcom,pcie-apq8064
- qcom,pcie-ipq4019
+ - qcom,pcie-ipq5332
- 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
* [PATCH v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
` (4 preceding siblings ...)
2025-01-28 6:27 ` [PATCH v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
2025-02-03 16:30 ` Krzysztof Kozlowski
2025-01-28 6:27 ` [PATCH v9 7/7] arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers Varadarajan Narayanan
6 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Cc: Praveenkumar I, Konrad Dybcio
From: Praveenkumar I <quic_ipkumar@quicinc.com>
Add phy and controller nodes for pcie0_x1 and pcie1_x2.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v7: * Fix IO 'ranges' entry
* Add root port definitions
* Not adding 'dma-coherent' as the controller doesn't have that support
* Remove 'bus-range' as it has default values
* Group root complex related entries and root port related entries
separately
v6: * Add 'num-lanes' to "pcie0_phy: phy@4b0000"
* Earlier, some related clock rates were set in U-Boot. In
recent versions of U-Boot this has been removed resulting
in the phy link not coming up. To remove boot loader
dependency add assigned-clocks and assigned-clock-rates to
the controller nodes.
* Not sure if 'Reviewed-by' should be dropped.
v5: Add 'num-lanes' to "pcie1_phy: phy@4b1000"
Make ipq5332 as main and ipq9574 as fallback compatible
Move controller nodes per address
Having Konrad's Reviewed-By
v4: Remove 'reset-names' as driver uses bulk APIs
Remove 'clock-output-names' as driver uses bulk APIs
Add missing reset for pcie1_phy
Convert 'reg-names' to a vertical list
Move 'msi-map' before interrupts
v3: Fix compatible string for phy nodes
Use ipq9574 as backup compatible instead of new compatible for ipq5332
Fix mixed case hex addresses
Add "mhi" space
Removed unnecessary comments and stray blank lines
v2: Fix nodes' location per address
---
arch/arm64/boot/dts/qcom/ipq5332.dtsi | 268 +++++++++++++++++++++++++-
1 file changed, 266 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332.dtsi b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
index ca3da95730bd..e5c920c21974 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq5332.dtsi
@@ -186,6 +186,46 @@ rng: rng@e3000 {
clock-names = "core";
};
+ pcie0_phy: phy@4b0000 {
+ compatible = "qcom,ipq5332-uniphy-pcie-phy";
+ reg = <0x004b0000 0x800>;
+
+ clocks = <&gcc GCC_PCIE3X1_0_PIPE_CLK>,
+ <&gcc GCC_PCIE3X1_PHY_AHB_CLK>;
+
+ resets = <&gcc GCC_PCIE3X1_0_PHY_BCR>,
+ <&gcc GCC_PCIE3X1_PHY_AHB_CLK_ARES>,
+ <&gcc GCC_PCIE3X1_0_PHY_PHY_BCR>;
+
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
+ num-lanes = <1>;
+
+ status = "disabled";
+ };
+
+ pcie1_phy: phy@4b1000 {
+ compatible = "qcom,ipq5332-uniphy-pcie-phy";
+ reg = <0x004b1000 0x1000>;
+
+ clocks = <&gcc GCC_PCIE3X2_PIPE_CLK>,
+ <&gcc GCC_PCIE3X2_PHY_AHB_CLK>;
+
+ resets = <&gcc GCC_PCIE3X2_PHY_BCR>,
+ <&gcc GCC_PCIE3X2_PHY_AHB_CLK_ARES>,
+ <&gcc GCC_PCIE3X2PHY_PHY_BCR>;
+
+ #clock-cells = <0>;
+
+ #phy-cells = <0>;
+
+ num-lanes = <2>;
+
+ status = "disabled";
+ };
+
tlmm: pinctrl@1000000 {
compatible = "qcom,ipq5332-tlmm";
reg = <0x01000000 0x300000>;
@@ -212,8 +252,8 @@ gcc: clock-controller@1800000 {
#interconnect-cells = <1>;
clocks = <&xo_board>,
<&sleep_clk>,
- <0>,
- <0>,
+ <&pcie1_phy>,
+ <&pcie0_phy>,
<0>;
};
@@ -479,6 +519,230 @@ frame@b128000 {
status = "disabled";
};
};
+
+ pcie1: pcie@18000000 {
+ compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
+ reg = <0x00088000 0x3000>,
+ <0x18000000 0xf1d>,
+ <0x18000f20 0xa8>,
+ <0x18001000 0x1000>,
+ <0x18100000 0x1000>,
+ <0x0008b000 0x1000>;
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config",
+ "mhi";
+ device_type = "pci";
+ linux,pci-domain = <1>;
+ num-lanes = <2>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ ranges = <0x01000000 0x0 0x00000000 0x18200000 0x0 0x00100000>,
+ <0x02000000 0x0 0x18300000 0x18300000 0x0 0x07d00000>;
+
+ msi-map = <0x0 &v2m0 0x0 0xffd>;
+
+ interrupts = <GIC_SPI 403 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 404 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 405 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 406 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 411 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi0",
+ "msi1",
+ "msi2",
+ "msi3",
+ "msi4",
+ "msi5",
+ "msi6",
+ "msi7",
+ "global";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc 0 0 412 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 413 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 414 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 415 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_PCIE3X2_AXI_M_CLK>,
+ <&gcc GCC_PCIE3X2_AXI_S_CLK>,
+ <&gcc GCC_PCIE3X2_AXI_S_BRIDGE_CLK>,
+ <&gcc GCC_PCIE3X2_RCHG_CLK>,
+ <&gcc GCC_PCIE3X2_AHB_CLK>,
+ <&gcc GCC_PCIE3X2_AUX_CLK>;
+ clock-names = "axi_m",
+ "axi_s",
+ "axi_bridge",
+ "rchng",
+ "ahb",
+ "aux";
+
+ assigned-clocks = <&gcc GCC_PCIE3X2_AUX_CLK>,
+ <&gcc GCC_PCIE3X2_AXI_M_CLK>,
+ <&gcc GCC_PCIE3X2_AXI_S_BRIDGE_CLK>,
+ <&gcc GCC_PCIE3X2_AXI_S_CLK>,
+ <&gcc GCC_PCIE3X2_RCHG_CLK>;
+
+ assigned-clock-rates = <2000000>,
+ <266666666>,
+ <240000000>,
+ <240000000>,
+ <100000000>;
+
+ resets = <&gcc GCC_PCIE3X2_PIPE_ARES>,
+ <&gcc GCC_PCIE3X2_CORE_STICKY_ARES>,
+ <&gcc GCC_PCIE3X2_AXI_S_STICKY_ARES>,
+ <&gcc GCC_PCIE3X2_AXI_S_CLK_ARES>,
+ <&gcc GCC_PCIE3X2_AXI_M_STICKY_ARES>,
+ <&gcc GCC_PCIE3X2_AXI_M_CLK_ARES>,
+ <&gcc GCC_PCIE3X2_AUX_CLK_ARES>,
+ <&gcc GCC_PCIE3X2_AHB_CLK_ARES>;
+ reset-names = "pipe",
+ "sticky",
+ "axi_s_sticky",
+ "axi_s",
+ "axi_m_sticky",
+ "axi_m",
+ "aux",
+ "ahb";
+
+ phys = <&pcie1_phy>;
+ phy-names = "pciephy";
+
+ interconnects = <&gcc MASTER_SNOC_PCIE3_2_M &gcc SLAVE_SNOC_PCIE3_2_M>,
+ <&gcc MASTER_ANOC_PCIE3_2_S &gcc SLAVE_ANOC_PCIE3_2_S>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
+
+ status = "disabled";
+
+ pcie@0 {
+ device_type = "pci";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ };
+ };
+
+ pcie0: pcie@20000000 {
+ compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
+ reg = <0x00080000 0x3000>,
+ <0x20000000 0xf1d>,
+ <0x20000f20 0xa8>,
+ <0x20001000 0x1000>,
+ <0x20100000 0x1000>,
+ <0x00083000 0x1000>;
+ reg-names = "parf",
+ "dbi",
+ "elbi",
+ "atu",
+ "config",
+ "mhi";
+ device_type = "pci";
+ linux,pci-domain = <0>;
+ num-lanes = <1>;
+ #address-cells = <3>;
+ #size-cells = <2>;
+
+ ranges = <0x01000000 0x0 0x00000000 0x20200000 0x0 0x00100000>,
+ <0x02000000 0x0 0x20300000 0x20300000 0x0 0x0fd00000>;
+
+ msi-map = <0x0 &v2m0 0x0 0xffd>;
+
+ interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "msi0",
+ "msi1",
+ "msi2",
+ "msi3",
+ "msi4",
+ "msi5",
+ "msi6",
+ "msi7",
+ "global";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &intc 0 0 35 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 2 &intc 0 0 36 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 3 &intc 0 0 37 IRQ_TYPE_LEVEL_HIGH>,
+ <0 0 0 4 &intc 0 0 38 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gcc GCC_PCIE3X1_0_AXI_M_CLK>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_CLK>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_BRIDGE_CLK>,
+ <&gcc GCC_PCIE3X1_0_RCHG_CLK>,
+ <&gcc GCC_PCIE3X1_0_AHB_CLK>,
+ <&gcc GCC_PCIE3X1_0_AUX_CLK>;
+ clock-names = "axi_m",
+ "axi_s",
+ "axi_bridge",
+ "rchng",
+ "ahb",
+ "aux";
+
+ assigned-clocks = <&gcc GCC_PCIE3X1_0_AUX_CLK>,
+ <&gcc GCC_PCIE3X1_0_AXI_M_CLK>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_BRIDGE_CLK>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_CLK>,
+ <&gcc GCC_PCIE3X1_0_RCHG_CLK>;
+
+ assigned-clock-rates = <2000000>,
+ <240000000>,
+ <240000000>,
+ <240000000>,
+ <100000000>;
+
+ resets = <&gcc GCC_PCIE3X1_0_PIPE_ARES>,
+ <&gcc GCC_PCIE3X1_0_CORE_STICKY_ARES>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_STICKY_ARES>,
+ <&gcc GCC_PCIE3X1_0_AXI_S_CLK_ARES>,
+ <&gcc GCC_PCIE3X1_0_AXI_M_STICKY_ARES>,
+ <&gcc GCC_PCIE3X1_0_AXI_M_CLK_ARES>,
+ <&gcc GCC_PCIE3X1_0_AUX_CLK_ARES>,
+ <&gcc GCC_PCIE3X1_0_AHB_CLK_ARES>;
+ reset-names = "pipe",
+ "sticky",
+ "axi_s_sticky",
+ "axi_s",
+ "axi_m_sticky",
+ "axi_m",
+ "aux",
+ "ahb";
+
+ phys = <&pcie0_phy>;
+ phy-names = "pciephy";
+
+ interconnects = <&gcc MASTER_SNOC_PCIE3_1_M &gcc SLAVE_SNOC_PCIE3_1_M>,
+ <&gcc MASTER_ANOC_PCIE3_1_S &gcc SLAVE_ANOC_PCIE3_1_S>;
+ interconnect-names = "pcie-mem", "cpu-pcie";
+
+ status = "disabled";
+
+ pcie@0 {
+ device_type = "pci";
+ reg = <0x0 0x0 0x0 0x0 0x0>;
+
+ #address-cells = <3>;
+ #size-cells = <2>;
+ ranges;
+ };
+ };
};
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
* [PATCH v9 7/7] arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
` (5 preceding siblings ...)
2025-01-28 6:27 ` [PATCH v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes Varadarajan Narayanan
@ 2025-01-28 6:27 ` Varadarajan Narayanan
6 siblings, 0 replies; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-01-28 6:27 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kw, manivannan.sadhasivam, robh, krzk+dt,
conor+dt, vkoul, kishon, andersson, konradybcio, p.zabel,
dmitry.baryshkov, quic_nsekar, quic_varada, linux-arm-msm,
linux-pci, devicetree, linux-kernel, linux-phy
Cc: Praveenkumar I, Konrad Dybcio
From: Praveenkumar I <quic_ipkumar@quicinc.com>
Enable the PCIe controller and PHY nodes for RDP 441.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Praveenkumar I <quic_ipkumar@quicinc.com>
Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
---
v5: Add 'Reviewed-by: Konrad Dybcio'
v4: Fix nodes sort order
Use property-n followed by property-names
v3: Reorder nodes alphabetically
Fix commit subject
---
arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts | 76 +++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts b/arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts
index 846413817e9a..79ec77cfe552 100644
--- a/arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp441.dts
@@ -32,6 +32,34 @@ &sdhc {
status = "okay";
};
+&pcie0 {
+ pinctrl-0 = <&pcie0_default>;
+ pinctrl-names = "default";
+
+ perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&pcie0_phy {
+ status = "okay";
+};
+
+&pcie1 {
+ pinctrl-0 = <&pcie1_default>;
+ pinctrl-names = "default";
+
+ perst-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+ wake-gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
+
+ status = "okay";
+};
+
+&pcie1_phy {
+ status = "okay";
+};
+
&tlmm {
i2c_1_pins: i2c-1-state {
pins = "gpio29", "gpio30";
@@ -40,6 +68,54 @@ i2c_1_pins: i2c-1-state {
bias-pull-up;
};
+ pcie0_default: pcie0-default-state {
+ clkreq-n-pins {
+ pins = "gpio37";
+ function = "pcie0_clk";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ perst-n-pins {
+ pins = "gpio38";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ output-low;
+ };
+
+ wake-n-pins {
+ pins = "gpio39";
+ function = "pcie0_wake";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+ };
+
+ pcie1_default: pcie1-default-state {
+ clkreq-n-pins {
+ pins = "gpio46";
+ function = "pcie1_clk";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ perst-n-pins {
+ pins = "gpio47";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ output-low;
+ };
+
+ wake-n-pins {
+ pins = "gpio48";
+ function = "pcie1_wake";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+ };
+
sdc_default_state: sdc-default-state {
clk-pins {
pins = "gpio13";
--
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 v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller
2025-01-28 6:27 ` [PATCH v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller Varadarajan Narayanan
@ 2025-01-28 7:27 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-28 7:27 UTC (permalink / raw)
To: Varadarajan Narayanan
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
On Tue, Jan 28, 2025 at 11:57:06AM +0530, Varadarajan Narayanan wrote:
> Document the PCIe controller on IPQ5332 platform. IPQ5332 will
> use IPQ9574 as the fall back compatible.
>
> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com>
> ---
> v9: Remove superfluous ipq5332 constraint since the fallback is present
>
> v8: Use ipq9574 as fallback compatible for ipq5332 along with ipq5424
>
> v7: Moved ipq9574 related changes to a separate patch
> Add 'global' interrupt
>
> v6: Commit message update only. Add info regarding the moving of
> ipq9574 from 5 "reg" definition to 5 or 6 reg definition.
>
> v5: Re-arrange 5332 and 9574 compatibles to handle fallback usage in dts
>
> v4: * v3 reused ipq9574 bindings for ipq5332. Instead add one for ipq5332
> * DTS uses ipq9574 compatible as fallback. Hence move ipq9574 to be able
> to use the 'reg' section for both ipq5332 and ipq9574. Else, dtbs_check
> and dt_binding_check flag errors.
> ---
Same problems as ipq5424.
What's more, you are doing the same, so this is a conflicting change
coming from the same company or even the same team.
It is not the open source community's job, not the maintainer's job to
coordinate tasks and teams in Qualcomm. Qualcomm people should
coordinate their teams.
It's merge window, you and your colleagues keep sending new versions of
big patchsets with conflicting changes, without any coordination. Amount
of patches is just overwhelming. Lack of coordination and any reflection
is just discouraging.
Can you slow down and actually sync to send something reasonable?
And not during the merge window?
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-01-28 6:27 ` [PATCH v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes Varadarajan Narayanan
@ 2025-02-03 16:30 ` Krzysztof Kozlowski
2025-02-05 10:49 ` Varadarajan Narayanan
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-03 16:30 UTC (permalink / raw)
To: Varadarajan Narayanan, 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
Cc: Praveenkumar I, Konrad Dybcio
On 28/01/2025 07:27, Varadarajan Narayanan wrote:
>
> @@ -479,6 +519,230 @@ frame@b128000 {
> status = "disabled";
> };
> };
> +
> + pcie1: pcie@18000000 {
> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
> + reg = <0x00088000 0x3000>,
So as Konrad pointed out now, this was never tested. It's not we who
should run tests for you. It's you.
It does not look like you tested the DTS against bindings. Please run
`make dtbs_check W=1` (see
Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Maybe you need to update your dtschema and yamllint. Don't rely on
distro packages for dtschema and be sure you are using the latest
released dtschema.
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 v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574
2025-01-28 6:27 ` [PATCH v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574 Varadarajan Narayanan
@ 2025-02-03 16:44 ` Bjorn Helgaas
0 siblings, 0 replies; 18+ messages in thread
From: Bjorn Helgaas @ 2025-02-03 16:44 UTC (permalink / raw)
To: Varadarajan Narayanan
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, Krzysztof Kozlowski
On Tue, Jan 28, 2025 at 11:57:04AM +0530, Varadarajan Narayanan wrote:
> All DT entries except "reg" is similar between ipq5332 and
> ipq9574. ipq9574 has 5 registers while ipq5332 has 6. MHI is the
> additional (i.e. sixth entry). Since this matches with the
> sdx55's "reg" definition which allows for 5 or 6 registers,
> combine ipq9574 with sdx55.
>
> This change is to prepare ipq9574 to be used as ipq5332's
> fallback compatible.
Nit: since there are apparently other fixes coming for this series,
rewrap all the commit logs to fill 75 columns (so they fit in 80
columns even after "git log" indents them). No point in artificially
short lines.
--
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-03 16:30 ` Krzysztof Kozlowski
@ 2025-02-05 10:49 ` Varadarajan Narayanan
2025-02-05 13:47 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-02-05 10:49 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, Praveenkumar I,
Konrad Dybcio
On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
> >
> > @@ -479,6 +519,230 @@ frame@b128000 {
> > status = "disabled";
> > };
> > };
> > +
> > + pcie1: pcie@18000000 {
> > + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
> > + reg = <0x00088000 0x3000>,
>
> So as Konrad pointed out now, this was never tested. It's not we who
> should run tests for you. It's you.
This was tested and it did not flag an error since it is having the order
specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
them have 'dbi' as the first register space and two of them have 'parf' as
the first register space. Looks like the constraints with 'dbi' as the
first entry will match with pcie@xxx and the ones with 'parf' won't match.
Since IPQ5332 follows the constraints specified for sdx55 which has 'parf'
as the first entry it is not able to match with pcie@xxx value.
The initial version that was posted has the first 'reg' entry matching with
pcie@xxx (please see [1]), since it used the ipq9574 reg constraints. Based
on the feedback received [2], had to add 'mhi' area also. Since adding
'mhi' to ipq9574 would result in duplication of the sdx55 reg constraints,
ipq5332 followed sdx55's constraints resulting in the reg entries getting
reordered and the first reg entry vs pcie@xxx mismatch happened.
To resolve this, shall I reorder the sdx55 reg bindings (and the affected
DTS arch/arm/boot/dts/qcom/qcom-sdx55.dtsi). Please let me know.
1 - https://lore.kernel.org/linux-arm-msm/20241204113329.3195627-6-quic_varada@quicinc.com/
2 - https://lore.kernel.org/linux-arm-msm/6fe09de4-c94c-495d-92a4-aa902d2519ef@oss.qualcomm.com/
> It does not look like you tested the DTS against bindings. Please run
> `make dtbs_check W=1` (see
> Documentation/devicetree/bindings/writing-schema.rst or
> https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
> for instructions).
> Maybe you need to update your dtschema and yamllint. Don't rely on
> distro packages for dtschema and be sure you are using the latest
> released dtschema.
I run the following tests before posting the patches and go through the
output to see if the nodes I added/changed have any errors or if other dtbs
have been impacted by my bindings changes.
export ARCH=arm64
export W=1
export DT_CHECKER_FLAGS='-v -m'
export DT_SCHEMA_FILES=qcom
export CHECK_DTBS=y
pip3 install dtschema --upgrade
make -j 16 dt_binding_check
make -j 16 dtbs_check
$ pip show dtschema | grep Version
Version: 2024.11
Please let me know if I should add anything else to ensure my setup is up
to speed.
Thanks
Varada
--
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-05 10:49 ` Varadarajan Narayanan
@ 2025-02-05 13:47 ` Krzysztof Kozlowski
2025-02-05 15:35 ` Varadarajan Narayanan
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-05 13:47 UTC (permalink / raw)
To: Varadarajan Narayanan
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, Praveenkumar I,
Konrad Dybcio
On 05/02/2025 11:49, Varadarajan Narayanan wrote:
> On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
>> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
>>>
>>> @@ -479,6 +519,230 @@ frame@b128000 {
>>> status = "disabled";
>>> };
>>> };
>>> +
>>> + pcie1: pcie@18000000 {
>>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
>>> + reg = <0x00088000 0x3000>,
>>
>> So as Konrad pointed out now, this was never tested. It's not we who
>> should run tests for you. It's you.
>
> This was tested and it did not flag an error since it is having the order
> specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
Hm, then please paste results of dtbs_check W=1 testing. Here.
I am 100% sure you have there warning and I don't understand your
reluctance to run the tests even after pointing it out by two people.
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-05 13:47 ` Krzysztof Kozlowski
@ 2025-02-05 15:35 ` Varadarajan Narayanan
2025-02-05 15:53 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-02-05 15:35 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, Praveenkumar I,
Konrad Dybcio
[-- Attachment #1: Type: text/plain, Size: 7612 bytes --]
On Wed, Feb 05, 2025 at 02:47:13PM +0100, Krzysztof Kozlowski wrote:
> On 05/02/2025 11:49, Varadarajan Narayanan wrote:
> > On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
> >> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
> >>>
> >>> @@ -479,6 +519,230 @@ frame@b128000 {
> >>> status = "disabled";
> >>> };
> >>> };
> >>> +
> >>> + pcie1: pcie@18000000 {
> >>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
> >>> + reg = <0x00088000 0x3000>,
> >>
> >> So as Konrad pointed out now, this was never tested. It's not we who
> >> should run tests for you. It's you.
> >
> > This was tested and it did not flag an error since it is having the order
> > specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
>
>
> Hm, then please paste results of dtbs_check W=1 testing. Here.
>
> I am 100% sure you have there warning and I don't understand your
> reluctance to run the tests even after pointing it out by two people.
I ran the tests. Not sure which portions to paste. Have attached the full
output just in case you are interested in some other detail. Please take a
look.
Thanks
Varada
$ grep ipq.*dtb dtbs-check.log
DTC [C] arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5332-rdp441.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5332-rdp442.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5332-rdp468.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5332-rdp474.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq5424-rdp466.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb: usb@8af8800: interrupt-names:0: 'pwr_event' was expected
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: qusb@59000: 'vdd-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupts: [[0, 62, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names:0: 'pwr_event' was expected
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb: usb@8af8800: interrupt-names: ['hs_phy_irq'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: qusb@59000: 'vdda-pll-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: qusb@59000: 'vdda-phy-dpdm-supply' is a required property
Check: arch/arm64/boot/dts/qcom/ipq5018-rdp432-c2.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: usb@70f8800: interrupt-names: ['pwr_event', 'qusb2_phy'] is too short
Check: arch/arm64/boot/dts/qcom/ipq5018-tplink-archer-ax55-v1.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb
Check: arch/arm64/boot/dts/qcom/ipq5424-rdp466.dtb
Check: arch/arm64/boot/dts/qcom/ipq5332-rdp442.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq8074-hk10-c1.dtb
Check: arch/arm64/boot/dts/qcom/ipq5332-rdp468.dtb
Check: arch/arm64/boot/dts/qcom/ipq5332-rdp441.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dtb
Check: arch/arm64/boot/dts/qcom/ipq5332-rdp474.dtb
arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb: /soc@0/remoteproc@cd00000: failed to match any schema with compatible: ['qcom,ipq6018-wcss-pil']
DTC [C] arch/arm64/boot/dts/qcom/ipq9574-rdp418.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb
DTC [C] arch/arm64/boot/dts/qcom/ipq9574-rdp453.dtb
Check: arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@59000: 'vdd-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@59000: 'vdda-pll-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@59000: 'vdda-phy-dpdm-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@79000: 'vdd-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@79000: 'vdda-pll-supply' is a required property
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb: phy@79000: 'vdda-phy-dpdm-supply' is a required property
DTC [C] arch/arm64/boot/dts/qcom/ipq9574-rdp454.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dtb: usb@8af8800: interrupt-names: ['pwr_event'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp418.dtb: usb@8af8800: interrupts-extended: [[1, 0, 134, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: usb@8af8800: interrupt-names: ['pwr_event'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb: usb@8af8800: interrupts-extended: [[1, 0, 134, 4]] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp453.dtb: usb@8af8800: interrupt-names: ['pwr_event'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp453.dtb: usb@8af8800: interrupts-extended: [[1, 0, 134, 4]] is too short
Check: arch/arm64/boot/dts/qcom/ipq8074-hk10-c1.dtb
Check: arch/arm64/boot/dts/qcom/ipq8074-hk01.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb: usb@8af8800: interrupt-names: ['pwr_event'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb: usb@8af8800: interrupts-extended: [[1, 0, 134, 4]] is too short
Check: arch/arm64/boot/dts/qcom/ipq8074-hk10-c2.dtb
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp454.dtb: usb@8af8800: interrupt-names: ['pwr_event'] is too short
/local/mnt/workspace/varada/upstream/pci-v10/arch/arm64/boot/dts/qcom/ipq9574-rdp454.dtb: usb@8af8800: interrupts-extended: [[1, 0, 134, 4]] is too short
Check: arch/arm64/boot/dts/qcom/ipq9574-rdp418.dtb
Check: arch/arm64/boot/dts/qcom/ipq9574-rdp449.dtb
Check: arch/arm64/boot/dts/qcom/ipq9574-rdp453.dtb
Check: arch/arm64/boot/dts/qcom/ipq9574-rdp433.dtb
Check: arch/arm64/boot/dts/qcom/ipq9574-rdp454.dtb
[-- Attachment #2: dtbs-check.log.gz --]
[-- Type: application/gzip, Size: 75207 bytes --]
[-- Attachment #3: Type: text/plain, Size: 112 bytes --]
--
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-05 15:35 ` Varadarajan Narayanan
@ 2025-02-05 15:53 ` Krzysztof Kozlowski
2025-02-05 15:54 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-05 15:53 UTC (permalink / raw)
To: Varadarajan Narayanan
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, Praveenkumar I,
Konrad Dybcio
On 05/02/2025 16:35, Varadarajan Narayanan wrote:
> On Wed, Feb 05, 2025 at 02:47:13PM +0100, Krzysztof Kozlowski wrote:
>> On 05/02/2025 11:49, Varadarajan Narayanan wrote:
>>> On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
>>>> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
>>>>>
>>>>> @@ -479,6 +519,230 @@ frame@b128000 {
>>>>> status = "disabled";
>>>>> };
>>>>> };
>>>>> +
>>>>> + pcie1: pcie@18000000 {
>>>>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
>>>>> + reg = <0x00088000 0x3000>,
>>>>
>>>> So as Konrad pointed out now, this was never tested. It's not we who
>>>> should run tests for you. It's you.
>>>
>>> This was tested and it did not flag an error since it is having the order
>>> specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
>>
>>
>> Hm, then please paste results of dtbs_check W=1 testing. Here.
>>
>> I am 100% sure you have there warning and I don't understand your
>> reluctance to run the tests even after pointing it out by two people.
>
> I ran the tests. Not sure which portions to paste. Have attached the full
> output just in case you are interested in some other detail. Please take a
> look.
>
> Thanks
> Varada
>
> $ grep ipq.*dtb dtbs-check.log
Where is the command you have used?
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-05 15:53 ` Krzysztof Kozlowski
@ 2025-02-05 15:54 ` Krzysztof Kozlowski
2025-02-06 6:19 ` Varadarajan Narayanan
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-05 15:54 UTC (permalink / raw)
To: Varadarajan Narayanan
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, Praveenkumar I,
Konrad Dybcio
On 05/02/2025 16:53, Krzysztof Kozlowski wrote:
> On 05/02/2025 16:35, Varadarajan Narayanan wrote:
>> On Wed, Feb 05, 2025 at 02:47:13PM +0100, Krzysztof Kozlowski wrote:
>>> On 05/02/2025 11:49, Varadarajan Narayanan wrote:
>>>> On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
>>>>> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
>>>>>>
>>>>>> @@ -479,6 +519,230 @@ frame@b128000 {
>>>>>> status = "disabled";
>>>>>> };
>>>>>> };
>>>>>> +
>>>>>> + pcie1: pcie@18000000 {
>>>>>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
>>>>>> + reg = <0x00088000 0x3000>,
>>>>>
>>>>> So as Konrad pointed out now, this was never tested. It's not we who
>>>>> should run tests for you. It's you.
>>>>
>>>> This was tested and it did not flag an error since it is having the order
>>>> specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
>>>
>>>
>>> Hm, then please paste results of dtbs_check W=1 testing. Here.
>>>
>>> I am 100% sure you have there warning and I don't understand your
>>> reluctance to run the tests even after pointing it out by two people.
>>
>> I ran the tests. Not sure which portions to paste. Have attached the full
>> output just in case you are interested in some other detail. Please take a
>> look.
>>
>> Thanks
>> Varada
>>
>> $ grep ipq.*dtb dtbs-check.log
>
> Where is the command you have used?
Although that might not matter - you skipped several warnings with your
grep. So maybe you need to fix your process, not sure.
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-05 15:54 ` Krzysztof Kozlowski
@ 2025-02-06 6:19 ` Varadarajan Narayanan
2025-02-06 7:37 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Varadarajan Narayanan @ 2025-02-06 6:19 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, Praveenkumar I,
Konrad Dybcio
On Wed, Feb 05, 2025 at 04:54:38PM +0100, Krzysztof Kozlowski wrote:
> On 05/02/2025 16:53, Krzysztof Kozlowski wrote:
> > On 05/02/2025 16:35, Varadarajan Narayanan wrote:
> >> On Wed, Feb 05, 2025 at 02:47:13PM +0100, Krzysztof Kozlowski wrote:
> >>> On 05/02/2025 11:49, Varadarajan Narayanan wrote:
> >>>> On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
> >>>>> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
> >>>>>>
> >>>>>> @@ -479,6 +519,230 @@ frame@b128000 {
> >>>>>> status = "disabled";
> >>>>>> };
> >>>>>> };
> >>>>>> +
> >>>>>> + pcie1: pcie@18000000 {
> >>>>>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
> >>>>>> + reg = <0x00088000 0x3000>,
> >>>>>
> >>>>> So as Konrad pointed out now, this was never tested. It's not we who
> >>>>> should run tests for you. It's you.
> >>>>
> >>>> This was tested and it did not flag an error since it is having the order
> >>>> specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
> >>>
> >>>
> >>> Hm, then please paste results of dtbs_check W=1 testing. Here.
> >>>
> >>> I am 100% sure you have there warning and I don't understand your
> >>> reluctance to run the tests even after pointing it out by two people.
> >>
> >> I ran the tests. Not sure which portions to paste. Have attached the full
> >> output just in case you are interested in some other detail. Please take a
> >> look.
> >>
> >> Thanks
> >> Varada
> >>
> >> $ grep ipq.*dtb dtbs-check.log
> >
> > Where is the command you have used?
export ARCH=arm64
export W=1
export DT_CHECKER_FLAGS='-v -m'
export DT_SCHEMA_FILES=qcom
export CHECK_DTBS=y
make -j 16 dtbs_check &> dtbs-check.log
> Although that might not matter - you skipped several warnings with your
> grep. So maybe you need to fix your process, not sure.
export W=1 is the problem. Kernel Makefile differentiates between 'W' being
set from environment and from command line with this check
ifeq ("$(origin W)", "command line")
KBUILD_EXTRA_WARN := $(W)
endif
I assumed similar to DT_SCHEMA_FILES and DT_CHECKER_FLAGS, W will also be
taken. I was not aware of this differentiation, and the 'export W=1' never
came into effect. I re-ran the command as below and see the warnings
$ make W=1 -j 16 dtbs_check &> dtbs-check2.log
$ grep Warning dtbs-check2.log | grep ipq.*dt
arch/arm64/boot/dts/qcom/ipq5332.dtsi:523.24-625.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:627.24-729.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:523.24-625.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:627.24-729.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:523.24-625.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:627.24-729.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:523.24-625.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq5332.dtsi:627.24-729.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq5424.dtsi:304.22-355.5: Warning (simple_bus_reg): /soc@0/usb2@1e00000: simple-bus unit address format error, expected "1ef8800"
arch/arm64/boot/dts/qcom/ipq5424.dtsi:395.22-448.5: Warning (simple_bus_reg): /soc@0/usb3@8a00000: simple-bus unit address format error, expected "8af8800"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:877.24-959.5: Warning (simple_bus_reg): /soc@0/pcie@10000000: simple-bus unit address format error, expected "f8000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:961.24-1043.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "f0000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1045.24-1127.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1129.23-1210.5: Warning (simple_bus_reg): /soc@0/pci@28000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:877.24-959.5: Warning (simple_bus_reg): /soc@0/pcie@10000000: simple-bus unit address format error, expected "f8000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:961.24-1043.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "f0000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1045.24-1127.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1129.23-1210.5: Warning (simple_bus_reg): /soc@0/pci@28000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:877.24-959.5: Warning (simple_bus_reg): /soc@0/pcie@10000000: simple-bus unit address format error, expected "f8000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:961.24-1043.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "f0000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1045.24-1127.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1129.23-1210.5: Warning (simple_bus_reg): /soc@0/pci@28000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:877.24-959.5: Warning (simple_bus_reg): /soc@0/pcie@10000000: simple-bus unit address format error, expected "f8000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:961.24-1043.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "f0000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1045.24-1127.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1129.23-1210.5: Warning (simple_bus_reg): /soc@0/pci@28000000: simple-bus unit address format error, expected "80000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:877.24-959.5: Warning (simple_bus_reg): /soc@0/pcie@10000000: simple-bus unit address format error, expected "f8000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:961.24-1043.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "f0000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1045.24-1127.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "88000"
arch/arm64/boot/dts/qcom/ipq9574.dtsi:1129.23-1210.5: Warning (simple_bus_reg): /soc@0/pci@28000000: simple-bus unit address format error, expected "80000"
Will change pcie@xxx to match with the first reg entry and post the next
version.
Thanks
Varada
--
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 v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes
2025-02-06 6:19 ` Varadarajan Narayanan
@ 2025-02-06 7:37 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-06 7:37 UTC (permalink / raw)
To: Varadarajan Narayanan
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, Praveenkumar I,
Konrad Dybcio
On 06/02/2025 07:19, Varadarajan Narayanan wrote:
> On Wed, Feb 05, 2025 at 04:54:38PM +0100, Krzysztof Kozlowski wrote:
>> On 05/02/2025 16:53, Krzysztof Kozlowski wrote:
>>> On 05/02/2025 16:35, Varadarajan Narayanan wrote:
>>>> On Wed, Feb 05, 2025 at 02:47:13PM +0100, Krzysztof Kozlowski wrote:
>>>>> On 05/02/2025 11:49, Varadarajan Narayanan wrote:
>>>>>> On Mon, Feb 03, 2025 at 05:30:32PM +0100, Krzysztof Kozlowski wrote:
>>>>>>> On 28/01/2025 07:27, Varadarajan Narayanan wrote:
>>>>>>>>
>>>>>>>> @@ -479,6 +519,230 @@ frame@b128000 {
>>>>>>>> status = "disabled";
>>>>>>>> };
>>>>>>>> };
>>>>>>>> +
>>>>>>>> + pcie1: pcie@18000000 {
>>>>>>>> + compatible = "qcom,pcie-ipq5332", "qcom,pcie-ipq9574";
>>>>>>>> + reg = <0x00088000 0x3000>,
>>>>>>>
>>>>>>> So as Konrad pointed out now, this was never tested. It's not we who
>>>>>>> should run tests for you. It's you.
>>>>>>
>>>>>> This was tested and it did not flag an error since it is having the order
>>>>>> specified in the bindings. qcom,pcie.yaml has 4 reg specifications. Two of
>>>>>
>>>>>
>>>>> Hm, then please paste results of dtbs_check W=1 testing. Here.
>>>>>
>>>>> I am 100% sure you have there warning and I don't understand your
>>>>> reluctance to run the tests even after pointing it out by two people.
>>>>
>>>> I ran the tests. Not sure which portions to paste. Have attached the full
>>>> output just in case you are interested in some other detail. Please take a
>>>> look.
>>>>
>>>> Thanks
>>>> Varada
>>>>
>>>> $ grep ipq.*dtb dtbs-check.log
>>>
>>> Where is the command you have used?
>
> export ARCH=arm64
> export W=1
> export DT_CHECKER_FLAGS='-v -m'
> export DT_SCHEMA_FILES=qcom
> export CHECK_DTBS=y
>
> make -j 16 dtbs_check &> dtbs-check.log
>
No flags for DTC as I asked.
>> Although that might not matter - you skipped several warnings with your
>> grep. So maybe you need to fix your process, not sure.
>
> export W=1 is the problem. Kernel Makefile differentiates between 'W' being
> set from environment and from command line with this check
So just don't export. Command is:
make W=1 -j8 dtbs_check
>
> ifeq ("$(origin W)", "command line")
> KBUILD_EXTRA_WARN := $(W)
> endif
>
> I assumed similar to DT_SCHEMA_FILES and DT_CHECKER_FLAGS, W will also be
> taken. I was not aware of this differentiation, and the 'export W=1' never
> came into effect. I re-ran the command as below and see the warnings
>
> $ make W=1 -j 16 dtbs_check &> dtbs-check2.log
>
> $ grep Warning dtbs-check2.log | grep ipq.*dt
> arch/arm64/boot/dts/qcom/ipq5332.dtsi:523.24-625.5: Warning (simple_bus_reg): /soc@0/pcie@18000000: simple-bus unit address format error, expected "88000"
> arch/arm64/boot/dts/qcom/ipq5332.dtsi:627.24-729.5: Warning (simple_bus_reg): /soc@0/pcie@20000000: simple-bus unit address format error, expected "80000"
Oh look! What surprise, who could expect that...
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
end of thread, other threads:[~2025-03-11 11:10 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 6:27 [PATCH v9 0/7] Add PCIe support for Qualcomm IPQ5332 Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 1/7] dt-bindings: phy: qcom,uniphy-pcie: Document PCIe uniphy Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 2/7] phy: qcom: Introduce PCIe UNIPHY 28LP driver Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 3/7] dt-bindings: PCI: qcom: Use sdx55 reg description for ipq9574 Varadarajan Narayanan
2025-02-03 16:44 ` Bjorn Helgaas
2025-01-28 6:27 ` [PATCH v9 4/7] arm64: dts: qcom: ipq9574: Reorder reg and reg-names Varadarajan Narayanan
2025-01-28 6:27 ` [PATCH v9 5/7] dt-bindings: PCI: qcom: Document the IPQ5332 PCIe controller Varadarajan Narayanan
2025-01-28 7:27 ` Krzysztof Kozlowski
2025-01-28 6:27 ` [PATCH v9 6/7] arm64: dts: qcom: ipq5332: Add PCIe related nodes Varadarajan Narayanan
2025-02-03 16:30 ` Krzysztof Kozlowski
2025-02-05 10:49 ` Varadarajan Narayanan
2025-02-05 13:47 ` Krzysztof Kozlowski
2025-02-05 15:35 ` Varadarajan Narayanan
2025-02-05 15:53 ` Krzysztof Kozlowski
2025-02-05 15:54 ` Krzysztof Kozlowski
2025-02-06 6:19 ` Varadarajan Narayanan
2025-02-06 7:37 ` Krzysztof Kozlowski
2025-01-28 6:27 ` [PATCH v9 7/7] arm64: dts: qcom: ipq5332-rdp441: Enable PCIe phys and controllers Varadarajan Narayanan
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).