Hi! > First of all, thank you for the review. You are welcome :-). > > > I also backported some fixes where I have found them. > > > > > > Tested on Si-Linux EK874 (with RZ/G2E SoC) that we have in house. > > > > Ok, so this does not look bad, but it affects other people's boards, too. I went > > through it and will have some questions/comments. > > > > Is someone else in -cip project using usb-otg? Are we reasonably sure this > > won't cause problems elsewhere? > > There are not many USB Type-C connectors, not even in upstream. For the common > area of the code (drivers/usb/roles/class.c) I see only two drivers that call > usb_role_switch_register(), Renesas's and x86 Intel xHCI driver. > > Does linux-cip support x86 platforms? Yes, we have several x86 configurations. But you may be right that Type-C is less common than I thought. cip-kernel-config/4.19.y-cip-rt/x86: siemens_i386-rt.config siemens_i386-rt.sources cip-kernel-config/4.19.y-cip/x86: plathome_obsvx2.config siemens_ipc227e.sources plathome_obsvx2.sources siemens_server_defconfig siemens_iot2000.config siemens_server.sources siemens_iot2000.sources toshiba_atom_baytrail_cip.config siemens_ipc227e_defconfig toshiba_atom_baytrail_cip.sources > I am actively trying to find what could go wrong with this implementation. Also, there > might be another way of doing this by attaching the graph connection to the port > controller device tree node and create a device connection between the two devices > (the role switch device and the port controller device). This might get rid of all the extra > additional patches in the general area of the code (no reference to fwnode), but might > introduce modifications into the port controller driver and into the role switch driver of > Renesas. I believe that general approach of the patches is okay. You should not need to do big changes. Best regards, Pavel -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany