Dragonboard 410c usb mode


We are running latest android with “release/android/qcomlt-4.14” kernel mentioned in the following link on dragonboard 410c?

Dynamic switch of USB OTG between Host and Device mode is not happening during run-time. It is either running only in Host mode or Device mode according to the configurations in dts files in kernel i.e


usb_sw_sel_pm: usb_sw_sel_pm {
	pinconf {
		pins = "gpio4";
		power-source = <PM8916_GPIO_VPH>;
		output-high; // high for Host mode, low for Device mode


	usb@78d9000 {
		extcon = <&usb_id>;
		status = "okay";
		dr_mode = "host"; // host for Host, otg for OTG, peripheral for Device
		pinctrl-names = "default";
		pinctrl-0 = <&usb_sw_sel_pm>;
		ulpi {
			phy {
				v1p8-supply = <&pm8916_l7>;
				v3p3-supply = <&pm8916_l13>;
				extcon = <&usb_id>;

Before running latest version of android we ran pre-builts (i.e following link) in which dynamic switch is happening automatically during run-time.

According to hardware user manual (i.e following link), usb mode is software controlled by using USB_SW_SEL_PM (i.e PMIC GPIO_4) pin. According to dts files no driver is controlling that pin except pin configuration.

What things should be done so that we can switch between Device mode and Host mode during run-time?


You can try to apply the top patches of this branch:
starting at usb: chipidea: Add dynamic pinctrl selection

Let me know…


It is working after applying the patches