+#ifdef CONFIG_ARM64
#include "usbdev_rk.h"
#include "dwc_otg_regs.h"
/* Turn off differential receiver in suspend mode */
uoc_write(UOC_HIWORD_UPDATE(0, 1, 2), 0x798);
- /* Set disconnect detection trigger point to 600mv */
- uoc_write(UOC_HIWORD_UPDATE(0, 0xf, 11), 0x79c);
+ /* Set disconnect detection trigger point to 625mv */
+ uoc_write(UOC_HIWORD_UPDATE(0x9, 0xf, 11), 0x79c);
/* other haredware init,include:
* DRV_VBUS GPIO init */
reset_control_deassert(rst_otg_c);
reset_control_deassert(rst_otg_h);
break;
-
+ case RST_CHN_HALT:
+ /* PHY reset */
+ uoc_write(UOC_HIWORD_UPDATE(0x1, 0x3, 0), 0x700);
+ reset_control_assert(rst_otg_p);
+ udelay(15);
+ uoc_write(UOC_HIWORD_UPDATE(0x2, 0x3, 0), 0x700);
+ udelay(1500);
+ reset_control_deassert(rst_otg_p);
+ udelay(2);
+ break;
default:
break;
}
static void usb20otg_power_enable(int enable)
{
if (0 == enable) {
+ rk_battery_charger_detect_cb(USB_OTG_POWER_OFF);
/* disable otg_drv power */
if (gpio_is_valid(control_usb->otg_gpios->gpio))
gpio_set_value(control_usb->otg_gpios->gpio, 0);
} else if (1 == enable) {
+ rk_battery_charger_detect_cb(USB_OTG_POWER_ON);
/* enable otg_drv power */
if (gpio_is_valid(control_usb->otg_gpios->gpio))
gpio_set_value(control_usb->otg_gpios->gpio, 1);
{
/* Turn off differential receiver in suspend mode */
uoc_write(UOC_HIWORD_UPDATE(0, 1, 2), 0x7b8);
- /* Set disconnect detection trigger point to 600mv */
- uoc_write(UOC_HIWORD_UPDATE(1, 0xf, 11), 0x7bc);
+ /* Set disconnect detection trigger point to 625mv */
+ uoc_write(UOC_HIWORD_UPDATE(0x9, 0xf, 11), 0x7bc);
/* other haredware init,include:
* DRV_VBUS GPIO init */
MODULE_AUTHOR("RockChip Inc.");
MODULE_DESCRIPTION("RockChip Control Module USB Driver");
MODULE_LICENSE("GPL v2");
+#endif