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