diff --git a/include/kernel-6.6 b/include/kernel-6.6 index e6f3c97c6..250365a50 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .83 -LINUX_KERNEL_HASH-6.6.83 = 894bbbe63b7484a0bc576a1e11a8dbc090fbd476d6424431bdc8435e03c2c208 +LINUX_VERSION-6.6 = .84 +LINUX_KERNEL_HASH-6.6.84 = 7fd20721551a61db347c5ac6ca05818e24058682be4e4389dc51e88d4ac17ba7 diff --git a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch index f8aa2fe5a..e2c2b02f7 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch @@ -14,21 +14,17 @@ We don't agree with upstream revert so undo it. --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -480,8 +480,10 @@ static void xhci_pci_quirks(struct devic - pdev->device == 0x3432) - xhci->quirks |= XHCI_BROKEN_STREAMS; - -- if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) -+ if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == 0x3483) { +@@ -485,6 +485,7 @@ static void xhci_pci_quirks(struct devic + if (pdev->vendor == PCI_VENDOR_ID_VIA && pdev->device == PCI_DEVICE_ID_VIA_VL805) { xhci->quirks |= XHCI_LPM_SUPPORT; + xhci->quirks |= XHCI_TRB_OVERFETCH; + xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; -+ } + } if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && - pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) { --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -633,8 +633,11 @@ static int xhci_move_dequeue_past_td(str +@@ -635,8 +635,11 @@ static int xhci_move_dequeue_past_td(str struct xhci_ring *ep_ring; struct xhci_command *cmd; struct xhci_segment *new_seg; @@ -40,7 +36,7 @@ We don't agree with upstream revert so undo it. dma_addr_t addr; u64 hw_dequeue; bool cycle_found = false; -@@ -672,7 +675,27 @@ static int xhci_move_dequeue_past_td(str +@@ -674,7 +677,27 @@ static int xhci_move_dequeue_past_td(str hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id); new_seg = ep_ring->deq_seg; new_deq = ep_ring->dequeue; diff --git a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch b/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch deleted file mode 100644 index 852e6a367..000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bab2f1e4e90675af7ea6b48b5c28eb94e22cecd7 Mon Sep 17 00:00:00 2001 -From: Jonathan Bell -Date: Thu, 13 Jul 2023 15:06:54 +0100 -Subject: [PATCH 0483/1085] usb: xhci: borrow upstream TRB_FETCH quirk on VL805 - hosts - -This reimplements 5a57342 usb: xhci: add VLI_TRB_CACHE_BUG quirk - -The downstream implementation required a fair bit of driver surgery to -allow for truncated ring segments, which needed to shrink by a small -amount to avoid the cache prefetcher from reading off the end of one -segment and into another. - -An upstream implementation for a similar bug on a different controller -just doubles the size of the memory allocated for ring segments, which -is a bit more wasteful (+4K per allocation) but means less code churn. - -Signed-off-by: Jonathan Bell ---- - drivers/usb/host/xhci-pci.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/drivers/usb/host/xhci-pci.c -+++ b/drivers/usb/host/xhci-pci.c -@@ -484,6 +484,7 @@ static void xhci_pci_quirks(struct devic - xhci->quirks |= XHCI_LPM_SUPPORT; - xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; - xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; -+ xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; - } - - if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && diff --git a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch index add65ee64..b6cfc1b7a 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0484-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch @@ -90,17 +90,17 @@ Signed-off-by: Jonathan Bell /* Allow 3 retries for everything but isoc, set CErr = 3 */ --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c -@@ -485,6 +485,7 @@ static void xhci_pci_quirks(struct devic +@@ -487,6 +487,7 @@ static void xhci_pci_quirks(struct devic + xhci->quirks |= XHCI_TRB_OVERFETCH; xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; - xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; + xhci->quirks |= XHCI_VLI_SS_BULK_OUT_BUG; } if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1665,6 +1665,7 @@ struct xhci_hcd { +@@ -1666,6 +1666,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) diff --git a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch index 9c45bd77e..a17245d94 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch @@ -45,9 +45,9 @@ Signed-off-by: Jonathan Bell +#define VL805_FW_VER_0138C0 0x0138C0 + /* Device for a quirk */ - #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 - #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 -@@ -295,6 +297,16 @@ static int xhci_pci_reinit(struct xhci_h + #define PCI_VENDOR_ID_FRESCO_LOGIC 0x1b73 + #define PCI_DEVICE_ID_FRESCO_LOGIC_PDK 0x1000 +@@ -297,6 +299,16 @@ static int xhci_pci_reinit(struct xhci_h return 0; } @@ -64,9 +64,9 @@ Signed-off-by: Jonathan Bell static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) { struct pci_dev *pdev = to_pci_dev(dev); -@@ -486,6 +498,8 @@ static void xhci_pci_quirks(struct devic +@@ -488,6 +500,8 @@ static void xhci_pci_quirks(struct devic + xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS; xhci->quirks |= XHCI_AVOID_DQ_ON_LINK; - xhci->quirks |= XHCI_ZHAOXIN_TRB_FETCH; xhci->quirks |= XHCI_VLI_SS_BULK_OUT_BUG; + if (xhci_vl805_get_fw_version(pdev) < VL805_FW_VER_0138C0) + xhci->quirks |= XHCI_VLI_HUB_TT_QUIRK; @@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA && --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3674,6 +3674,48 @@ static int xhci_align_td(struct xhci_hcd +@@ -3715,6 +3715,48 @@ static int xhci_align_td(struct xhci_hcd return 1; } @@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell /* This is very similar to what ehci-q.c qtd_fill() does */ int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags, struct urb *urb, int slot_id, unsigned int ep_index) -@@ -3830,6 +3872,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * +@@ -3871,6 +3913,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd * } check_trb_math(urb, enqd_len); @@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id, start_cycle, start_trb); return 0; -@@ -3979,6 +4023,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -4020,6 +4064,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * /* Event on completion */ field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state); @@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell return 0; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1666,6 +1666,7 @@ struct xhci_hcd { +@@ -1667,6 +1667,7 @@ struct xhci_hcd { /* Downstream VLI fixes */ #define XHCI_AVOID_DQ_ON_LINK BIT_ULL(56) #define XHCI_VLI_SS_BULK_OUT_BUG BIT_ULL(57) diff --git a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch b/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch deleted file mode 100644 index fe77f2121..000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch +++ /dev/null @@ -1,378 +0,0 @@ -From fa846f5991de6c37db1f40e26a39f52c130f2bc7 Mon Sep 17 00:00:00 2001 -From: Jonathan Bell -Date: Mon, 13 Sep 2021 11:14:32 +0100 -Subject: [PATCH 0519/1085] usb: dwc3: Set DMA and coherent masks early - -dwc3 allocates scratch and event buffers in the top-level driver. Hack the -probe function to set the DMA mask before trying to allocate these. - -I think the event buffers are only used in device mode, but the scratch -buffers may be used if core hibernation is enabled. - -usb: dwc3: add support for new DT quirks - -Apply the optional axi-pipe-limit and dis-in-autoretry-quirk properties -during driver probe. - -Signed-off-by: Jonathan Bell - -phy: phy-brcm-usb: Add 2712 support - -usb: dwc3: if the host controller instance number is present in DT, use it - -If two instances of a dwc3 host controller are specified in devicetree, -then the probe order may be arbitrary which results in the device names -swapping on a per-boot basis. - -If a "usb" alias with the instance number is specified, then use -that to construct the device name instead of autogenerating one. - -Signed-off-by: Jonathan Bell - -rp1 dwc3 changes - -drivers: usb: dwc3: allow setting GTXTHRCFG on dwc_usb3.0 hardware - -Equivalent register fields exist in the SuperSpeed Host version of the -hardware, so allow the use of TX thresholds if specified in devicetree. - -Signed-off-by: Jonathan Bell - -drivers: usb: dwc3: remove downstream quirk dis-in-autoretry - -Upstream have unilaterally disabled the feature. - -Partially reverts 6e9142a26ee0fdc3a5adc49ed6cedc0b16ec2ed1 (downstream) - -Signed-off-by: Jonathan Bell ---- - drivers/phy/broadcom/Kconfig | 2 +- - .../phy/broadcom/phy-brcm-usb-init-synopsys.c | 59 +++++++++++++++++++ - drivers/phy/broadcom/phy-brcm-usb-init.h | 2 + - drivers/phy/broadcom/phy-brcm-usb.c | 18 +++++- - drivers/usb/dwc3/core.c | 53 +++++++++++++++++ - drivers/usb/dwc3/core.h | 5 ++ - drivers/usb/dwc3/host.c | 9 ++- - 7 files changed, 145 insertions(+), 3 deletions(-) - ---- a/drivers/phy/broadcom/Kconfig -+++ b/drivers/phy/broadcom/Kconfig -@@ -93,7 +93,7 @@ config PHY_BRCM_SATA - - config PHY_BRCM_USB - tristate "Broadcom STB USB PHY driver" -- depends on ARCH_BCMBCA || ARCH_BRCMSTB || COMPILE_TEST -+ depends on ARCH_BCMBCA || ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST - depends on OF - select GENERIC_PHY - select SOC_BRCMSTB if ARCH_BRCMSTB ---- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c -+++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c -@@ -335,6 +335,36 @@ static void usb_init_common_7216(struct - usb_init_common(params); - } - -+static void usb_init_common_2712(struct brcm_usb_init_params *params) -+{ -+ void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; -+ void __iomem *bdc_ec = params->regs[BRCM_REGS_BDC_EC]; -+ u32 reg; -+ -+ if (params->syscon_piarbctl) -+ syscon_piarbctl_init(params->syscon_piarbctl); -+ -+ USB_CTRL_UNSET(ctrl, USB_PM, USB_PWRDN); -+ -+ usb_wake_enable_7211b0(params, false); -+ -+ usb_init_common(params); -+ -+ /* -+ * The BDC controller will get occasional failures with -+ * the default "Read Transaction Size" of 6 (1024 bytes). -+ * Set it to 4 (256 bytes). -+ */ -+ if ((params->supported_port_modes != USB_CTLR_MODE_HOST) && bdc_ec) { -+ reg = brcm_usb_readl(bdc_ec + BDC_EC_AXIRDA); -+ reg &= ~BDC_EC_AXIRDA_RTS_MASK; -+ reg |= (0x4 << BDC_EC_AXIRDA_RTS_SHIFT); -+ brcm_usb_writel(reg, bdc_ec + BDC_EC_AXIRDA); -+ } -+ -+ usb2_eye_fix_7211b0(params); -+} -+ - static void usb_init_xhci(struct brcm_usb_init_params *params) - { - pr_debug("%s\n", __func__); -@@ -380,6 +410,18 @@ static void usb_uninit_common_7211b0(str - - } - -+static void usb_uninit_common_2712(struct brcm_usb_init_params *params) -+{ -+ void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; -+ -+ if (params->wake_enabled) { -+ USB_CTRL_SET(ctrl, TEST_PORT_CTL, TPOUT_SEL_PME_GEN); -+ usb_wake_enable_7211b0(params, true); -+ } else { -+ USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); -+ } -+} -+ - static void usb_uninit_xhci(struct brcm_usb_init_params *params) - { - -@@ -434,6 +476,16 @@ static const struct brcm_usb_init_ops bc - .set_dual_select = usb_set_dual_select, - }; - -+static const struct brcm_usb_init_ops bcm2712_ops = { -+ .init_ipp = usb_init_ipp, -+ .init_common = usb_init_common_2712, -+ .init_xhci = usb_init_xhci, -+ .uninit_common = usb_uninit_common_2712, -+ .uninit_xhci = usb_uninit_xhci, -+ .get_dual_select = usb_get_dual_select, -+ .set_dual_select = usb_set_dual_select, -+}; -+ - void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params) - { - -@@ -451,3 +503,10 @@ void brcm_usb_dvr_init_7211b0(struct brc - params->family_name = "7211"; - params->ops = &bcm7211b0_ops; - } -+ -+void brcm_usb_dvr_init_2712(struct brcm_usb_init_params *params) -+{ -+ params->family_name = "2712"; -+ params->ops = &bcm2712_ops; -+ params->suspend_with_clocks = true; -+} ---- a/drivers/phy/broadcom/phy-brcm-usb-init.h -+++ b/drivers/phy/broadcom/phy-brcm-usb-init.h -@@ -70,12 +70,14 @@ struct brcm_usb_init_params { - const struct brcm_usb_init_ops *ops; - struct regmap *syscon_piarbctl; - bool wake_enabled; -+ bool suspend_with_clocks; - }; - - void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params); - void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params); - void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params); - void brcm_usb_dvr_init_7211b0(struct brcm_usb_init_params *params); -+void brcm_usb_dvr_init_2712(struct brcm_usb_init_params *params); - - static inline u32 brcm_usb_readl(void __iomem *addr) - { ---- a/drivers/phy/broadcom/phy-brcm-usb.c -+++ b/drivers/phy/broadcom/phy-brcm-usb.c -@@ -75,7 +75,7 @@ struct brcm_usb_phy_data { - }; - - static s8 *node_reg_names[BRCM_REGS_MAX] = { -- "crtl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec" -+ "ctrl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec" - }; - - static int brcm_pm_notifier(struct notifier_block *notifier, -@@ -315,6 +315,18 @@ static const struct match_chip_info chip - .optional_reg = BRCM_REGS_BDC_EC, - }; - -+static const struct match_chip_info chip_info_2712 = { -+ .init_func = &brcm_usb_dvr_init_2712, -+ .required_regs = { -+ BRCM_REGS_CTRL, -+ BRCM_REGS_XHCI_EC, -+ BRCM_REGS_XHCI_GBL, -+ BRCM_REGS_USB_MDIO, -+ -1, -+ }, -+ .optional_reg = BRCM_REGS_BDC_EC, -+}; -+ - static const struct match_chip_info chip_info_7445 = { - .init_func = &brcm_usb_dvr_init_7445, - .required_regs = { -@@ -338,6 +350,10 @@ static const struct of_device_id brcm_us - .data = &chip_info_7211b0, - }, - { -+ .compatible = "brcm,bcm2712-usb-phy", -+ .data = &chip_info_2712, -+ }, -+ { - .compatible = "brcm,brcmstb-usb-phy", - .data = &chip_info_7445, - }, ---- a/drivers/usb/dwc3/core.c -+++ b/drivers/usb/dwc3/core.c -@@ -1208,6 +1208,24 @@ static void dwc3_config_threshold(struct - } - } - -+static void dwc3_set_axi_pipe_limit(struct dwc3 *dwc) -+{ -+ struct device *dev = dwc->dev; -+ u32 cfg; -+ -+ if (!dwc->axi_pipe_limit) -+ return; -+ if (dwc->axi_pipe_limit > 16) { -+ dev_err(dev, "Invalid axi_pipe_limit property\n"); -+ return; -+ } -+ cfg = dwc3_readl(dwc->regs, DWC3_GSBUSCFG1); -+ cfg &= ~DWC3_GSBUSCFG1_PIPETRANSLIMIT(15); -+ cfg |= DWC3_GSBUSCFG1_PIPETRANSLIMIT(dwc->axi_pipe_limit - 1); -+ -+ dwc3_writel(dwc->regs, DWC3_GSBUSCFG1, cfg); -+} -+ - /** - * dwc3_core_init - Low-level initialization of DWC3 Core - * @dwc: Pointer to our controller context structure -@@ -1273,6 +1291,8 @@ static int dwc3_core_init(struct dwc3 *d - - dwc3_set_incr_burst_type(dwc); - -+ dwc3_set_axi_pipe_limit(dwc); -+ - ret = dwc3_phy_power_on(dwc); - if (ret) - goto err_exit_phy; -@@ -1362,6 +1382,24 @@ static int dwc3_core_init(struct dwc3 *d - - dwc3_config_threshold(dwc); - -+ if (DWC3_IP_IS(DWC3) && dwc->dr_mode == USB_DR_MODE_HOST) { -+ u8 tx_thr_num = dwc->tx_thr_num_pkt_prd; -+ u8 tx_maxburst = dwc->tx_max_burst_prd; -+ -+ if (tx_thr_num && tx_maxburst) { -+ reg = dwc3_readl(dwc->regs, DWC3_GTXTHRCFG); -+ reg |= DWC3_GTXTHRCFG_PKTCNTSEL; -+ -+ reg &= ~DWC3_GTXTHRCFG_TXPKTCNT(~0); -+ reg |= DWC3_GTXTHRCFG_TXPKTCNT(tx_thr_num); -+ -+ reg &= ~DWC3_GTXTHRCFG_MAXTXBURSTSIZE(~0); -+ reg |= DWC3_GTXTHRCFG_MAXTXBURSTSIZE(tx_maxburst); -+ -+ dwc3_writel(dwc->regs, DWC3_GTXTHRCFG, reg); -+ } -+ } -+ - return 0; - - err_power_off_phy: -@@ -1505,6 +1543,7 @@ static void dwc3_get_properties(struct d - u8 tx_thr_num_pkt_prd = 0; - u8 tx_max_burst_prd = 0; - u8 tx_fifo_resize_max_num; -+ u8 axi_pipe_limit; - const char *usb_psy_name; - int ret; - -@@ -1527,6 +1566,9 @@ static void dwc3_get_properties(struct d - */ - tx_fifo_resize_max_num = 6; - -+ /* Default to 0 (don't override hardware defaults) */ -+ axi_pipe_limit = 0; -+ - dwc->maximum_speed = usb_get_maximum_speed(dev); - dwc->max_ssp_rate = usb_get_maximum_ssp_rate(dev); - dwc->dr_mode = usb_get_dr_mode(dev); -@@ -1648,6 +1690,9 @@ static void dwc3_get_properties(struct d - dwc->dis_split_quirk = device_property_read_bool(dev, - "snps,dis-split-quirk"); - -+ device_property_read_u8(dev, "snps,axi-pipe-limit", -+ &axi_pipe_limit); -+ - dwc->lpm_nyet_threshold = lpm_nyet_threshold; - dwc->tx_de_emphasis = tx_de_emphasis; - -@@ -1665,6 +1710,8 @@ static void dwc3_get_properties(struct d - dwc->tx_thr_num_pkt_prd = tx_thr_num_pkt_prd; - dwc->tx_max_burst_prd = tx_max_burst_prd; - -+ dwc->axi_pipe_limit = axi_pipe_limit; -+ - dwc->imod_interval = 0; - - dwc->tx_fifo_resize_max_num = tx_fifo_resize_max_num; -@@ -1940,6 +1987,12 @@ static int dwc3_probe(struct platform_de - - dwc3_get_properties(dwc); - -+ if (!dwc->sysdev_is_parent) { -+ ret = dma_set_mask_and_coherent(dwc->sysdev, DMA_BIT_MASK(64)); -+ if (ret) -+ return ret; -+ } -+ - dwc->reset = devm_reset_control_array_get_optional_shared(dev); - if (IS_ERR(dwc->reset)) { - ret = PTR_ERR(dwc->reset); ---- a/drivers/usb/dwc3/core.h -+++ b/drivers/usb/dwc3/core.h -@@ -185,6 +185,9 @@ - #define DWC3_GSBUSCFG0_INCRBRSTENA (1 << 0) /* undefined length enable */ - #define DWC3_GSBUSCFG0_INCRBRST_MASK 0xff - -+/* Global SoC Bus Configuration Register 1 */ -+#define DWC3_GSBUSCFG1_PIPETRANSLIMIT(n) (((n) & 0xf) << 8) -+ - /* Global Debug LSP MUX Select */ - #define DWC3_GDBGLSPMUX_ENDBC BIT(15) /* Host only */ - #define DWC3_GDBGLSPMUX_HOSTSELECT(n) ((n) & 0x3fff) -@@ -1062,6 +1065,7 @@ struct dwc3_scratchpad_array { - * @tx_max_burst_prd: max periodic ESS transmit burst size - * @tx_fifo_resize_max_num: max number of fifos allocated during txfifo resize - * @clear_stall_protocol: endpoint number that requires a delayed status phase -+ * @axi_max_pipe: set to override the maximum number of pipelined AXI transfers - * @hsphy_interface: "utmi" or "ulpi" - * @connected: true when we're connected to a host, false otherwise - * @softconnect: true when gadget connect is called, false when disconnect runs -@@ -1299,6 +1303,7 @@ struct dwc3 { - u8 tx_max_burst_prd; - u8 tx_fifo_resize_max_num; - u8 clear_stall_protocol; -+ u8 axi_pipe_limit; - - const char *hsphy_interface; - ---- a/drivers/usb/dwc3/host.c -+++ b/drivers/usb/dwc3/host.c -@@ -82,16 +82,23 @@ out: - - int dwc3_host_init(struct dwc3 *dwc) - { -+ struct platform_device *pdev = to_platform_device(dwc->dev); - struct property_entry props[5]; - struct platform_device *xhci; - int ret, irq; - int prop_idx = 0; -+ int id; - - irq = dwc3_host_get_irq(dwc); - if (irq < 0) - return irq; - -- xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); -+ id = of_alias_get_id(pdev->dev.of_node, "usb"); -+ if (id >= 0) -+ xhci = platform_device_alloc("xhci-hcd", id); -+ else -+ xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); -+ - if (!xhci) { - dev_err(dwc->dev, "couldn't allocate xHCI device\n"); - return -ENOMEM;