From: Serge Semin <fancer.lancer@gmail.com>
To: richard.leitner@skidata.com, gregkh@linuxfoundation.org,
robh+dt@kernel.org, mark.rutland@arm.com
Cc: Sergey.Semin@t-platforms.ru, linux-usb@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Serge Semin <fancer.lancer@gmail.com>
Subject: [PATCH 02/10 v3] usb: usb251xb: Add USB2517i specific struct and IDs
Date: Sun, 22 Oct 2017 23:38:04 +0300 [thread overview]
Message-ID: <20171022203812.9379-3-fancer.lancer@gmail.com> (raw)
In-Reply-To: <20171022203812.9379-1-fancer.lancer@gmail.com>
There are USB2517 and USB2517i hubs, which have almost the same
registers space as already supported USB251xBi series. The difference
it in DIDs and in a few functions. This patch adds the USB2517/i data
structures to the driver, so it would have different setting depending
on the device discovered on i2c-bus.
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
---
drivers/usb/misc/Kconfig | 4 ++--
drivers/usb/misc/usb251xb.c | 23 +++++++++++++++++++++--
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
index 37dd1c018..27b9fcbdf 100644
--- a/drivers/usb/misc/Kconfig
+++ b/drivers/usb/misc/Kconfig
@@ -247,8 +247,8 @@ config USB_HUB_USB251XB
depends on I2C
help
This option enables support for configuration via SMBus of the
- Microchip USB251xB/xBi USB 2.0 Hub Controller series.
- Configuration parameters may be set in devicetree or platform data.
+ Microchip USB251x/xBi USB 2.0 Hub Controller series. Configuration
+ parameters may be set in devicetree or platform data.
Say Y or M here if you need to configure such a device via SMBus.
config USB_HSIC_USB3503
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 91f66d68b..22c32ea3f 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -38,6 +38,7 @@
#define USB251XB_DEF_PRODUCT_ID_12 0x2512 /* USB2512B/12Bi */
#define USB251XB_DEF_PRODUCT_ID_13 0x2513 /* USB2513B/13Bi */
#define USB251XB_DEF_PRODUCT_ID_14 0x2514 /* USB2514B/14Bi */
+#define USB251XB_DEF_PRODUCT_ID_17 0x2517 /* USB2517/17i */
#define USB251XB_ADDR_DEVICE_ID_LSB 0x04
#define USB251XB_ADDR_DEVICE_ID_MSB 0x05
@@ -82,7 +83,7 @@
#define USB251XB_ADDR_PRODUCT_STRING_LEN 0x14
#define USB251XB_ADDR_PRODUCT_STRING 0x54
-#define USB251XB_DEF_PRODUCT_STRING "USB251xB/xBi"
+#define USB251XB_DEF_PRODUCT_STRING "USB251xB/xBi/7i"
#define USB251XB_ADDR_SERIAL_STRING_LEN 0x15
#define USB251XB_ADDR_SERIAL_STRING 0x92
@@ -186,6 +187,16 @@ static const struct usb251xb_data usb2514bi_data = {
.product_str = "USB2514Bi",
};
+static const struct usb251xb_data usb2517_data = {
+ .product_id = 0x2517,
+ .product_str = "USB2517",
+};
+
+static const struct usb251xb_data usb2517i_data = {
+ .product_id = 0x2517,
+ .product_str = "USB2517i",
+};
+
static void usb251xb_reset(struct usb251xb *hub, int state)
{
if (!gpio_is_valid(hub->gpio_reset))
@@ -511,6 +522,12 @@ static const struct of_device_id usb251xb_of_match[] = {
.compatible = "microchip,usb2514bi",
.data = &usb2514bi_data,
}, {
+ .compatible = "microchip,usb2517",
+ .data = &usb2517_data,
+ }, {
+ .compatible = "microchip,usb2517i",
+ .data = &usb2517i_data,
+ }, {
/* sentinel */
}
};
@@ -574,6 +591,8 @@ static const struct i2c_device_id usb251xb_id[] = {
{ "usb2513bi", 0 },
{ "usb2514b", 0 },
{ "usb2514bi", 0 },
+ { "usb2517", 0 },
+ { "usb2517i", 0 },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(i2c, usb251xb_id);
@@ -590,5 +609,5 @@ static struct i2c_driver usb251xb_i2c_driver = {
module_i2c_driver(usb251xb_i2c_driver);
MODULE_AUTHOR("Richard Leitner <richard.leitner@skidata.com>");
-MODULE_DESCRIPTION("USB251xB/xBi USB 2.0 Hub Controller Driver");
+MODULE_DESCRIPTION("USB251x/xBi USB 2.0 Hub Controller Driver");
MODULE_LICENSE("GPL");
--
2.12.0
next prev parent reply other threads:[~2017-10-22 20:38 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 23:31 [PATCH 0/5] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin
2017-09-15 23:31 ` [PATCH 1/5] usb: usb251xb: Add USB2517/i hub support Serge Semin
2017-09-15 23:45 ` Greg KH
2017-09-15 23:55 ` Serge Semin
2017-09-20 20:52 ` Rob Herring
2017-09-20 21:15 ` Serge Semin
2017-09-21 16:53 ` Rob Herring
2017-09-21 17:40 ` Serge Semin
2017-09-15 23:31 ` [PATCH 2/5] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin
2017-09-15 23:31 ` [PATCH 3/5] usb: usb251xb: Add max power/current dts nodes Serge Semin
2017-09-15 23:31 ` [PATCH 4/5] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin
2017-09-15 23:31 ` [PATCH 5/5] usb: usb251xb: Add copyrights Serge Semin
2017-09-15 23:40 ` Greg KH
2017-09-15 23:42 ` Greg KH
2017-09-15 23:45 ` Serge Semin
2017-09-15 23:53 ` Greg KH
2017-09-16 0:11 ` Serge Semin
2017-09-16 10:42 ` [PATCH 0/9 v2] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin
2017-09-16 10:42 ` [PATCH 1/9 v2] usb: usb251xb: Add USB2517i specific struct and IDs Serge Semin
2017-10-04 7:39 ` Richard Leitner
2017-09-16 10:42 ` [PATCH 2/9 v2] usb: usb251xb: Add USB251x specific port count setting Serge Semin
2017-10-04 7:27 ` Richard Leitner
2017-09-16 10:42 ` [PATCH 3/9 v2] usb: usb251xb: Add 5,6,7 ports mapping def setting Serge Semin
2017-10-04 7:51 ` Richard Leitner
2017-09-16 10:42 ` [PATCH 4/9 v2] usb: usb251xb: Add 5,6,7 ports boost settings Serge Semin
2017-10-04 7:57 ` Richard Leitner
2017-09-16 10:42 ` [PATCH 5/9 v2] usb: usb251xb: Add battery enable setting flag Serge Semin
2017-09-16 10:42 ` [PATCH 6/9 v2] usb: usb251xb: Add USB2517 LED settings Serge Semin
2017-09-16 10:42 ` [PATCH 7/9 v2] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin
2017-09-16 10:42 ` [PATCH 8/9 v2] usb: usb251xb: Add max power/current dts property support Serge Semin
2017-09-20 20:52 ` Rob Herring
2017-09-20 21:27 ` Serge Semin
2017-09-21 16:26 ` Rob Herring
2017-09-21 17:10 ` Serge Semin
2017-10-04 8:12 ` Richard Leitner
2017-10-04 13:44 ` Rob Herring
2017-09-16 10:42 ` [PATCH 9/9 v2] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin
2017-09-20 20:52 ` Rob Herring
2017-09-20 21:29 ` Serge Semin
2017-09-21 8:23 ` Greg KH
2017-09-21 14:51 ` Serge Semin
2017-09-21 15:07 ` Greg KH
2017-09-22 15:26 ` Serge Semin
2017-09-22 16:05 ` Greg KH
2017-10-22 20:38 ` [PATCH 00/10 v3] usb: usb251xb: Add USB2517i hub support and fix some bugs Serge Semin
2017-10-22 20:38 ` [PATCH 01/10 v3] usb: usb251xb: Update usb251xb bindings Serge Semin
2017-10-27 3:21 ` Rob Herring
2017-10-22 20:38 ` Serge Semin [this message]
2017-10-23 21:47 ` [PATCH 02/10 v3] usb: usb251xb: Add USB2517i specific struct and IDs Richard Leitner
2017-10-22 20:38 ` [PATCH 03/10 v3] usb: usb251xb: Add USB251x specific port count setting Serge Semin
2017-10-23 21:36 ` Richard Leitner
2017-10-22 20:38 ` [PATCH 04/10 v3] usb: usb251xb: Add 5,6,7 ports mapping def setting Serge Semin
2017-10-22 20:38 ` [PATCH 05/10 v3] usb: usb251xb: Add 5,6,7 ports boost settings Serge Semin
2017-10-22 20:38 ` [PATCH 06/10 v3] usb: usb251xb: Add battery enable setting flag Serge Semin
2017-10-22 20:38 ` [PATCH 07/10 v3] usb: usb251xb: Add USB2517 LED settings Serge Semin
2017-10-22 20:38 ` [PATCH 08/10 v3] usb: usb251xb: Fix property_u32 NULL pointer dereference Serge Semin
2017-10-22 20:38 ` [PATCH 09/10 v3] usb: usb251xb: Add max power/current dts property support Serge Semin
2017-10-23 21:55 ` Richard Leitner
2017-10-22 20:38 ` [PATCH 10/10 v3] usb: usb251xb: Use GPIO descriptor consumer interface Serge Semin
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=20171022203812.9379-3-fancer.lancer@gmail.com \
--to=fancer.lancer@gmail.com \
--cc=Sergey.Semin@t-platforms.ru \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=richard.leitner@skidata.com \
--cc=robh+dt@kernel.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).