lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <174473125440.400068.8321160690827825721.robh@kernel.org>
Date: Tue, 15 Apr 2025 10:34:14 -0500
From: "Rob Herring (Arm)" <robh@...nel.org>
To: Quentin Schulz <foss+kernel@...il.net>
Cc: Ɓukasz Czechowski <lukasz.czechowski@...umatec.com>, 
 linux-kernel@...r.kernel.org, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>, 
 Quentin Schulz <quentin.schulz@...rry.de>, devicetree@...r.kernel.org, 
 Conor Dooley <conor+dt@...nel.org>, linux-usb@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: usb: usb-device: allow multiple
 compatibles


On Tue, 15 Apr 2025 16:34:27 +0200, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@...rry.de>
> 
> The dt-core typically allows multiple compatibles[1] but usb-device
> currently forces a single compatible.
> 
> This is an issue when multiple devices with slightly different productID
> all behave the same. This would require the driver to keep updating its
> compatible matching table and the bindings to include this new productID
> instead of doing what is usually done: have two compatibles, the
> leftmost which matches exactly the HW device definition, and the
> rightmost one as a fallback which is assumed to be 100% compatible with
> the device at hand. If this assumption turns out to be wrong, it is easy
> to work around this without having to modify the device tree by handling
> the leftmost compatible in the driver.
> 
> [1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/dt-core.yaml#L21-L25
> 
> Signed-off-by: Quentin Schulz <quentin.schulz@...rry.de>
> ---
> This came up while working on fixing USB on an RK3399 Puma which has an
> onboard USB hub whose productID isn't in any driver compatible list
> but which can be supported by a driver with a slightly different
> productID matching another variant of the same IC, from the same
> datasheet.
> 
> See https://lore.kernel.org/linux-rockchip/20250326-onboard_usb_dev-v1-0-a4b0a5d1b32c@thaumatec.com/
> ---
>  Documentation/devicetree/bindings/usb/usb-device.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/usb/usb-device.yaml: properties:compatible:items: {'pattern': '^usb[0-9a-f]{1,4},[0-9a-f]{1,4}$'} is not of type 'array'
	from schema $id: http://devicetree.org/meta-schemas/string-array.yaml#

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250415-dt-binding-usb-device-compatibles-v1-1-90f3cff32aa0@cherry.de

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ