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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YaQseO5kF71vABji@robh.at.kernel.org>
Date:   Sun, 28 Nov 2021 19:27:20 -0600
From:   Rob Herring <robh@...nel.org>
To:     Sven Peter <sven@...npeter.dev>
Cc:     Felipe Balbi <balbi@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Hector Martin <marcan@...can.st>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Mark Kettenis <mark.kettenis@...all.nl>,
        linux-usb@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] dt-bindings: usb: Add Apple dwc3 bindings

On Mon, Nov 08, 2021 at 06:09:45PM +0100, Sven Peter wrote:
> Apple Silicon SoCs such as the M1 have multiple USB controllers based on
> the Synopsys DesignWare USB3 controller.
> References to the ATC PHY required for SuperSpeed are left out for now
> until support has been upstreamed as well.
> 
> Signed-off-by: Sven Peter <sven@...npeter.dev>
> ---
> v1 -> v2:
>  - added apple,dwc3 bindings instead of a property for the reset quirk
>    as requested by robh
> 
> I think I have to use GPL-2.0 for this binding since it's based
> on and references snps,dwc3.yaml which is also only GPL-2.0.
> Otherwise I'd be fine with the usual GPL/BSD dual license as well.
> 
>  .../devicetree/bindings/usb/apple,dwc3.yaml   | 64 +++++++++++++++++++
>  MAINTAINERS                                   |  1 +
>  2 files changed, 65 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/apple,dwc3.yaml
> 
> diff --git a/Documentation/devicetree/bindings/usb/apple,dwc3.yaml b/Documentation/devicetree/bindings/usb/apple,dwc3.yaml
> new file mode 100644
> index 000000000000..fb3b3489e6b2
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/apple,dwc3.yaml
> @@ -0,0 +1,64 @@
> +# SPDX-License-Identifier: GPL-2.0

Dual license please.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/usb/apple,dwc3.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Apple Silicon DWC3 USB controller
> +
> +maintainers:
> +  - Sven Peter <sven@...npeter.dev>
> +
> +description:
> +  On Apple Silicon SoCs such as the M1 each Type-C port has a corresponding
> +  USB controller based on the Synopsys DesignWare USB3 controller.
> +
> +  The common content of this binding is defined in snps,dwc3.yaml.
> +
> +allOf:
> +  - $ref: snps,dwc3.yaml#
> +
> +select:
> +  properties:
> +    compatible:
> +      contains:
> +        const: apple,dwc3

This needs to list all possible compatibles except snps,dwc3 so the 
schema is applied for any incorrect mixture of compatibles.

> +  required:
> +    - compatible
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - apple,t8103-dwc3
> +          - apple,t6000-dwc3
> +      - const: apple,dwc3
> +      - const: snps,dwc3
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/apple-aic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    usb@...80000 {
> +      compatible = "apple,t8103-dwc3", "apple,dwc3", "snps,dwc3";
> +      reg = <0x82280000 0x10000>;
> +      interrupts = <AIC_IRQ 777 IRQ_TYPE_LEVEL_HIGH>;
> +
> +      dr_mode = "otg";
> +      usb-role-switch;
> +      role-switch-default-mode = "host";
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3b79fd441dde..03e7cc48877a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1724,6 +1724,7 @@ T:	git https://github.com/AsahiLinux/linux.git
>  F:	Documentation/devicetree/bindings/arm/apple.yaml
>  F:	Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml
>  F:	Documentation/devicetree/bindings/pinctrl/apple,pinctrl.yaml
> +F:	Documentation/devicetree/bindings/usb/apple,dwc3.yaml
>  F:	arch/arm64/boot/dts/apple/
>  F:	drivers/irqchip/irq-apple-aic.c
>  F:	include/dt-bindings/interrupt-controller/apple-aic.h
> -- 
> 2.25.1
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ