Skip to content

Draft: [DRIVERS] SoC RK3399: Add support for USB Type-C port in OTG mode and DisplayPort Alternate mode

Natalia Kovalenko requested to merge seco_5.10.110_c31_typec_dp into seco_5.10.110

This MR adds USB Type-C port support in OTG mode and DisplayPort alternate mode for RK3399 SoC, as an initial implementation that is already working but needs further testing and debugging.

in OTG mode - device: SBC-C31 was tested as Mass Storage Gadget. in Alternate Mode DisplayPort SBC-C31 was tested with self-powered display. Note: for DisplayPort: all drivers involved finish inserting at startup rather late, after the graphical.target, so you need to restart weston with the command systemctl restart weston.

Some changes are needed in seco-rk3399-c31.dtsi file that actually supports only USB host dr_mode.

  • in node &usbdrd_dwc3_0 change dr_mode = "host"; to dr_mode = "otg";

  • in &u2phy0 { add:

port {
	u2phy0_hs: endpoint {
		remote-endpoint = <&usbc_hs>;
	};
};
  • in fusb0: fusb30x@22 { .. connector { .. ports .. { add:
port@2 {
	reg = <2>;
	usbc_hs: endpoint {
		remote-endpoint = <&u2phy0_hs>;
	};
};

The port in the &u2phy0 node is needed to obtain via its remote endpoint the CC Logic Controller node (fusb302) and therefore to obtain its vbus regulator, without passing this regulator to the &u2phy0 node, thus maintaining only one consumer of regulator (only fusb302).

Merge request reports