bcm63xx: ar-5315u: expose LEDs through controller
[openwrt/staging/mkresin.git] / target / linux / layerscape / patches-4.14 / 807-usb-support-layerscape.patch
index 47481cfa99d9c73b9cdc970845473e449144ea08..d0bee3b4500b45150e6283c2ee6728c6810fabed 100644 (file)
@@ -323,7 +323,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
        usb_phy_set_suspend(dwc->usb2_phy, 0);
        usb_phy_set_suspend(dwc->usb3_phy, 0);
        ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -870,6 +1006,22 @@ static int dwc3_core_init(struct dwc3 *d
+@@ -873,6 +1009,22 @@ static int dwc3_core_init(struct dwc3 *d
                dwc3_writel(dwc->regs, DWC3_GUCTL1, reg);
        }
  
@@ -346,7 +346,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
        return 0;
  
  err4:
-@@ -1076,6 +1228,8 @@ static void dwc3_get_properties(struct d
+@@ -1079,6 +1231,8 @@ static void dwc3_get_properties(struct d
                                &hird_threshold);
        dwc->usb3_lpm_capable = device_property_read_bool(dev,
                                "snps,usb3_lpm_capable");
@@ -355,9 +355,9 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
  
        dwc->disable_scramble_quirk = device_property_read_bool(dev,
                                "snps,disable_scramble_quirk");
-@@ -1108,8 +1262,16 @@ static void dwc3_get_properties(struct d
-       dwc->dis_tx_ipgap_linecheck_quirk = device_property_read_bool(dev,
-                               "snps,dis-tx-ipgap-linecheck-quirk");
+@@ -1113,8 +1267,16 @@ static void dwc3_get_properties(struct d
+       dwc->parkmode_disable_ss_quirk = device_property_read_bool(dev,
+                               "snps,parkmode-disable-ss-quirk");
  
 +      dwc->quirk_reverse_in_out = device_property_read_bool(dev,
 +                              "snps,quirk_reverse_in_out");
@@ -372,7 +372,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
        device_property_read_u8(dev, "snps,tx_de_emphasis",
                                &tx_de_emphasis);
        device_property_read_string(dev, "snps,hsphy_interface",
-@@ -1120,6 +1282,9 @@ static void dwc3_get_properties(struct d
+@@ -1125,6 +1287,9 @@ static void dwc3_get_properties(struct d
        dwc->dis_metastability_quirk = device_property_read_bool(dev,
                                "snps,dis_metastability_quirk");
  
@@ -382,7 +382,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
        dwc->lpm_nyet_threshold = lpm_nyet_threshold;
        dwc->tx_de_emphasis = tx_de_emphasis;
  
-@@ -1371,12 +1536,14 @@ static int dwc3_resume_common(struct dwc
+@@ -1376,12 +1541,14 @@ static int dwc3_resume_common(struct dwc
  
        switch (dwc->dr_mode) {
        case USB_DR_MODE_PERIPHERAL:
@@ -440,9 +440,9 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
 +#define DWC3_GUCTL_HSTINAUTORETRY     BIT(14)
 +
  /* Global User Control 1 Register */
+ #define DWC3_GUCTL1_PARKMODE_DISABLE_SS       BIT(17)
  #define DWC3_GUCTL1_TX_IPGAP_LINECHECK_DIS    BIT(28)
- #define DWC3_GUCTL1_DEV_L1_EXIT_BY_HW BIT(24)
-@@ -477,6 +506,14 @@
+@@ -478,6 +507,14 @@
  #define DWC3_DEV_IMOD_INTERVAL_SHIFT  0
  #define DWC3_DEV_IMOD_INTERVAL_MASK   (0xffff << 0)
  
@@ -457,7 +457,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
  /* Structures */
  
  struct dwc3_trb;
-@@ -788,6 +825,7 @@ struct dwc3_scratchpad_array {
+@@ -789,6 +826,7 @@ struct dwc3_scratchpad_array {
   * @regs: base address for our registers
   * @regs_size: address space size
   * @fladj: frame length adjustment
@@ -465,7 +465,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
   * @irq_gadget: peripheral controller's IRQ number
   * @nr_scratch: number of scratch buffers
   * @u1u2: only used on revisions <1.83a for workaround
-@@ -843,6 +881,7 @@ struct dwc3_scratchpad_array {
+@@ -844,6 +882,7 @@ struct dwc3_scratchpad_array {
   * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround
   * @three_stage_setup: set if we perform a three phase setup
   * @usb3_lpm_capable: set if hadrware supports Link Power Management
@@ -473,7 +473,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
   * @disable_scramble_quirk: set if we enable the disable scramble quirk
   * @u2exit_lfps_quirk: set if we enable u2exit lfps quirk
   * @u2ss_inp3_quirk: set if we enable P3 OK for U2/SS Inactive quirk
-@@ -922,6 +961,12 @@ struct dwc3 {
+@@ -925,6 +964,12 @@ struct dwc3 {
        enum usb_phy_interface  hsphy_mode;
  
        u32                     fladj;
@@ -486,7 +486,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
        u32                     irq_gadget;
        u32                     nr_scratch;
        u32                     u1u2;
-@@ -1006,6 +1051,7 @@ struct dwc3 {
+@@ -1009,6 +1054,7 @@ struct dwc3 {
        unsigned                setup_packet_pending:1;
        unsigned                three_stage_setup:1;
        unsigned                usb3_lpm_capable:1;
@@ -494,7 +494,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
  
        unsigned                disable_scramble_quirk:1;
        unsigned                u2exit_lfps_quirk:1;
-@@ -1025,6 +1071,11 @@ struct dwc3 {
+@@ -1029,6 +1075,11 @@ struct dwc3 {
  
        unsigned                tx_de_emphasis_quirk:1;
        unsigned                tx_de_emphasis:2;
@@ -528,7 +528,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
                reg &= ~DWC3_DCTL_INITU2ENA;
 --- a/drivers/usb/dwc3/gadget.c
 +++ b/drivers/usb/dwc3/gadget.c
-@@ -3220,6 +3220,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
+@@ -3216,6 +3216,7 @@ int dwc3_gadget_init(struct dwc3 *dwc)
  {
        int ret;
        int irq;
@@ -536,7 +536,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com>
  
        irq = dwc3_gadget_get_irq(dwc);
        if (irq < 0) {
-@@ -3298,6 +3299,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
+@@ -3294,6 +3295,12 @@ int dwc3_gadget_init(struct dwc3 *dwc)
  
        dwc3_gadget_set_speed(&dwc->gadget, dwc->maximum_speed);