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: <20200127184347.GA27080@bogus>
Date:   Mon, 27 Jan 2020 12:43:47 -0600
From:   Rob Herring <robh@...nel.org>
To:     Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Cc:     linux-arm-msm@...r.kernel.org, linux-usb@...r.kernel.org,
        gregkh@...uxfoundation.org, jackp@...eaurora.org, balbi@...nel.org,
        bjorn.andersson@...aro.org, linux-kernel@...r.kernel.org,
        Mark Rutland <mark.rutland@....com>, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 06/19] dt-bindings: usb: dwc3: Add a
 gpio-usb-connector description

On Wed, Jan 22, 2020 at 06:55:57PM +0000, Bryan O'Donoghue wrote:
> A USB connector should be a child node of the USB controller
> connector/usb-connector.txt. This patch adds a property
> "gpio_usb_connector" which declares a connector child device. Code in the
> DWC3 driver will then
> 
> - Search for "gpio_usb_controller"
> - Do an of_platform_populate() if found
> 
> This will have the effect of making the declared node a child of the USB
> controller and will make sure that USB role-switch events detected with the
> gpio_usb_controller driver propagate into the DWC3 controller code
> appropriately.

This is all driver specifics. This is a binding patch.

> 
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Rob Herring <robh+dt@...nel.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: linux-usb@...r.kernel.org
> Cc: devicetree@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>
> ---
>  Documentation/devicetree/bindings/usb/dwc3.txt | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc3.txt b/Documentation/devicetree/bindings/usb/dwc3.txt
> index 66780a47ad85..b019bd472f83 100644
> --- a/Documentation/devicetree/bindings/usb/dwc3.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc3.txt
> @@ -108,6 +108,9 @@ Optional properties:
>  			When just one value, which means INCRX burst mode enabled. When
>  			more than one value, which means undefined length INCR burst type
>  			enabled. The values can be 1, 4, 8, 16, 32, 64, 128 and 256.
> + - gpio_usb_connector: Declares a USB connector named 'gpio_usb_connector' as a
> +		       child node of the DWC3 block. Use when modelling a USB
> +		       connector based on the gpio-usb-b-connector driver.

Should be just 'connector'. That's already implicitly allowed for any 
USB controller, so you don't really need a binding change. And the 
specific type of connector is outside the scope of the DWC3 binding.

>  
>   - in addition all properties from usb-xhci.txt from the current directory are
>     supported as well
> @@ -121,4 +124,12 @@ dwc3@...30000 {
>  	interrupts = <0 92 4>
>  	usb-phy = <&usb2_phy>, <&usb3,phy>;
>  	snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
> +	usb_con: gpio_usb_connector {
> +		compatible = "gpio-usb-b-connector";
> +		id-gpio = <&tlmm 116 GPIO_ACTIVE_HIGH>;
> +		vbus-gpio = <&pms405_gpios 12 GPIO_ACTIVE_HIGH>;

*-gpios is the preferred form and should be what's documented.

> +		vbus-supply = <&usb3_vbus_reg>;
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&usb3_id_pin>, <&usb3_vbus_pin>;
> +	};
>  };
> -- 
> 2.25.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ