* [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32
@ 2023-05-15 10:33 Krzysztof Kozlowski
2023-05-15 12:55 ` Marek Vasut
0 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-05-15 10:33 UTC (permalink / raw)
To: Richard Leitner, Greg Kroah-Hartman, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Marek Vasut, linux-usb,
devicetree, linux-kernel
Cc: Krzysztof Kozlowski, mike.looijmans
The "swap-dx-lanes" was never described as uint8 in original TXT
bindings and Linuxx driver expects uint32. Fix the type to match Linux
driver expectation and original binding.
Fixes: fff61d4ccf3d ("dt-bindings: usb: usb251xb: Convert to YAML schema")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Cc: mike.looijmans@topic.nl
---
Documentation/devicetree/bindings/usb/usb251xb.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/usb251xb.yaml b/Documentation/devicetree/bindings/usb/usb251xb.yaml
index 4d1530816817..ac5b99710332 100644
--- a/Documentation/devicetree/bindings/usb/usb251xb.yaml
+++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml
@@ -231,7 +231,7 @@ properties:
power-on sequence to a port until the port has adequate power.
swap-dx-lanes:
- $ref: /schemas/types.yaml#/definitions/uint8-array
+ $ref: /schemas/types.yaml#/definitions/uint32-array
description: |
Specifies the ports which will swap the differential-pair (D+/D-),
default is not-swapped.
--
2.34.1
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 2023-05-15 10:33 [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 Krzysztof Kozlowski @ 2023-05-15 12:55 ` Marek Vasut [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.ed9c8f5a-900b-42eb-a8c2-543ccf3145e3@emailsignatures365.codetwo.com> 0 siblings, 1 reply; 6+ messages in thread From: Marek Vasut @ 2023-05-15 12:55 UTC (permalink / raw) To: Krzysztof Kozlowski, Richard Leitner, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb, devicetree, linux-kernel Cc: mike.looijmans On 5/15/23 12:33, Krzysztof Kozlowski wrote: > The "swap-dx-lanes" was never described as uint8 in original TXT > bindings and Linuxx driver expects uint32. Fix the type to match Linux Linux , one x too many . > driver expectation and original binding. > > Fixes: fff61d4ccf3d ("dt-bindings: usb: usb251xb: Convert to YAML schema") > Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > > --- > > Cc: mike.looijmans@topic.nl > --- > Documentation/devicetree/bindings/usb/usb251xb.yaml | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/usb/usb251xb.yaml b/Documentation/devicetree/bindings/usb/usb251xb.yaml > index 4d1530816817..ac5b99710332 100644 > --- a/Documentation/devicetree/bindings/usb/usb251xb.yaml > +++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml > @@ -231,7 +231,7 @@ properties: > power-on sequence to a port until the port has adequate power. > > swap-dx-lanes: > - $ref: /schemas/types.yaml#/definitions/uint8-array > + $ref: /schemas/types.yaml#/definitions/uint32-array > description: | > Specifies the ports which will swap the differential-pair (D+/D-), > default is not-swapped. Would it make more sense to update the driver instead ? I doubt you could have more than 256 ports on this device after all. ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.ed9c8f5a-900b-42eb-a8c2-543ccf3145e3@emailsignatures365.codetwo.com>]
* Re: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 [not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.ed9c8f5a-900b-42eb-a8c2-543ccf3145e3@emailsignatures365.codetwo.com> @ 2023-05-15 13:17 ` mike.looijmans 2023-05-15 13:47 ` Marek Vasut 0 siblings, 1 reply; 6+ messages in thread From: mike.looijmans @ 2023-05-15 13:17 UTC (permalink / raw) To: Marek Vasut, Krzysztof Kozlowski, Richard Leitner, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb, devicetree, linux-kernel See below... Met vriendelijke groet / kind regards, Mike Looijmans System Expert TOPIC Embedded Products B.V. Materiaalweg 4, 5681 RJ Best The Netherlands T: +31 (0) 499 33 69 69 E: mike.looijmans@topicproducts.com W: www.topic.nl Please consider the environment before printing this e-mail On 15-05-2023 14:55, Marek Vasut wrote: > On 5/15/23 12:33, Krzysztof Kozlowski wrote: diff --git > a/Documentation/devicetree/bindings/usb/usb251xb.yaml > b/Documentation/devicetree/bindings/usb/usb251xb.yaml >> index 4d1530816817..ac5b99710332 100644 >> --- a/Documentation/devicetree/bindings/usb/usb251xb.yaml >> +++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml >> @@ -231,7 +231,7 @@ properties: >> power-on sequence to a port until the port has adequate power. >> swap-dx-lanes: >> - $ref: /schemas/types.yaml#/definitions/uint8-array >> + $ref: /schemas/types.yaml#/definitions/uint32-array >> description: | >> Specifies the ports which will swap the differential-pair >> (D+/D-), >> default is not-swapped. > > Would it make more sense to update the driver instead ? I doubt you > could have more than 256 ports on this device after all. I guess there's a bunch of devicetrees already out there using the (misdocumented) 32-bit array binding, they'd break in a bad way... -- Mike Looijmans ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 2023-05-15 13:17 ` mike.looijmans @ 2023-05-15 13:47 ` Marek Vasut 2023-05-16 8:19 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Marek Vasut @ 2023-05-15 13:47 UTC (permalink / raw) To: mike.looijmans, Krzysztof Kozlowski, Richard Leitner, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb, devicetree, linux-kernel On 5/15/23 15:17, mike.looijmans@topic.nl wrote: > See below... > > Met vriendelijke groet / kind regards, > > Mike Looijmans > System Expert > > > TOPIC Embedded Products B.V. > Materiaalweg 4, 5681 RJ Best > The Netherlands > > T: +31 (0) 499 33 69 69 > E: mike.looijmans@topicproducts.com > W: www.topic.nl Can you please drop this part next time ? > Please consider the environment before printing this e-mail > On 15-05-2023 14:55, Marek Vasut wrote: >> On 5/15/23 12:33, Krzysztof Kozlowski wrote: diff --git >> a/Documentation/devicetree/bindings/usb/usb251xb.yaml >> b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>> index 4d1530816817..ac5b99710332 100644 >>> --- a/Documentation/devicetree/bindings/usb/usb251xb.yaml >>> +++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>> @@ -231,7 +231,7 @@ properties: >>> power-on sequence to a port until the port has adequate power. >>> swap-dx-lanes: >>> - $ref: /schemas/types.yaml#/definitions/uint8-array >>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>> description: | >>> Specifies the ports which will swap the differential-pair >>> (D+/D-), >>> default is not-swapped. >> >> Would it make more sense to update the driver instead ? I doubt you >> could have more than 256 ports on this device after all. > > > I guess there's a bunch of devicetrees already out there using the > (misdocumented) 32-bit array binding, they'd break in a bad way... I think it is the other way around -- if the binding was documented as u8, then the existing DTs should use the u8 type if they are compliant to the binding document. I see one board in next which uses this property and sets it to 0 , so this one is not affected either way: arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dts: swap-dx-lanes = <0>; ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 2023-05-15 13:47 ` Marek Vasut @ 2023-05-16 8:19 ` Krzysztof Kozlowski 2023-05-16 8:21 ` Marek Vasut 0 siblings, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2023-05-16 8:19 UTC (permalink / raw) To: Marek Vasut, mike.looijmans, Richard Leitner, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb, devicetree, linux-kernel On 15/05/2023 15:47, Marek Vasut wrote: >> Please consider the environment before printing this e-mail >> On 15-05-2023 14:55, Marek Vasut wrote: >>> On 5/15/23 12:33, Krzysztof Kozlowski wrote: diff --git >>> a/Documentation/devicetree/bindings/usb/usb251xb.yaml >>> b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>> index 4d1530816817..ac5b99710332 100644 >>>> --- a/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>> +++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>> @@ -231,7 +231,7 @@ properties: >>>> power-on sequence to a port until the port has adequate power. >>>> swap-dx-lanes: >>>> - $ref: /schemas/types.yaml#/definitions/uint8-array >>>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>>> description: | >>>> Specifies the ports which will swap the differential-pair >>>> (D+/D-), >>>> default is not-swapped. >>> >>> Would it make more sense to update the driver instead ? I doubt you >>> could have more than 256 ports on this device after all. >> >> >> I guess there's a bunch of devicetrees already out there using the >> (misdocumented) 32-bit array binding, they'd break in a bad way... > > I think it is the other way around -- if the binding was documented as > u8, then the existing DTs should use the u8 type if they are compliant > to the binding document. > > I see one board in next which uses this property and sets it to 0 , so > this one is not affected either way: > arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dts: > swap-dx-lanes = <0>; First of all, the original binding did not define it as u8. It actually skipped the type entirely but: - Example shown u32, - Driver used u32, - In-tree user uses u32 (although as pointed - as 0 so not really relevant). Thus the ABI is rather defined by not-breaking users here, so I would stick to fixing it to u32. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 2023-05-16 8:19 ` Krzysztof Kozlowski @ 2023-05-16 8:21 ` Marek Vasut 0 siblings, 0 replies; 6+ messages in thread From: Marek Vasut @ 2023-05-16 8:21 UTC (permalink / raw) To: Krzysztof Kozlowski, mike.looijmans, Richard Leitner, Greg Kroah-Hartman, Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-usb, devicetree, linux-kernel On 5/16/23 10:19, Krzysztof Kozlowski wrote: > On 15/05/2023 15:47, Marek Vasut wrote: >>> Please consider the environment before printing this e-mail >>> On 15-05-2023 14:55, Marek Vasut wrote: >>>> On 5/15/23 12:33, Krzysztof Kozlowski wrote: diff --git >>>> a/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>> b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>>> index 4d1530816817..ac5b99710332 100644 >>>>> --- a/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>>> +++ b/Documentation/devicetree/bindings/usb/usb251xb.yaml >>>>> @@ -231,7 +231,7 @@ properties: >>>>> power-on sequence to a port until the port has adequate power. >>>>> swap-dx-lanes: >>>>> - $ref: /schemas/types.yaml#/definitions/uint8-array >>>>> + $ref: /schemas/types.yaml#/definitions/uint32-array >>>>> description: | >>>>> Specifies the ports which will swap the differential-pair >>>>> (D+/D-), >>>>> default is not-swapped. >>>> >>>> Would it make more sense to update the driver instead ? I doubt you >>>> could have more than 256 ports on this device after all. >>> >>> >>> I guess there's a bunch of devicetrees already out there using the >>> (misdocumented) 32-bit array binding, they'd break in a bad way... >> >> I think it is the other way around -- if the binding was documented as >> u8, then the existing DTs should use the u8 type if they are compliant >> to the binding document. >> >> I see one board in next which uses this property and sets it to 0 , so >> this one is not affected either way: >> arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-rmb3.dts: >> swap-dx-lanes = <0>; > > > First of all, the original binding did not define it as u8. It actually > skipped the type entirely but: > - Example shown u32, > - Driver used u32, > - In-tree user uses u32 (although as pointed - as 0 so not really > relevant). > > Thus the ABI is rather defined by not-breaking users here, so I would > stick to fixing it to u32. Fine by me. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-16 8:21 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 10:33 [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 Krzysztof Kozlowski
2023-05-15 12:55 ` Marek Vasut
[not found] ` <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.ed9c8f5a-900b-42eb-a8c2-543ccf3145e3@emailsignatures365.codetwo.com>
2023-05-15 13:17 ` mike.looijmans
2023-05-15 13:47 ` Marek Vasut
2023-05-16 8:19 ` Krzysztof Kozlowski
2023-05-16 8:21 ` Marek Vasut
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®