On 2.05.2023 13:16, Bryan O'Donoghue wrote: > On 02/05/2023 12:13, Konrad Dybcio wrote: >> >> >> On 2.05.2023 13:03, Bryan O'Donoghue wrote: >>> On 02/05/2023 12:00, Konrad Dybcio wrote: >>>>> + #address-cells = <1>; >>>>> + #size-cells = <0>; >>>>> + >>>>> + port@0 { >>>>> + reg = <0>; >>>>> + pm8150b_role_switch_out: endpoint { >>>> Similarly to the QMPPHY, the port definition can be moved to >>>> the common node in the SoC DTSI >>> >>> But then the connector would have to be defined in the SoC dtsi and not all derivatives of SoC can be assumed to have a usb-c-connector. >> Not quite! >> >> You can define an empty endpoint (like we do with DSI<->panel ones) and >> fill it in on the device side. > > Sorry you're saying to define as an example the port here in the dtsi > > &usb_1_dwc3 { > dr_mode = "otg"; > usb-role-switch; === > port { > dwc3_role_switch_in: endpoint { > remote-endpoint = <&pm8150b_role_switch_out>; > }; > }; === this part (minus remote-endpoint) would go to SoC dtsi remote-endpoint would be assigned on a per-device basis > }; > > and to leave the reciprocal definition in the connector to the dts ? > > &pm8150b_typec { > ==== > connector { > compatible = "usb-c-connector"; > ports { > #address-cells = <1>; > #size-cells = <0>; > > port@0 { > reg = <0>; > pm8150b_role_switch_out: endpoint { > remote-endpoint = <&dwc3_role_switch_in>; > }; > }; ==== this part (minus remote-endpoint) would go to pm8150b.dtsi remote-endpoint would be assigned (or left empty) on a per-device basis Konrad >