From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Mathias Nyman
<mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH v10 9/9] usb: xhci: tegra: Add Tegra210 support
Date: Fri, 4 Mar 2016 17:19:39 +0100 [thread overview]
Message-ID: <1457108379-20794-9-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1457108379-20794-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Parameterize more parts of the driver and add support for Tegra210.
Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: Mathias Nyman <mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/usb/host/xhci-tegra.c | 59 +++++++++++++++++++++++++++++++++++++------
1 file changed, 51 insertions(+), 8 deletions(-)
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index ab6f9856c5c4..426e8d922cf4 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -159,6 +159,8 @@ struct tegra_xusb_soc {
unsigned int count;
} usb2, ulpi, hsic, usb3;
} ports;
+
+ bool scale_ss_clock;
};
struct tegra_xusb {
@@ -495,13 +497,19 @@ static void tegra_xusb_mbox_handle(struct tegra_xusb *tegra,
case MBOX_CMD_INC_SSPI_CLOCK:
case MBOX_CMD_DEC_SSPI_CLOCK:
- err = tegra_xusb_set_ss_clk(tegra, msg->data * 1000);
- if (err < 0)
- rsp.cmd = MBOX_CMD_NAK;
- else
+ if (tegra->soc->scale_ss_clock) {
+ err = tegra_xusb_set_ss_clk(tegra, msg->data * 1000);
+ if (err < 0)
+ rsp.cmd = MBOX_CMD_NAK;
+ else
+ rsp.cmd = MBOX_CMD_ACK;
+
+ rsp.data = clk_get_rate(tegra->ss_src_clk) / 1000;
+ } else {
rsp.cmd = MBOX_CMD_ACK;
+ rsp.data = msg->data;
+ }
- rsp.data = clk_get_rate(tegra->ss_src_clk) / 1000;
break;
case MBOX_CMD_SET_BW:
@@ -783,9 +791,11 @@ static int tegra_xusb_clk_enable(struct tegra_xusb *tegra)
if (err < 0)
goto disable_fs_src;
- err = tegra_xusb_set_ss_clk(tegra, TEGRA_XHCI_SS_HIGH_SPEED);
- if (err < 0)
- goto disable_hs_src;
+ if (tegra->soc->scale_ss_clock) {
+ err = tegra_xusb_set_ss_clk(tegra, TEGRA_XHCI_SS_HIGH_SPEED);
+ if (err < 0)
+ goto disable_hs_src;
+ }
return 0;
@@ -890,11 +900,44 @@ static const struct tegra_xusb_soc tegra124_soc = {
.hsic = { .offset = 6, .count = 2, },
.usb3 = { .offset = 0, .count = 2, },
},
+ .scale_ss_clock = true,
};
MODULE_FIRMWARE("nvidia/tegra124/xusb.bin");
+static const char * const tegra210_supply_names[] = {
+ "dvddio-pex",
+ "hvddio-pex",
+ "avdd-usb",
+ "avdd-pll-utmip",
+ "avdd-pll-uerefe",
+ "dvdd-pex-pll",
+ "hvdd-pex-pll-e",
+};
+
+static const struct tegra_xusb_phy_type tegra210_phy_types[] = {
+ { .name = "usb3", .num = 4, },
+ { .name = "usb2", .num = 4, },
+ { .name = "hsic", .num = 1, },
+};
+
+static const struct tegra_xusb_soc tegra210_soc = {
+ .firmware_file = "nvidia/tegra210/xusb.bin",
+ .supply_names = tegra210_supply_names,
+ .num_supplies = ARRAY_SIZE(tegra210_supply_names),
+ .phy_types = tegra210_phy_types,
+ .num_types = ARRAY_SIZE(tegra210_phy_types),
+ .ports = {
+ .usb2 = { .offset = 4, .count = 4, },
+ .hsic = { .offset = 8, .count = 1, },
+ .usb3 = { .offset = 0, .count = 4, },
+ },
+ .scale_ss_clock = false,
+};
+MODULE_FIRMWARE("nvidia/tegra210/xusb.bin");
+
static const struct of_device_id tegra_xusb_of_match[] = {
{ .compatible = "nvidia,tegra124-xusb", .data = &tegra124_soc },
+ { .compatible = "nvidia,tegra210-xusb", .data = &tegra210_soc },
{ },
};
MODULE_DEVICE_TABLE(of, tegra_xusb_of_match);
--
2.7.1
next prev parent reply other threads:[~2016-03-04 16:19 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 16:19 [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Thierry Reding
2016-03-04 16:19 ` [PATCH v10 2/9] dt-bindings: pinctrl: Deprecate " Thierry Reding
2016-03-05 4:32 ` Rob Herring
2016-03-15 9:01 ` Linus Walleij
[not found] ` <CACRpkda_YvQQesSUiZB0cpotZWyyd+5nUqzz3HjnY9fCanWJwQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-18 11:12 ` Thierry Reding
[not found] ` <20160418111200.GA17716-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-18 11:26 ` Linus Walleij
2016-04-18 11:36 ` Thierry Reding
[not found] ` <1457108379-20794-2-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 17:40 ` Stephen Warren
2016-03-04 16:19 ` [PATCH v10 3/9] dt-bindings: phy: tegra-xusb-padctl: Add Tegra210 support Thierry Reding
[not found] ` <1457108379-20794-3-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-04 21:41 ` Andrew Bresticker
2016-03-05 4:32 ` Rob Herring
2016-03-15 9:03 ` Linus Walleij
2016-03-16 17:59 ` Stephen Warren
[not found] ` <56E99F10.1060508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-05 14:44 ` Thierry Reding
[not found] ` <20160405144416.GA10809-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-05 21:10 ` Stephen Warren
[not found] ` <570429B8.3060002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2016-04-06 17:08 ` Thierry Reding
[not found] ` <20160406170824.GA28843-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-07 20:42 ` Stephen Warren
2016-04-18 11:50 ` Thierry Reding
[not found] ` <20160418115035.GD17716-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-25 13:48 ` Kishon Vijay Abraham I
[not found] ` <1457108379-20794-1-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-04 16:19 ` [PATCH v10 4/9] phy: Add Tegra XUSB pad controller support Thierry Reding
[not found] ` <1457108379-20794-4-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-05 13:16 ` Thierry Reding
2016-04-06 12:43 ` Kishon Vijay Abraham I
2016-04-06 17:26 ` Thierry Reding
[not found] ` <20160406172616.GB28843-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-07 9:32 ` Kishon Vijay Abraham I
2016-04-18 11:43 ` Thierry Reding
2016-04-26 13:44 ` Linus Walleij
2016-03-04 16:19 ` [PATCH v10 5/9] phy: tegra: Add Tegra210 support Thierry Reding
2016-03-04 16:19 ` [PATCH v10 6/9] dt-bindings: usb: Add NVIDIA Tegra XUSB controller binding Thierry Reding
[not found] ` <1457108379-20794-6-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 18:08 ` Stephen Warren
2016-03-04 16:19 ` [PATCH v10 8/9] usb: xhci: Add NVIDIA Tegra XUSB controller driver Thierry Reding
[not found] ` <1457108379-20794-8-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-05 13:17 ` Thierry Reding
[not found] ` <20160405131751.GB24972-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-04-05 13:35 ` Greg Kroah-Hartman
[not found] ` <20160405133552.GB28802-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2016-04-05 16:18 ` Mathias Nyman
2016-04-07 11:03 ` Mathias Nyman
[not found] ` <57063E91.1070202-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-04-07 11:05 ` Thierry Reding
2016-04-07 11:50 ` Mathias Nyman
2016-03-04 16:19 ` Thierry Reding [this message]
2016-03-04 21:47 ` [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Andrew Bresticker
2016-03-16 17:39 ` Stephen Warren
2016-03-22 11:01 ` Linus Walleij
2016-03-04 16:19 ` [PATCH v10 7/9] dt-bindings: usb: xhci-tegra: Add Tegra210 XUSB controller support Thierry Reding
[not found] ` <1457108379-20794-7-git-send-email-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-03-16 6:42 ` Rob Herring
2016-03-16 18:08 ` Stephen Warren
2016-03-04 21:36 ` [PATCH v10 1/9] dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding Andrew Bresticker
2016-03-05 4:31 ` Rob Herring
2016-03-07 11:24 ` Thierry Reding
2016-03-16 6:42 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457108379-20794-9-git-send-email-thierry.reding@gmail.com \
--to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mathias.nyman-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).