Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: dwc2: Add new parameter eusb2_disc

Added new parameter eusb2_disc to list of core parameters which specify
whether eUSB2 PHY disconnect support flow applicable or no.
Set to false as default value and checked core version if set to true.
This parameter applicable in device mode of HSOTG and HS IOT cores
v5.00 or higher.

Added print this parameter in show parameters of debugfs.

Signed-off-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Link: https://lore.kernel.org/r/e77cc4312bda797d1ddaa4351d86c65a69c8b926.1708948356.git.Minas.Harutyunyan@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Minas Harutyunyan and committed by
Greg Kroah-Hartman
bc5d81b8 f73220f7

+29
+6
drivers/usb/dwc2/core.h
··· 288 288 * core has been configured to work at either data path 289 289 * width. 290 290 * 8 or 16 (default 16 if available) 291 + * @eusb2_disc: Specifies whether eUSB2 PHY disconnect support flow 292 + * applicable or no. Applicable in device mode of HSOTG 293 + * and HS IOT cores v5.00 or higher. 294 + * 0 - eUSB2 PHY disconnect support flow not applicable 295 + * 1 - eUSB2 PHY disconnect support flow applicable 291 296 * @phy_ulpi_ddr: Specifies whether the ULPI operates at double or single 292 297 * data rate. This parameter is only applicable if phy_type 293 298 * is ULPI. ··· 447 442 #define DWC2_SPEED_PARAM_LOW 2 448 443 449 444 u8 phy_utmi_width; 445 + bool eusb2_disc; 450 446 bool phy_ulpi_ddr; 451 447 bool phy_ulpi_ext_vbus; 452 448 bool enable_dynamic_fifo;
+1
drivers/usb/dwc2/debugfs.c
··· 686 686 print_param(seq, p, host_channels); 687 687 print_param(seq, p, phy_type); 688 688 print_param(seq, p, phy_utmi_width); 689 + print_param(seq, p, eusb2_disc); 689 690 print_param(seq, p, phy_ulpi_ddr); 690 691 print_param(seq, p, phy_ulpi_ext_vbus); 691 692 print_param(seq, p, i2c_enable);
+22
drivers/usb/dwc2/params.c
··· 475 475 dwc2_set_param_lpm(hsotg); 476 476 p->phy_ulpi_ddr = false; 477 477 p->phy_ulpi_ext_vbus = false; 478 + p->eusb2_disc = false; 478 479 479 480 p->enable_dynamic_fifo = hw->enable_dynamic_fifo; 480 481 p->en_multiple_tx_fifo = hw->en_multiple_tx_fifo; ··· 738 737 } 739 738 } 740 739 740 + static void dwc2_check_param_eusb2_disc(struct dwc2_hsotg *hsotg) 741 + { 742 + u32 gsnpsid; 743 + 744 + if (!hsotg->params.eusb2_disc) 745 + return; 746 + gsnpsid = dwc2_readl(hsotg, GSNPSID); 747 + /* 748 + * eusb2_disc not supported by FS IOT devices. 749 + * For other cores, it supported starting from version 5.00a 750 + */ 751 + if ((gsnpsid & ~DWC2_CORE_REV_MASK) == DWC2_FS_IOT_ID || 752 + (gsnpsid & DWC2_CORE_REV_MASK) < 753 + (DWC2_CORE_REV_5_00a & DWC2_CORE_REV_MASK)) { 754 + hsotg->params.eusb2_disc = false; 755 + return; 756 + } 757 + } 758 + 741 759 #define CHECK_RANGE(_param, _min, _max, _def) do { \ 742 760 if ((int)(hsotg->params._param) < (_min) || \ 743 761 (hsotg->params._param) > (_max)) { \ ··· 785 765 dwc2_check_param_speed(hsotg); 786 766 dwc2_check_param_phy_utmi_width(hsotg); 787 767 dwc2_check_param_power_down(hsotg); 768 + dwc2_check_param_eusb2_disc(hsotg); 769 + 788 770 CHECK_BOOL(enable_dynamic_fifo, hw->enable_dynamic_fifo); 789 771 CHECK_BOOL(en_multiple_tx_fifo, hw->en_multiple_tx_fifo); 790 772 CHECK_BOOL(i2c_enable, hw->i2c_enable);