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]
Date:   Thu, 28 Oct 2021 17:50:47 -0500
From:   Rob Herring <robh@...nel.org>
To:     Fabrice Gasnier <fabrice.gasnier@...s.st.com>
Cc:     Minas Harutyunyan <hminas@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux USB List <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "moderated list:ARM/STM32 ARCHITECTURE" 
        <linux-stm32@...md-mailman.stormreply.com>,
        devicetree@...r.kernel.org,
        Amelie Delaunay <amelie.delaunay@...s.st.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>
Subject: Re: [PATCH] dt-bindings: usb: dwc2: document the port when
 usb-role-switch is used

On Wed, Oct 27, 2021 at 7:05 AM Fabrice Gasnier
<fabrice.gasnier@...s.st.com> wrote:
>
> On 10/26/21 10:38 PM, Rob Herring wrote:
> > On Wed, Oct 13, 2021 at 06:53:46PM +0200, Fabrice Gasnier wrote:
> >> Document the "port" property, which is used with "usb-role-switch"
> >> to describe the bus connector.
> >> Definition is inspired from mediatek,mtu3.yaml.
> >>
> >> This fixes some errors seen when running "make dtbs_check":
> >> ... 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
> >>         From schema: ... Documentation/devicetree/bindings/usb/dwc2.yaml
> >>
> >> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@...s.st.com>
> >> ---
> >>  Documentation/devicetree/bindings/usb/dwc2.yaml | 10 ++++++++++
> >>  1 file changed, 10 insertions(+)
> >>
> >> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml
> >> index 10c7d9b..7d1aa53 100644
> >> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
> >> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
> >> @@ -130,6 +130,16 @@ properties:
> >>      description: If present indicates that we need to reset the PHY when we
> >>        detect a wakeup. This is due to a hardware errata.
> >>
> >> +  port:
> >> +    description:
> >> +      Any connector to the data bus of this controller should be modelled
> >> +      using the OF graph bindings specified, if the "usb-role-switch"
> >> +      property is used. See graph.txt
> >
> > Drop 'See graph.txt'
> >
> >> +    $ref: /schemas/graph.yaml#/properties/port
> >> +
> >> +dependencies:
> >> +  port: [ 'usb-role-switch' ]
> >
> > usb-role-switch without port is valid or both must be present. In case
> > of the latter, you need to add:

If I wasn't clear, that was a question. Is usb-role-switch without
port is valid?

>
> Hi Rob,
>
> Thanks for your review.
> I agree with your statement. But I miss something in this proposal:
>
> >
> > usb-role-switch: [ port ]
>
> I tried this without success, when running dt_binding_check.
>
> For testing, I added locally in the example successively:
>
> 1 - usb-role-switch (alone)
> -----
> +        usb-role-switch;
> "dwc2.example.dt.yaml: usb@...c0000: 'port' is a dependency of
> 'usb-role-switch'
>
> 2 - port without usb-role-switch
> -----
> +        //usb-role-switch;
> +
> +        port {
> +          usb_role_sw: endpoint {
> +            remote-endpoint = <&hs_ep>;
> +          };
> +        };
> dt_binding_check is happy here. But it shouldn't, right ?

You had this?:

dependencies:
  usb-role-switch: [ port ]
  port: [ usb-role-switch ]


If both properties have to be present together, then you need the above.

>
> 3 - both (port + usb-role-switch)
> -----
> dt_binding_check is ok.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ