@@ -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
@@ -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 },
{}
};
@@ -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
new file mode 100644
@@ -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";
+ };
+ };
+};
new file mode 100644
@@ -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";
+ };
+ };
+};
new file mode 100644
@@ -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";
+ };
+ };
+};
new file mode 100644
@@ -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";
+ };
+ };
+};
new file mode 100644
@@ -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";
+ };
+ };
+};
new file mode 100644
@@ -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";
+ };
+ };
+};
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(+)