Message ID | 20230515103337.130607-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp6817014vqo; Mon, 15 May 2023 03:37:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TkQfSZnEi+XLkwg01G1wke9JCG3UfVfsx42r+5+u9LuAI6B5OTrif3ydUjbrLpQIhvf6N X-Received: by 2002:a05:6a00:2285:b0:643:88b1:9bd1 with SMTP id f5-20020a056a00228500b0064388b19bd1mr43296573pfe.26.1684147059374; Mon, 15 May 2023 03:37:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684147059; cv=none; d=google.com; s=arc-20160816; b=SPylCRc2OaXLP/uIv5QIqYz+wu6QvCR7fupgflw/R0zzrdxypukTRwPoQBbKiHSCs2 ldLBsMjOh2yxi4TEuYX5Zh9V6VKjFcxBqOaFC45j04kZDigNtADWkq+PFN51ohHe0/YV y4rmiCN68E6X4w9GdMl8JAJZncA+4j1hIqRxe/DALTT4NW+JTv9OKYAJNRBqTsV/tzgv AmO3Iuv1yz9XjB14GNym9USx3RdSs+C09DFnPgLkzFpBzB2HBfZy/01/0c4jbCg8/5oQ swTmPURfsypMYVAGrGVgeoGUqV1s/Jn+lzAtk0zAeZHcnRo2AymcTYKDlIJruOr4CngI jm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=J1Io9xJbU4JX39VK14nXRnzKFl0uDZxNNtw5+nQANrY=; b=oBkcu0mZIVQqV00zrdVE+nM2PIiR00NvQOLa+MjtG+Fbo6RQ+T9NRDVMBNv5P0P1O6 KEOtPLjwTR+kMVgZMabmq43m30QKRPBGx2IcyTyvTW1GzibNB6GHmNZql490QR9dxElg 4L23ZZ9zz8F5cGhyAsqZaA5H4i0KIc8o9jmoI6cV3ZL9vgzFCdnh4YLJLo+PhdewcqOw dir0gyi8f+FZuPcVdZ1XtE5S3bvMKab0bZWru09fXpkuGm0niuMDDt4bOQW9cd1TxN/+ UITU0skAGOZQ+f0G0Pd8rZhkSAKlOREBejPkeVy7FlDwAkoVUquuGCX2SfA+282qwrFU Udvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ope3CTSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 3-20020a621703000000b00642ea72f3eesi16804901pfx.341.2023.05.15.03.37.25; Mon, 15 May 2023 03:37:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ope3CTSs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241064AbjEOKds (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Mon, 15 May 2023 06:33:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241022AbjEOKdq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 15 May 2023 06:33:46 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86F0D10D7 for <linux-kernel@vger.kernel.org>; Mon, 15 May 2023 03:33:42 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-50bd37ca954so110209484a12.0 for <linux-kernel@vger.kernel.org>; Mon, 15 May 2023 03:33:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684146821; x=1686738821; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=J1Io9xJbU4JX39VK14nXRnzKFl0uDZxNNtw5+nQANrY=; b=ope3CTSsmM5+nVGa6nDQ23eDeo6m42GlWQq+HNb7BKilPdW4bR3mXUiy091oi8TPC1 YDgjX/ggvnKelkEWVBwh4rW9K/Hi0TNylwpuoJuksl1pgoRTmrKacrdvDQWlOUDdEs1D ld7YGKdDoAE9qimRne5zWKkxo4V1rqx7cUus7iPdEkNUPTw+4wnCayYYIhN9ZpLkGIUg YrVLX89UGrv0rqMFwW8pqnXtYWjFvw2MQxxOUcbgufaHs5uWIHJbFA1+PSVD60ogtvrC v7+23INVZGFKvD+lSaTb/n4dqSengc8Hsh2F50J3E1r44oa11XHil+JEc8lm4XNtp1yZ BLVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684146821; x=1686738821; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=J1Io9xJbU4JX39VK14nXRnzKFl0uDZxNNtw5+nQANrY=; b=C8HSved5Tl5rhydnk8J8JnSmrNYXGNDA7geqMeayj6k3W1oNUstqBHWMcxi4CyIgjE Xzw3/zJNOLRZovolwNYsgmYTkkyx7BTuyYzK3V5UJ6GwcceV+0U+4DS88dMkINnhFLqx gAmCeDDqLFkSYP0VyaoxtVkbI4rCet6QKDutbBDMAH+k72cQmnvQIBCnB+aYYJTya7OK y2tfcVvBl72lv00IXiUjTPQRc8A3snqNH18xSKtKrHSo4cdQOITfPzX1HAcMFjY5JSI0 ot2b/xd1cSjInNzlKm0UrQYieDAwyne4Nrzb9E6wYI+DDMJuGfuwqLDKqO/uG7XeD+aK L5OA== X-Gm-Message-State: AC+VfDzEHZ4EvQ5UvaJtDksgeS5SzguptKonbhZu3tXvpUnrKGxM49T6 P1BpjctgVV7HxSDQTsahcEH4xw== X-Received: by 2002:a17:906:da8c:b0:94a:653b:ba41 with SMTP id xh12-20020a170906da8c00b0094a653bba41mr16678956ejb.15.1684146821031; Mon, 15 May 2023 03:33:41 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:6470:25b8:7c2d:1992]) by smtp.gmail.com with ESMTPSA id ci18-20020a170907267200b00959c6cb82basm9276788ejc.105.2023.05.15.03.33.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 May 2023 03:33:40 -0700 (PDT) From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> To: Richard Leitner <richard.leitner@linux.dev>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, mike.looijmans@topic.nl Subject: [PATCH] dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32 Date: Mon, 15 May 2023 12:33:37 +0200 Message-Id: <20230515103337.130607-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765956187066097626?= X-GMAIL-MSGID: =?utf-8?q?1765956187066097626?= |
Series |
dt-bindings: usb: usb251xb: correct swap-dx-lanes type to uint32
|
|
Commit Message
Krzysztof Kozlowski
May 15, 2023, 10:33 a.m. UTC
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(-)
Comments
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.
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...
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>;
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
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.
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.