Re: [PATCH v5 2/6] dt-bindings: usb: Add Qualcomm PMIC type C controller dt-binding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux