57a67d
From patchwork Wed Apr  6 07:54:05 2016
57a67d
Content-Type: text/plain; charset="utf-8"
57a67d
MIME-Version: 1.0
57a67d
Content-Transfer-Encoding: 7bit
57a67d
Subject: usb: phy: tegra: Add 38.4MHz clock table entry
57a67d
From: Hunter Laux <hunterlaux@gmail.com>
57a67d
X-Patchwork-Id: 606877
57a67d
Message-Id: <1459929245-23449-1-git-send-email-hunterlaux@gmail.com>
57a67d
To: Stephen Warren <swarren@wwwdotorg.org>,
57a67d
 Thierry Reding <thierry.reding@gmail.com>,
57a67d
 Alexandre Courbot <gnurou@gmail.com>, linux-tegra@vger.kernel.org
57a67d
Cc: Hunter Laux <hunterlaux@gmail.com>
57a67d
Date: Wed,  6 Apr 2016 00:54:05 -0700
57a67d
57a67d
The Tegra210 uses a 38.4MHz OSC. This clock table entry is required to
57a67d
use the ehci phy on the Jetson TX1.
57a67d
57a67d
The xtal_freq_count is actually a 12 bit value, so it should be a u16
57a67d
instead of u8.
57a67d
57a67d
Signed-off-by: Hunter Laux <hunterlaux@gmail.com>
57a67d
---
57a67d
 drivers/usb/phy/phy-tegra-usb.c | 10 +++++++++-
57a67d
 1 file changed, 9 insertions(+), 1 deletion(-)
57a67d
57a67d
diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
57a67d
index 5fe4a57..f0431f0 100644
57a67d
--- a/drivers/usb/phy/phy-tegra-usb.c
57a67d
+++ b/drivers/usb/phy/phy-tegra-usb.c
57a67d
@@ -164,7 +164,7 @@ struct tegra_xtal_freq {
57a67d
 	u8 enable_delay;
57a67d
 	u8 stable_count;
57a67d
 	u8 active_delay;
57a67d
-	u8 xtal_freq_count;
57a67d
+	u16 xtal_freq_count;
57a67d
 	u16 debounce;
57a67d
 };
57a67d
 
57a67d
@@ -201,6 +201,14 @@ static const struct tegra_xtal_freq tegra_freq_table[] = {
57a67d
 		.xtal_freq_count = 0xFE,
57a67d
 		.debounce = 0xFDE8,
57a67d
 	},
57a67d
+	{
57a67d
+		.freq = 38400000,
57a67d
+		.enable_delay = 0x00,
57a67d
+		.stable_count = 0x00,
57a67d
+		.active_delay = 0x18,
57a67d
+		.xtal_freq_count = 0x177,
57a67d
+		.debounce = 0xBB80,
57a67d
+	},
57a67d
 };
57a67d
 
57a67d
 static void set_pts(struct tegra_usb_phy *phy, u8 pts_val)