linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support
       [not found] <20220215152957.581303-1-sashal@kernel.org>
@ 2022-02-15 15:29 ` Sasha Levin
  2022-02-20 10:12   ` Pavel Machek
  2022-02-15 15:29 ` [PATCH AUTOSEL 5.10 21/23] net: usb: qmi_wwan: Add support for Dell DW5829e Sasha Levin
  1 sibling, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2022-02-15 15:29 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Tommaso Merciai, Richard Leitner, Greg Kroah-Hartman,
	Sasha Levin, richard.leitner, linux-usb

From: Tommaso Merciai <tomm.merciai@gmail.com>

[ Upstream commit 5c2b9c61ae5d8ad0a196d33b66ce44543be22281 ]

Add support for boost-up register of usb251xb hub.
boost-up property control USB electrical drive strength
This register can be set:

 - Normal mode -> 0x00
 - Low         -> 0x01
 - Medium      -> 0x10
 - High        -> 0x11

(Normal Default)

References:
 - http://www.mouser.com/catalog/specsheets/2514.pdf p29

Reviewed-by: Richard Leitner <richard.leitner@linux.dev>
Signed-off-by: Tommaso Merciai <tomm.merciai@gmail.com>
Link: https://lore.kernel.org/r/20220128181713.96856-1-tomm.merciai@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/usb/misc/usb251xb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 29fe5771c21bc..2f14690bc9ca8 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -543,6 +543,9 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
 		hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
 
+	if (of_property_read_u8(np, "boost-up", &hub->boost_up))
+		hub->boost_up = USB251XB_DEF_BOOST_UP;
+
 	cproperty_char = of_get_property(np, "manufacturer", NULL);
 	strlcpy(str, cproperty_char ? : USB251XB_DEF_MANUFACTURER_STRING,
 		sizeof(str));
@@ -584,7 +587,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
 	 * may be as soon as needed.
 	 */
 	hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
-	hub->boost_up = USB251XB_DEF_BOOST_UP;
 	hub->boost_57 = USB251XB_DEF_BOOST_57;
 	hub->boost_14 = USB251XB_DEF_BOOST_14;
 	hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH AUTOSEL 5.10 21/23] net: usb: qmi_wwan: Add support for Dell DW5829e
       [not found] <20220215152957.581303-1-sashal@kernel.org>
  2022-02-15 15:29 ` [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support Sasha Levin
@ 2022-02-15 15:29 ` Sasha Levin
  1 sibling, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2022-02-15 15:29 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Slark Xiao, Bjørn Mork, Jakub Kicinski, Sasha Levin, davem,
	netdev, linux-usb

From: Slark Xiao <slark_xiao@163.com>

[ Upstream commit 8ecbb179286cbc91810c16caeb3396e06305cd0c ]

Dell DW5829e same as DW5821e except the CAT level.
DW5821e supports CAT16 but DW5829e supports CAT9.
Also, DW5829e includes normal and eSIM type.
Please see below test evidence:

T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=413c ProdID=81e6 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=413c ProdID=81e4 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e-eSIM Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

Signed-off-by: Slark Xiao <slark_xiao@163.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Link: https://lore.kernel.org/r/20220209024717.8564-1-slark_xiao@163.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/usb/qmi_wwan.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 6e033ba717030..597766d14563e 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1333,6 +1333,8 @@ static const struct usb_device_id products[] = {
 	{QMI_FIXED_INTF(0x413c, 0x81d7, 0)},	/* Dell Wireless 5821e */
 	{QMI_FIXED_INTF(0x413c, 0x81d7, 1)},	/* Dell Wireless 5821e preproduction config */
 	{QMI_FIXED_INTF(0x413c, 0x81e0, 0)},	/* Dell Wireless 5821e with eSIM support*/
+	{QMI_FIXED_INTF(0x413c, 0x81e4, 0)},	/* Dell Wireless 5829e with eSIM support*/
+	{QMI_FIXED_INTF(0x413c, 0x81e6, 0)},	/* Dell Wireless 5829e */
 	{QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)},	/* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */
 	{QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)},	/* HP lt4120 Snapdragon X5 LTE */
 	{QMI_FIXED_INTF(0x22de, 0x9061, 3)},	/* WeTelecom WPD-600N */
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support
  2022-02-15 15:29 ` [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support Sasha Levin
@ 2022-02-20 10:12   ` Pavel Machek
  2022-02-28 12:23     ` Richard Leitner
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Machek @ 2022-02-20 10:12 UTC (permalink / raw)
  To: Sasha Levin
  Cc: linux-kernel, stable, Tommaso Merciai, Richard Leitner,
	Greg Kroah-Hartman, richard.leitner, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1751 bytes --]

Hi!

> From: Tommaso Merciai <tomm.merciai@gmail.com>
> 
> [ Upstream commit 5c2b9c61ae5d8ad0a196d33b66ce44543be22281 ]
> 
> Add support for boost-up register of usb251xb hub.
> boost-up property control USB electrical drive strength
> This register can be set:
> 
>  - Normal mode -> 0x00
>  - Low         -> 0x01
>  - Medium      -> 0x10
>  - High        -> 0x11
> 
> (Normal Default)
> 
> References:
>  - http://www.mouser.com/catalog/specsheets/2514.pdf p29

Should the boost-up property be documented somewhere in the kernel
tree? We normally do that for device tree properties. And we normally
have properties used somewhere in the device tree. What is going on here?

Best regards,
							Pavel

> +++ b/drivers/usb/misc/usb251xb.c
> @@ -543,6 +543,9 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>  	if (of_property_read_u16_array(np, "language-id", &hub->lang_id, 1))
>  		hub->lang_id = USB251XB_DEF_LANGUAGE_ID;
>  
> +	if (of_property_read_u8(np, "boost-up", &hub->boost_up))
> +		hub->boost_up = USB251XB_DEF_BOOST_UP;
> +
>  	cproperty_char = of_get_property(np, "manufacturer", NULL);
>  	strlcpy(str, cproperty_char ? : USB251XB_DEF_MANUFACTURER_STRING,
>  		sizeof(str));
> @@ -584,7 +587,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>  	 * may be as soon as needed.
>  	 */
>  	hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
> -	hub->boost_up = USB251XB_DEF_BOOST_UP;
>  	hub->boost_57 = USB251XB_DEF_BOOST_57;
>  	hub->boost_14 = USB251XB_DEF_BOOST_14;
>  	hub->port_map12 = USB251XB_DEF_PORT_MAP_12;

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support
  2022-02-20 10:12   ` Pavel Machek
@ 2022-02-28 12:23     ` Richard Leitner
  2022-03-02  9:24       ` Tommaso Merciai
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Leitner @ 2022-02-28 12:23 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Sasha Levin, linux-kernel, stable, Tommaso Merciai,
	Greg Kroah-Hartman, richard.leitner, linux-usb

Hi,

On Sun, Feb 20, 2022 at 11:12:57AM +0100, Pavel Machek wrote:
> Hi!
> 
> > From: Tommaso Merciai <tomm.merciai@gmail.com>
> > 
> > [ Upstream commit 5c2b9c61ae5d8ad0a196d33b66ce44543be22281 ]
> > 
> > Add support for boost-up register of usb251xb hub.
> > boost-up property control USB electrical drive strength
> > This register can be set:
> > 
> >  - Normal mode -> 0x00
> >  - Low         -> 0x01
> >  - Medium      -> 0x10
> >  - High        -> 0x11
> > 
> > (Normal Default)
> > 
> > References:
> >  - http://www.mouser.com/catalog/specsheets/2514.pdf p29
> 
> Should the boost-up property be documented somewhere in the kernel
> tree? We normally do that for device tree properties. And we normally
> have properties used somewhere in the device tree. What is going on here?

AFAIK this patch was dropped for all stable releases, so this specific
AUTOSEL message/thread is obsolete.

Nonetheless the DT documentation is also missing on master. Therefore
I guess it should be provided asap 😉

Tommaso, can you provide a patch?

regards;rl

> 
> Best regards,
> 							Pavel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support
  2022-02-28 12:23     ` Richard Leitner
@ 2022-03-02  9:24       ` Tommaso Merciai
  0 siblings, 0 replies; 5+ messages in thread
From: Tommaso Merciai @ 2022-03-02  9:24 UTC (permalink / raw)
  To: Richard Leitner
  Cc: Pavel Machek, Sasha Levin, linux-kernel, stable,
	Greg Kroah-Hartman, richard.leitner, linux-usb

On Mon, Feb 28, 2022 at 01:23:02PM +0100, Richard Leitner wrote:
> Hi,
> 
> On Sun, Feb 20, 2022 at 11:12:57AM +0100, Pavel Machek wrote:
> > Hi!
> > 
> > > From: Tommaso Merciai <tomm.merciai@gmail.com>
> > > 
> > > [ Upstream commit 5c2b9c61ae5d8ad0a196d33b66ce44543be22281 ]
> > > 
> > > Add support for boost-up register of usb251xb hub.
> > > boost-up property control USB electrical drive strength
> > > This register can be set:
> > > 
> > >  - Normal mode -> 0x00
> > >  - Low         -> 0x01
> > >  - Medium      -> 0x10
> > >  - High        -> 0x11
> > > 
> > > (Normal Default)
> > > 
> > > References:
> > >  - http://www.mouser.com/catalog/specsheets/2514.pdf p29
> > 
> > Should the boost-up property be documented somewhere in the kernel
> > tree? We normally do that for device tree properties. And we normally
> > have properties used somewhere in the device tree. What is going on here?
> 
> AFAIK this patch was dropped for all stable releases, so this specific
> AUTOSEL message/thread is obsolete.
> 
> Nonetheless the DT documentation is also missing on master. Therefore
> I guess it should be provided asap 😉
> 
> Tommaso, can you provide a patch?

Hi All,
Sorry for delay, but I'm quite busy in these days.
Yes I can provide a patch about documentation in the
next days.

Regards,
Tommaso

> 
> regards;rl
> 
> > 
> > Best regards,
> > 							Pavel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-02  9:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220215152957.581303-1-sashal@kernel.org>
2022-02-15 15:29 ` [PATCH AUTOSEL 5.10 04/23] usb: usb251xb: add boost-up property support Sasha Levin
2022-02-20 10:12   ` Pavel Machek
2022-02-28 12:23     ` Richard Leitner
2022-03-02  9:24       ` Tommaso Merciai
2022-02-15 15:29 ` [PATCH AUTOSEL 5.10 21/23] net: usb: qmi_wwan: Add support for Dell DW5829e Sasha Levin

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).