From: lyz Date: Tue, 2 Sep 2014 12:34:28 +0000 (+0800) Subject: rk312x: usb power optimize by turning off differential receiver in suspend mode X-Git-Tag: firefly_0821_release~4769^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4bcced19103e4c9941b5c284f731712503aaceea;p=firefly-linux-kernel-4.4.55.git rk312x: usb power optimize by turning off differential receiver in suspend mode --- diff --git a/drivers/usb/dwc_otg_310/usbdev_rk3126.c b/drivers/usb/dwc_otg_310/usbdev_rk3126.c index b14679996572..4f7326ff6eb9 100755 --- a/drivers/usb/dwc_otg_310/usbdev_rk3126.c +++ b/drivers/usb/dwc_otg_310/usbdev_rk3126.c @@ -6,6 +6,9 @@ static struct dwc_otg_control_usb *control_usb; #ifdef CONFIG_USB20_OTG static void usb20otg_hw_init(void) { + /* Turn off differential receiver in suspend mode */ + writel(UOC_HIWORD_UPDATE(0, 1, 2), + RK_GRF_VIRT + RK312X_GRF_USBPHY1_CON6); /* other haredware init,include: * DRV_VBUS GPIO init */ if (gpio_is_valid(control_usb->otg_gpios->gpio)) { @@ -210,8 +213,12 @@ struct dwc_otg_platform_data usb20otg_pdata_rk3126 = { #ifdef CONFIG_USB20_HOST static void usb20host_hw_init(void) { + /* Switch to DWC HOST */ writel(UOC_HIWORD_UPDATE(1, 1, 3), RK_GRF_VIRT + RK312X_GRF_SOC_CON2); + /* Turn off differential receiver in suspend mode */ + writel(UOC_HIWORD_UPDATE(0, 1, 2), + RK_GRF_VIRT + RK312X_GRF_USBPHY0_CON6); /* other haredware init,include: * DRV_VBUS GPIO init */ if (gpio_is_valid(control_usb->host_gpios->gpio)) {