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