diff options
author | Vardan Mikayelyan <mvardan@synopsys.com> | 2016-11-15 06:16:58 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 14:54:49 +0300 |
commit | 1e6b98ebd458e63b9effda2feb696e36644d4eed (patch) | |
tree | a5c88400355805ce971fac4d03b1d9c82472407e /drivers/usb/dwc2/params.c | |
parent | 79c3b5bb8955b9353e56008000fede01932bada8 (diff) | |
download | linux-1e6b98ebd458e63b9effda2feb696e36644d4eed.tar.xz |
usb: dwc2: gadget: Add IOT device IDs, configure core accordingly
Add new device IDs for IOT gadget. Done changes in probe to
configure core accordingly depending on device ID value.
Signed-off-by: Vardan Mikayelyan <mvardan@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/params.c')
-rw-r--r-- | drivers/usb/dwc2/params.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 7152dbf4bb9f..2fd461de63a8 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -1276,7 +1276,9 @@ int dwc2_get_hwparams(struct dwc2_hsotg *hsotg) */ hw->snpsid = dwc2_readl(hsotg->regs + GSNPSID); if ((hw->snpsid & 0xfffff000) != 0x4f542000 && - (hw->snpsid & 0xfffff000) != 0x4f543000) { + (hw->snpsid & 0xfffff000) != 0x4f543000 && + (hw->snpsid & 0xffff0000) != 0x55310000 && + (hw->snpsid & 0xffff0000) != 0x55320000) { dev_err(hsotg->dev, "Bad value for GSNPSID: 0x%08x\n", hw->snpsid); return -ENODEV; @@ -1418,6 +1420,11 @@ int dwc2_init_params(struct dwc2_hsotg *hsotg) else params = params_default; + if (dwc2_is_fs_iot(hsotg)) { + params.speed = DWC2_SPEED_PARAM_FULL; + params.phy_type = DWC2_PHY_TYPE_PARAM_FS; + } + dwc2_set_parameters(hsotg, ¶ms); return 0; |