Commit ccdddc03 authored by Serge Semin's avatar Serge Semin Committed by Greg Kroah-Hartman

usb: usb251xb: Add 5,6,7 ports boost settings

USB electrical signaling drive strength boost bit is also supported
by USB2517 hub. Since it got three addition ports, the designers
needed to add one more register for initialization. It turned out
to be formerly reserved 0xF7. As before we just initialize it with
default zeros.
Signed-off-by: default avatarSerge Semin <fancer.lancer@gmail.com>
Acked-by: default avatarRichard Leitner <richard.leitner@skidata.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent db234b9a
...@@ -94,8 +94,10 @@ ...@@ -94,8 +94,10 @@
#define USB251XB_ADDR_BOOST_UP 0xF6 #define USB251XB_ADDR_BOOST_UP 0xF6
#define USB251XB_DEF_BOOST_UP 0x00 #define USB251XB_DEF_BOOST_UP 0x00
#define USB251XB_ADDR_BOOST_X 0xF8 #define USB251XB_ADDR_BOOST_57 0xF7
#define USB251XB_DEF_BOOST_X 0x00 #define USB251XB_DEF_BOOST_57 0x00
#define USB251XB_ADDR_BOOST_14 0xF8
#define USB251XB_DEF_BOOST_14 0x00
#define USB251XB_ADDR_PORT_SWAP 0xFA #define USB251XB_ADDR_PORT_SWAP 0xFA
#define USB251XB_DEF_PORT_SWAP 0x00 #define USB251XB_DEF_PORT_SWAP 0x00
...@@ -148,7 +150,8 @@ struct usb251xb { ...@@ -148,7 +150,8 @@ struct usb251xb {
char serial[USB251XB_STRING_BUFSIZE]; char serial[USB251XB_STRING_BUFSIZE];
u8 bat_charge_en; u8 bat_charge_en;
u8 boost_up; u8 boost_up;
u8 boost_x; u8 boost_57;
u8 boost_14;
u8 port_swap; u8 port_swap;
u8 port_map12; u8 port_map12;
u8 port_map34; u8 port_map34;
...@@ -279,7 +282,8 @@ static int usb251xb_connect(struct usb251xb *hub) ...@@ -279,7 +282,8 @@ static int usb251xb_connect(struct usb251xb *hub)
USB251XB_STRING_BUFSIZE); USB251XB_STRING_BUFSIZE);
i2c_wb[USB251XB_ADDR_BATTERY_CHARGING_ENABLE] = hub->bat_charge_en; i2c_wb[USB251XB_ADDR_BATTERY_CHARGING_ENABLE] = hub->bat_charge_en;
i2c_wb[USB251XB_ADDR_BOOST_UP] = hub->boost_up; i2c_wb[USB251XB_ADDR_BOOST_UP] = hub->boost_up;
i2c_wb[USB251XB_ADDR_BOOST_X] = hub->boost_x; i2c_wb[USB251XB_ADDR_BOOST_57] = hub->boost_57;
i2c_wb[USB251XB_ADDR_BOOST_14] = hub->boost_14;
i2c_wb[USB251XB_ADDR_PORT_SWAP] = hub->port_swap; i2c_wb[USB251XB_ADDR_PORT_SWAP] = hub->port_swap;
i2c_wb[USB251XB_ADDR_PORT_MAP_12] = hub->port_map12; i2c_wb[USB251XB_ADDR_PORT_MAP_12] = hub->port_map12;
i2c_wb[USB251XB_ADDR_PORT_MAP_34] = hub->port_map34; i2c_wb[USB251XB_ADDR_PORT_MAP_34] = hub->port_map34;
...@@ -519,7 +523,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub, ...@@ -519,7 +523,8 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS; hub->max_current_bp = USB251XB_DEF_MAX_CURRENT_BUS;
hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE; hub->bat_charge_en = USB251XB_DEF_BATTERY_CHARGING_ENABLE;
hub->boost_up = USB251XB_DEF_BOOST_UP; hub->boost_up = USB251XB_DEF_BOOST_UP;
hub->boost_x = USB251XB_DEF_BOOST_X; hub->boost_57 = USB251XB_DEF_BOOST_57;
hub->boost_14 = USB251XB_DEF_BOOST_14;
hub->port_swap = USB251XB_DEF_PORT_SWAP; hub->port_swap = USB251XB_DEF_PORT_SWAP;
hub->port_map12 = USB251XB_DEF_PORT_MAP_12; hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
hub->port_map34 = USB251XB_DEF_PORT_MAP_34; hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment