From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Felipe Balbi <balbi@kernel.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Saravana Kannan <saravanak@google.com>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Frank Li <Frank.li@nxp.com>
Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Subject: [PATCH v3 05/12] of: overlays: dwc3-flattening: Add Qualcomm Arm32 overlays
Date: Mon, 13 Jan 2025 21:11:38 -0800 [thread overview]
Message-ID: <20250113-dwc3-refactor-v3-5-d1722075df7b@oss.qualcomm.com> (raw)
In-Reply-To: <20250113-dwc3-refactor-v3-0-d1722075df7b@oss.qualcomm.com>
Introduce the overlays necessary for migrating Qualcomm Arm32 boards
currently present in the upstream Linux kernel.
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
drivers/of/overlays/dwc3-flattening/Makefile | 6 ++++
.../of/overlays/dwc3-flattening/dwc3-flattening.c | 42 ++++++++++++++++++++++
.../of/overlays/dwc3-flattening/dwc3-flattening.h | 13 +++++++
.../overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts | 36 +++++++++++++++++++
.../dwc3-qcom_ipq4018_8dev_jalapeno.dts | 38 ++++++++++++++++++++
.../overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts | 38 ++++++++++++++++++++
.../overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts | 40 +++++++++++++++++++++
.../overlays/dwc3-flattening/dwc3-qcom_sdx55.dts | 38 ++++++++++++++++++++
.../overlays/dwc3-flattening/dwc3-qcom_sdx65.dts | 38 ++++++++++++++++++++
9 files changed, 289 insertions(+)
diff --git a/drivers/of/overlays/dwc3-flattening/Makefile b/drivers/of/overlays/dwc3-flattening/Makefile
index 78ed59517887..248ddabd424e 100644
--- a/drivers/of/overlays/dwc3-flattening/Makefile
+++ b/drivers/of/overlays/dwc3-flattening/Makefile
@@ -2,3 +2,9 @@
obj-$(CONFIG_OF_OVERLAYS_DWC3_FLATTENING) += dwc3-flattening-overlay.o
dwc3-flattening-overlay-y += dwc3-flattening.o
+dwc3-flattening-overlay-y += dwc3-qcom_ipq4018.dtb.o
+dwc3-flattening-overlay-y += dwc3-qcom_ipq4018_8dev_jalapeno.dtb.o
+dwc3-flattening-overlay-y += dwc3-qcom_ipq4019.dtb.o
+dwc3-flattening-overlay-y += dwc3-qcom_ipq8064.dtb.o
+dwc3-flattening-overlay-y += dwc3-qcom_sdx55.dtb.o
+dwc3-flattening-overlay-y += dwc3-qcom_sdx65.dtb.o
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c
index fe8e42627fe3..0a3a31c5088b 100644
--- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.c
@@ -21,7 +21,49 @@ struct dwc3_overlay_data {
const char *migrate_match;
};
+static const struct dwc3_overlay_data dwc3_qcom_ipq4018_overlay = {
+ .fdt = __dtb_dwc3_qcom_ipq4018_begin,
+ .end = __dtb_dwc3_qcom_ipq4018_end,
+ .migrate_match = "qcom,dwc3",
+};
+
+static const struct dwc3_overlay_data dwc3_qcom_ipq4018_8dev_jalapeno_overlay = {
+ .fdt = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin,
+ .end = __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end,
+ .migrate_match = "qcom,dwc3",
+};
+
+static const struct dwc3_overlay_data dwc3_qcom_ipq4019_overlay = {
+ .fdt = __dtb_dwc3_qcom_ipq4019_begin,
+ .end = __dtb_dwc3_qcom_ipq4019_end,
+ .migrate_match = "qcom,dwc3",
+};
+
+static const struct dwc3_overlay_data dwc3_qcom_ipq8064_overlay = {
+ .fdt = __dtb_dwc3_qcom_ipq8064_begin,
+ .end = __dtb_dwc3_qcom_ipq8064_end,
+ .migrate_match = "qcom,dwc3",
+};
+
+static const struct dwc3_overlay_data dwc3_qcom_sdx55_overlay = {
+ .fdt = __dtb_dwc3_qcom_sdx55_begin,
+ .end = __dtb_dwc3_qcom_sdx55_end,
+ .migrate_match = "qcom,dwc3",
+};
+
+static const struct dwc3_overlay_data dwc3_qcom_sdx65_overlay = {
+ .fdt = __dtb_dwc3_qcom_sdx65_begin,
+ .end = __dtb_dwc3_qcom_sdx65_end,
+ .migrate_match = "qcom,dwc3",
+};
+
static const struct of_device_id dwc3_flatten_of_match[] = {
+ { .compatible = "8dev,jalapeno", .data = &dwc3_qcom_ipq4018_8dev_jalapeno_overlay },
+ { .compatible = "qcom,ipq4018", .data = &dwc3_qcom_ipq4018_overlay },
+ { .compatible = "qcom,ipq4019", .data = &dwc3_qcom_ipq4019_overlay },
+ { .compatible = "qcom,ipq8064", .data = &dwc3_qcom_ipq8064_overlay },
+ { .compatible = "qcom,sdx55", .data = &dwc3_qcom_sdx55_overlay },
+ { .compatible = "qcom,sdx65", .data = &dwc3_qcom_sdx65_overlay },
{}
};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h
index 6147376d3c92..57d7dbc94980 100644
--- a/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-flattening.h
@@ -4,4 +4,17 @@
#include <linux/kernel.h>
+extern u8 __dtb_dwc3_qcom_ipq4018_begin[];
+extern u8 __dtb_dwc3_qcom_ipq4018_end[];
+extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_begin[];
+extern u8 __dtb_dwc3_qcom_ipq4018_8dev_jalapeno_end[];
+extern u8 __dtb_dwc3_qcom_ipq4019_begin[];
+extern u8 __dtb_dwc3_qcom_ipq4019_end[];
+extern u8 __dtb_dwc3_qcom_ipq8064_begin[];
+extern u8 __dtb_dwc3_qcom_ipq8064_end[];
+extern u8 __dtb_dwc3_qcom_sdx55_begin[];
+extern u8 __dtb_dwc3_qcom_sdx55_end[];
+extern u8 __dtb_dwc3_qcom_sdx65_begin[];
+extern u8 __dtb_dwc3_qcom_sdx65_end[];
+
#endif
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts
new file mode 100644
index 000000000000..1bd86a1852ba
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018.dts
@@ -0,0 +1,36 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@8af8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x08a00000 0xf8100>;
+ phys = <&usb3_hs_phy>;
+ phy-names = "usb2-phy";
+ };
+ };
+
+ fragment@1 {
+ target-path = "/soc/usb@60f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x06000000 0xf8100>;
+ phys = <&usb2_hs_phy>;
+ phy-names = "usb2-phy";
+ };
+ };
+};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts
new file mode 100644
index 000000000000..bdc76b73c1fe
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4018_8dev_jalapeno.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@8af8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x08a00000 0xf8100>;
+ phys = <&usb3_hs_phy>,
+ <&usb3_ss_phy>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+
+ fragment@1 {
+ target-path = "/soc/usb@60f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x06000000 0xf8100>;
+ phys = <&usb2_hs_phy>;
+ phy-names = "usb2-phy";
+ };
+ };
+};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts
new file mode 100644
index 000000000000..bdc76b73c1fe
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq4019.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@8af8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x08a00000 0xf8100>;
+ phys = <&usb3_hs_phy>,
+ <&usb3_ss_phy>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+
+ fragment@1 {
+ target-path = "/soc/usb@60f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq4019-dwc3", "qcom,snps-dwc3";
+ reg = <0x06000000 0xf8100>;
+ phys = <&usb2_hs_phy>;
+ phy-names = "usb2-phy";
+ };
+ };
+};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts
new file mode 100644
index 000000000000..8e29a17472c6
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_ipq8064.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@100f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq8064-dwc3", "qcom,snps-dwc3";
+ reg = <0x10000000 0x14d00>;
+ phys = <&hs_phy_0>,
+ <&ss_phy_0>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+
+ fragment@1 {
+ target-path = "/soc/usb@110f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,ipq8064-dwc3", "qcom,snps-dwc3";
+ reg = <0x11000000 0x14d00>;
+ phys = <&hs_phy_1>,
+ <&ss_phy_1>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts
new file mode 100644
index 000000000000..9ebb5d42f355
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx55.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@a6f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,sdx55-dwc3", "qcom,snps-dwc3";
+ reg = <0x0a600000 0xd100>;
+ interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 10 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 11 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 51 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dwc_usb3",
+ "pwr_event",
+ "hs_phy_irq",
+ "dp_hs_phy_irq",
+ "dm_hs_phy_irq",
+ "ss_phy_irq";
+ iommus = <&apps_smmu 0x1a0 0x0>;
+ phys = <&usb_hsphy>,
+ <&usb_qmpphy>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+};
diff --git a/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts
new file mode 100644
index 000000000000..239caec1f80d
--- /dev/null
+++ b/drivers/of/overlays/dwc3-flattening/dwc3-qcom_sdx65.dts
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ fragment@0 {
+ target-path = "/soc/usb@a6f8800";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ __overlay__ {
+ compatible = "qcom,sdx65-dwc3", "qcom,snps-dwc3";
+ reg = <0x0a600000 0xd100>;
+ interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>,
+ <&intc GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>,
+ <&pdc 19 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 18 IRQ_TYPE_EDGE_BOTH>,
+ <&pdc 76 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "dwc_usb3",
+ "pwr_event",
+ "hs_phy_irq",
+ "dp_hs_phy_irq",
+ "dm_hs_phy_irq",
+ "ss_phy_irq";
+ iommus = <&apps_smmu 0x1a0 0x0>;
+ phys = <&usb_hsphy>,
+ <&usb_qmpphy>;
+ phy-names = "usb2-phy",
+ "usb3-phy";
+ };
+ };
+};
--
2.45.2
next prev parent reply other threads:[~2025-01-14 5:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-14 5:11 [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 01/12] dt-bindings: usb: snps,dwc3: Split core description Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 02/12] dt-bindings: usb: Introduce qcom,snps-dwc3 Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 03/12] of: dynamic: Add of_changeset_add_prop_copy() Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 04/12] of: overlays: Introduce dwc3 flattening overlay Bjorn Andersson
2025-01-14 5:11 ` Bjorn Andersson [this message]
2025-01-14 5:11 ` [PATCH v3 06/12] of: overlays: dwc3-flattening: Add Qualcomm Arm64 board overlays Bjorn Andersson
2025-01-14 17:42 ` Rob Herring
2025-01-14 22:46 ` Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 07/12] of: overlays: dwc3-flattening: Provide overlay symbols Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 08/12] usb: dwc3: core: Expose core driver as library Bjorn Andersson
2025-01-14 19:43 ` Frank Li
2025-01-14 22:55 ` Bjorn Andersson
2025-01-15 1:56 ` Thinh Nguyen
2025-01-15 2:59 ` Thinh Nguyen
2025-01-14 5:11 ` [PATCH v3 09/12] usb: dwc3: core: Don't touch resets and clocks Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 10/12] usb: dwc3: qcom: Don't rely on drvdata during probe Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 11/12] usb: dwc3: qcom: Transition to flattened model Bjorn Andersson
2025-01-14 5:11 ` [PATCH v3 12/12] arm64: dts: qcom: sc8280x: Flatten the USB nodes Bjorn Andersson
2025-01-14 17:44 ` [PATCH v3 00/12] usb: dwc3: qcom: Flatten dwc3 structure Rob Herring
2025-01-14 23:04 ` Bjorn Andersson
2025-01-15 18:51 ` Rob Herring
2025-01-23 3:07 ` Bjorn Andersson
2025-01-23 21:22 ` Rob Herring
2025-01-27 17:57 ` Stephan Gerhold
2025-01-27 22:40 ` Bjorn Andersson
2025-01-28 10:42 ` Konrad Dybcio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250113-dwc3-refactor-v3-5-d1722075df7b@oss.qualcomm.com \
--to=bjorn.andersson@oss.qualcomm.com \
--cc=Frank.li@nxp.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=andersson@kernel.org \
--cc=balbi@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=quic_wcheng@quicinc.com \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox