diff options
| author | Tom Rini <[email protected]> | 2026-01-16 15:14:37 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-01-16 15:14:37 -0600 |
| commit | ff498a3c5efb424accc1d825cc45cede2540ca13 (patch) | |
| tree | 390a18b9462e99d6ed961425fd6a71020b22092f /drivers/usb | |
| parent | adccdb22ebd799a7d964892d4a7e7454ed3c239c (diff) | |
| parent | cd8ee4fff82788546df06fae7bbe6d22a710737b (diff) | |
Merge branch 'qcom-main' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
We have been getting a lot more patches from Qualcomm engineers, largely
focusing on IoT, router, and automotive platforms (those with QCS, IPQ,
and SA prefixes specifically).
Quite a variety of changes here:
- Watchdog overflow fix
- Hardcoded fastboot buffer addresses for a few board (hoppefully
temporary until fastboot is updated to read $fastboot_addr_r)
- Enable memory protection (MMU_MGPROT) for ARCH_SNAPDRAGON
- pinctrl support for the QCS615 soc
- various USB/phy fixes including phy config for msm8996/qcs615
- mmc and i2c clock configuration fixes
- significant fixes for rpmh and regulator drivers
- added config fragment for pixel devices
- sa8775p clock fixes
- support for "flattened" dwc3 DT that recently landed upstream for
sc7280 (qcs6490) and a few other platforms
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/dwc3/dwc3-generic.c | 32 | ||||
| -rw-r--r-- | drivers/usb/gadget/Kconfig | 4 |
2 files changed, 27 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/dwc3-generic.c b/drivers/usb/dwc3/dwc3-generic.c index bb11613a587..22b9ef0b24e 100644 --- a/drivers/usb/dwc3/dwc3-generic.c +++ b/drivers/usb/dwc3/dwc3-generic.c @@ -461,9 +461,13 @@ static void dwc3_qcom_select_utmi_clk(void __iomem *qscratch_base) setbits_le32(qscratch_base + QSCRATCH_GENERAL_CFG, PIPE_UTMI_CLK_DIS); + udelay(100); + setbits_le32(qscratch_base + QSCRATCH_GENERAL_CFG, PIPE_UTMI_CLK_SEL | PIPE3_PHYSTATUS_SW); + udelay(100); + clrbits_le32(qscratch_base + QSCRATCH_GENERAL_CFG, PIPE_UTMI_CLK_DIS); } @@ -472,7 +476,14 @@ static void dwc3_qcom_glue_configure(struct udevice *dev, int index, enum usb_dr_mode mode) { struct dwc3_glue_data *glue = dev_get_plat(dev); - void __iomem *qscratch_base = map_physmem(glue->regs, 0x400, MAP_NOCACHE); + fdt_addr_t regs = glue->regs; + void __iomem *qscratch_base; + + /* Offset for qscratch base when using flat DT */ + if (device_is_compatible(dev, "qcom,snps-dwc3")) + regs += SDM845_QSCRATCH_BASE_OFFSET; + + qscratch_base = map_physmem(regs, 0x400, MAP_NOCACHE); if (IS_ERR_OR_NULL(qscratch_base)) { log_err("%s: Invalid qscratch base address\n", dev->name); return; @@ -485,11 +496,8 @@ static void dwc3_qcom_glue_configure(struct udevice *dev, int index, dwc3_qcom_vbus_override_enable(qscratch_base, true); } -struct dwc3_glue_ops qcom_ops = { - .glue_configure = dwc3_qcom_glue_configure, -}; - -static int dwc3_rk_glue_get_ctrl_dev(struct udevice *dev, ofnode *node) +/* In cases where there is no dwc3 node and it's flattened into the glue node */ +static int dwc3_flat_dt_get_ctrl_dev(struct udevice *dev, ofnode *node) { *node = dev_ofnode(dev); if (!ofnode_valid(*node)) @@ -498,8 +506,17 @@ static int dwc3_rk_glue_get_ctrl_dev(struct udevice *dev, ofnode *node) return 0; } +struct dwc3_glue_ops qcom_ops = { + .glue_configure = dwc3_qcom_glue_configure, +}; + +struct dwc3_glue_ops qcom_flat_dt_ops = { + .glue_configure = dwc3_qcom_glue_configure, + .glue_get_ctrl_dev = dwc3_flat_dt_get_ctrl_dev, +}; + struct dwc3_glue_ops rk_ops = { - .glue_get_ctrl_dev = dwc3_rk_glue_get_ctrl_dev, + .glue_get_ctrl_dev = dwc3_flat_dt_get_ctrl_dev, }; static int dwc3_glue_bind_common(struct udevice *parent, ofnode node) @@ -708,6 +725,7 @@ static const struct udevice_id dwc3_glue_ids[] = { { .compatible = "rockchip,rk3576-dwc3", .data = (ulong)&rk_ops }, { .compatible = "rockchip,rk3588-dwc3", .data = (ulong)&rk_ops }, { .compatible = "qcom,dwc3", .data = (ulong)&qcom_ops }, + { .compatible = "qcom,snps-dwc3", .data = (ulong)&qcom_flat_dt_ops }, { .compatible = "fsl,imx8mp-dwc3", .data = (ulong)&imx8mp_ops }, { .compatible = "fsl,imx8mq-dwc3" }, { .compatible = "intel,tangier-dwc3" }, diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 7e08aeab904..ebb306852a6 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -61,7 +61,7 @@ config USB_GADGET_VENDOR_NUM default 0x0955 if ARCH_TEGRA default 0x1f3a if ARCH_SUNXI default 0x2207 if ARCH_ROCKCHIP - default 0x18d1 if ARCH_QCOM + default 0x18d1 if ARCH_SNAPDRAGON default 0x0 help Vendor ID of the USB device emulated, reported to the host device. @@ -89,7 +89,7 @@ config USB_GADGET_PRODUCT_NUM default 0x350b if ROCKCHIP_RK3588 default 0x350c if ROCKCHIP_RK3528 default 0x350e if ROCKCHIP_RK3576 - default 0x4ee0 if ARCH_QCOM + default 0x4ee0 if ARCH_SNAPDRAGON default 0x0 help Product ID of the USB device emulated, reported to the host device. |
