Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 706eaa70 authored by Devdutt Patnaik's avatar Devdutt Patnaik
Browse files

usb: phy: qusb: Update sdxhedgehog suspend/resume sequence



Update the suspend/resume sequence as per HPG.

CRs-Fixed: 1107628
Change-Id: I3e1927380b85c4c457d4da6d69dad49107d54e09
Signed-off-by: default avatarDevdutt Patnaik <dpatnaik@codeaurora.org>
parent eb76995f
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -49,6 +49,7 @@
#define DPSE_INTERRUPT			BIT(0)

#define QUSB2PHY_PORT_TUNE1		0x23c
#define QUSB2PHY_TEST1			0x24C

#define QUSB2PHY_1P8_VOL_MIN           1800000 /* uV */
#define QUSB2PHY_1P8_VOL_MAX           1800000 /* uV */
@@ -556,13 +557,21 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
				readl_relaxed(qphy->base +
					QUSB2PHY_PLL_ANALOG_CONTROLS_TWO);

			writel_relaxed(0x1b,
			writel_relaxed(0x0b,
				qphy->base + QUSB2PHY_PLL_ANALOG_CONTROLS_TWO);

			/* enable clock bypass */
			writel_relaxed(0x90,
				qphy->base + QUSB2PHY_PLL_ANALOG_CONTROLS_ONE);

			/* Enable auto-resume */
			writel_relaxed(0x91,
				qphy->base + QUSB2PHY_TEST1);

			/* arm auto-resume */
			writel_relaxed(0x90,
				qphy->base + QUSB2PHY_TEST1);

			/* Disable all interrupts */
			writel_relaxed(0x00,
				qphy->base + QUSB2PHY_INTR_CTRL);