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