* [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-19 14:59 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-19 14:59 UTC (permalink / raw)
To: richard.leitner, robh, fancer.lancer; +Cc: kernel, linux-usb, devicetree
Add optional binding to allow USB differential-pair (D+/D-) data lane
swapping. The swapping can be specified for each port separately,
default is no swapping.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index 168ff819e827..aec93a92870d 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -64,6 +64,8 @@ Optional properties :
- power-on-time-ms : Specifies the time it takes from the time the host
initiates the power-on sequence to a port until the port has adequate
power. The value is given in ms in a 0 - 510 range (default is 100ms).
+ - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
+ (D+/D-), default is not-swapped.
Examples:
usb2512b@2c {
@@ -81,4 +83,6 @@ Examples:
manufacturer = "Foo";
product = "Foo-Bar";
serial = "1234567890A";
+ /* correct misplaced usb connectors on port 1,2 */
+ sw-dx-lanes-ports = <1 2>;
};
--
2.19.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-19 14:59 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-19 14:59 UTC (permalink / raw)
To: richard.leitner, robh, fancer.lancer; +Cc: kernel, linux-usb, devicetree
Add optional binding to allow USB differential-pair (D+/D-) data lane
swapping. The swapping can be specified for each port separately,
default is no swapping.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
index 168ff819e827..aec93a92870d 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.txt
+++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
@@ -64,6 +64,8 @@ Optional properties :
- power-on-time-ms : Specifies the time it takes from the time the host
initiates the power-on sequence to a port until the port has adequate
power. The value is given in ms in a 0 - 510 range (default is 100ms).
+ - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
+ (D+/D-), default is not-swapped.
Examples:
usb2512b@2c {
@@ -81,4 +83,6 @@ Examples:
manufacturer = "Foo";
product = "Foo-Bar";
serial = "1234567890A";
+ /* correct misplaced usb connectors on port 1,2 */
+ sw-dx-lanes-ports = <1 2>;
};
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/2] usb: usb251xb: add usb data lane port swap feature
@ 2018-12-19 14:59 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-19 14:59 UTC (permalink / raw)
To: richard.leitner, robh, fancer.lancer; +Cc: kernel, linux-usb, devicetree
The HW can swap the USB differential-pair (D+/D-) for each port
separately. So the USB signals can be re-aligned with a misplaced
USB connector on the PCB.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/usb/misc/usb251xb.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index a6efb9a72939..cd89618e11f1 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -337,10 +337,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
struct device *dev = hub->dev;
struct device_node *np = dev->of_node;
int len, err, i;
- u32 property_u32 = 0;
+ u32 port, property_u32 = 0;
const u32 *cproperty_u32;
const char *cproperty_char;
char str[USB251XB_STRING_BUFSIZE / 2];
+ struct property *prop;
+ const __be32 *p;
if (!np) {
dev_err(dev, "failed to get ofdata\n");
@@ -539,6 +541,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
(wchar_t *)hub->serial,
USB251XB_STRING_BUFSIZE);
+ hub->port_swap = USB251XB_DEF_PORT_SWAP;
+ of_property_for_each_u32(np, "sw-dx-lanes-ports", prop, p, port) {
+ if ((port >= 0) && (port <= data->port_cnt))
+ hub->port_swap |= BIT(port);
+ }
+
/* The following parameters are currently not exposed to devicetree, but
* may be as soon as needed.
*/
@@ -546,7 +554,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
hub->boost_up = USB251XB_DEF_BOOST_UP;
hub->boost_57 = USB251XB_DEF_BOOST_57;
hub->boost_14 = USB251XB_DEF_BOOST_14;
- hub->port_swap = USB251XB_DEF_PORT_SWAP;
hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
hub->port_map56 = USB251XB_DEF_PORT_MAP_56;
--
2.19.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [2/2] usb: usb251xb: add usb data lane port swap feature
@ 2018-12-19 14:59 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-19 14:59 UTC (permalink / raw)
To: richard.leitner, robh, fancer.lancer; +Cc: kernel, linux-usb, devicetree
The HW can swap the USB differential-pair (D+/D-) for each port
separately. So the USB signals can be re-aligned with a misplaced
USB connector on the PCB.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
drivers/usb/misc/usb251xb.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index a6efb9a72939..cd89618e11f1 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -337,10 +337,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
struct device *dev = hub->dev;
struct device_node *np = dev->of_node;
int len, err, i;
- u32 property_u32 = 0;
+ u32 port, property_u32 = 0;
const u32 *cproperty_u32;
const char *cproperty_char;
char str[USB251XB_STRING_BUFSIZE / 2];
+ struct property *prop;
+ const __be32 *p;
if (!np) {
dev_err(dev, "failed to get ofdata\n");
@@ -539,6 +541,12 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
(wchar_t *)hub->serial,
USB251XB_STRING_BUFSIZE);
+ hub->port_swap = USB251XB_DEF_PORT_SWAP;
+ of_property_for_each_u32(np, "sw-dx-lanes-ports", prop, p, port) {
+ if ((port >= 0) && (port <= data->port_cnt))
+ hub->port_swap |= BIT(port);
+ }
+
/* The following parameters are currently not exposed to devicetree, but
* may be as soon as needed.
*/
@@ -546,7 +554,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
hub->boost_up = USB251XB_DEF_BOOST_UP;
hub->boost_57 = USB251XB_DEF_BOOST_57;
hub->boost_14 = USB251XB_DEF_BOOST_14;
- hub->port_swap = USB251XB_DEF_PORT_SWAP;
hub->port_map12 = USB251XB_DEF_PORT_MAP_12;
hub->port_map34 = USB251XB_DEF_PORT_MAP_34;
hub->port_map56 = USB251XB_DEF_PORT_MAP_56;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-28 23:45 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2018-12-28 23:45 UTC (permalink / raw)
To: Marco Felsch
Cc: richard.leitner, fancer.lancer, kernel, linux-usb, devicetree
On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> Add optional binding to allow USB differential-pair (D+/D-) data lane
> swapping. The swapping can be specified for each port separately,
> default is no swapping.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> index 168ff819e827..aec93a92870d 100644
> --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> @@ -64,6 +64,8 @@ Optional properties :
> - power-on-time-ms : Specifies the time it takes from the time the host
> initiates the power-on sequence to a port until the port has adequate
> power. The value is given in ms in a 0 - 510 range (default is 100ms).
> + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> + (D+/D-), default is not-swapped.
Perhaps 'swap-dx-ports' would be a more obvious name.
>
> Examples:
> usb2512b@2c {
> @@ -81,4 +83,6 @@ Examples:
> manufacturer = "Foo";
> product = "Foo-Bar";
> serial = "1234567890A";
> + /* correct misplaced usb connectors on port 1,2 */
> + sw-dx-lanes-ports = <1 2>;
> };
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-28 23:45 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2018-12-28 23:45 UTC (permalink / raw)
To: Marco Felsch
Cc: richard.leitner, fancer.lancer, kernel, linux-usb, devicetree
On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> Add optional binding to allow USB differential-pair (D+/D-) data lane
> swapping. The swapping can be specified for each port separately,
> default is no swapping.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> index 168ff819e827..aec93a92870d 100644
> --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> @@ -64,6 +64,8 @@ Optional properties :
> - power-on-time-ms : Specifies the time it takes from the time the host
> initiates the power-on sequence to a port until the port has adequate
> power. The value is given in ms in a 0 - 510 range (default is 100ms).
> + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> + (D+/D-), default is not-swapped.
Perhaps 'swap-dx-ports' would be a more obvious name.
>
> Examples:
> usb2512b@2c {
> @@ -81,4 +83,6 @@ Examples:
> manufacturer = "Foo";
> product = "Foo-Bar";
> serial = "1234567890A";
> + /* correct misplaced usb connectors on port 1,2 */
> + sw-dx-lanes-ports = <1 2>;
> };
> --
> 2.19.1
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-31 11:05 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-31 11:05 UTC (permalink / raw)
To: Rob Herring; +Cc: richard.leitner, fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 18-12-28 17:45, Rob Herring wrote:
> On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> > Add optional binding to allow USB differential-pair (D+/D-) data lane
> > swapping. The swapping can be specified for each port separately,
> > default is no swapping.
> >
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > index 168ff819e827..aec93a92870d 100644
> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > @@ -64,6 +64,8 @@ Optional properties :
> > - power-on-time-ms : Specifies the time it takes from the time the host
> > initiates the power-on sequence to a port until the port has adequate
> > power. The value is given in ms in a 0 - 510 range (default is 100ms).
> > + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> > + (D+/D-), default is not-swapped.
>
> Perhaps 'swap-dx-ports' would be a more obvious name.
What you think about 'swap-dx-lanes' since it has nothing to do with
port swapping, it's rather swapping port properties internally.
Regards,
Marco
>
> >
> > Examples:
> > usb2512b@2c {
> > @@ -81,4 +83,6 @@ Examples:
> > manufacturer = "Foo";
> > product = "Foo-Bar";
> > serial = "1234567890A";
> > + /* correct misplaced usb connectors on port 1,2 */
> > + sw-dx-lanes-ports = <1 2>;
> > };
> > --
> > 2.19.1
> >
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 12+ messages in thread
* [1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2018-12-31 11:05 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2018-12-31 11:05 UTC (permalink / raw)
To: Rob Herring; +Cc: richard.leitner, fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 18-12-28 17:45, Rob Herring wrote:
> On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> > Add optional binding to allow USB differential-pair (D+/D-) data lane
> > swapping. The swapping can be specified for each port separately,
> > default is no swapping.
> >
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > ---
> > Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > index 168ff819e827..aec93a92870d 100644
> > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > @@ -64,6 +64,8 @@ Optional properties :
> > - power-on-time-ms : Specifies the time it takes from the time the host
> > initiates the power-on sequence to a port until the port has adequate
> > power. The value is given in ms in a 0 - 510 range (default is 100ms).
> > + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> > + (D+/D-), default is not-swapped.
>
> Perhaps 'swap-dx-ports' would be a more obvious name.
What you think about 'swap-dx-lanes' since it has nothing to do with
port swapping, it's rather swapping port properties internally.
Regards,
Marco
>
> >
> > Examples:
> > usb2512b@2c {
> > @@ -81,4 +83,6 @@ Examples:
> > manufacturer = "Foo";
> > product = "Foo-Bar";
> > serial = "1234567890A";
> > + /* correct misplaced usb connectors on port 1,2 */
> > + sw-dx-lanes-ports = <1 2>;
> > };
> > --
> > 2.19.1
> >
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2019-01-02 5:44 ` Richard Leitner
0 siblings, 0 replies; 12+ messages in thread
From: Richard Leitner @ 2019-01-02 5:44 UTC (permalink / raw)
To: Marco Felsch, Rob Herring; +Cc: fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 31/12/2018 12:05, Marco Felsch wrote:
> Hi,
>
> On 18-12-28 17:45, Rob Herring wrote:
>> On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
>>> Add optional binding to allow USB differential-pair (D+/D-) data lane
>>> swapping. The swapping can be specified for each port separately,
>>> default is no swapping.
>>>
>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>>> ---
>>> Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> index 168ff819e827..aec93a92870d 100644
>>> --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> @@ -64,6 +64,8 @@ Optional properties :
>>> - power-on-time-ms : Specifies the time it takes from the time the host
>>> initiates the power-on sequence to a port until the port has adequate
>>> power. The value is given in ms in a 0 - 510 range (default is 100ms).
>>> + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
>>> + (D+/D-), default is not-swapped.
>>
>> Perhaps 'swap-dx-ports' would be a more obvious name.
>
> What you think about 'swap-dx-lanes' since it has nothing to do with
> port swapping, it's rather swapping port properties internally.
I'd also prefer 'swap-dx-lanes'. For me it's short and clear.
The only downside is that the feature is called "PORT SWAP" in the
datasheet. Therefore you should maybe mention it in a comment somewhere
in the code so people know what to look for in the datasheet?
regards;Richard.L
^ permalink raw reply [flat|nested] 12+ messages in thread
* [1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2019-01-02 5:44 ` Richard Leitner
0 siblings, 0 replies; 12+ messages in thread
From: Richard Leitner @ 2019-01-02 5:44 UTC (permalink / raw)
To: Marco Felsch, Rob Herring; +Cc: fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 31/12/2018 12:05, Marco Felsch wrote:
> Hi,
>
> On 18-12-28 17:45, Rob Herring wrote:
>> On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
>>> Add optional binding to allow USB differential-pair (D+/D-) data lane
>>> swapping. The swapping can be specified for each port separately,
>>> default is no swapping.
>>>
>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>>> ---
>>> Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> index 168ff819e827..aec93a92870d 100644
>>> --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
>>> @@ -64,6 +64,8 @@ Optional properties :
>>> - power-on-time-ms : Specifies the time it takes from the time the host
>>> initiates the power-on sequence to a port until the port has adequate
>>> power. The value is given in ms in a 0 - 510 range (default is 100ms).
>>> + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
>>> + (D+/D-), default is not-swapped.
>>
>> Perhaps 'swap-dx-ports' would be a more obvious name.
>
> What you think about 'swap-dx-lanes' since it has nothing to do with
> port swapping, it's rather swapping port properties internally.
I'd also prefer 'swap-dx-lanes'. For me it's short and clear.
The only downside is that the feature is called "PORT SWAP" in the
datasheet. Therefore you should maybe mention it in a comment somewhere
in the code so people know what to look for in the datasheet?
regards;Richard.L
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2019-01-03 13:58 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2019-01-03 13:58 UTC (permalink / raw)
To: Richard Leitner; +Cc: Rob Herring, fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 19-01-02 06:44, Richard Leitner wrote:
> Hi,
>
> On 31/12/2018 12:05, Marco Felsch wrote:
> > Hi,
> >
> > On 18-12-28 17:45, Rob Herring wrote:
> > > On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> > > > Add optional binding to allow USB differential-pair (D+/D-) data lane
> > > > swapping. The swapping can be specified for each port separately,
> > > > default is no swapping.
> > > >
> > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > > ---
> > > > Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> > > > 1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > index 168ff819e827..aec93a92870d 100644
> > > > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > @@ -64,6 +64,8 @@ Optional properties :
> > > > - power-on-time-ms : Specifies the time it takes from the time the host
> > > > initiates the power-on sequence to a port until the port has adequate
> > > > power. The value is given in ms in a 0 - 510 range (default is 100ms).
> > > > + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> > > > + (D+/D-), default is not-swapped.
> > >
> > > Perhaps 'swap-dx-ports' would be a more obvious name.
> >
> > What you think about 'swap-dx-lanes' since it has nothing to do with
> > port swapping, it's rather swapping port properties internally.
>
> I'd also prefer 'swap-dx-lanes'. For me it's short and clear.
>
> The only downside is that the feature is called "PORT SWAP" in the
> datasheet. Therefore you should maybe mention it in a comment somewhere
> in the code so people know what to look for in the datasheet?
Okay, I can do this. Should I place the comment into the driver code or
into the bindings description? Both places seems to be correct for me.
Regards,
Marco
>
> regards;Richard.L
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 12+ messages in thread
* [1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping
@ 2019-01-03 13:58 ` Marco Felsch
0 siblings, 0 replies; 12+ messages in thread
From: Marco Felsch @ 2019-01-03 13:58 UTC (permalink / raw)
To: Richard Leitner; +Cc: Rob Herring, fancer.lancer, kernel, linux-usb, devicetree
Hi,
On 19-01-02 06:44, Richard Leitner wrote:
> Hi,
>
> On 31/12/2018 12:05, Marco Felsch wrote:
> > Hi,
> >
> > On 18-12-28 17:45, Rob Herring wrote:
> > > On Wed, Dec 19, 2018 at 03:59:40PM +0100, Marco Felsch wrote:
> > > > Add optional binding to allow USB differential-pair (D+/D-) data lane
> > > > swapping. The swapping can be specified for each port separately,
> > > > default is no swapping.
> > > >
> > > > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> > > > ---
> > > > Documentation/devicetree/bindings/usb/usb251xb.txt | 4 ++++
> > > > 1 file changed, 4 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.txt b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > index 168ff819e827..aec93a92870d 100644
> > > > --- a/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > +++ b/Documentation/devicetree/bindings/usb/usb251xb.txt
> > > > @@ -64,6 +64,8 @@ Optional properties :
> > > > - power-on-time-ms : Specifies the time it takes from the time the host
> > > > initiates the power-on sequence to a port until the port has adequate
> > > > power. The value is given in ms in a 0 - 510 range (default is 100ms).
> > > > + - sw-dx-lanes-ports : Specifies the ports which will swap the differential-pair
> > > > + (D+/D-), default is not-swapped.
> > >
> > > Perhaps 'swap-dx-ports' would be a more obvious name.
> >
> > What you think about 'swap-dx-lanes' since it has nothing to do with
> > port swapping, it's rather swapping port properties internally.
>
> I'd also prefer 'swap-dx-lanes'. For me it's short and clear.
>
> The only downside is that the feature is called "PORT SWAP" in the
> datasheet. Therefore you should maybe mention it in a comment somewhere
> in the code so people know what to look for in the datasheet?
Okay, I can do this. Should I place the comment into the driver code or
into the bindings description? Both places seems to be correct for me.
Regards,
Marco
>
> regards;Richard.L
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-01-03 13:58 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-19 14:59 [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping Marco Felsch
2018-12-19 14:59 ` [1/2] " Marco Felsch
2018-12-19 14:59 ` [PATCH 2/2] usb: usb251xb: add usb data lane port swap feature Marco Felsch
2018-12-19 14:59 ` [2/2] " Marco Felsch
2018-12-28 23:45 ` [PATCH 1/2] dt-bindings: usb: usb251xb: add documentation for data lane swapping Rob Herring
2018-12-28 23:45 ` [1/2] " Rob Herring
2018-12-31 11:05 ` [PATCH 1/2] " Marco Felsch
2018-12-31 11:05 ` [1/2] " Marco Felsch
2019-01-02 5:44 ` [PATCH 1/2] " Richard Leitner
2019-01-02 5:44 ` [1/2] " Richard Leitner
2019-01-03 13:58 ` [PATCH 1/2] " Marco Felsch
2019-01-03 13:58 ` [1/2] " Marco Felsch
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.