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] [day] [month] [year] [list]
Message-ID: <bef7638a-3f1d-2c92-a7a0-c7a17d2f63c0@codeaurora.org>
Date:   Thu, 9 Jul 2020 20:08:45 -0700
From:   Wesley Cheng <wcheng@...eaurora.org>
To:     Rob Herring <robh@...nel.org>
Cc:     lgirdwood@...il.com, mark.rutland@....com, agross@...nel.org,
        broonie@...nel.org, heikki.krogerus@...ux.intel.com,
        gregkh@...uxfoundation.org, bjorn.andersson@...aro.org,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
        jackp@...eaurora.org, rdunlap@...radead.org,
        bryan.odonoghue@...aro.org
Subject: Re: [PATCH v5 2/6] dt-bindings: usb: Add Qualcomm PMIC type C
 controller dt-binding


On 7/9/2020 3:46 PM, Rob Herring wrote:
> 
> Why is all the connector schema duplicated here? You only need things 
> that are further constrained like 'compatible'.
> 

Hi Rob,

Most of the properties in this dt-binding are going to be constrained by
the definitions/values specified by usb-connector.  I can add individual
references to each property, such as compatible, power-role, data-role
and ports, if that is the recommended approach.

> 
> 'remote-endpoint' in not an array.
> 

Agreed, I have removed the maxItems parameter.

> 
> So USB-SS data can come from 'type C mux' or 'role switch node'? That 
> seems odd.
> 

This was one of the interpretations, which might work with the current
usb-connector model.  From the previous block diagram I shared, we can
see that the SS path has two potential "endpoints," one to the mux and
another to the USB controller on the SOC.

Another design consideration is when the device supports the "Audio
Adapter Accessory Mode."  The audio accessory is mentioned in the type C
spec as an adapter which will utilize the USB D+/- lines for audio
output.  So now, you could potentially have something like below:

				   _______		 _______
                            ______|FUSB302|		|SOC	|
			   |	  |Type C |		|	|
			   |      |Cntrl  |__I2C_______	|	|
			   |	  |_______|		|	|
 ___                       |       			|	|
|   |______ CC1/2 _________|				|	|
|   |				   _______		|	|
|   |			     ____*|Charger|		|	|
|   |			    |	  |HW     |		|	|
|   |			    |     |_______|		|	|
|   |			    |	   ________      	|	|
|   |______ HS DP/DM _______|____*|MAX20328|_HS D+/D-__	|	|
|   |				  |________|__Audio Out_|	|
|   |				   ________		|	|
|   |______ SS RX/TX1 __________**|FUSB304 |_SS RX/TX**_|	|
|   |______ SS RX/TX2 ____________|USB Mux |		|_______|
|   |                             |________|
|   |
|___|

With this kind of device, it would make sense to have multiple endpoints
per path, which can be represented like the following:

connector {
        compatible = "usb-c-connector";
	...
        ports {
        	port@0 {
			...
			//Charger endpoint*
			usb_con_hs_chg: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&max77865_usbc_hs>;
			};
			//Audio accessory adapter mux*
			usb_con_hs_audio: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&analog_audio>;
			};
                };
		port@1 {
			...
			//USB3 lane mux**
			usb3_data_ss: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&qmp_ss_mux>;
			};
			//USB3 SOC controller**
			usb3_role: endpoint@1 {
				reg = <1>;
				remote-endpoint = <&dwc3_drd_switch>;
			};
		};
	};
};

Thanks
Wesley Cheng

-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ